ble_hs_id_copy_addr
int
ble_hs_id_copy_addr(
uint8_t id_addr_type,
uint8_t *out_id_addr,
int *out_is_nrpa
)
Description
Retrieves one of the device's identity addresses. The device can have two identity addresses: one public and one random. The id_addr_type argument specifies which of these two addresses to retrieve.
Parameters
Parameter | Description |
---|
id_addr_type | The type of identity address to retrieve. Valid values are: BLE_ADDR_PUBLIC BLE_ADDR_RANDOM |
out_id_addr | On success, the requested identity address is copied into this buffer. The buffer must be at least six bytes in size. |
out_is_nrpa | On success, the pointed-to value indicates whether the retrieved address is a non-resolvable private address. |
Returned values
Value | Condition |
---|
0 | Success. |
BLE_HS_EINVAL | An invalid address type was specified. |
BLE_HS_ENOADDR | The device does not have an identity address of the requested type. |
other | Other ble host core code on error. |