Go to the documentation of this file.
62 #define AUTH_BOND (1 << 0)
63 #define AUTH_MITM (1 << 2)
64 #define AUTH_SEC_CON (1 << 3)
65 #define AUTH_KEY_PRESS_NOTIFY (1 << 4)
66 #define AUTH_ALL (AUTH_BOND | AUTH_MITM | AUTH_SEC_CON | AUTH_KEY_PRESS_NOTIFY)
73 #define KDIST_ENCKEY (1 << 0)
74 #define KDIST_IDKEY (1 << 1)
75 #define KDIST_SIGNKEY (1 << 2)
76 #define KDIST_ALL (KDIST_ENCKEY | KDIST_IDKEY | KDIST_SIGNKEY)
236 void (*app_sec_enc_ind_cb)(uint8_t conn_idx,
sec_enc_ind_t enc_ind, uint8_t auth);
@ SEC_MODE1_LEVEL2
Encrypted link is required.
sec_oob_t oob_data
OOB data, see sec_oob_t.
sec_enc_req_type_t req_type
Request type, see sec_enc_req_type_t.
bool oob
Indicate whether OOB is supported.
@ ENC_FAIL_CONFIRM_VAL_FAIL
The confirm value does not match the calculated compare value.
@ KEY_PRESS_STARTED
Passkey entry started.
@ SEC_MODE1_LEVEL1
No security is needed.
sec_enc_req_type_t
SEC Encryption Request Type.
@ ENC_FAIL_UNSPECIFIED
Pairing failed due to an unspecified reason.
uint16_t ble_sec_enc_cfm(uint8_t conn_idx, const sec_cfm_enc_t *p_cfm_enc)
Send the encrypt confirm information.
uint8_t auth
Set the auth, see SEC Auth Flag.
@ ENC_FAIL_PAIRING_NOT_SUPPORT
Pairing is not supported by the device.
sec_keypress_notify_t
SEC Key Press Notify.
SEC number comparison value.
sec_enc_req_data_t data
SEC encryption request data, sec_enc_req_data_t.
@ SEC_TK_DISPLAY
TK generated and shall be displayed by local device.
sec_oob_t oob
OOB value, see sec_oob_t.
uint16_t ble_sec_keypress_notify_send(uint8_t conn_idx, uint8_t notify_type)
Send key press notify.
uint8_t key_size
Indicate the supported maximum LTK size (range: 7-16).
sec_tk_t tk
TK value, see sec_tk_t.
@ IO_DISPLAY_YES_NO
Display and input yes or no.
@ KEY_PRESS_ERASED
Passkey digit erased.
sec_io_cap_t
SEC IO Capability.
@ KEY_PRESS_CLEARED
Passkey cleared.
@ ENC_SUCCESS
Encrypt success.
uint16_t ble_sec_params_set(sec_param_t *p_sec_param)
Set security parameter.
sec_nc_t nc_data
Number comparison data, see sec_nc_t.
@ SEC_TK_KEY_ENTRY
TK shall be entered by user using device keyboard.
@ LTK_VALID_MASK_ERR
LTK valid mask flag is false.
@ ENC_FAIL_REPEAT_ATTEMPT
Pairing or authentication procedure is disallowed because too little time has elapsed since last pair...
@ SEC_MODE2_LEVEL1
Data signing is required.
sec_tk_type_t
SEC TK type.
@ IO_KEYBOARD_ONLY
Keyboard only.
SEC Confirm encryption data.
sec_key_missing_reason_t
Key missing reason.
File that contains error codes.
@ SEC_MODE1_LEVEL4
Encrypted link is required.
@ ENC_FAIL_LTK_MISSING
Indicate the LTK of peer devices missing.
@ SEC_TK_OOB
TK got from OOB (out of band) method.
SEC encryption request data.
uint8_t ikey_dist
Set the initial key distribution, see SEC Key Distribution Flag.
uint8_t rkey_dist
Set the response key distribution, see SEC Key Distribution Flag.
@ EDIV_RAND_VALUE_ERR
Ediv and rand value not match.
@ SEC_MODE1_LEVEL3
Encrypted link is required.
sec_tk_type_t tk_type
TK type, see sec_tk_type_t.
@ ENC_FAIL_COMMAND_NOT_SUPPORT
The SMP command received is not supported on this device.
@ SEC_MODE2_LEVEL2
Data signing is required.
sec_enc_req_type_t req_type
Indicate the request type, sec_enc_req_type_t.
uint16_t ble_sec_enc_start(uint8_t conn_idx)
Start security encryption, this interface is used by both slave and master.
@ ENC_FAIL_AUTH_REQ
The pairing procedure cannot be performed as authentication requirements cannot be met due to IO inca...
bool accept
Indicate whether to accept the request.
@ ENC_FAIL_INVALID_PARAM
The Invalid Parameters error code indicates that the command length is invalid or that a parameter is...
@ KEY_PRESS_ENTERED
Passkey digit entered.
sec_cfm_enc_data_t data
SEC Confirm encryption data, see sec_cfm_enc_data_t.
@ ENC_FAIL_ENCRPT_KEY_SIZE
The resultant encryption key size is insufficient for the security requirements of this device.
@ IO_DISPLAY_ONLY
Display only.
@ ENC_FAIL_BR_EDR_IN_PROGRESS
Indicate that the pairing over the LE transport failed due to a Pairing Request sent over the BR/EDR ...
sec_mode_level_t
SEC mode and level.
sec_enc_ind_t
SEC pair result.
sec_mode_level_t level
Set the minimum security level of the device, see sec_mode_level_t.
@ ENC_FAIL_DHKEY_CHECK_FAIL
Indicate to the remote device that the DHKey Check value received doesn't match the one calculated by...
@ NC_REQ
Number comparison request.
@ BOND_INFO_LOAD_FAILED
Bond information load failed.
@ ENC_FAIL_NUM_CMP_FAIL
Indicate that the confirm values in the numeric comparison protocol do not match.
@ KEY_PRESS_COMPLETED
Passkey entry completed.
sec_io_cap_t io_cap
Set the IO capability, see sec_io_cap_t.
@ IO_NO_INPUT_NO_OUTPUT
No input and no output.
@ IO_KEYBOARD_DISPLAY
Keyboard and display.
@ ENC_FAIL_OOB_NOT_AVAILBL
The OOB data is not available.
@ ENC_FAIL_KEY_DRIV_GEN_NOT_ALLOW
Indicate that the BR/EDR Link Key generated on the BR/EDR transport cannot be used to derive and dist...
@ ENC_FAIL_PASSKEY_ENTRY_FAIL
The user input of passkey failed, for example, the user cancelled the operation.