BLE_API wrapper library for STMicroelectronics' BlueNRG Bluetooth Low Energy expansion board shield

Fork of X_NUCLEO_IDB0XA1 by ST Expansion SW Team

Committer:
Wolfgang Betz
Date:
Wed Oct 07 08:39:04 2015 +0200
Revision:
132:51056160fa4a
Andrea's version as of mail from 10/06/2015 05:56 PM

From: Andrea PALMIERI <andrea.palmieri@st.com>
To: Wolfgang BETZ <wolfgang.betz@st.com>, Rohit Grover <rohit.grover@arm.com>,
Antonio VILEI <antonio.vilei@st.com>, Mihail Stoyanov
<Mihail.Stoyanov@arm.com>
CC: Nicola CAPOVILLA <nicola.capovilla@st.com>, Silvio Lucio OLIVA
<silvio.oliva@st.com>, "jonathan.austin@arm.com" <jonathan.austin@arm.com>
Content-Class: urn:content-classes:message
Date: Tue, 6 Oct 2015 17:56:34 +0200
Subject: RE: Arduino Compatibility of X-NUCLEO-IDB04A1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wolfgang Betz 132:51056160fa4a 1 /******************** (C) COPYRIGHT 2012 STMicroelectronics ********************
Wolfgang Betz 132:51056160fa4a 2 * File Name : sm.h
Wolfgang Betz 132:51056160fa4a 3 * Author : AMS - HEA&RF BU
Wolfgang Betz 132:51056160fa4a 4 * Version : V1.0.0
Wolfgang Betz 132:51056160fa4a 5 * Date : 19-July-2012
Wolfgang Betz 132:51056160fa4a 6 * Description : Header file for BlueNRG's security manager.
Wolfgang Betz 132:51056160fa4a 7 ********************************************************************************
Wolfgang Betz 132:51056160fa4a 8 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
Wolfgang Betz 132:51056160fa4a 9 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
Wolfgang Betz 132:51056160fa4a 10 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
Wolfgang Betz 132:51056160fa4a 11 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
Wolfgang Betz 132:51056160fa4a 12 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
Wolfgang Betz 132:51056160fa4a 13 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
Wolfgang Betz 132:51056160fa4a 14 *******************************************************************************/
Wolfgang Betz 132:51056160fa4a 15
Wolfgang Betz 132:51056160fa4a 16 #ifndef __SM_H__
Wolfgang Betz 132:51056160fa4a 17 #define __SM_H__
Wolfgang Betz 132:51056160fa4a 18
Wolfgang Betz 132:51056160fa4a 19 /******************************************************************************
Wolfgang Betz 132:51056160fa4a 20 * Macros
Wolfgang Betz 132:51056160fa4a 21 *****************************************************************************/
Wolfgang Betz 132:51056160fa4a 22
Wolfgang Betz 132:51056160fa4a 23 /**
Wolfgang Betz 132:51056160fa4a 24 *@addtogroup GAP GAP
Wolfgang Betz 132:51056160fa4a 25 *@brief API for GAP layer.
Wolfgang Betz 132:51056160fa4a 26 *@{
Wolfgang Betz 132:51056160fa4a 27 */
Wolfgang Betz 132:51056160fa4a 28
Wolfgang Betz 132:51056160fa4a 29 /* IO capabilities */
Wolfgang Betz 132:51056160fa4a 30 /**
Wolfgang Betz 132:51056160fa4a 31 * @anchor IO_capabilities
Wolfgang Betz 132:51056160fa4a 32 * @name IO capabilities
Wolfgang Betz 132:51056160fa4a 33 * @{
Wolfgang Betz 132:51056160fa4a 34 */
Wolfgang Betz 132:51056160fa4a 35 #define IO_CAP_DISPLAY_ONLY (0x00)
Wolfgang Betz 132:51056160fa4a 36 #define IO_CAP_DISPLAY_YES_NO (0x01)
Wolfgang Betz 132:51056160fa4a 37 #define IO_CAP_KEYBOARD_ONLY (0x02)
Wolfgang Betz 132:51056160fa4a 38 #define IO_CAP_NO_INPUT_NO_OUTPUT (0x03)
Wolfgang Betz 132:51056160fa4a 39 #define IO_CAP_KEYBOARD_DISPLAY (0x04)
Wolfgang Betz 132:51056160fa4a 40 /**
Wolfgang Betz 132:51056160fa4a 41 * @}
Wolfgang Betz 132:51056160fa4a 42 */
Wolfgang Betz 132:51056160fa4a 43
Wolfgang Betz 132:51056160fa4a 44 /**
Wolfgang Betz 132:51056160fa4a 45 * @anchor Auth_req
Wolfgang Betz 132:51056160fa4a 46 * @name Authentication requirements
Wolfgang Betz 132:51056160fa4a 47 * @{
Wolfgang Betz 132:51056160fa4a 48 */
Wolfgang Betz 132:51056160fa4a 49 #define BONDING (0x01)
Wolfgang Betz 132:51056160fa4a 50 #define NO_BONDING (0x00)
Wolfgang Betz 132:51056160fa4a 51 /**
Wolfgang Betz 132:51056160fa4a 52 * @}
Wolfgang Betz 132:51056160fa4a 53 */
Wolfgang Betz 132:51056160fa4a 54
Wolfgang Betz 132:51056160fa4a 55 /**
Wolfgang Betz 132:51056160fa4a 56 * @anchor MITM_req
Wolfgang Betz 132:51056160fa4a 57 * @name MITM protection requirements
Wolfgang Betz 132:51056160fa4a 58 * @{
Wolfgang Betz 132:51056160fa4a 59 */
Wolfgang Betz 132:51056160fa4a 60 #define MITM_PROTECTION_NOT_REQUIRED (0x00)
Wolfgang Betz 132:51056160fa4a 61 #define MITM_PROTECTION_REQUIRED (0x01)
Wolfgang Betz 132:51056160fa4a 62 /**
Wolfgang Betz 132:51056160fa4a 63 * @}
Wolfgang Betz 132:51056160fa4a 64 */
Wolfgang Betz 132:51056160fa4a 65
Wolfgang Betz 132:51056160fa4a 66 /**
Wolfgang Betz 132:51056160fa4a 67 * @anchor OOB_Data
Wolfgang Betz 132:51056160fa4a 68 * @name Out-Of-Band data
Wolfgang Betz 132:51056160fa4a 69 * @{
Wolfgang Betz 132:51056160fa4a 70 */
Wolfgang Betz 132:51056160fa4a 71 #define OOB_AUTH_DATA_ABSENT (0x00)
Wolfgang Betz 132:51056160fa4a 72 #define OOB_AUTH_DATA_PRESENT (0x01)
Wolfgang Betz 132:51056160fa4a 73 /**
Wolfgang Betz 132:51056160fa4a 74 * @}
Wolfgang Betz 132:51056160fa4a 75 */
Wolfgang Betz 132:51056160fa4a 76
Wolfgang Betz 132:51056160fa4a 77 /**
Wolfgang Betz 132:51056160fa4a 78 * @anchor Author_req
Wolfgang Betz 132:51056160fa4a 79 * @name Authorization requirements
Wolfgang Betz 132:51056160fa4a 80 * @{
Wolfgang Betz 132:51056160fa4a 81 */
Wolfgang Betz 132:51056160fa4a 82 #define AUTHORIZATION_NOT_REQUIRED (0x00)
Wolfgang Betz 132:51056160fa4a 83 #define AUTHORIZATION_REQUIRED (0x01)
Wolfgang Betz 132:51056160fa4a 84 /**
Wolfgang Betz 132:51056160fa4a 85 * @}
Wolfgang Betz 132:51056160fa4a 86 */
Wolfgang Betz 132:51056160fa4a 87
Wolfgang Betz 132:51056160fa4a 88 /**
Wolfgang Betz 132:51056160fa4a 89 * @anchor Conn_authorization
Wolfgang Betz 132:51056160fa4a 90 * @name Connection authorization
Wolfgang Betz 132:51056160fa4a 91 * @{
Wolfgang Betz 132:51056160fa4a 92 */
Wolfgang Betz 132:51056160fa4a 93 #define CONNECTION_AUTHORIZED (0x01)
Wolfgang Betz 132:51056160fa4a 94 #define CONNECTION_REJECTED (0x02)
Wolfgang Betz 132:51056160fa4a 95 /**
Wolfgang Betz 132:51056160fa4a 96 * @}
Wolfgang Betz 132:51056160fa4a 97 */
Wolfgang Betz 132:51056160fa4a 98
Wolfgang Betz 132:51056160fa4a 99 /**
Wolfgang Betz 132:51056160fa4a 100 * @anchor Use_fixed_pin
Wolfgang Betz 132:51056160fa4a 101 * @name Use fixed pin
Wolfgang Betz 132:51056160fa4a 102 * @{
Wolfgang Betz 132:51056160fa4a 103 */
Wolfgang Betz 132:51056160fa4a 104 #define USE_FIXED_PIN_FOR_PAIRING (0x0)
Wolfgang Betz 132:51056160fa4a 105 #define DONOT_USE_FIXED_PIN_FOR_PAIRING (0x01)
Wolfgang Betz 132:51056160fa4a 106 /**
Wolfgang Betz 132:51056160fa4a 107 * @}
Wolfgang Betz 132:51056160fa4a 108 */
Wolfgang Betz 132:51056160fa4a 109
Wolfgang Betz 132:51056160fa4a 110 /**
Wolfgang Betz 132:51056160fa4a 111 * @anchor link_security_status
Wolfgang Betz 132:51056160fa4a 112 * @name Link security status
Wolfgang Betz 132:51056160fa4a 113 * @{
Wolfgang Betz 132:51056160fa4a 114 */
Wolfgang Betz 132:51056160fa4a 115 #define SM_LINK_AUTHENTICATED (0x01)
Wolfgang Betz 132:51056160fa4a 116 #define SM_LINK_AUTHORIZED (0x02)
Wolfgang Betz 132:51056160fa4a 117 #define SM_LINK_ENCRYPTED (0x04)
Wolfgang Betz 132:51056160fa4a 118 /**
Wolfgang Betz 132:51056160fa4a 119 * @}
Wolfgang Betz 132:51056160fa4a 120 */
Wolfgang Betz 132:51056160fa4a 121
Wolfgang Betz 132:51056160fa4a 122 /**
Wolfgang Betz 132:51056160fa4a 123 * @anchor SMP_pairing_failed_codes
Wolfgang Betz 132:51056160fa4a 124 * @name SMP pairing failed reason codes
Wolfgang Betz 132:51056160fa4a 125 * @{
Wolfgang Betz 132:51056160fa4a 126 */
Wolfgang Betz 132:51056160fa4a 127 #define PASSKEY_ENTRY_FAILED (0x01)
Wolfgang Betz 132:51056160fa4a 128 #define OOB_NOT_AVAILABLE (0x02)
Wolfgang Betz 132:51056160fa4a 129 #define AUTH_REQ_CANNOT_BE_MET (0x03)
Wolfgang Betz 132:51056160fa4a 130 #define CONFIRM_VALUE_FAILED (0x04)
Wolfgang Betz 132:51056160fa4a 131 #define PAIRING_NOT_SUPPORTED (0x05)
Wolfgang Betz 132:51056160fa4a 132 #define INSUFF_ENCRYPTION_KEY_SIZE (0x06)
Wolfgang Betz 132:51056160fa4a 133 #define CMD_NOT_SUPPORTED (0x07)
Wolfgang Betz 132:51056160fa4a 134 #define UNSPECIFIED_REASON (0x08)
Wolfgang Betz 132:51056160fa4a 135 #define VERY_EARLY_NEXT_ATTEMPT (0x09)
Wolfgang Betz 132:51056160fa4a 136 #define SM_INVALID_PARAMS (0x0A)
Wolfgang Betz 132:51056160fa4a 137 /**
Wolfgang Betz 132:51056160fa4a 138 * @}
Wolfgang Betz 132:51056160fa4a 139 */
Wolfgang Betz 132:51056160fa4a 140
Wolfgang Betz 132:51056160fa4a 141 /**
Wolfgang Betz 132:51056160fa4a 142 * @anchor pairing_failed_codes
Wolfgang Betz 132:51056160fa4a 143 * @name Pairing failed error codes
Wolfgang Betz 132:51056160fa4a 144 * Error codes in @ref EVT_BLUE_GAP_PAIRING_CMPLT event
Wolfgang Betz 132:51056160fa4a 145 * @{
Wolfgang Betz 132:51056160fa4a 146 */
Wolfgang Betz 132:51056160fa4a 147 #define SM_PAIRING_SUCCESS (0x00)
Wolfgang Betz 132:51056160fa4a 148 #define SM_PAIRING_TIMEOUT (0x01)
Wolfgang Betz 132:51056160fa4a 149 #define SM_PAIRING_FAILED (0x02)
Wolfgang Betz 132:51056160fa4a 150 /**
Wolfgang Betz 132:51056160fa4a 151 * @}
Wolfgang Betz 132:51056160fa4a 152 */
Wolfgang Betz 132:51056160fa4a 153
Wolfgang Betz 132:51056160fa4a 154 /**
Wolfgang Betz 132:51056160fa4a 155 * @}
Wolfgang Betz 132:51056160fa4a 156 */
Wolfgang Betz 132:51056160fa4a 157
Wolfgang Betz 132:51056160fa4a 158 #endif /* __SM_H__ */