S115 SoftDevice for nRF54LV10 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gap_authenticate()

uint32_t sd_ble_gap_authenticate ( uint16_t conn_handle,
ble_gap_sec_params_t const * p_sec_params )

#include <ble_gap.h>

Initiate the GAP Authentication procedure.

In the peripheral role, this function will send an SMP Security Request.

Events generated
Depending on the security parameters set and the packet exchanges with the peer, the following events may be generated:
BLE_GAP_EVT_SEC_PARAMS_REQUEST
BLE_GAP_EVT_SEC_INFO_REQUEST
BLE_GAP_EVT_PASSKEY_DISPLAY
BLE_GAP_EVT_KEY_PRESSED
BLE_GAP_EVT_AUTH_KEY_REQUEST
BLE_GAP_EVT_LESC_DHKEY_REQUEST
BLE_GAP_EVT_CONN_SEC_UPDATE
BLE_GAP_EVT_AUTH_STATUS
BLE_GAP_EVT_TIMEOUT
Relevant Message Sequence Charts
Peripheral Security Request
Parameters
[in]conn_handleConnection handle.
[in]p_sec_paramsPointer to the ble_gap_sec_params_t structure with the security parameters to be used during the pairing or bonding procedure. In the peripheral role, only the bond, mitm, lesc and keypress fields of this structure are used.
Return values
NRF_SUCCESSSuccessfully initiated authentication procedure.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied.
NRF_ERROR_INVALID_STATEInvalid state to perform operation. Either:
  • No link has been established.
  • An encryption is already executing or queued.
NRF_ERROR_NO_MEMThe maximum number of authentication procedures that can run in parallel for the given role is reached.
BLE_ERROR_INVALID_CONN_HANDLEInvalid connection handle supplied.
NRF_ERROR_TIMEOUTA SMP timeout has occurred, and further SMP operations on this link is prohibited.