ble_gap_set_priv_mode

int
ble_gap_set_priv_mode(
        const ble_addr_t *peer_addr,
                 uint8_t  priv_mode
)

Description

Set privacy mode for given device.

If device mode is used, then Nimble accepts both the peer's identity address and a resolvable private address.

If network mode is used, then Nimble accepts only resolvable private address.

Parameters

ParameterDescription
peer_addrThe identity address of the peer for which privacy mode shall be changed.
priv_modeThe privacy mode. One of: BLE_GAP_PRIVATE_MODE_NETWORK BLE_GAP_PRIVATE_MODE_DEVICE

Returned values

ValueCondition
0Success.
Core return codeUnexpected error.