Enumerations
Enumerations
BLE » Security Manager(SM)

## Enumerations
enum | ble_sec_io_cap_t { BLE_SEC_IO_DISPLAY_ONLY = 0x00, BLE_SEC_IO_DISPLAY_YES_NO = 0x01, BLE_SEC_IO_KEYBOARD_ONLY = 0x02, BLE_SEC_IO_NO_INPUT_NO_OUTPUT = 0x03, BLE_SEC_IO_KEYBOARD_DISPLAY = 0x04 }
| SEC IO Capability. More...
enum | ble_sec_enc_req_type_t { BLE_SEC_PAIR_REQ, BLE_SEC_TK_REQ, BLE_SEC_OOB_REQ, BLE_SEC_NC_REQ }
| SEC Encryption Request Type. More...
enum | ble_sec_keypress_notify_t { BLE_SEC_KEY_PRESS_STARTED = 0x00, BLE_SEC_KEY_PRESS_ENTERED = 0x01, BLE_SEC_KEY_PRESS_ERASED = 0x02, BLE_SEC_KEY_PRESS_CLEARED = 0x03, BLE_SEC_KEY_PRESS_COMPLETED = 0x04 }
| SEC Key Press Notify. More...
enum | ble_sec_enc_ind_t { ENC_SUCCESS = 0x00, ENC_FAIL_PASSKEY_ENTRY_FAIL = 0x01, ENC_FAIL_OOB_NOT_AVAILBL = 0x02, ENC_FAIL_AUTH_REQ = 0x03, ENC_FAIL_CONFIRM_VAL_FAIL = 0x04, ENC_FAIL_PAIRING_NOT_SUPPORT = 0x05, ENC_FAIL_ENCRPT_KEY_SIZE = 0x06, ENC_FAIL_COMMAND_NOT_SUPPORT = 0x07, ENC_FAIL_UNSPECIFIED = 0x08, ENC_FAIL_REPEAT_ATTEMPT = 0x09, ENC_FAIL_INVALID_PARAM = 0x0A, ENC_FAIL_DHKEY_CHECK_FAIL = 0x0B, ENC_FAIL_NUM_CMP_FAIL = 0x0C, ENC_FAIL_BR_EDR_IN_PROGRESS = 0x0D, ENC_FAIL_KEY_DRIV_GEN_NOT_ALLOW = 0x0E, ENC_FAIL_LTK_MISSING = 0x0F }
| SEC pair result. More...
enum | ble_sec_mode_level_t { BLE_SEC_MODE1_LEVEL1 = 0x00, BLE_SEC_MODE1_LEVEL2 = 0x01, BLE_SEC_MODE1_LEVEL3 = 0x02, BLE_SEC_MODE1_LEVEL4 = 0x03, BLE_SEC_MODE2_LEVEL1 = 0x04, BLE_SEC_MODE2_LEVEL2 = 0x05 }
| SEC mode and level. More...
enum | ble_sec_tk_type_t { BLE_SEC_TK_OOB = 0x00, BLE_SEC_TK_DISPLAY, BLE_SEC_TK_KEY_ENTRY }
| SEC TK type. More...
enum | ble_sec_key_missing_reason_t { BLE_SEC_BOND_INFO_LOAD_FAILED = 0x00, BLE_SEC_LTK_VALID_MASK_ERR, BLE_SEC_EDIV_RAND_VALUE_ERR }
| Key missing reason. More...

## Detailed Description

## Enumeration Type Documentation

## ◆ ble_sec_enc_ind_t

enum ble_sec_enc_ind_t

SEC pair result.

