leaps_usr_data_write
Write custom user data to non volatile memory or send the data over UWB or BLE interface. To receive notifications on new user data or to read user data refer to leaps_usr_data_read.
data
type: ? 2 bits ? (user data type, ‘0’ means write user data to the UWB interface, ‘1’ means write user data to the BLE interface, ‘2’ means write user data to non volatile memory)
flags: overwrite
overwrite: ? 1 bit ?
‘0’ means do not overwrite
‘1’ means overwrite data currently being sent
‘Busy’ - Previous data are not yet sent, try again or send with overwrite flag set to 1.
‘Invalid parameter’ - Size of the user data is too high or the type of the usr data is unknown.
‘Internal error’ - Unexpected internal error.
BLE
‘Not permitted’ - No active connection on the BLE interface.
Example (write UWB user data)
TLV Request |
|||
---|---|---|---|
Type |
Length |
Value |
|
flags
(bits 0-1) type
(bit 2) overwrite
(bits 3-7) reserved
|
UWB, BLE user data - max 26 bytes non-volatile memory user data - max 250 bytes |
||
0x1A |
0x23 |
0x00 |
0x01 0x02 0x03 …. 0x23 0x22 |
Type 0x1A (26 dec) means command leaps_usr_data_write
TLV response |
||
---|---|---|
Type |
Length |
Value |
0x40 |
0x01 |
0x00 |
Type 0x40 means Status Code of the command
Example (overwrite BLE user data)
TLV Request |
|||
---|---|---|---|
Type |
Length |
Value |
|
flags
(bits 0-1) type
(bit 2) overwrite
(bits 3-7) reserved
|
BLE user data max 34 bytes |
||
0x1A |
0x23 |
0x05 |
0x01 0x02 0x03 …. 0x23 0x22 |
Type 0x1A (26 dec) means command leaps_usr_data_write
TLV response |
||
---|---|---|
Type |
Length |
Value |
0x40 |
0x01 |
0x00 |
Type 0x40 means Status Code of the command
Example (write user data to non volatile memory)
TLV Request |
|||
---|---|---|---|
Type |
Length |
Value |
|
flags
(bits 0-1) type
(bit 2) overwrite
(bits 3-7) reserved
|
BLE user data max 34 bytes |
||
0x1A |
0x23 |
0x02 |
0x01 0x02 0x03 …. 0xFA |
Type 0x1A (26 dec) means command leaps_usr_data_write
TLV response |
||
---|---|---|
Type |
Length |
Value |
0x40 |
0x01 |
0x00 |
Type 0x40 means Status Code of the command