nrf-softdevice-s113

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gap_addr_set(p_addr: *const ble_gap_addr_t) -> u32
Expand description

@brief Set the local Bluetooth identity address.

    The local Bluetooth identity address is the address that identifies this device to other peers.
    The address type must be either @ref BLE_GAP_ADDR_TYPE_PUBLIC or @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC.

@note The identity address cannot be changed while advertising.

@note This address will be distributed to the peer during bonding. If the address changes, the address stored in the peer device will not be valid and the ability to reconnect using the old address will be lost.

@note By default the SoftDevice will set an address of type @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC upon being enabled. The address is a random number populated during the IC manufacturing process and remains unchanged for the lifetime of each IC.

@mscs @mmsc{@ref BLE_GAP_ADV_MSC} @endmscs

@param[in] p_addr Pointer to address structure.

@retval ::NRF_SUCCESS Address successfully set. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address. @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. @retval ::NRF_ERROR_INVALID_STATE The identity address cannot be changed while advertising.