Enumerator
ENC_SUCCESS | Encrypt success.
ENC_FAIL_PASSKEY_ENTRY_FAIL | The user input of passkey failed, for example, the user cancelled the operation.
ENC_FAIL_OOB_NOT_AVAILBL | The OOB data is not available.
ENC_FAIL_AUTH_REQ | The pairing procedure cannot be performed as authentication requirements cannot be met due to IO incapability of one or both devices.
ENC_FAIL_CONFIRM_VAL_FAIL | The confirm value does not match the calculated compare value.
ENC_FAIL_PAIRING_NOT_SUPPORT | Pairing is not supported by the device.
ENC_FAIL_ENCRPT_KEY_SIZE | The resultant encryption key size is insufficient for the security requirements of this device.
ENC_FAIL_COMMAND_NOT_SUPPORT | The SMP command received is not supported on this device.
ENC_FAIL_UNSPECIFIED | Pairing failed due to an unspecified reason.
ENC_FAIL_REPEAT_ATTEMPT | Pairing or authentication procedure is disallowed because too little time has elapsed since last pairing request or security request.
ENC_FAIL_INVALID_PARAM | The Invalid Parameters error code indicates that the command length is invalid or that a parameter is outside of the specified range.
ENC_FAIL_DHKEY_CHECK_FAIL | Indicate to the remote device that the DHKey Check value received doesn't match the one calculated by the local device.
ENC_FAIL_NUM_CMP_FAIL | Indicate that the confirm values in the numeric comparison protocol do not match.
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 transport in process.
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 distribute keys for the LE transport.
ENC_FAIL_LTK_MISSING | Indicate the LTK of peer devices missing.

Definition at line 117 of file ble_sec.h.

## ◆ ble_sec_enc_req_type_t

enum ble_sec_enc_req_type_t

SEC Encryption Request Type.

Note
  These types indicate some operations need to interact with app during pair process.

Enumerator
BLE_SEC_PAIR_REQ | Pair request. Apps need to decide whether to accept this request.
BLE_SEC_TK_REQ | TK request. Apps need to set the TK value.
BLE_SEC_OOB_REQ | OOB request. Apps need to set the OOB value.
BLE_SEC_NC_REQ | Number comparison request. Apps need to check if it is the same number displayed in Master and Slave.

Definition at line 98 of file ble_sec.h.

## ◆ ble_sec_io_cap_t

enum ble_sec_io_cap_t

SEC IO Capability.

Enumerator
BLE_SEC_IO_DISPLAY_ONLY | Display only.
BLE_SEC_IO_DISPLAY_YES_NO | Display and input yes or no.
BLE_SEC_IO_KEYBOARD_ONLY | Keyboard only.
BLE_SEC_IO_NO_INPUT_NO_OUTPUT | No input and no output.
BLE_SEC_IO_KEYBOARD_DISPLAY | Keyboard and display.

Definition at line 86 of file ble_sec.h.

## ◆ ble_sec_key_missing_reason_t

enum ble_sec_key_missing_reason_t

Key missing reason.

Enumerator
BLE_SEC_BOND_INFO_LOAD_FAILED | Bond information load failed.
BLE_SEC_LTK_VALID_MASK_ERR | LTK valid mask flag is false.
BLE_SEC_EDIV_RAND_VALUE_ERR | Ediv and rand value not match.

Definition at line 163 of file ble_sec.h.

## ◆ ble_sec_keypress_notify_t

enum ble_sec_keypress_notify_t

SEC Key Press Notify.

Enumerator
BLE_SEC_KEY_PRESS_STARTED | Passkey entry started.
BLE_SEC_KEY_PRESS_ENTERED | Passkey digit entered.
BLE_SEC_KEY_PRESS_ERASED | Passkey digit erased.
BLE_SEC_KEY_PRESS_CLEARED | Passkey cleared.
BLE_SEC_KEY_PRESS_COMPLETED | Passkey entry completed.

Definition at line 107 of file ble_sec.h.

## ◆ ble_sec_mode_level_t

enum ble_sec_mode_level_t

SEC mode and level.

Enumerator
BLE_SEC_MODE1_LEVEL1 | No security is needed.
BLE_SEC_MODE1_LEVEL2 | Encrypted link is required. Unnecessary: MITM and SC.
BLE_SEC_MODE1_LEVEL3 | Encrypted link is required. Necessary: MITM; unnecessary: SC.
BLE_SEC_MODE1_LEVEL4 | Encrypted link is required. Necessary: MITM and SC.
BLE_SEC_MODE2_LEVEL1 | Data signing is required. Unnecessary: MITM and SC.
BLE_SEC_MODE2_LEVEL2 | Data signing is required. Necessary: MITM; unnecessary: SC.

Definition at line 144 of file ble_sec.h.

## ◆ ble_sec_tk_type_t

enum ble_sec_tk_type_t

SEC TK type.

Enumerator
BLE_SEC_TK_OOB | TK got from OOB (out of band) method.
BLE_SEC_TK_DISPLAY | TK generated and shall be displayed by local device.
BLE_SEC_TK_KEY_ENTRY | TK shall be entered by user using device keyboard.

Definition at line 155 of file ble_sec.h.