Our website is under construction. Please stay tuned!

dwm_status_get

Gets the system status. Flags are:

  • Location data ready

  • Node joined the UWB network

  • New backhaul data ready

  • Backhaul status has changed

  • Backhaul route is

  • initialized

  • UWB scan result is ready

  • User data over UWB received

  • User data over UWB sent

  • Firmware update in progress

All flags are cleared after the call.

int dwm_status_get(dwm_status_t*)
Parameters
  • input – (none)

  • output – err_code, status

  • status – loc_ready, uwbmac_joined, bh_data_ready, bh_initialized, bh_status_changed, uwb_scan_ready, usr_data_ready

  • loc_ready – ‘0’ | ‘1’ (new location data are ready)

  • uwbmac_joined – ‘0’ | ‘1’ (node is connected to UWB network)

  • bh_data_ready – ‘0’ | ‘1’ (UWB MAC backhaul data ready)

  • bh_status_changed – ‘0’ | ‘1’ (UWB MAC status has changed, used in backhaul)

  • bh_initialized – ‘0’ | ‘1’ (node has initialized route via UWB backhaul)

  • uwb_scan_ready – ‘0’ | ‘1’ (UWB scan results are ready)

  • usr_data_ready – ‘0’ | ‘1’ (User data over UWB received)

  • usr_data_sent – ‘0’ | ‘1’ (User data over UWB sent)

  • fwup_in_progress – ‘0’ | ‘1’ (Firmware update is in progress)

C code example

dwm_status_t status;
int rv;
rv = dwm_status_get(&status);
if (rv == DWM_OK) {
    printf("loc_data: %d\n", status.loc_dat1);
    printf("uwbmac_joined: %d\n", status.uwbmac_joined);
    printf("bh_data_ready: %d\n", status.bh_data_ready);
    printf("bh_status_changed: %d\n", status.bh_status_changed);
    printf("bh_initialized: %d\n", status.bh_initialized);
    printf("uwb_scan_ready: %d\n", status.uwb_scan_ready);
    printf("usr_data_ready: %d\n", status.usr_data_ready);
    printf("usr_data_sent: %d\n", status.usr_data_sent);
    printf("fwup_in_progress: %d\n", status.fwup_in_progress);
}
else {
    printf("error\n");
}

SPI/UART example

TLV request

type

length

0x32

0x00

Type 0x32 means command dwm_status_get

TLV response

type

length

Value (see error codes)

type

length

value

0x40

0x01

0x00

0x5A

0x02

loc_ready (bit 0) uwbmac_joined (bit 1) bh_status_changed (bit 2) bh_data_ready (bit 3) bh_initialized (bit 4) uwb_scan_ready (bit 5) usr_data_ready(bit 6) usr_data_sent(bit 7) fwup_in_progress(bit 8) reserved (bits 9-15)

0x01 0x00

Type 0x5A means status
Type 0x40 means err_code of the previous command