VAR-SOM-MX6 Eth IEEE.1588: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|IEE1588 Hardware Timestamp}} {{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}Category: DART-6ULCategory: VAR-SOM-MX7 __toc__ = Overview of IEE1588 Hard...")
 
Line 2: Line 2:


= Overview of IEE1588 Hardware Timestamping =
= Overview of IEE1588 Hardware Timestamping =
 
* Allows reference clock to be chosen independently of network speed.
Use '''btmgmt''' tool to find BLE devices and detect their MAC address type (random vs public).
* Software-programmable precise time-stamping of ingress and egress frames
 
* Timer monitoring capabilities for system calibration and timing accuracy management
<pre>
* Precise time-stamping of external events with programmable interrupt generation
root@var-som-mx6:~# btmgmt find -l
* Programmable event and interrupt generation for external system control
Discovery started
* Supports hardware- and software-controllable timer synchronization.
hci0 type 7 discovering on
* Provides a 4-channel IEEE 1588 timer. Each channel supports input capture and
hci0 dev_found: 74:B9:AB:CF:13:A9 type LE Random rssi -90 flags 0x0000
output compare using the 1588 counter.
AD flags 0x1a
name Galaxy S5
hci0 type 7 discovering off
</pre>
 
In this example a single BLE device was detected, having MAC address 74:B9:AB:CF:13:A9 and random MAC address type


= Connecting to BLE devices =
= Connecting to BLE devices =

Revision as of 05:33, 15 November 2018

IEE1588 Hardware Timestamp

Overview of IEE1588 Hardware Timestamping

  • Allows reference clock to be chosen independently of network speed.
  • Software-programmable precise time-stamping of ingress and egress frames
  • Timer monitoring capabilities for system calibration and timing accuracy management
  • Precise time-stamping of external events with programmable interrupt generation
  • Programmable event and interrupt generation for external system control
  • Supports hardware- and software-controllable timer synchronization.
  • Provides a 4-channel IEEE 1588 timer. Each channel supports input capture and

output compare using the 1588 counter.

Connecting to BLE devices

Use gatttool to connect to BLE devices. Pass "-t random" parameter if scan has reported a random MAC address.

root@var-som-mx6:~# gatttool -t random -b 74:B9:AB:CF:13:A9 -I
[74:B9:AB:CF:13:A9][LE]> connect
Attempting to connect to 74:B9:AB:CF:13:A9
[74:B9:AB:CF:13:A9][LE]>
Connection successful
Indication handle = 0x0003 value: 01 00 ff ff
[74:B9:AB:CF:13:A9][LE]>

Accessing BLE devices

After successful connection BLE device characteristics can be accessed via gatttool. Continuing the example above:

[74:B9:AB:CF:13:A9][LE]> characteristics 
handle: 0x0002, char properties: 0x20, char value handle: 0x0003, uuid: 00002a05-0000-1000-8000-00805f9b34fb
handle: 0x0015, char properties: 0x02, char value handle: 0x0016, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0017, char properties: 0x02, char value handle: 0x0018, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0019, char properties: 0x02, char value handle: 0x001a, uuid: 00002aa6-0000-1000-8000-00805f9b34fb
handle: 0x0029, char properties: 0x12, char value handle: 0x002a, uuid: 00002a19-0000-1000-8000-00805f9b34fb
[74:B9:AB:CF:13:A9][LE]> char-read-hnd 0x0002
Characteristic value/descriptor: 20 03 00 05 2a 
[74:B9:AB:CF:13:A9][LE]> char-read-hnd 0x0015
Characteristic value/descriptor: 02 16 00 00 2a 
[74:B9:AB:CF:13:A9][LE]> char-read-hnd 0x0017
Characteristic value/descriptor: 02 18 00 01 2a 
[74:B9:AB:CF:13:A9][LE]> char-read-hnd 0x0019
Characteristic value/descriptor: 02 1a 00 a6 2a 
[74:B9:AB:CF:13:A9][LE]> char-read-hnd 0x0029
Characteristic value/descriptor: 12 2a 00 19 2a 

Receiving notifications from BLE devices

Notifications sent from connected BLE devices can be seen in gatttool. The example below shows notification sent by Android "BLE Peripheral Simulator"

[74:B9:AB:CF:13:A9][LE]>
Notification handle = 0x002a value: 08 3c 00 00
[74:B9:AB:CF:13:A9][LE]>