1. General
You can interact directly with the hardware via the UART bus.
Messages use the same framing as the
binary data API — a '##' preamble, a
length, a command and a version — but the command is a numeric id rather
than a letter.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 216 | Length of the complete message |
| cmd | char | 1 | 24 | Command type — selects the payload layout below |
| version | uint8 | 1 | 3 | Command protocol version |
2. Commands
The (GET) commands are sent to the device; the rest are received from it.
PROPERTIES
RX
cmd 24
Full device properties: uptime, antenna delays, firmware and config versions, UID.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 216 | Length of the complete message |
| cmd | char | 1 | 24 | |
| version | uint8 | 1 | 3 | command protocol version |
| runmode | byte | 1 | 3 | obsolete |
| length | uint16 | 2 | 48 | length of this message (incl cmd & len) |
| uptime | uint32 | 4 | 100 | uptime of device (in seconds) |
| antenna delay (RX) | uint16 | 2 | 16500 | antenna delay (RX) of the device |
| antenna delay (TX) | uint16 | 2 | 16500 | antenna delay (TX) of the device |
| reset type | uint8 | 1 | 1 | reset type of the device |
| hw version | uint8 | 1 | 1 | Hardware version |
| obsolete | uint32 | 4 | 0 | obsolete |
| FW version | uint16 | 2 | 30404 | Firmware version |
| FW CRC | uint16 | 2 | 0x1234 | Firmware CRC |
| Config version | uint16 | 2 | 1 | Configuration version |
| Tagspeed version | uint16 | 2 | 1 | Tagspeed version |
| Firmware version (sub) | uint8 | 1 | 1 | Subversion number |
| obsolete | uint48 | 6 | 0 | obsolete |
| uid | uint64 | 8 | 0xAA..01 | Unique ID |
| obsolete | uint8 * 21 | 21 | 0 | obsolete |
PROPERTIES (GET)
TX
cmd 36
Request the properties block.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 6 | Length of the complete message |
| cmd | char | 1 | 36 | |
| version | uint8 | 1 | 3 | command protocol version |
TX POWER (GET)
TX
cmd 44
Request the current TX power.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 6 | Length of the complete message |
| cmd | char | 1 | 44 | |
| version | uint8 | 1 | 3 | command protocol version |
TX Power (SET)
SET
cmd 45
Set TX power amplification, 0..33 dB.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 7 | Length of the complete message |
| cmd | char | 1 | 45 | |
| version | uint8 | 1 | 3 | command protocol version |
| tx power (SET) | uint8 | 1 | 33 | TX Power amplification in dB (0..33 dB) |
TX Power
RX
cmd 46
Reported TX power.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 7 | Length of the complete message |
| cmd | char | 1 | 46 | |
| version | uint8 | 1 | 3 | command protocol version |
| tx power | uint8 | 1 | 33 | TX Power amplification in dB (0..33 dB) |
HAIRS (GET)
TX
cmd 47
Request the current hairs configuration.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 6 | Length of the complete message |
| cmd | char | 1 | 47 | |
| version | uint8 | 1 | 3 | command protocol version |
HAIRS (SET)
SET
cmd 48
Set the hairs configuration.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 10 | Length of the complete message |
| cmd | char | 1 | 48 | |
| version | uint8 | 1 | 3 | command protocol version |
| enable | uint8 | 1 | 0 | enable hairs <\br> > 0 = disable <\br> > 1 = enable |
| save | uint8 | 1 | 0 | Save parameter to permanent storage (0 = no, 1 = save) |
| size | uint8 | 1 | 0 | Small hairs = 128b Big hairs = 512b (0 = small,1 = big) |
| continuous enable | uint8 | 1 | 1 | Continuously transmit the hairs, instead of on request (0 = disable, 1 = enable) |
HAIRS
RX
cmd 48
Reported hairs configuration.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 10 | Length of the complete message |
| cmd | char | 1 | 48 | |
| version | uint8 | 1 | 3 | command protocol version |
| enable | uint8 | 1 | 0 | enable hairs (0 = disable, 1 = enable) |
| save | uint8 | 1 | 0 | Save parameter to permanent storage (0 = no, 1 = save) |
| size | uint8 | 1 | 0 | Small hairs = 128b Big hairs = 512b (0 = small,1 = big) |
| continuous enable | uint8 | 1 | 1 | Continuously transmit the hairs, instead of on request (0 = disable, 1 = enable) |
DISTANCES
RX
cmd 2
Measured distances to the nodes in range.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 11 + nb_distances * 6 | Length of the complete message |
| cmd | char | 1 | 2 | |
| version | uint8 | 1 | 3 | command protocol version |
| nb distances | uint8 | 1 | 5 | amount of distance reports that will follow |
| frame | uint32 | 4 | 12345 | Current frame of the system |
| repeat nb_distances times |
| id | uint16 | 2 | 101 | device id - 1..65536 |
| distance | uint16 | 2 | 167 | distance to this device (in cm) |
| RSSI1 | uint8 | 1 | 43 | RSSI1 - Tag to Anchor(in dB) |
| RSSI2 | uint8 | 1 | 44 | RSSI2 - Anchor to Tag (in dB) |
STREAM (START)
TX
cmd 5
Start streaming.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 6 | Length of the complete message |
| cmd | char | 1 | 5 | |
| version | uint8 | 1 | 3 | command protocol version |
STREAM (STOP)
TX
cmd 6
Stop streaming.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 6 | Length of the complete message |
| cmd | char | 1 | 6 | Command identifier for STREAM (STOP) |
| version | uint8 | 1 | 3 | Command protocol version |
STREAM (GET)
TX
cmd 50
Request the stream status.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| length | uint16 | 2 | 6 | Length of the complete message |
| cmd | char | 1 | 50 | Command identifier for STREAM (GET) |
| version | uint8 | 1 | 3 | Command protocol version |
STREAM (STATUS)
RX
cmd 51
Reported stream status.
| Field | Type | Bytes | Example | Description |
| preamble | uint16 | 2 | '##' | Preamble bytes (2x '#') |
| cmd | char | 1 | 51 | Command identifier for STREAM (STATUS) |
| version | uint8 | 1 | 3 | Command protocol version |
| length | uint16 | 2 | 7 | Length of the complete message |
| status | uint8 | 1 | 0 | 0 = streaming not active, 1 = streaming active |
Transcribed from the RTLOC documentation archive.