nrf-softdevice-s132

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gap_encrypt(
conn_handle: u16,
p_master_id: *const ble_gap_master_id_t,
p_enc_info: *const ble_gap_enc_info_t
) -> u32
Expand description

@brief Initiate GAP Encryption procedure.

@details In the central role, this function will initiate the encryption procedure using the encryption information provided.

@events @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE, The connection security has been updated.} @endevents

@mscs @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} @mmsc{@ref BLE_GAP_CENTRAL_ENC_MSC} @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC} @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC} @endmscs

@param[in] conn_handle Connection handle. @param[in] p_master_id Pointer to a @ref ble_gap_master_id_t master identification structure. @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure.

@retval ::NRF_SUCCESS Successfully initiated authentication procedure. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::NRF_ERROR_INVALID_STATE No link has been established. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. @retval ::BLE_ERROR_INVALID_ROLE Operation is not supported in the Peripheral role. @retval ::NRF_ERROR_BUSY Procedure already in progress or not allowed at this time, wait for pending procedures to complete and retry.