Go to the documentation of this file.
61 #define BLE_SEC_AUTH_NONE 0
62 #define BLE_SEC_AUTH_BOND (1 << 0)
63 #define BLE_SEC_AUTH_MITM (1 << 2)
64 #define BLE_SEC_AUTH_SEC_CON (1 << 3)
65 #define BLE_SEC_AUTH_KEY_PRESS_NOTIFY (1 << 4)
66 #define BLE_SEC_AUTH_ALL (AUTH_BOND | AUTH_MITM | AUTH_SEC_CON | AUTH_KEY_PRESS_NOTIFY)
72 #define BLE_SEC_KDIST_NONE 0
73 #define BLE_SEC_KDIST_ENCKEY (1 << 0)
74 #define BLE_SEC_KDIST_IDKEY (1 << 1)
75 #define BLE_SEC_KDIST_SIGNKEY (1 << 2)
76 #define BLE_SEC_KDIST_LINKKEY (1 << 3)
77 #define BLE_SEC_KDIST_ALL (BLE_SEC_KDIST_ENCKEY | BLE_SEC_KDIST_IDKEY | BLE_SEC_KDIST_SIGNKEY )
78 #define BLE_BT_SEC_KDIST_ALL (BLE_SEC_KDIST_ENCKEY | BLE_SEC_KDIST_IDKEY | BLE_SEC_KDIST_SIGNKEY | BLE_SEC_KDIST_LINKKEY)
ble_sec_nc_t nc_data
Number comparison data, see ble_sec_nc_t.
@ BLE_SEC_KEY_PRESS_COMPLETED
Passkey entry completed.
@ BLE_SEC_BOND_INFO_LOAD_FAILED
Bond information load failed.
ble_sec_oob_t oob
OOB value, see ble_sec_oob_t.
SEC number comparison value.
@ BLE_SEC_KEY_PRESS_CLEARED
Passkey cleared.
@ BLE_SEC_MODE2_LEVEL1
Data signing is required.
@ BLE_SEC_OOB_REQ
OOB request.
@ BLE_SEC_KEY_PRESS_STARTED
Passkey entry started.
Key Press Notify event for BLE_SEC_EVT_KEY_PRESS_NTF.
ble_sec_enc_req_type_t req_type
Indicate the request type, ble_sec_enc_req_type_t.
@ BLE_SEC_TK_OOB
TK got from OOB (out of band) method.
ble_sec_tk_t tk
TK value, see ble_sec_tk_t.
@ BLE_SEC_TK_KEY_ENTRY
TK shall be entered by user using device keyboard.
ble_sec_io_cap_t io_cap
Set the IO capability, see ble_sec_io_cap_t.
uint8_t rkey_dist
Set the response key distribution, see SEC Key Distribution Flag.
ble_sec_keypress_notify_t notify_type
key Press Notify type.
bool oob
Indicate whether OOB is supported.
Key Missing event for BLE_SEC_EVT_KEY_MISSING.
uint16_t ble_sec_keypress_notify_send(uint8_t conn_idx, uint8_t notify_type)
Send key press notify.
@ BLE_SEC_KEY_PRESS_ENTERED
Passkey digit entered.
@ BLE_SEC_TK_DISPLAY
TK generated and shall be displayed by local device.
Link Encrypted event for BLE_SEC_EVT_LINK_ENCRYPTED.
ble_sec_key_missing_reason_t reason
Keymissing reason.
Link Encrypte Request event for BLE_SEC_EVT_LINK_ENC_REQUEST.
ble_sec_tk_type_t tk_type
TK type, see ble_sec_tk_type_t.
@ BLE_SEC_MODE1_LEVEL1
No security is needed.
ble_sec_cfm_enc_data_t data
SEC Confirm encryption data, see ble_sec_cfm_enc_data_t.
SEC encryption request data.
File that contains error codes.
@ BLE_SEC_MODE1_LEVEL2
Encrypted link is required.
@ BLE_SEC_KEY_PRESS_ERASED
Passkey digit erased.
ble_sec_evt_enc_req_t enc_req
Link Encrypte Request event.
uint16_t ble_sec_enc_cfm(uint8_t conn_idx, const ble_sec_cfm_enc_t *p_cfm_enc)
Send the encrypt confirm information.
bool accept
Indicate whether to accept the request.
@ BLE_SEC_IO_DISPLAY_ONLY
Display only.
uint8_t key_size
Indicate the supported maximum LTK size (range: 7-16).
@ BLE_SEC_MODE1_LEVEL3
Encrypted link is required.
ble_sec_mode_level_t
SEC mode and level.
ble_sec_enc_req_data_t data
SEC encryption request data, ble_sec_enc_req_data_t.
ble_sec_enc_req_type_t req_type
Request type, see ble_sec_enc_req_type_t.
ble_sec_tk_type_t
SEC TK type.
@ BLE_SEC_TK_REQ
TK request.
@ BLE_SEC_IO_NO_INPUT_NO_OUTPUT
No input and no output.
ble_sec_keypress_notify_t
SEC Key Press Notify.
@ BLE_SEC_NC_REQ
Number comparison request.
uint16_t ble_sec_enc_start(uint8_t conn_idx)
Start security encryption, this interface is used by both slave and master.
ble_sec_oob_t oob_data
OOB data, see ble_sec_oob_t.
ble_sec_key_missing_reason_t
Key missing reason.
@ BLE_SEC_IO_KEYBOARD_DISPLAY
Keyboard and display.
@ BLE_SEC_LTK_VALID_MASK_ERR
LTK valid mask flag is false.
SEC Confirm encryption data.
@ BLE_SEC_MODE2_LEVEL2
Data signing is required.
@ BLE_SEC_IO_KEYBOARD_ONLY
Keyboard only.
ble_sec_evt_enc_ind_t enc_ind
Link Encrypted event.
@ BLE_SEC_PAIR_REQ
Pair request.
@ BLE_SEC_IO_DISPLAY_YES_NO
Display and input yes or no.
ble_sec_io_cap_t
SEC IO Capability.
uint8_t index
Index of connection.
@ BLE_SEC_EDIV_RAND_VALUE_ERR
Ediv and rand value not match.
ble_sec_evt_keypress_notify_t keypress_ntf
Key Press Notify event.
uint8_t ikey_dist
Set the initial key distribution, see SEC Key Distribution Flag.
uint16_t ble_sec_params_set(ble_sec_param_t *p_sec_param)
Set security parameter.
@ BLE_SEC_MODE1_LEVEL4
Encrypted link is required.
uint8_t auth
Set the auth, see SEC Auth Flag.
BLE Security event structure.
ble_sec_enc_req_type_t
SEC Encryption Request Type.
ble_sec_evt_key_missing_t key_missing
Key Missing event.
ble_sec_mode_level_t level
Set the minimum security level of the device, see ble_sec_mode_level_t.