S145 SoftDevice for nRF54LS05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gap_adv_addr_get()

uint32_t sd_ble_gap_adv_addr_get ( uint8_t adv_handle,
ble_gap_addr_t * p_addr )

#include <ble_gap.h>

Get the Bluetooth device address used by the advertiser.

Note
This function will return the local Bluetooth address used in advertising PDUs. When using privacy, the SoftDevice will generate a new private address every ble_gap_privacy_params_t::private_addr_cycle_s configured using sd_ble_gap_privacy_set. Hence depending on when the application calls this API, the address returned may not be the latest address that is used in the advertising PDUs.
Parameters
[in]adv_handleThe advertising handle to get the address from.
[out]p_addrPointer to address structure to be filled in.
Return values
NRF_SUCCESSAddress successfully retrieved.
NRF_ERROR_INVALID_ADDRInvalid or NULL pointer supplied.
BLE_ERROR_INVALID_ADV_HANDLEThe provided advertising handle was not found.
NRF_ERROR_INVALID_STATEThe advertising set is currently not advertising.