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

◆ sd_ble_gap_privacy_set()

uint32_t sd_ble_gap_privacy_set ( ble_gap_privacy_params_t const * p_privacy_params)

#include <ble_gap.h>

Set privacy settings.

Note
Privacy settings cannot be changed while advertising, scanning or creating a connection.
Parameters
[in]p_privacy_paramsPrivacy settings.
Relevant Message Sequence Charts
Private Scanning
Private Advertising
Directed Advertising
Return values
NRF_SUCCESSSet successfully.
NRF_ERROR_BUSYThe stack is busy, process pending events and retry.
BLE_ERROR_GAP_INVALID_BLE_ADDRInvalid address type is supplied.
NRF_ERROR_INVALID_ADDRThe pointer to privacy settings is NULL or invalid. Otherwise, the p_device_irk pointer in privacy parameter is an invalid pointer.
NRF_ERROR_INVALID_PARAMOut of range parameters are provided.
BLE_ERROR_GAP_ZERO_IRK_NOT_ALLOWEDBLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY is requested while an all zeroes IRK is in the device identity list.
NRF_ERROR_NOT_SUPPORTEDThe SoftDevice does not support privacy if the Central Address Resolution characteristic is not configured to be included and the SoftDevice is configured to support central roles. See ble_gap_cfg_car_incl_cfg_t and ble_gap_cfg_role_count_t.
NRF_ERROR_INVALID_STATEPrivacy settings cannot be changed while advertising, scanning or creating a connection.