![]() |
S145 SoftDevice for nRF54LM20 API documentation 10.0.0
|
| uint32_t sd_ble_gap_auth_key_reply | ( | uint16_t | conn_handle, |
| uint8_t | key_type, | ||
| uint8_t const * | p_key ) |
#include <ble_gap.h>
Reply with an authentication key.
This function is only used to reply to a BLE_GAP_EVT_AUTH_KEY_REQUEST or a BLE_GAP_EVT_PASSKEY_DISPLAY, calling it at other times will result in an NRF_ERROR_INVALID_STATE.
| This function is used during authentication procedures, see the list of events in the documentation of sd_ble_gap_authenticate. |
| [in] | conn_handle | Connection handle. |
| [in] | key_type | See GAP Authentication Key Types. |
| [in] | p_key | If key type is BLE_GAP_AUTH_KEY_TYPE_NONE, then NULL. If key type is BLE_GAP_AUTH_KEY_TYPE_PASSKEY, then a 6-byte ASCII string (digit 0..9 only, no NULL termination) or NULL when confirming LE Secure Connections Numeric Comparison. If key type is BLE_GAP_AUTH_KEY_TYPE_OOB, then a 16-byte OOB key value in little-endian format. |
| NRF_SUCCESS | Authentication key successfully set. |
| NRF_ERROR_INVALID_ADDR | Invalid pointer supplied. |
| NRF_ERROR_INVALID_PARAM | Invalid parameter(s) supplied. |
| NRF_ERROR_INVALID_STATE | Authentication key has not been requested. |
| BLE_ERROR_INVALID_CONN_HANDLE | Invalid connection handle supplied. |