dwm_dev_info_get
Gets the firmware ID, firmware version, configuration version, and hardware version of the module. Firmware ID has a default value 1 on the gateway and a default value 2 on DWM1001. Firmware with ID 0 on the gateway and firmware with ID 1 on the DWM1001 are used as possible backups. The backup firmware is used during firmware updates .
-
void dwm_dev_info_get(dwm_dev_info_t *info);
- Parameters
output – Status code, fw_id, fw_bckp_version, fw_version, fw_bckp_cksum, fw_cksum, cfg_version, hw_version
fw_id – 32-bits integer ? (ID of a firmware that is currently active)
fw_bckp_version – 32-bits integer ? (maj, min, patch, res, var)
fw_version – 32-bits integer ? (maj, min, patch, res, var)
fw_bckp_cksum – 32-bits integer ?
fw_cksum – 32-bits integer ?
cfg_version – 32-bits integer ?
hw_version – 32-bits integer ?
C code example
dwm_dev_info_t info;
dwm_dev_info_get(&info);
printf(“FW ID=%d\n”, info.fw_id);
printf(“FW version: maj(%d) min(%d) patch(%d) res(%d) var(%d)\n”, info.fw_ver[1].maj, info.fw_ver[1].min, info.fw_ver[1].patch, info.fw_ver[1].res, info .fw_ver[1].var);
printf(“CFG version: x%08x\n”, info.cfg_ver);
printf(“HW version: x%08x\n”, info.hw_ver);
SPI/UART example
TLV Request |
|
---|---|
Type |
Length |
0x15 |
0x00 |
Type 0x15 means command dwm_dev_info_get
TLV Response |
|||||
---|---|---|---|---|---|
Type |
Length |
Value (see error codes) |
Type |
Length |
Value |
0x40 |
0x01 |
0x00 |
0x50 |
0x1C |
device in formation |
0x01 0x00 0x00 0x00 0x01 0x01 0x03 0x01 0x01 0x01 0x03 0x01 0xd2 0x81 0x9d 0x59 0x9b 0x52 0x90 0x81 0x00 0x07 0x01 0x00 0x02 0x11 0x01 0x00 |
device information TLV encoding |
||||
---|---|---|---|---|
fw_id |
fw_bckp_version fw_version |
fw_bckp_cksum fw_cksum |
cfg_version |
hw |
bytes 0-3 |
bytes 4-7 bytes 8-11 |
bytes 12-15 bytes 16-19 |
bytes 20-23 |
bytes 24-27 |
fw0_version and fw1_version TLV encoding |
||||
---|---|---|---|---|
maj |
min |
patch |
res |
var |
bits 24 - 31 |
bits 16 - 23 |
bits 8 - 15 |
bits 4 - 7 |
bits 0 - 3 |