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

◆ sd_ble_gap_sec_params_reply()

uint32_t sd_ble_gap_sec_params_reply ( uint16_t conn_handle,
uint8_t sec_status,
ble_gap_sec_params_t const * p_sec_params,
ble_gap_sec_keyset_t const * p_sec_keyset )

#include <ble_gap.h>

Reply with GAP security parameters.

This function is only used to reply to a BLE_GAP_EVT_SEC_PARAMS_REQUEST, calling it at other times will result in an NRF_ERROR_INVALID_STATE.

Events generated
This function is used during authentication proceduressee the list of events in the documentation of sd_ble_gap_authenticate.
Relevant Message Sequence Charts
Peripheral Legacy Pairing: Just Works
Peripheral Legacy Bonding: Just Works
Peripheral Legacy Bonding: Passkey Entry, Peripheral displays
Peripheral Legacy Bonding: Passkey Entry, User Inputs on Peripheral
Peripheral Legacy Bonding: Out of Band
Peripheral Legacy Bonding: Passkey Entry with application-provided passkey
Peripheral Legacy Pairing failure: Confirm failed
Peripheral LESC Pairing: Just Works
Peripheral LESC Bonding: Numeric Comparison
Peripheral LESC Bonding: Passkey Entry, Peripheral Displays
Peripheral LESC Bonding: Passkey Entry, User Inputs on Peripheral
Peripheral LESC Bonding: Out of Band
GAP Failed Pairing: Keysize too small
Pairing failure: Pairing aborted by the application
Pairing failure: Pairing failed from central
Pairing failure: Timeout
Central Legacy Pairing: Just Works
Central Legacy Bonding: Just Works
Central Legacy Bonding: Passkey Entry, Central displays
Central Legacy Bonding: Passkey Entry, User Inputs on Central
Central Legacy Bonding: Out Of Band
Central LESC Pairing: Just Works
Central LESC Bonding: Numeric Comparison
Central LESC Bonding: Passkey Entry, Central Displays
Central LESC Bonding: Passkey Entry, User Inputs on Central
Central LESC Bonding: Out of Band
Parameters
[in]conn_handleConnection handle.
[in]sec_statusSecurity status, see GAP Security status.
[in]p_sec_paramsPointer to a ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have already been provided during a previous call to sd_ble_gap_authenticate.
[in,out]p_sec_keysetPointer to a ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application upon reception of a BLE_GAP_EVT_AUTH_STATUS event. Note that the SoftDevice expects the application to provide memory for storing the peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key can, however, be NULL, in which case, the local key data will not be available to the application upon reception of the BLE_GAP_EVT_AUTH_STATUS event.
Return values
NRF_SUCCESSSuccessfully accepted security parameter from the application.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_BUSYThe stack is busy, process pending events and retry.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied.
NRF_ERROR_INVALID_STATESecurity parameters has not been requested.
BLE_ERROR_INVALID_CONN_HANDLEInvalid connection handle supplied.
NRF_ERROR_NOT_SUPPORTEDDistribution of own Identity Information is only supported if the Central Address Resolution characteristic is configured to be included or the Softdevice is configured to support peripheral roles only. See ble_gap_cfg_car_incl_cfg_t and ble_gap_cfg_role_count_t.