TLV API
The TLV (Type-Length-Value) format is used in the DWM module API. Data in TLV format always begins with the type byte, followed by the length byte, and then followed by a variable number of value bytes (ranging from 0 to 253), as specified by the length byte. Table 1 shows an example of TLV format data, where the type byte is 0x28, the length byte is 0x02, and, as declared by the length byte, the value field consists of two bytes: 0x0D and 0x01.
In the DWM1001 firmware, both the SPI and UART APIs use the TLV format for data transmission. Users should refer to the TLV type list to understand the meaning of type bytes. For each specific command or response, the value field has a different length to provide the corresponding information.
TLV format data example
TLV Request |
|||
---|---|---|---|
Type |
Length |
Value |
|
pin index |
pin value |
||
0x28 |
0x02 |
0x0D |
0x01 |
Detail information of each API, please read the following pages: