Developer documentation

BLE API

GATT services on tags and anchors — device information, live distances and positions, autopositioning and operating mode, largely following Decawave's PANS spec.

1. Overview

Our BLE implementation largely follows Decawave's BLE spec (“PANS”). It allows for device information, receiving distances and positions, performing autopositioning, and more.

Service ID: 680c21d9-c946-4c1f-9c11-baa1c21329e7

The characteristics below are transcribed from the specification table dated 5 October 2019. The original is kept alongside this page as ble-gatt.png, and the full specification is available as a PDF.

2. Characteristics

Sensor Mode RW

0cd7e9d1-638a-4961-8b46-ae55020161a8

ValueLengthFlags
uint8 mode;1 byteRW
mode
ValueMeaning
0None
1IMU
2Raw Accel, Gyro & Magneto

Sensor Data R (notify)

bd097d0e-5978-49ee-8c82-4d0b861eae75

ValueLengthFlags
uint8 mode; payload (depends on mode)belowR (notify)
payload by mode
ModePayloadLength
1 — IMUfloat q0, q1, q2, q3;16 bytes
2 — raw AGMuint32 timestamp; uint16 scale; int16 ax, ay, az;
uint32 timestamp; uint16 scale; int16 gx, gy, gz;
uint32 timestamp; uint16 scale; int16 mx, my, mz;
36 bytes

Device Info RO

0eb2bc59-baf1-4c1c-8535-8a0204c69de5

ValueLengthFlags
uint64 uid; uint32 hw_ver; uint32 fwloader_ver; uint32 fw_ver; uint32 fwloader_crc; uint32 fw_crc; uint8 flag; uint16 project31 bytesRO

Statistics RO

0eb2bc59-baf1-4c1c-8535-8a0204c69de5

ValueLengthFlags
uint8 version; uint32 uptime; to be expanded5 bytes max (currently)RO

Location Data Mode RW

bd097d0e-5978-49ee-8c82-4d0b861eae75

ValueLengthFlags
uint8 mode;1 byteRW
mode
ValueMeaning
0positions (tags)
1distances (tags to anchors)
2distances + positions
11distances (anchors to anchors)

Location Data R (notify)

003bbdf2-c634-4b3d-ab56-7ec889b89a37

ValueLengthFlags
uint8 mode; payload (depends on mode)belowR (notify)
payload by mode
ModePayloadLengthNote
0 — Positionsuint8 mode; uint8 version; uint8 count;
count x [uint16 ID, float pos_x, pos_y, pos_z, uint8 quality_factor]
3 + count x 15TAG ONLY
1 — Distancesuint8 mode; uint8 version; uint8 count;
count x [uint16 ID, uint16_t dist [cm]]
3 + count x 4TAG ONLY
2 — Position + Distancesuint8 mode; uint8 version; uint16 ID, float pos_x, pos_y, pos_z, uint8 quality_factor; uint8 count;
count x [uint16 ID, uint16_t dist [cm]]
18 + count x 4
11 — A2A distancesuint8 mode; uint8 anchors_done; uint8 anchors_total; uint8 count;
uint16 reporter_node; uint8 dist_cnt;
dist_count x [uint16 ID; uint16 dist]
7 + (dist_cnt x 4)ANCHOR ONLY

Get/Set Anchor Position RW

4f6d4b3c-3322-420f-accb-f34579b85d15

ValueLengthFlags
uint8 count; uint8 qf;
count x [ uint16 ID, int32 pos_x, pos_y, pos_z]
1 + (cnt x 14) bytesRW

Operation Mode RW

3f0afd88-7770-46b0-b5e7-9fc099598964

ValueLengthFlags
uint8 byte1; uint8 byte22 bytesRW
bit flags
Bitbyte 1byte 2
bit0reservedreserved
bit1reservedreserved
bit20 = led off
1 = led on
reserved
bit30 = accel off
1 = accel on
1 = new config (autoresets to 0)
bit4reserved1 = start autopos (autoresets to 0)
bit5reserved0 = loc engine off
1 = loc engine on
bit6reserved0 = low power off
1 = low power on
bit70 = tag
1 = anchor
0 = initiator off
1 = initiator on

Specification table last updated 5 October 2019.