nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ pm_privacy_set()

uint32_t pm_privacy_set ( const ble_gap_privacy_params_t * privacy_params)

#include <peer_manager.h>

Configure privacy settings.

The privacy settings cannot be configured while advertising, scanning, or while connected.

Note
The SoftDevice functions sd_ble_gap_addr_set and sd_ble_gap_privacy_set must not be called when using the Peer Manager. Use this function instead.
Parameters
[in]privacy_paramsPrivacy settings.
Return values
NRF_SUCCESSIf the privacy settings were configured successfully.
NRF_ERROR_NULLIf privacy_params is NULL.
NRF_ERROR_BUSYIf the operation could not be performed at this time. Process SoftDevice events and retry.
NRF_ERROR_INVALID_PARAMIf the address type is invalid.
NRF_ERROR_INVALID_STATEIf this function is called while Bluetooth LE roles using privacy are enabled.
NRF_ERROR_INVALID_STATEIf the Peer Manager is not initialized.