Enumerations
Enumerations
BLE » Security Manager(SM)

## Enumerations
enum | sec_io_cap_t { IO_DISPLAY_ONLY = 0x00, IO_DISPLAY_YES_NO = 0x01, IO_KEYBOARD_ONLY = 0x02, IO_NO_INPUT_NO_OUTPUT = 0x03, IO_KEYBOARD_DISPLAY = 0x04 }
| SEC IO Capability. More...
enum | sec_enc_req_type_t { PAIR_REQ, TK_REQ, OOB_REQ, NC_REQ }
| SEC Encryption Request Type. More...
enum | sec_keypress_notify_t { KEY_PRESS_STARTED = 0x00, KEY_PRESS_ENTERED = 0x01, KEY_PRESS_ERASED = 0x02, KEY_PRESS_CLEARED = 0x03, KEY_PRESS_COMPLETED = 0x04 }
| SEC Key Press Notify. More...
enum | 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 | sec_mode_level_t { SEC_MODE1_LEVEL1 = 0x00, SEC_MODE1_LEVEL2 = 0x01, SEC_MODE1_LEVEL3 = 0x02, SEC_MODE1_LEVEL4 = 0x03, SEC_MODE2_LEVEL1 = 0x04, SEC_MODE2_LEVEL2 = 0x05 }
| SEC mode and level. More...
enum | sec_tk_type_t { SEC_TK_OOB = 0x00, SEC_TK_DISPLAY, SEC_TK_KEY_ENTRY }
| SEC TK type. More...
enum | sec_key_missing_reason_t { BOND_INFO_LOAD_FAILED = 0x00, LTK_VALID_MASK_ERR, EDIV_RAND_VALUE_ERR }
| Key missing reason. More...

## Detailed Description

## Enumeration Type Documentation

## ◆ sec_enc_ind_t

enum 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 115 of file ble_sec.h.

## ◆ sec_enc_req_type_t

enum sec_enc_req_type_t

SEC Encryption Request Type.

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

Enumerator
PAIR_REQ | Pair request. Apps need to decide whether to accept this request.
TK_REQ | TK request. Apps need to set the TK value.
OOB_REQ | OOB request. Apps need to set the OOB value.
NC_REQ | Number comparison request. Apps need to check if it is the same number displayed in Master and Slave.

Definition at line 96 of file ble_sec.h.

## ◆ sec_io_cap_t

enum sec_io_cap_t

SEC IO Capability.

Enumerator
IO_DISPLAY_ONLY | Display only.
IO_DISPLAY_YES_NO | Display and input yes or no.
IO_KEYBOARD_ONLY | Keyboard only.
IO_NO_INPUT_NO_OUTPUT | No input and no output.
IO_KEYBOARD_DISPLAY | Keyboard and display.

Definition at line 84 of file ble_sec.h.

## ◆ sec_key_missing_reason_t

enum sec_key_missing_reason_t

Key missing reason.

Enumerator
BOND_INFO_LOAD_FAILED | Bond information load failed.
LTK_VALID_MASK_ERR | LTK valid mask flag is false.
EDIV_RAND_VALUE_ERR | Ediv and rand value not match.

Definition at line 161 of file ble_sec.h.

## ◆ sec_keypress_notify_t

enum sec_keypress_notify_t

SEC Key Press Notify.

Enumerator
KEY_PRESS_STARTED | Passkey entry started.
KEY_PRESS_ENTERED | Passkey digit entered.
KEY_PRESS_ERASED | Passkey digit erased.
KEY_PRESS_CLEARED | Passkey cleared.
KEY_PRESS_COMPLETED | Passkey entry completed.

Definition at line 105 of file ble_sec.h.

## ◆ sec_mode_level_t

enum sec_mode_level_t

SEC mode and level.

Enumerator
SEC_MODE1_LEVEL1 | No security is needed.
SEC_MODE1_LEVEL2 | Encrypted link is required. Unnecessary: MITM and SC.
SEC_MODE1_LEVEL3 | Encrypted link is required. Necessary: MITM; unnecessary: SC.
SEC_MODE1_LEVEL4 | Encrypted link is required. Necessary: MITM and SC.
SEC_MODE2_LEVEL1 | Data signing is required. Unnecessary: MITM and SC.
SEC_MODE2_LEVEL2 | Data signing is required. Necessary: MITM; unnecessary: SC.

Definition at line 142 of file ble_sec.h.

## ◆ sec_tk_type_t

enum sec_tk_type_t

SEC TK type.

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

Definition at line 153 of file ble_sec.h.