dwm_baddr_get
Gets BLE address currently used by the device.
-
void dwm_baddr_get(dwm_baddr_t *baddr)
- Parameters
output – Status code, ble_addr
C code example
dwm_baddr_t baddr;
int i;
if (DWM_OK == dwm_baddr_get(&baddr)) {
printf("addr=");
for (i: DWM_BLE_ADDR_LEN - 1; i >= 0; --i) {
printf("%02x%s", baddr.byte[i], (i > 0) ? ":" : "");
}
printf("\n");
} else {
printf("FAILED");
}
SPI/UART example
TLV Request |
|
---|---|
Type |
Length |
0x10 |
0x00 |
Type 0x10 means command dwm_baddr_get
TLV Response |
|||||
---|---|---|---|---|---|
Type |
Length |
Value (see error codes) |
Type |
Length |
value |
0x40 |
0x01 |
0x00 |
0x5F |
0x06 |
6 bytes in little endian |
0x01 0x02 0x03 0x04 0x05 0x06 |
Type 0x40 means err_code of the previous command
Type 0x5F means BLE address