# UART API
You can interact directly with the hardware via the UART bus.
# General
COMMAND
PARAMS
TYPE
BYTES
EXAMPLE
DESCRIPTION
PROPERTIES
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)
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)
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)
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
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)
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)
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
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
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)
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)
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)
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)
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