nrf-softdevice-s112

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gap_adv_addr_get(
adv_handle: u8,
p_addr: *mut ble_gap_addr_t
) -> u32
Expand description

@brief 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 @ref ble_gap_privacy_params_t::private_addr_cycle_s configured using @ref 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.

@param[in] adv_handle The advertising handle to get the address from. @param[out] p_addr Pointer to address structure to be filled in.

@retval ::NRF_SUCCESS Address successfully retrieved. @retval ::NRF_ERROR_INVALID_ADDR Invalid or NULL pointer supplied. @retval ::BLE_ERROR_INVALID_ADV_HANDLE The provided advertising handle was not found. @retval ::NRF_ERROR_INVALID_STATE The advertising set is currently not advertising.