The host and device (nRF52) communicate with each other via UART using the following message format:
Note 1: LEN field determines the length of the payload (CMD field is not included in LEN).
Thus, the message with LEN=0 contains only the CMD byte and no Payload.
Note 2: CRC16 is calculated for Header (LEN and CMD) and Payload.
CRC is CRC-16-CCITT-FALSE, Polynomial Formula: x16+x12+x5+1, Polynomial: 1021
Enable/disable BLE tags filter
Manufacturer ID to be filtered (uint16)
Enable/disable BLE coded PHY
RE_CA_UART_SET_SCAN_1MB_PHY
Enable/disable BLE scan PHY
RE_CA_UART_SET_EXT_PAYLOAD
Enable/disable BLE extended payload
Enable/disable BLE channel 37
Enable/disable BLE channel 38
Enable/disable BLE channel 39
Turn on the LED for the specified time interval in milliseconds (uint16)
Manufacturer ID to be filtered:
0...65535
Bit-mask (uint8) for all state flags:
- bit 0: Filter tags
- bit 1: BLE coded PHY
- bit 2: BLE scan PHY
- bit 3: BLE extended payload
- bit 4: BLE chan 37
- bit 5: BLE chan 38
- bit 6: BLE chan 39
Command to which the ACK responds:
0x05...0x0C, 0x0F
Ack state:
0 - OK
1 - Error
Example: Set the state of channel 37
Command RE_CA_UART_SET_CH_37:
Complete message: CA 02 0A 01 2C B6 78 0A
Ack RE_CA_UART_ACK:
Complete message: CA 04 20 0A 2C 00 2C E7 7E 0A
Example: Set all configuration
Command RE_CA_UART_SET_ALL:
STX
LEN
CMD
Filter ID
DELIMITER
State bit-mask
DELIMITER
CRC16
ETX
Complete message: CA 05 0F 99 04 2C 7D 2C 21 61 0A
Ack RE_CA_UART_ACK:
STX
LEN
CMD
Command
DELIMITER
Ack
DELIMITER
CRC16
ETX
Complete message: CA 04 20 0F 2C 00 2C A2 C2 0A
Request message
Response message
Response
CMD
Param 1
Param 2
Example: Request DEVICE_ID
Command :
Complete request message: CA 00 18 36 8E 0A
Response:
STX
LEN
CMD
Device ID
DELIMITER
MAC Addr
DELIMITER
CRC16
ETX
Complete response message: CA 10 11 40 98 A7 78 58 1A E1 38 2C C8 25 2D 8E 9C 2C 2C 7F 67 0A
REPORT sequence
Report
CMD
Param 1
Param 2
Param 3
Advertisement:
Variable length (MAX 31 Bytes)
Note: The length of the Advertisement is determined by the LEN field in the Header.
Adv_Len := LEN - 10
Example of report
STX
LEN
CMD
MAC Addr
DELIMITER
Adv
DELIMITER
RSSI
DELIMITER
CRC16
ETX
02 01 06 1B FF 99 04 05 14 64 47 25 C4 41 00 34 00 00 04 1C A9 36 11 01 58 C6 A5 B9 E0 AD 06
Complete report message: CA 29 10 C6 A5 B9 E0 AD 06 2C 02 01 06 1B FF 99 04 05 14 64 47 25 C4 41 00 34 00 00 04 1C A9 36 11 01 58 C6 A5 B9 E0 AD 06 2C D9 2C 11 08 0A
CONFIGURATION REQUEST sequence
CFG Request message
Example: Configuration request on the device side
Complete configuration request message: CA 00 19 17 9E 0A