Function nrf_softdevice_s113::sd_ble_gap_lesc_dhkey_reply
source · pub unsafe fn sd_ble_gap_lesc_dhkey_reply(
conn_handle: u16,
p_dhkey: *const ble_gap_lesc_dhkey_t
) -> u32
Expand description
@brief Reply with an LE Secure connections DHKey.
@details This function is only used to reply to a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters.
@events @event{This function is used during authentication procedures, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} @endevents
@mscs @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC} @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC} @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} @endmscs
@param[in] conn_handle Connection handle. @param[in] p_dhkey LE Secure Connections DHKey.
@retval ::NRF_SUCCESS DHKey successfully set. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: - The peer is not authenticated. - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.