dwm_cfg_get
Gets the current configuration options of the node.
-
void dwm_cfg_get(dwm_cfg_t *cfg);
- Parameters
output: – Status code, mode, initiator, bridge, low_power_en, meas_mode, loc_engine_en, led_en, ble_en, uwb_mode, fw_update_en, enc_en,
Note
Available only when the firmware is compiled with UWB routing backhaul: uwb_bh_routing
C code example
dwm_cfg_t cfg;
dwm_cfg_get(&cfg);
printf(“mode %u \n”, cfg.mode);
printf(“initiator %u \n”, cfg.initiator);
printf(“bridge %u \n”, cfg.bridge);
/*[Available only when the firmware is compiled with UWB routing backhaul:* **printf(“UWB mode %u \n”, cfg.uwb_bh_routing); */
printf(“motion detection enabled %u \n”, cfg.stnry_en);
printf(“measurement mode %u \n”, cfg.meas_mode);
printf(“low-power enabled %u \n”, cfg.low_power_en);
printf(“internal location engine enabled %u \n”, cfg.loc_engine_en);
printf(“encryption enabled %u \n”, cfg.common.enc_en);
printf(“LED enabled %u \n”, cfg.common.led_en);
printf(“BLE enabled %u \n”, cfg.common.ble_en);
printf(“firmware update enabled %u \n”, cfg.common.fw_update_en);
printf(“UWB mode %u \n”, cfg.common.uwb_mode);
SPI/UART example
TLV Request |
|
---|---|
Type |
Length |
0x08 |
0x00 |
Type 0x08 means command dwm_cfg_get
TLV Response |
|||||
---|---|---|---|---|---|
Type |
Length |
Value (see error codes) |
Type |
length |
value |
0x40 |
0x01 |
0x00 |
0x46 |
0x02 |
(BYTE 1) Available only when the firmware is compiled with UWB routing backhaul: (bits 6-7) uwb_bh_routing : 0 - OFF, 1 - ON, 2 - AUTO (bit 5) mode : 0 - tag, 1 - anchor (bit 4) initiator (bit 3) bridge (bit 2) stnry_en (bits 0-1) meas_mode : 0 - TWR, 1-3 not supported (BYTE 0) (bit 7) low_power_en (bit 6) loc_engine_en (bit 5) enc_en (bit 4) led_en (bit 3) ble_en (bit 2) fw_update_en (bits 0-1) uwb_mode |
0x1C 0x20 (anchor, leds, ble, fwup, uwb mode off) |