Fork of BlueNRG library to be compatible with bluetooth demo application
Dependents: Nucleo_BLE_Demo Nucleo_BLE_Demo
Fork of Nucleo_BLE_BlueNRG by
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 /* IO capabilities */ 00024 typedef tHalUint8 tSMIoCapability; 00025 #define IO_CAP_DISPLAY_ONLY (0x00) 00026 #define IO_CAP_DISPLAY_YES_NO (0x01) 00027 #define KEYBOARD_ONLY (0x02) 00028 #define IO_CAP_NO_INPUT_NO_OUTPUT (0x03) 00029 #define IO_CAP_KEYBOARD_DISPLAY (0x04) 00030 00031 /* authentication requirements */ 00032 typedef tHalUint8 tSMBondingMode; 00033 #define BONDING (0x01) 00034 #define NO_BONDING (0x00) 00035 00036 typedef tHalUint8 tSMMIMTMode; 00037 #define MITM_PROTECTION_NOT_REQUIRED (0x00) 00038 #define MITM_PROTECTION_REQUIRED (0x01) 00039 00040 #define OOB_AUTH_DATA_ABSENT (0x00) 00041 #define OOB_AUTH_DATA_PRESENT (0x01) 00042 00043 #define AUTHORIZATION_NOT_REQUIRED (0x00) 00044 #define AUTHORIZATION_REQUIRED (0x01) 00045 00046 /* valid authorization responses */ 00047 #define CONNECTION_AUTHORIZED (0x01) 00048 #define CONNECTION_REJECTED (0x02) 00049 00050 #define USE_FIXED_PIN_FOR_PAIRING (0x0) 00051 #define DONOT_USE_FIXED_PIN_FOR_PAIRING (0x01) 00052 #define PASSKEY_ENTERED (0x02) 00053 00054 /* link security status */ 00055 #define SM_LINK_AUTHENTICATED (0x01) 00056 #define SM_LINK_AUTHORIZED (0x02) 00057 #define SM_LINK_ENCRYPTED (0x04) 00058 00059 /* SMP pairing failed reason codes */ 00060 #define PASSKEY_ENTRY_FAILED (0x01) 00061 #define OOB_NOT_AVAILABLE (0x02) 00062 #define AUTH_REQ_CANNOT_BE_MET (0x03) 00063 #define CONFIRM_VALUE_FAILED (0x04) 00064 #define PAIRING_NOT_SUPPORTED (0x05) 00065 #define INSUFF_ENCRYPTION_KEY_SIZE (0x06) 00066 #define CMD_NOT_SUPPORTED (0x07) 00067 #define UNSPECIFIED_REASON (0x08) 00068 #define VERY_EARLY_NEXT_ATTEMPT (0x09) 00069 #define SM_INVALID_PARAMS (0x0A) 00070 00071 00072 /* error codes to be sent with the pairing complete event */ 00073 #define SM_PAIRING_TIMEOUT (0x01) 00074 #define SM_PAIRING_FAILED (0x02) 00075 00076 00077 #endif /* __SM_H__ */
Generated on Sat Jul 16 2022 01:53:16 by 1.7.2