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.
The type of identity address to retrieve. Valid values are: o BLE_ADDR_PUBLIC o 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. Pass NULL if you do not require this information.
out_is_nrpa
On success, the pointed-to value indicates whether the retrieved address is a non-resolvable private address. Pass NULL if you do not require this information.
Return value
0 on success; BLE_HS_EINVAL if an invalid address type was specified; BLE_HS_ENOADDR if the device does not have an identity address of the requested type; Other BLE host core code on error.
Examples
ble_hs_id_copy_addr() is referenced by 21 libraries and example projects: