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

ParameterDescription
id_addr_typeThe type of identity address to retrieve. Valid values are: BLE_ADDR_PUBLIC BLE_ADDR_RANDOM
out_id_addrOn success, the requested identity address is copied into this buffer. The buffer must be at least six bytes in size.
out_is_nrpaOn success, the pointed-to value indicates whether the retrieved address is a non-resolvable private address.

Returned values

ValueCondition
0Success.
BLE_HS_EINVALAn invalid address type was specified.
BLE_HS_ENOADDRThe device does not have an identity address of the requested type.
otherOther ble host core code on error.