BLE_BlueNRG for Nucleo board
Dependents: Nucleo_BLE_HeartRate Nucleo_BLE_UART Nucleo_BLE_UART
Warning: Deprecated!
Supported drivers and applications can be found at this link.
hci/inc/sm.h@0:a948f5f3904c, 2014-12-19 (annotated)
- Committer:
- sjallouli
- Date:
- Fri Dec 19 18:56:07 2014 +0000
- Revision:
- 0:a948f5f3904c
BLE_BlueNRG for Nucleo board
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sjallouli | 0:a948f5f3904c | 1 | /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** |
sjallouli | 0:a948f5f3904c | 2 | * File Name : sm.h |
sjallouli | 0:a948f5f3904c | 3 | * Author : AMS - HEA&RF BU |
sjallouli | 0:a948f5f3904c | 4 | * Version : V1.0.0 |
sjallouli | 0:a948f5f3904c | 5 | * Date : 19-July-2012 |
sjallouli | 0:a948f5f3904c | 6 | * Description : Header file for BlueNRG's security manager. |
sjallouli | 0:a948f5f3904c | 7 | ******************************************************************************** |
sjallouli | 0:a948f5f3904c | 8 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
sjallouli | 0:a948f5f3904c | 9 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
sjallouli | 0:a948f5f3904c | 10 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
sjallouli | 0:a948f5f3904c | 11 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
sjallouli | 0:a948f5f3904c | 12 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
sjallouli | 0:a948f5f3904c | 13 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
sjallouli | 0:a948f5f3904c | 14 | *******************************************************************************/ |
sjallouli | 0:a948f5f3904c | 15 | |
sjallouli | 0:a948f5f3904c | 16 | #ifndef __SM_H__ |
sjallouli | 0:a948f5f3904c | 17 | #define __SM_H__ |
sjallouli | 0:a948f5f3904c | 18 | |
sjallouli | 0:a948f5f3904c | 19 | /****************************************************************************** |
sjallouli | 0:a948f5f3904c | 20 | * Macros |
sjallouli | 0:a948f5f3904c | 21 | *****************************************************************************/ |
sjallouli | 0:a948f5f3904c | 22 | |
sjallouli | 0:a948f5f3904c | 23 | /* IO capabilities */ |
sjallouli | 0:a948f5f3904c | 24 | typedef tHalUint8 tSMIoCapability; |
sjallouli | 0:a948f5f3904c | 25 | #define IO_CAP_DISPLAY_ONLY (0x00) |
sjallouli | 0:a948f5f3904c | 26 | #define IO_CAP_DISPLAY_YES_NO (0x01) |
sjallouli | 0:a948f5f3904c | 27 | #define KEYBOARD_ONLY (0x02) |
sjallouli | 0:a948f5f3904c | 28 | #define IO_CAP_NO_INPUT_NO_OUTPUT (0x03) |
sjallouli | 0:a948f5f3904c | 29 | #define IO_CAP_KEYBOARD_DISPLAY (0x04) |
sjallouli | 0:a948f5f3904c | 30 | |
sjallouli | 0:a948f5f3904c | 31 | /* authentication requirements */ |
sjallouli | 0:a948f5f3904c | 32 | typedef tHalUint8 tSMBondingMode; |
sjallouli | 0:a948f5f3904c | 33 | #define BONDING (0x01) |
sjallouli | 0:a948f5f3904c | 34 | #define NO_BONDING (0x00) |
sjallouli | 0:a948f5f3904c | 35 | |
sjallouli | 0:a948f5f3904c | 36 | typedef tHalUint8 tSMMIMTMode; |
sjallouli | 0:a948f5f3904c | 37 | #define MITM_PROTECTION_NOT_REQUIRED (0x00) |
sjallouli | 0:a948f5f3904c | 38 | #define MITM_PROTECTION_REQUIRED (0x01) |
sjallouli | 0:a948f5f3904c | 39 | |
sjallouli | 0:a948f5f3904c | 40 | #define OOB_AUTH_DATA_ABSENT (0x00) |
sjallouli | 0:a948f5f3904c | 41 | #define OOB_AUTH_DATA_PRESENT (0x01) |
sjallouli | 0:a948f5f3904c | 42 | |
sjallouli | 0:a948f5f3904c | 43 | #define AUTHORIZATION_NOT_REQUIRED (0x00) |
sjallouli | 0:a948f5f3904c | 44 | #define AUTHORIZATION_REQUIRED (0x01) |
sjallouli | 0:a948f5f3904c | 45 | |
sjallouli | 0:a948f5f3904c | 46 | /* valid authorization responses */ |
sjallouli | 0:a948f5f3904c | 47 | #define CONNECTION_AUTHORIZED (0x01) |
sjallouli | 0:a948f5f3904c | 48 | #define CONNECTION_REJECTED (0x02) |
sjallouli | 0:a948f5f3904c | 49 | |
sjallouli | 0:a948f5f3904c | 50 | #define USE_FIXED_PIN_FOR_PAIRING (0x0) |
sjallouli | 0:a948f5f3904c | 51 | #define DONOT_USE_FIXED_PIN_FOR_PAIRING (0x01) |
sjallouli | 0:a948f5f3904c | 52 | #define PASSKEY_ENTERED (0x02) |
sjallouli | 0:a948f5f3904c | 53 | |
sjallouli | 0:a948f5f3904c | 54 | /* link security status */ |
sjallouli | 0:a948f5f3904c | 55 | #define SM_LINK_AUTHENTICATED (0x01) |
sjallouli | 0:a948f5f3904c | 56 | #define SM_LINK_AUTHORIZED (0x02) |
sjallouli | 0:a948f5f3904c | 57 | #define SM_LINK_ENCRYPTED (0x04) |
sjallouli | 0:a948f5f3904c | 58 | |
sjallouli | 0:a948f5f3904c | 59 | /* SMP pairing failed reason codes */ |
sjallouli | 0:a948f5f3904c | 60 | #define PASSKEY_ENTRY_FAILED (0x01) |
sjallouli | 0:a948f5f3904c | 61 | #define OOB_NOT_AVAILABLE (0x02) |
sjallouli | 0:a948f5f3904c | 62 | #define AUTH_REQ_CANNOT_BE_MET (0x03) |
sjallouli | 0:a948f5f3904c | 63 | #define CONFIRM_VALUE_FAILED (0x04) |
sjallouli | 0:a948f5f3904c | 64 | #define PAIRING_NOT_SUPPORTED (0x05) |
sjallouli | 0:a948f5f3904c | 65 | #define INSUFF_ENCRYPTION_KEY_SIZE (0x06) |
sjallouli | 0:a948f5f3904c | 66 | #define CMD_NOT_SUPPORTED (0x07) |
sjallouli | 0:a948f5f3904c | 67 | #define UNSPECIFIED_REASON (0x08) |
sjallouli | 0:a948f5f3904c | 68 | #define VERY_EARLY_NEXT_ATTEMPT (0x09) |
sjallouli | 0:a948f5f3904c | 69 | #define SM_INVALID_PARAMS (0x0A) |
sjallouli | 0:a948f5f3904c | 70 | |
sjallouli | 0:a948f5f3904c | 71 | |
sjallouli | 0:a948f5f3904c | 72 | /* error codes to be sent with the pairing complete event */ |
sjallouli | 0:a948f5f3904c | 73 | #define SM_PAIRING_TIMEOUT (0x01) |
sjallouli | 0:a948f5f3904c | 74 | #define SM_PAIRING_FAILED (0x02) |
sjallouli | 0:a948f5f3904c | 75 | |
sjallouli | 0:a948f5f3904c | 76 | |
sjallouli | 0:a948f5f3904c | 77 | #endif /* __SM_H__ */ |