dragoon  4383
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ble_hci.h
1 /*
2  * Copyright (c) 2012 - 2017, Nordic Semiconductor ASA
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice, this
9  * list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form, except as embedded into a Nordic
12  * Semiconductor ASA integrated circuit in a product or a software update for
13  * such product, must reproduce the above copyright notice, this list of
14  * conditions and the following disclaimer in the documentation and/or other
15  * materials provided with the distribution.
16  *
17  * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
18  * contributors may be used to endorse or promote products derived from this
19  * software without specific prior written permission.
20  *
21  * 4. This software, with or without modification, must only be used with a
22  * Nordic Semiconductor ASA integrated circuit.
23  *
24  * 5. Any software provided in binary form under this license must not be reverse
25  * engineered, decompiled, modified and/or disassembled.
26  *
27  * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
28  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
29  * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
30  * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
31  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
33  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
36  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37  */
38 
45 #ifndef BLE_HCI_H__
46 #define BLE_HCI_H__
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
54 #define BLE_HCI_STATUS_CODE_SUCCESS 0x00
55 #define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND 0x01
56 #define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER 0x02
57 /*0x03 Hardware Failure
58 0x04 Page Timeout
59 */
60 #define BLE_HCI_AUTHENTICATION_FAILURE 0x05
61 #define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING 0x06
62 #define BLE_HCI_MEMORY_CAPACITY_EXCEEDED 0x07
63 #define BLE_HCI_CONNECTION_TIMEOUT 0x08
64 /*0x09 Connection Limit Exceeded
65 0x0A Synchronous Connection Limit To A Device Exceeded
66 0x0B ACL Connection Already Exists*/
67 #define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED 0x0C
68 /*0x0D Connection Rejected due to Limited Resources
69 0x0E Connection Rejected Due To Security Reasons
70 0x0F Connection Rejected due to Unacceptable BD_ADDR
71 0x10 Connection Accept Timeout Exceeded
72 0x11 Unsupported Feature or Parameter Value*/
73 #define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12
74 #define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13
75 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES 0x14
76 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF 0x15
77 #define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16
78 /*
79 0x17 Repeated Attempts
80 0x18 Pairing Not Allowed
81 0x19 Unknown LMP PDU
82 */
83 #define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE 0x1A
84 /*
85 0x1B SCO Offset Rejected
86 0x1C SCO Interval Rejected
87 0x1D SCO Air Mode Rejected*/
88 #define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS 0x1E
89 #define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR 0x1F
90 /*0x20 Unsupported LMP Parameter Value
91 0x21 Role Change Not Allowed
92 */
93 #define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT 0x22
94 #define BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION 0x23
95 #define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED 0x24
96 /*0x25 Encryption Mode Not Acceptable
97 0x26 Link Key Can Not be Changed
98 0x27 Requested QoS Not Supported
99 */
100 #define BLE_HCI_INSTANT_PASSED 0x28
101 #define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED 0x29
102 #define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION 0x2A
103 /*
104 0x2B Reserved
105 0x2C QoS Unacceptable Parameter
106 0x2D QoS Rejected
107 0x2E Channel Classification Not Supported
108 0x2F Insufficient Security
109 */
110 #define BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE 0x30
111 /*
112 0x31 Reserved
113 0x32 Role Switch Pending
114 0x33 Reserved
115 0x34 Reserved Slot Violation
116 0x35 Role Switch Failed
117 0x36 Extended Inquiry Response Too Large
118 0x37 Secure Simple Pairing Not Supported By Host.
119 0x38 Host Busy - Pairing
120 0x39 Connection Rejected due to No Suitable Channel Found*/
121 #define BLE_HCI_CONTROLLER_BUSY 0x3A
122 #define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE 0x3B
123 #define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT 0x3C
124 #define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE 0x3D
125 #define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED 0x3E
130 #ifdef __cplusplus
131 }
132 #endif
133 #endif // BLE_HCI_H__
134