BLE_API wrapper library for STMicroelectronics' BlueNRG Bluetooth Low Energy expansion board shield (Component)
Dependents: Nucleo_Zumo_BLE_IDB04A1 contest_IOT5 contest_IOT6 contest_IOT_10 ... more
Fork of X_NUCLEO_IDB0XA1 by
ble_sm.h
00001 /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** 00002 * File Name : sm.h 00003 * Author : AMS - HEA&RF BU 00004 * Version : V1.0.0 00005 * Date : 19-July-2012 00006 * Description : Header file for BlueNRG's security manager. 00007 ******************************************************************************** 00008 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 00009 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. 00010 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE 00012 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING 00013 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 00014 *******************************************************************************/ 00015 00016 #ifndef __SM_H__ 00017 #define __SM_H__ 00018 00019 /****************************************************************************** 00020 * Macros 00021 *****************************************************************************/ 00022 00023 /** 00024 *@addtogroup GAP GAP 00025 *@brief API for GAP layer. 00026 *@{ 00027 */ 00028 00029 /* IO capabilities */ 00030 /** 00031 * @anchor IO_capabilities 00032 * @name IO capabilities 00033 * @{ 00034 */ 00035 #define IO_CAP_DISPLAY_ONLY (0x00) 00036 #define IO_CAP_DISPLAY_YES_NO (0x01) 00037 #define IO_CAP_KEYBOARD_ONLY (0x02) 00038 #define IO_CAP_NO_INPUT_NO_OUTPUT (0x03) 00039 #define IO_CAP_KEYBOARD_DISPLAY (0x04) 00040 /** 00041 * @} 00042 */ 00043 00044 /** 00045 * @anchor Auth_req 00046 * @name Authentication requirements 00047 * @{ 00048 */ 00049 #define BONDING (0x01) 00050 #define NO_BONDING (0x00) 00051 /** 00052 * @} 00053 */ 00054 00055 /** 00056 * @anchor MITM_req 00057 * @name MITM protection requirements 00058 * @{ 00059 */ 00060 #define MITM_PROTECTION_NOT_REQUIRED (0x00) 00061 #define MITM_PROTECTION_REQUIRED (0x01) 00062 /** 00063 * @} 00064 */ 00065 00066 /** 00067 * @anchor OOB_Data 00068 * @name Out-Of-Band data 00069 * @{ 00070 */ 00071 #define OOB_AUTH_DATA_ABSENT (0x00) 00072 #define OOB_AUTH_DATA_PRESENT (0x01) 00073 /** 00074 * @} 00075 */ 00076 00077 /** 00078 * @anchor Author_req 00079 * @name Authorization requirements 00080 * @{ 00081 */ 00082 #define AUTHORIZATION_NOT_REQUIRED (0x00) 00083 #define AUTHORIZATION_REQUIRED (0x01) 00084 /** 00085 * @} 00086 */ 00087 00088 /** 00089 * @anchor Conn_authorization 00090 * @name Connection authorization 00091 * @{ 00092 */ 00093 #define CONNECTION_AUTHORIZED (0x01) 00094 #define CONNECTION_REJECTED (0x02) 00095 /** 00096 * @} 00097 */ 00098 00099 /** 00100 * @anchor Use_fixed_pin 00101 * @name Use fixed pin 00102 * @{ 00103 */ 00104 #define USE_FIXED_PIN_FOR_PAIRING (0x0) 00105 #define DONOT_USE_FIXED_PIN_FOR_PAIRING (0x01) 00106 /** 00107 * @} 00108 */ 00109 00110 /** 00111 * @anchor link_security_status 00112 * @name Link security status 00113 * @{ 00114 */ 00115 #define SM_LINK_AUTHENTICATED (0x01) 00116 #define SM_LINK_AUTHORIZED (0x02) 00117 #define SM_LINK_ENCRYPTED (0x04) 00118 /** 00119 * @} 00120 */ 00121 00122 /** 00123 * @anchor SMP_pairing_failed_codes 00124 * @name SMP pairing failed reason codes 00125 * @{ 00126 */ 00127 #define PASSKEY_ENTRY_FAILED (0x01) 00128 #define OOB_NOT_AVAILABLE (0x02) 00129 #define AUTH_REQ_CANNOT_BE_MET (0x03) 00130 #define CONFIRM_VALUE_FAILED (0x04) 00131 #define PAIRING_NOT_SUPPORTED (0x05) 00132 #define INSUFF_ENCRYPTION_KEY_SIZE (0x06) 00133 #define CMD_NOT_SUPPORTED (0x07) 00134 #define UNSPECIFIED_REASON (0x08) 00135 #define VERY_EARLY_NEXT_ATTEMPT (0x09) 00136 #define SM_INVALID_PARAMS (0x0A) 00137 /** 00138 * @} 00139 */ 00140 00141 /** 00142 * @anchor pairing_failed_codes 00143 * @name Pairing failed error codes 00144 * Error codes in @ref EVT_BLUE_GAP_PAIRING_CMPLT event 00145 * @{ 00146 */ 00147 #define SM_PAIRING_SUCCESS (0x00) 00148 #define SM_PAIRING_TIMEOUT (0x01) 00149 #define SM_PAIRING_FAILED (0x02) 00150 /** 00151 * @} 00152 */ 00153 00154 /** 00155 * @} 00156 */ 00157 00158 #endif /* __SM_H__ */
Generated on Tue Jul 12 2022 18:15:59 by 1.7.2