Mistake on this page?
Report an issue in GitHub or email us
hci_defs.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file hci_defs.h
4  *
5  * \brief HCI constants and definitions from the Bluetooth specification.
6  *
7  * Copyright (c) 2009-2019 ARM Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 #ifndef HCI_DEFS_H
25 #define HCI_DEFS_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*! \addtogroup STACK_HCI_API
32  * \{ */
33 
34 /** \name Packet definitions
35  *
36  */
37 /**@{*/
38 #define HCI_CMD_HDR_LEN 3 /*!< Command packet header length */
39 #define HCI_ACL_HDR_LEN 4 /*!< ACL packet header length */
40 #define HCI_ISO_HDR_LEN 4 /*!< ISO packet header length */
41 #define HCI_EVT_HDR_LEN 2 /*!< Event packet header length */
42 #define HCI_EVT_PARAM_MAX_LEN 255 /*!< Maximum length of event packet parameters */
43 #define HCI_ACL_DEFAULT_LEN 27 /*!< Default maximum ACL packet length */
44 #define HCI_PB_FLAG_MASK 0x3000 /*!< ACL packet boundary flag mask */
45 #define HCI_PB_START_H2C 0x0000 /*!< Packet boundary flag, start, host-to-controller */
46 #define HCI_PB_CONTINUE 0x1000 /*!< Packet boundary flag, continue */
47 #define HCI_PB_START_C2H 0x2000 /*!< Packet boundary flag, start, controller-to-host */
48 #define HCI_HANDLE_MASK 0x0FFF /*!< Mask for handle bits in ACL packet */
49 #define HCI_HANDLE_NONE 0xFFFF /*!< Value for invalid handle */
50 
51 #define HCI_ISO_DL_MIN_LEN 4 /*!< ISO Data Load header minimum length */
52 #define HCI_ISO_DL_MAX_LEN 8 /*!< ISO Data Load header maximum length */
53 #define HCI_ISO_TS_LEN 4 /*!< ISO Data Load timestamp length */
54 /**@}*/
55 
56 /** \name Packet types
57  *
58  */
59 #define HCI_CMD_TYPE 0x01 /*!< HCI command packet */
60 #define HCI_ACL_TYPE 0x02 /*!< HCI ACL data packet */
61 #define HCI_EVT_TYPE 0x04 /*!< HCI event packet */
62 #define HCI_ISO_TYPE 0x05 /*!< HCI ISO data packet */
63 /**@}*/
64 
65 /** \name Error codes
66  *
67  */
68 /**@{*/
69 #define HCI_SUCCESS 0x00 /*!< Success */
70 #define HCI_ERR_UNKNOWN_CMD 0x01 /*!< Unknown HCI command */
71 #define HCI_ERR_UNKNOWN_HANDLE 0x02 /*!< Unknown connection identifier */
72 #define HCI_ERR_HARDWARE_FAILURE 0x03 /*!< Hardware failure */
73 #define HCI_ERR_PAGE_TIMEOUT 0x04 /*!< Page timeout */
74 #define HCI_ERR_AUTH_FAILURE 0x05 /*!< Authentication failure */
75 #define HCI_ERR_KEY_MISSING 0x06 /*!< PIN or key missing */
76 #define HCI_ERR_MEMORY_EXCEEDED 0x07 /*!< Memory capacity exceeded */
77 #define HCI_ERR_CONN_TIMEOUT 0x08 /*!< Connection timeout */
78 #define HCI_ERR_CONN_LIMIT 0x09 /*!< Connection limit exceeded */
79 #define HCI_ERR_SYNCH_CONN_LIMIT 0x0A /*!< Synchronous connection limit exceeded */
80 #define HCI_ERR_ACL_CONN_EXISTS 0x0B /*!< ACL connection already exists */
81 #define HCI_ERR_CMD_DISALLOWED 0x0C /*!< Command disallowed */
82 #define HCI_ERR_REJ_RESOURCES 0x0D /*!< Connection rejected limited resources */
83 #define HCI_ERR_REJ_SECURITY 0x0E /*!< Connection rejected security reasons */
84 #define HCI_ERR_REJ_BD_ADDR 0x0F /*!< Connection rejected unacceptable BD_ADDR */
85 #define HCI_ERR_ACCEPT_TIMEOUT 0x10 /*!< Connection accept timeout exceeded */
86 #define HCI_ERR_UNSUP_FEAT 0x11 /*!< Unsupported feature or parameter value */
87 #define HCI_ERR_INVALID_PARAM 0x12 /*!< Invalid HCI command parameters */
88 #define HCI_ERR_REMOTE_TERMINATED 0x13 /*!< Remote user terminated connection */
89 #define HCI_ERR_REMOTE_RESOURCES 0x14 /*!< Remote device low resources */
90 #define HCI_ERR_REMOTE_POWER_OFF 0x15 /*!< Remote device power off */
91 #define HCI_ERR_LOCAL_TERMINATED 0x16 /*!< Connection terminated by local host */
92 #define HCI_ERR_REPEATED_ATTEMPTS 0x17 /*!< Repeated attempts */
93 #define HCI_ERR_PAIRING_NOT_ALLOWED 0x18 /*!< Pairing not allowed */
94 #define HCI_ERR_UNKNOWN_LMP_PDU 0x19 /*!< Unknown LMP PDU */
95 #define HCI_ERR_UNSUP_REMOTE_FEAT 0x1A /*!< Unsupported remote feature */
96 #define HCI_ERR_SCO_OFFSET 0x1B /*!< SCO offset rejected */
97 #define HCI_ERR_SCO_INTERVAL 0x1C /*!< SCO interval rejected */
98 #define HCI_ERR_SCO_MODE 0x1D /*!< SCO air mode rejected */
99 #define HCI_ERR_LMP_PARAM 0x1E /*!< Invalid LMP parameters */
100 #define HCI_ERR_UNSPECIFIED 0x1F /*!< Unspecified error */
101 #define HCI_ERR_UNSUP_LMP_PARAM 0x20 /*!< Unsupported LMP parameter value */
102 #define HCI_ERR_ROLE_CHANGE 0x21 /*!< Role change not allowed */
103 #define HCI_ERR_LL_RESP_TIMEOUT 0x22 /*!< LL response timeout */
104 #define HCI_ERR_LMP_COLLISION 0x23 /*!< LMP error transaction collision */
105 #define HCI_ERR_LMP_PDU 0x24 /*!< LMP pdu not allowed */
106 #define HCI_ERR_ENCRYPT_MODE 0x25 /*!< Encryption mode not acceptable */
107 #define HCI_ERR_LINK_KEY 0x26 /*!< Link key can not be changed */
108 #define HCI_ERR_UNSUP_QOS 0x27 /*!< Requested qos not supported */
109 #define HCI_ERR_INSTANT_PASSED 0x28 /*!< Instant passed */
110 #define HCI_ERR_UNSUP_UNIT_KEY 0x29 /*!< Pairing with unit key not supported */
111 #define HCI_ERR_TRANSACT_COLLISION 0x2A /*!< Different transaction collision */
112 #define HCI_ERR_CHANNEL_CLASS 0x2E /*!< Channel classification not supported */
113 #define HCI_ERR_MEMORY 0x2F /*!< Insufficient security */
114 #define HCI_ERR_PARAMETER_RANGE 0x30 /*!< Parameter out of mandatory range */
115 #define HCI_ERR_ROLE_SWITCH_PEND 0x32 /*!< Role switch pending */
116 #define HCI_ERR_RESERVED_SLOT 0x34 /*!< Reserved slot violation */
117 #define HCI_ERR_ROLE_SWITCH 0x35 /*!< Role switch failed */
118 #define HCI_ERR_INQ_TOO_LARGE 0x36 /*!< Extended inquiry response too large */
119 #define HCI_ERR_UNSUP_SSP 0x37 /*!< Secure simple pairing not supported by host */
120 #define HCI_ERR_HOST_BUSY_PAIRING 0x38 /*!< Host busy - pairing */
121 #define HCI_ERR_NO_CHANNEL 0x39 /*!< Connection rejected no suitable channel */
122 #define HCI_ERR_CONTROLLER_BUSY 0x3A /*!< Controller busy */
123 #define HCI_ERR_CONN_INTERVAL 0x3B /*!< Unacceptable connection interval */
124 #define HCI_ERR_ADV_TIMEOUT 0x3C /*!< Advertising timeout */
125 #define HCI_ERR_MIC_FAILURE 0x3D /*!< Connection terminated due to MIC failure */
126 #define HCI_ERR_CONN_FAIL 0x3E /*!< Connection failed to be established */
127 #define HCI_ERR_MAC_CONN_FAIL 0x3F /*!< MAC connection failed */
128 #define HCI_ERR_COARSE_CLK_ADJ_REJ 0x40 /*!< Coarse clock adjustment rejected */
129 #define HCI_ERR_TYPE0_SUBMAP_NOT_DEF 0x41 /*!< Type0 submap not defined */
130 #define HCI_ERR_UNKNOWN_ADV_ID 0x42 /*!< Unknown advertising identifier */
131 #define HCI_ERR_LIMIT_REACHED 0x43 /*!< Limit reached */
132 #define HCI_ERR_OP_CANCELLED_BY_HOST 0x44 /*!< Operation cancelled by host */
133 /* Version 5.1 */
134 #define HCI_ERR_PKT_TOO_LONG 0x45 /*!< Packet too long */
135 /**@}*/
136 
137 /** \name Command groups
138  *
139  */
140 /**@{*/
141 #define HCI_OGF_NOP 0x00 /*!< No operation */
142 #define HCI_OGF_LINK_CONTROL 0x01 /*!< Link control */
143 #define HCI_OGF_LINK_POLICY 0x02 /*!< Link policy */
144 #define HCI_OGF_CONTROLLER 0x03 /*!< Controller and baseband */
145 #define HCI_OGF_INFORMATIONAL 0x04 /*!< Informational parameters */
146 #define HCI_OGF_STATUS 0x05 /*!< Status parameters */
147 #define HCI_OGF_TESTING 0x06 /*!< Testing */
148 #define HCI_OGF_LE_CONTROLLER 0x08 /*!< LE controller */
149 #define HCI_OGF_VENDOR_SPEC 0x3F /*!< Vendor specific */
150 /**@}*/
151 
152 /** \name NOP command
153  *
154  */
155 /**@{*/
156 #define HCI_OCF_NOP 0x00
157 /**@}*/
158 
159 /** \name Link control commands
160  *
161  */
162 /**@{*/
163 #define HCI_OCF_DISCONNECT 0x06
164 #define HCI_OCF_READ_REMOTE_VER_INFO 0x1D
165 /**@}*/
166 
167 /* Link policy commands (none used for LE) */
168 
169 /** \name Controller and baseband commands
170  *
171  */
172 /**@{*/
173 #define HCI_OCF_SET_EVENT_MASK 0x01
174 #define HCI_OCF_RESET 0x03
175 #define HCI_OCF_READ_TX_PWR_LVL 0x2D
176 #define HCI_OCF_SET_CONTROLLER_TO_HOST_FC 0x31
177 #define HCI_OCF_HOST_BUFFER_SIZE 0x33
178 #define HCI_OCF_HOST_NUM_CMPL_PKTS 0x35
179 /* Version 4.1 */
180 #define HCI_OCF_SET_EVENT_MASK_PAGE2 0x63
181 #define HCI_OCF_READ_AUTH_PAYLOAD_TO 0x7B
182 #define HCI_OCF_WRITE_AUTH_PAYLOAD_TO 0x7C
183 
184 /* Version 5.2 */
185 #define HCI_OCF_CONFIG_DATA_PATH 0x83
186 /**@}*/
187 
188 /** \name Informational commands
189  *
190  */
191 /**@{*/
192 #define HCI_OCF_READ_LOCAL_VER_INFO 0x01
193 #define HCI_OCF_READ_LOCAL_SUP_CMDS 0x02
194 #define HCI_OCF_READ_LOCAL_SUP_FEAT 0x03
195 #define HCI_OCF_READ_BUF_SIZE 0x05
196 #define HCI_OCF_READ_BD_ADDR 0x09
197 
198 /* Version 5.2 */
199 #define HCI_OCF_READ_LOCAL_SUP_CODECS 0x0D
200 #define HCI_OCF_READ_LOCAL_SUP_CODEC_CAP 0x0E
201 #define HCI_OCF_READ_LOCAL_SUP_CONTROLLER_DLY 0x0F
202 /**@}*/
203 
204 /** \name Status commands
205  *
206  */
207 /**@{*/
208 #define HCI_OCF_READ_RSSI 0x05
209 /**@}*/
210 
211 /** \name LE controller commands
212  *
213  */
214 /**@{*/
215 #define HCI_OCF_LE_SET_EVENT_MASK 0x01
216 #define HCI_OCF_LE_READ_BUF_SIZE 0x02
217 #define HCI_OCF_LE_READ_LOCAL_SUP_FEAT 0x03
218 #define HCI_OCF_LE_SET_RAND_ADDR 0x05
219 #define HCI_OCF_LE_SET_ADV_PARAM 0x06
220 #define HCI_OCF_LE_READ_ADV_TX_POWER 0x07
221 #define HCI_OCF_LE_SET_ADV_DATA 0x08
222 #define HCI_OCF_LE_SET_SCAN_RESP_DATA 0x09
223 #define HCI_OCF_LE_SET_ADV_ENABLE 0x0A
224 #define HCI_OCF_LE_SET_SCAN_PARAM 0x0B
225 #define HCI_OCF_LE_SET_SCAN_ENABLE 0x0C
226 #define HCI_OCF_LE_CREATE_CONN 0x0D
227 #define HCI_OCF_LE_CREATE_CONN_CANCEL 0x0E
228 #define HCI_OCF_LE_READ_WHITE_LIST_SIZE 0x0F
229 #define HCI_OCF_LE_CLEAR_WHITE_LIST 0x10
230 #define HCI_OCF_LE_ADD_DEV_WHITE_LIST 0x11
231 #define HCI_OCF_LE_REMOVE_DEV_WHITE_LIST 0x12
232 #define HCI_OCF_LE_CONN_UPDATE 0x13
233 #define HCI_OCF_LE_SET_HOST_CHAN_CLASS 0x14
234 #define HCI_OCF_LE_READ_CHAN_MAP 0x15
235 #define HCI_OCF_LE_READ_REMOTE_FEAT 0x16
236 #define HCI_OCF_LE_ENCRYPT 0x17
237 #define HCI_OCF_LE_RAND 0x18
238 #define HCI_OCF_LE_START_ENCRYPTION 0x19
239 #define HCI_OCF_LE_LTK_REQ_REPL 0x1A
240 #define HCI_OCF_LE_LTK_REQ_NEG_REPL 0x1B
241 #define HCI_OCF_LE_READ_SUP_STATES 0x1C
242 #define HCI_OCF_LE_RECEIVER_TEST 0x1D
243 #define HCI_OCF_LE_TRANSMITTER_TEST 0x1E
244 #define HCI_OCF_LE_TEST_END 0x1F
245 /* Version 4.1 */
246 #define HCI_OCF_LE_REM_CONN_PARAM_REP 0x20
247 #define HCI_OCF_LE_REM_CONN_PARAM_NEG_REP 0x21
248 /* Version 4.2 */
249 #define HCI_OCF_LE_SET_DATA_LEN 0x22
250 #define HCI_OCF_LE_READ_DEF_DATA_LEN 0x23
251 #define HCI_OCF_LE_WRITE_DEF_DATA_LEN 0x24
252 #define HCI_OCF_LE_READ_LOCAL_P256_PUB_KEY 0x25
253 #define HCI_OCF_LE_GENERATE_DHKEY 0x26
254 #define HCI_OCF_LE_ADD_DEV_RES_LIST 0x27
255 #define HCI_OCF_LE_REMOVE_DEV_RES_LIST 0x28
256 #define HCI_OCF_LE_CLEAR_RES_LIST 0x29
257 #define HCI_OCF_LE_READ_RES_LIST_SIZE 0x2A
258 #define HCI_OCF_LE_READ_PEER_RES_ADDR 0x2B
259 #define HCI_OCF_LE_READ_LOCAL_RES_ADDR 0x2C
260 #define HCI_OCF_LE_SET_ADDR_RES_ENABLE 0x2D
261 #define HCI_OCF_LE_SET_RES_PRIV_ADDR_TO 0x2E
262 #define HCI_OCF_LE_READ_MAX_DATA_LEN 0x2F
263 /* Version 5.0 */
264 #define HCI_OCF_LE_READ_PHY 0x30
265 #define HCI_OCF_LE_SET_DEF_PHY 0x31
266 #define HCI_OCF_LE_SET_PHY 0x32
267 #define HCI_OCF_LE_ENHANCED_RECEIVER_TEST 0x33
268 #define HCI_OCF_LE_ENHANCED_TRANSMITTER_TEST 0x34
269 #define HCI_OCF_LE_SET_ADV_SET_RAND_ADDR 0x35
270 #define HCI_OCF_LE_SET_EXT_ADV_PARAM 0x36
271 #define HCI_OCF_LE_SET_EXT_ADV_DATA 0x37
272 #define HCI_OCF_LE_SET_EXT_SCAN_RESP_DATA 0x38
273 #define HCI_OCF_LE_SET_EXT_ADV_ENABLE 0x39
274 #define HCI_OCF_LE_READ_MAX_ADV_DATA_LEN 0x3A
275 #define HCI_OCF_LE_READ_NUM_SUP_ADV_SETS 0x3B
276 #define HCI_OCF_LE_REMOVE_ADV_SET 0x3C
277 #define HCI_OCF_LE_CLEAR_ADV_SETS 0x3D
278 #define HCI_OCF_LE_SET_PER_ADV_PARAM 0x3E
279 #define HCI_OCF_LE_SET_PER_ADV_DATA 0x3F
280 #define HCI_OCF_LE_SET_PER_ADV_ENABLE 0x40
281 #define HCI_OCF_LE_SET_EXT_SCAN_PARAM 0x41
282 #define HCI_OCF_LE_SET_EXT_SCAN_ENABLE 0x42
283 #define HCI_OCF_LE_EXT_CREATE_CONN 0x43
284 #define HCI_OCF_LE_PER_ADV_CREATE_SYNC 0x44
285 #define HCI_OCF_LE_PER_ADV_CREATE_SYNC_CANCEL 0x45
286 #define HCI_OCF_LE_PER_ADV_TERM_SYNC 0x46
287 #define HCI_OCF_LE_ADD_DEV_PER_ADV_LIST 0x47
288 #define HCI_OCF_LE_REMOVE_DEV_PER_ADV_LIST 0x48
289 #define HCI_OCF_LE_CLEAR_PER_ADV_LIST 0x49
290 #define HCI_OCF_LE_READ_PER_ADV_LIST_SIZE 0x4A
291 #define HCI_OCF_LE_READ_TX_POWER 0x4B
292 #define HCI_OCF_LE_READ_RF_PATH_COMP 0x4C
293 #define HCI_OCF_LE_WRITE_RF_PATH_COMP 0x4D
294 #define HCI_OCF_LE_SET_PRIVACY_MODE 0x4E
295 /* Version 5.1 */
296 #define HCI_OCF_LE_RECEIVER_TEST_V3 0x4F
297 #define HCI_OCF_LE_TRANSMITTER_TEST_V3 0x50
298 #define HCI_OCF_LE_SET_CONNLESS_CTE_TX_PARAMS 0x51
299 #define HCI_OCF_LE_SET_CONNLESS_CTE_TX_ENABLE 0x52
300 #define HCI_OCF_LE_SET_CONNLESS_IQ_SAMP_ENABLE 0x53
301 #define HCI_OCF_LE_SET_CONN_CTE_RX_PARAMS 0x54
302 #define HCI_OCF_LE_SET_CONN_CTE_TX_PARAMS 0x55
303 #define HCI_OCF_LE_CONN_CTE_REQ_ENABLE 0x56
304 #define HCI_OCF_LE_CONN_CTE_RSP_ENABLE 0x57
305 #define HCI_OCF_LE_READ_ANTENNA_INFO 0x58
306 #define HCI_OCF_LE_SET_PER_ADV_RCV_ENABLE 0x59
307 #define HCI_OCF_LE_PER_ADV_SYNC_TRANSFER 0x5A
308 #define HCI_OCF_LE_PER_ADV_SET_INFO_TRANSFER 0x5B
309 #define HCI_OCF_LE_SET_PAST_PARAM 0x5C
310 #define HCI_OCF_LE_SET_DEFAULT_PAST_PARAM 0x5D
311 #define HCI_OCF_LE_GENERATE_DHKEY_V2 0x5E
312 #define HCI_OCF_LE_MODIFY_SLEEP_CLK_ACC 0x5F
313 /* Version 5.2 */
314 #define HCI_OCF_LE_READ_BUF_SIZE_V2 0x60
315 #define HCI_OCF_LE_READ_ISO_TX_SYNC 0x61
316 #define HCI_OCF_LE_SET_CIG_PARAMS 0x62
317 #define HCI_OCF_LE_SET_CIG_PARAMS_TEST 0x63
318 #define HCI_OCF_LE_CREATE_CIS 0x64
319 #define HCI_OCF_LE_REMOVE_CIG 0x65
320 #define HCI_OCF_LE_ACCEPT_CIS_REQ 0x66
321 #define HCI_OCF_LE_REJECT_CIS_REQ 0x67
322 #define HCI_OCF_LE_CREATE_BIG 0x68
323 #define HCI_OCF_LE_CREATE_BIG_TEST 0x69
324 #define HCI_OCF_LE_TERMINATE_BIG 0x6A
325 #define HCI_OCF_LE_BIG_CREATE_SYNC 0x6B
326 #define HCI_OCF_LE_BIG_TERMINATE_SYNC 0x6C
327 #define HCI_OCF_LE_REQUEST_PEER_SCA 0x6D
328 #define HCI_OCF_LE_SETUP_ISO_DATA_PATH 0x6E
329 #define HCI_OCF_LE_REMOVE_ISO_DATA_PATH 0x6F
330 #define HCI_OCF_LE_ISO_TX_TEST 0x70
331 #define HCI_OCF_LE_ISO_RX_TEST 0x71
332 #define HCI_OCF_LE_ISO_READ_TEST_COUNTERS 0x72
333 #define HCI_OCF_LE_ISO_TEST_END 0x73
334 #define HCI_OCF_LE_SET_HOST_FEATURE 0x74
335 #define HCI_OCF_LE_READ_ISO_LINK_QUAL 0x75
336 #define HCI_OCF_LE_READ_ENHANCED_TX_POWER 0x76
337 #define HCI_OCF_LE_READ_REMOTE_TX_POWER 0x77
338 #define HCI_OCF_LE_SET_PATH_LOSS_REPORTING_PARAMS 0x78
339 #define HCI_OCF_LE_SET_PATH_LOSS_REPORTING_ENABLE 0x79
340 #define HCI_OCF_LE_SET_TX_POWER_REPORT_ENABLE 0x7A
341 /**@}*/
342 
343 /** \name Opcode manipulation macros
344  *
345  */
346 /**@{*/
347 #define HCI_OPCODE(ogf, ocf) (((ogf) << 10) + (ocf))
348 #define HCI_OGF(opcode) ((opcode) >> 10)
349 #define HCI_OCF(opcode) ((opcode) & 0x03FF)
350 /**@}*/
351 
352 /** \name Command opcodes
353  *
354  */
355 /**@{*/
356 #define HCI_OPCODE_NOP HCI_OPCODE(HCI_OGF_NOP, HCI_OCF_NOP)
357 
358 #define HCI_OPCODE_DISCONNECT HCI_OPCODE(HCI_OGF_LINK_CONTROL, HCI_OCF_DISCONNECT)
359 #define HCI_OPCODE_READ_REMOTE_VER_INFO HCI_OPCODE(HCI_OGF_LINK_CONTROL, HCI_OCF_READ_REMOTE_VER_INFO)
360 
361 #define HCI_OPCODE_SET_EVENT_MASK HCI_OPCODE(HCI_OGF_CONTROLLER, HCI_OCF_SET_EVENT_MASK)
362 #define HCI_OPCODE_RESET HCI_OPCODE(HCI_OGF_CONTROLLER, HCI_OCF_RESET)
363 #define HCI_OPCODE_READ_TX_PWR_LVL HCI_OPCODE(HCI_OGF_CONTROLLER, HCI_OCF_READ_TX_PWR_LVL)
364 #define HCI_OPCODE_SET_EVENT_MASK_PAGE2 HCI_OPCODE(HCI_OGF_CONTROLLER, HCI_OCF_SET_EVENT_MASK_PAGE2)
365 #define HCI_OPCODE_READ_AUTH_PAYLOAD_TO HCI_OPCODE(HCI_OGF_CONTROLLER, HCI_OCF_READ_AUTH_PAYLOAD_TO)
366 #define HCI_OPCODE_WRITE_AUTH_PAYLOAD_TO HCI_OPCODE(HCI_OGF_CONTROLLER, HCI_OCF_WRITE_AUTH_PAYLOAD_TO)
367 #define HCI_OPCODE_CONFIG_DATA_PATH HCI_OPCODE(HCI_OGF_CONTROLLER, HCI_OCF_CONFIG_DATA_PATH)
368 
369 #define HCI_OPCODE_READ_LOCAL_VER_INFO HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_LOCAL_VER_INFO)
370 #define HCI_OPCODE_READ_LOCAL_SUP_CMDS HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_LOCAL_SUP_CMDS)
371 #define HCI_OPCODE_READ_LOCAL_SUP_FEAT HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_LOCAL_SUP_FEAT)
372 #define HCI_OPCODE_READ_BUF_SIZE HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_BUF_SIZE)
373 #define HCI_OPCODE_READ_BD_ADDR HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_BD_ADDR)
374 #define HCI_OPCODE_READ_LOCAL_SUP_CODECS HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_LOCAL_SUP_CODECS)
375 #define HCI_OPCODE_READ_LOCAL_SUP_CODEC_CAP HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_LOCAL_SUP_CODEC_CAP)
376 #define HCI_OPCODE_READ_LOCAL_SUP_CONTROLLER_DLY HCI_OPCODE(HCI_OGF_INFORMATIONAL, HCI_OCF_READ_LOCAL_SUP_CONTROLLER_DLY)
377 
378 #define HCI_OPCODE_READ_RSSI HCI_OPCODE(HCI_OGF_STATUS, HCI_OCF_READ_RSSI)
379 
380 #define HCI_OPCODE_LE_SET_EVENT_MASK HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_EVENT_MASK)
381 #define HCI_OPCODE_LE_READ_BUF_SIZE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_BUF_SIZE)
382 #define HCI_OPCODE_LE_READ_LOCAL_SUP_FEAT HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_LOCAL_SUP_FEAT)
383 #define HCI_OPCODE_LE_SET_RAND_ADDR HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_RAND_ADDR)
384 #define HCI_OPCODE_LE_SET_ADV_PARAM HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_ADV_PARAM)
385 #define HCI_OPCODE_LE_READ_ADV_TX_POWER HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_ADV_TX_POWER)
386 #define HCI_OPCODE_LE_SET_ADV_DATA HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_ADV_DATA)
387 #define HCI_OPCODE_LE_SET_SCAN_RESP_DATA HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_SCAN_RESP_DATA)
388 #define HCI_OPCODE_LE_SET_ADV_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_ADV_ENABLE)
389 #define HCI_OPCODE_LE_SET_SCAN_PARAM HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_SCAN_PARAM)
390 #define HCI_OPCODE_LE_SET_SCAN_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_SCAN_ENABLE)
391 #define HCI_OPCODE_LE_CREATE_CONN HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CREATE_CONN)
392 #define HCI_OPCODE_LE_CREATE_CONN_CANCEL HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CREATE_CONN_CANCEL)
393 #define HCI_OPCODE_LE_READ_WHITE_LIST_SIZE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_WHITE_LIST_SIZE)
394 #define HCI_OPCODE_LE_CLEAR_WHITE_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CLEAR_WHITE_LIST)
395 #define HCI_OPCODE_LE_ADD_DEV_WHITE_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ADD_DEV_WHITE_LIST)
396 #define HCI_OPCODE_LE_REMOVE_DEV_WHITE_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REMOVE_DEV_WHITE_LIST)
397 #define HCI_OPCODE_LE_CONN_UPDATE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CONN_UPDATE)
398 #define HCI_OPCODE_LE_SET_HOST_CHAN_CLASS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_HOST_CHAN_CLASS)
399 #define HCI_OPCODE_LE_READ_CHAN_MAP HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_CHAN_MAP)
400 #define HCI_OPCODE_LE_READ_REMOTE_FEAT HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_REMOTE_FEAT)
401 #define HCI_OPCODE_LE_ENCRYPT HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ENCRYPT)
402 #define HCI_OPCODE_LE_RAND HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_RAND)
403 #define HCI_OPCODE_LE_START_ENCRYPTION HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_START_ENCRYPTION)
404 #define HCI_OPCODE_LE_LTK_REQ_REPL HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_LTK_REQ_REPL)
405 #define HCI_OPCODE_LE_LTK_REQ_NEG_REPL HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_LTK_REQ_NEG_REPL)
406 #define HCI_OPCODE_LE_READ_SUP_STATES HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_SUP_STATES)
407 #define HCI_OPCODE_LE_RECEIVER_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_RECEIVER_TEST)
408 #define HCI_OPCODE_LE_TRANSMITTER_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_TRANSMITTER_TEST)
409 #define HCI_OPCODE_LE_TEST_END HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_TEST_END)
410 /* Version 4.1 */
411 #define HCI_OPCODE_LE_REM_CONN_PARAM_REP HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REM_CONN_PARAM_REP)
412 #define HCI_OPCODE_LE_REM_CONN_PARAM_NEG_REP HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REM_CONN_PARAM_NEG_REP)
413 /* Version 4.2 */
414 #define HCI_OPCODE_LE_SET_DATA_LEN HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_DATA_LEN)
415 #define HCI_OPCODE_LE_READ_DEF_DATA_LEN HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_DEF_DATA_LEN)
416 #define HCI_OPCODE_LE_WRITE_DEF_DATA_LEN HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_WRITE_DEF_DATA_LEN)
417 #define HCI_OPCODE_LE_READ_LOCAL_P256_PUB_KEY HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_LOCAL_P256_PUB_KEY)
418 #define HCI_OPCODE_LE_GENERATE_DHKEY HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_GENERATE_DHKEY)
419 #define HCI_OPCODE_LE_ADD_DEV_RES_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ADD_DEV_RES_LIST)
420 #define HCI_OPCODE_LE_REMOVE_DEV_RES_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REMOVE_DEV_RES_LIST)
421 #define HCI_OPCODE_LE_CLEAR_RES_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CLEAR_RES_LIST)
422 #define HCI_OPCODE_LE_READ_RES_LIST_SIZE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_RES_LIST_SIZE)
423 #define HCI_OPCODE_LE_READ_PEER_RES_ADDR HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_PEER_RES_ADDR)
424 #define HCI_OPCODE_LE_READ_LOCAL_RES_ADDR HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_LOCAL_RES_ADDR)
425 #define HCI_OPCODE_LE_SET_ADDR_RES_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_ADDR_RES_ENABLE)
426 #define HCI_OPCODE_LE_SET_RES_PRIV_ADDR_TO HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_RES_PRIV_ADDR_TO)
427 #define HCI_OPCODE_LE_READ_MAX_DATA_LEN HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_MAX_DATA_LEN)
428 /* Version 5.0 */
429 #define HCI_OPCODE_LE_READ_PHY HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_PHY)
430 #define HCI_OPCODE_LE_SET_DEF_PHY HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_DEF_PHY)
431 #define HCI_OPCODE_LE_SET_PHY HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PHY)
432 #define HCI_OPCODE_LE_ENHANCED_RECEIVER_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ENHANCED_RECEIVER_TEST)
433 #define HCI_OPCODE_LE_ENHANCED_TRANSMITTER_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ENHANCED_TRANSMITTER_TEST)
434 #define HCI_OPCODE_LE_SET_ADV_SET_RAND_ADDR HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_ADV_SET_RAND_ADDR)
435 #define HCI_OPCODE_LE_SET_EXT_ADV_PARAM HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_EXT_ADV_PARAM)
436 #define HCI_OPCODE_LE_SET_EXT_ADV_DATA HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_EXT_ADV_DATA)
437 #define HCI_OPCODE_LE_SET_EXT_SCAN_RESP_DATA HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_EXT_SCAN_RESP_DATA)
438 #define HCI_OPCODE_LE_SET_EXT_ADV_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_EXT_ADV_ENABLE)
439 #define HCI_OPCODE_LE_READ_MAX_ADV_DATA_LEN HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_MAX_ADV_DATA_LEN)
440 #define HCI_OPCODE_LE_READ_NUM_SUP_ADV_SETS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_NUM_SUP_ADV_SETS)
441 #define HCI_OPCODE_LE_REMOVE_ADV_SET HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REMOVE_ADV_SET)
442 #define HCI_OPCODE_LE_CLEAR_ADV_SETS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CLEAR_ADV_SETS)
443 #define HCI_OPCODE_LE_SET_PER_ADV_PARAM HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PER_ADV_PARAM)
444 #define HCI_OPCODE_LE_SET_PER_ADV_DATA HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PER_ADV_DATA)
445 #define HCI_OPCODE_LE_SET_PER_ADV_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PER_ADV_ENABLE)
446 #define HCI_OPCODE_LE_SET_EXT_SCAN_PARAM HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_EXT_SCAN_PARAM)
447 #define HCI_OPCODE_LE_SET_EXT_SCAN_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_EXT_SCAN_ENABLE)
448 #define HCI_OPCODE_LE_EXT_CREATE_CONN HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_EXT_CREATE_CONN)
449 #define HCI_OPCODE_LE_PER_ADV_CREATE_SYNC HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_PER_ADV_CREATE_SYNC)
450 #define HCI_OPCODE_LE_PER_ADV_CREATE_SYNC_CANCEL HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_PER_ADV_CREATE_SYNC_CANCEL)
451 #define HCI_OPCODE_LE_PER_ADV_TERMINATE_SYNC HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_PER_ADV_TERM_SYNC)
452 #define HCI_OPCODE_LE_ADD_DEV_PER_ADV_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ADD_DEV_PER_ADV_LIST)
453 #define HCI_OPCODE_LE_REMOVE_DEV_PER_ADV_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REMOVE_DEV_PER_ADV_LIST)
454 #define HCI_OPCODE_LE_CLEAR_PER_ADV_LIST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CLEAR_PER_ADV_LIST)
455 #define HCI_OPCODE_LE_READ_PER_ADV_LIST_SIZE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_PER_ADV_LIST_SIZE)
456 #define HCI_OPCODE_LE_READ_TX_POWER HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_TX_POWER)
457 #define HCI_OPCODE_LE_WRITE_RF_PATH_COMP HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_WRITE_RF_PATH_COMP)
458 #define HCI_OPCODE_LE_READ_RF_PATH_COMP HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_RF_PATH_COMP)
459 #define HCI_OPCODE_LE_SET_PRIVACY_MODE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PRIVACY_MODE)
460 /* Version 5.1 */
461 #define HCI_OPCODE_LE_RECEIVER_TEST_V3 HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_RECEIVER_TEST_V3)
462 #define HCI_OPCODE_LE_TRANSMITTER_TEST_V3 HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_TRANSMITTER_TEST_V3)
463 #define HCI_OPCODE_LE_SET_CONNLESS_CTE_TX_PARAMS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_CONNLESS_CTE_TX_PARAMS)
464 #define HCI_OPCODE_LE_SET_CONNLESS_CTE_TX_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_CONNLESS_CTE_TX_ENABLE)
465 #define HCI_OPCODE_LE_SET_CONNLESS_IQ_SAMP_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_CONNLESS_IQ_SAMP_ENABLE)
466 #define HCI_OPCODE_LE_SET_CONN_CTE_RX_PARAMS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_CONN_CTE_RX_PARAMS)
467 #define HCI_OPCODE_LE_SET_CONN_CTE_TX_PARAMS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_CONN_CTE_TX_PARAMS)
468 #define HCI_OPCODE_LE_CONN_CTE_REQ_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CONN_CTE_REQ_ENABLE)
469 #define HCI_OPCODE_LE_CONN_CTE_RSP_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CONN_CTE_RSP_ENABLE)
470 #define HCI_OPCODE_LE_READ_ANTENNA_INFO HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_ANTENNA_INFO)
471 #define HCI_OPCODE_LE_SET_PER_ADV_RCV_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PER_ADV_RCV_ENABLE)
472 #define HCI_OPCODE_LE_PER_ADV_SYNC_TRANSFER HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_PER_ADV_SYNC_TRANSFER)
473 #define HCI_OPCODE_LE_PER_ADV_SET_INFO_TRANSFER HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_PER_ADV_SET_INFO_TRANSFER)
474 #define HCI_OPCODE_LE_SET_PAST_PARAM HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PAST_PARAM)
475 #define HCI_OPCODE_LE_SET_DEFAULT_PAST_PARAM HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_DEFAULT_PAST_PARAM)
476 #define HCI_OPCODE_LE_GENERATE_DHKEY_V2 HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_GENERATE_DHKEY_V2)
477 #define HCI_OPCODE_LE_MODIFY_SLEEP_CLK_ACC HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_MODIFY_SLEEP_CLK_ACC)
478 /* Version 5.2 */
479 #define HCI_OPCODE_LE_READ_BUF_SIZE_V2 HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_BUF_SIZE_V2)
480 #define HCI_OPCODE_LE_READ_ISO_TX_SYNC HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_ISO_TX_SYNC)
481 #define HCI_OPCODE_LE_SET_CIG_PARAMS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_CIG_PARAMS)
482 #define HCI_OPCODE_LE_SET_CIG_PARAMS_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_CIG_PARAMS_TEST)
483 #define HCI_OPCODE_LE_CREATE_CIS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CREATE_CIS)
484 #define HCI_OPCODE_LE_REMOVE_CIG HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REMOVE_CIG)
485 #define HCI_OPCODE_LE_ACCEPT_CIS_REQ HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ACCEPT_CIS_REQ)
486 #define HCI_OPCODE_LE_REJECT_CIS_REQ HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REJECT_CIS_REQ)
487 #define HCI_OPCODE_LE_CREATE_BIG HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CREATE_BIG)
488 #define HCI_OPCODE_LE_CREATE_BIG_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_CREATE_BIG_TEST)
489 #define HCI_OPCODE_LE_TERMINATE_BIG HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_TERMINATE_BIG)
490 #define HCI_OPCODE_LE_BIG_CREATE_SYNC HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_BIG_CREATE_SYNC)
491 #define HCI_OPCODE_LE_BIG_TERMINATE_SYNC HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_BIG_TERMINATE_SYNC)
492 #define HCI_OPCODE_LE_REQUEST_PEER_SCA HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REQUEST_PEER_SCA)
493 #define HCI_OPCODE_LE_SETUP_ISO_DATA_PATH HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SETUP_ISO_DATA_PATH)
494 #define HCI_OPCODE_LE_REMOVE_ISO_DATA_PATH HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_REMOVE_ISO_DATA_PATH)
495 #define HCI_OPCODE_LE_ISO_TX_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ISO_TX_TEST)
496 #define HCI_OPCODE_LE_ISO_RX_TEST HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ISO_RX_TEST)
497 #define HCI_OPCODE_LE_ISO_READ_TEST_COUNTERS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ISO_READ_TEST_COUNTERS)
498 #define HCI_OPCODE_LE_ISO_TEST_END HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_ISO_TEST_END)
499 #define HCI_OPCODE_LE_SET_HOST_FEATURE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_HOST_FEATURE)
500 #define HCI_OPCODE_LE_READ_ISO_LINK_QUAL HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_ISO_LINK_QUAL)
501 #define HCI_OPCODE_LE_READ_ENHANCED_TX_POWER HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_ENHANCED_TX_POWER)
502 #define HCI_OPCODE_LE_READ_REMOTE_TX_POWER HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_READ_REMOTE_TX_POWER)
503 #define HCI_OPCODE_LE_SET_PATH_LOSS_REPORTING_PARAMS HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PATH_LOSS_REPORTING_PARAMS)
504 #define HCI_OPCODE_LE_SET_PATH_LOSS_REPORTING_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_PATH_LOSS_REPORTING_ENABLE)
505 #define HCI_OPCODE_LE_SET_TX_POWER_REPORT_ENABLE HCI_OPCODE(HCI_OGF_LE_CONTROLLER, HCI_OCF_LE_SET_TX_POWER_REPORT_ENABLE)
506 /**@}*/
507 
508 /** \name Packetcraft Vendor Specific
509  *
510  */
511 /**@{*/
512 #define HCI_OPCODE_LE_VS_ENABLE_READ_FEAT_ON_CONN ((uint16_t)(0xfff3))
513 /**@}*/
514 
515 /** \name Command parameter lengths
516  *
517  */
518 /**@{*/
519 #define HCI_LEN_NOP 0
520 
521 #define HCI_LEN_DISCONNECT 3
522 #define HCI_LEN_READ_REMOTE_VER_INFO 2
523 
524 #define HCI_LEN_SET_EVENT_MASK 8
525 #define HCI_LEN_SET_EVENT_MASK_PAGE2 8
526 #define HCI_LEN_RESET 0
527 #define HCI_LEN_READ_TX_PWR_LVL 3
528 #define HCI_LEN_SET_CONTROLLER_TO_HOST_FC 1
529 #define HCI_LEN_HOST_BUFFER_SIZE 8
530 #define HCI_LEN_HOST_NUM_CMPL_PKTS 1
531 #define HCI_LEN_CONFIG_DATA_PATH(cLen) (3 + (cLen))
532 
533 #define HCI_LEN_READ_LOCAL_VER_INFO 0
534 #define HCI_LEN_READ_LOCAL_SUP_CMDS 0
535 #define HCI_LEN_READ_LOCAL_SUP_FEAT 0
536 #define HCI_LEN_READ_BUF_SIZE 0
537 #define HCI_LEN_READ_BD_ADDR 0
538 #define HCI_LEN_READ_LOCAL_SUP_CODECS 0
539 #define HCI_LEN_READ_LOCAL_SUP_CODEC_CAP 7
540 #define HCI_LEN_READ_LOCAL_SUP_CONTROLLER_DLY(ccLen) (8 + (ccLen))
541 
542 #define HCI_LEN_READ_RSSI 2
543 #define HCI_LEN_READ_AUTH_PAYLOAD_TO 2
544 #define HCI_LEN_WRITE_AUTH_PAYLOAD_TO 4
545 
546 #define HCI_LEN_LE_SET_EVENT_MASK 8
547 #define HCI_LEN_LE_READ_BUF_SIZE 0
548 #define HCI_LEN_LE_READ_LOCAL_SUP_FEAT 0
549 #define HCI_LEN_LE_SET_RAND_ADDR 6
550 #define HCI_LEN_LE_SET_ADV_PARAM 15
551 #define HCI_LEN_LE_READ_ADV_TX_POWER 0
552 #define HCI_LEN_LE_SET_ADV_DATA 32
553 #define HCI_LEN_LE_SET_SCAN_RESP_DATA 32
554 #define HCI_LEN_LE_SET_ADV_ENABLE 1
555 #define HCI_LEN_LE_SET_SCAN_PARAM 7
556 #define HCI_LEN_LE_SET_SCAN_ENABLE 2
557 #define HCI_LEN_LE_CREATE_CONN 25
558 #define HCI_LEN_LE_CREATE_CONN_CANCEL 0
559 #define HCI_LEN_LE_READ_WHITE_LIST_SIZE 0
560 #define HCI_LEN_LE_CLEAR_WHITE_LIST 0
561 #define HCI_LEN_LE_ADD_DEV_WHITE_LIST 7
562 #define HCI_LEN_LE_REMOVE_DEV_WHITE_LIST 7
563 #define HCI_LEN_LE_CONN_UPDATE 14
564 #define HCI_LEN_LE_SET_HOST_CHAN_CLASS 5
565 #define HCI_LEN_LE_READ_CHAN_MAP 2
566 #define HCI_LEN_LE_READ_REMOTE_FEAT 2
567 #define HCI_LEN_LE_ENCRYPT 32
568 #define HCI_LEN_LE_RAND 0
569 #define HCI_LEN_LE_START_ENCRYPTION 28
570 #define HCI_LEN_LE_LTK_REQ_REPL 18
571 #define HCI_LEN_LE_LTK_REQ_NEG_REPL 2
572 #define HCI_LEN_LE_READ_SUP_STATES 0
573 #define HCI_LEN_LE_RECEIVER_TEST 1
574 #define HCI_LEN_LE_TRANSMITTER_TEST 3
575 #define HCI_LEN_LE_TEST_END 0
576 /* Version 4.1 */
577 #define HCI_LEN_LE_REM_CONN_PARAM_REP 14
578 #define HCI_LEN_LE_REM_CONN_PARAM_NEG_REP 3
579 /* Version 4.2 */
580 #define HCI_LEN_LE_SET_DATA_LEN 6
581 #define HCI_LEN_LE_READ_DEF_DATA_LEN 0
582 #define HCI_LEN_LE_WRITE_DEF_DATA_LEN 4
583 #define HCI_LEN_LE_READ_LOCAL_P256_PUB_KEY 0
584 #define HCI_LEN_LE_GENERATE_DHKEY 64
585 #define HCI_LEN_LE_ADD_DEV_RES_LIST 39
586 #define HCI_LEN_LE_REMOVE_DEV_RES_LIST 7
587 #define HCI_LEN_LE_CLEAR_RES_LIST 0
588 #define HCI_LEN_LE_READ_RES_LIST_SIZE 0
589 #define HCI_LEN_LE_READ_PEER_RES_ADDR 7
590 #define HCI_LEN_LE_READ_LOCAL_RES_ADDR 7
591 #define HCI_LEN_LE_SET_ADDR_RES_ENABLE 1
592 #define HCI_LEN_LE_SET_RES_PRIV_ADDR_TO 2
593 #define HCI_LEN_LE_READ_MAX_DATA_LEN 0
594 /* Version 5.0 */
595 #define HCI_LEN_LE_READ_PHY 2
596 #define HCI_LEN_LE_SET_DEF_PHY 3
597 #define HCI_LEN_LE_SET_PHY 7
598 #define HCI_LEN_LE_ENHANCED_RECEIVER_TEST 3
599 #define HCI_LEN_LE_ENHANCED_TRANSMITTER_TEST 4
600 #define HCI_LEN_LE_SET_ADV_SET_RAND_ADDR 7
601 #define HCI_LEN_LE_SET_EXT_ADV_PARAM 25
602 #define HCI_LEN_LE_SET_EXT_ADV_DATA(len) (4 + (len))
603 #define HCI_LEN_LE_SET_EXT_SCAN_RESP_DATA(len) (4 + (len))
604 #define HCI_LEN_LE_EXT_ADV_ENABLE(numSets) (2 + (4 * (numSets)))
605 #define HCI_LEN_LE_READ_MAX_ADV_DATA_LEN 0
606 #define HCI_LEN_LE_READ_NUM_OF_SUP_ADV_SETS 0
607 #define HCI_LEN_LE_REMOVE_ADV_SET 1
608 #define HCI_LEN_LE_CLEAR_ADV_SETS 0
609 #define HCI_LEN_LE_SET_PER_ADV_PARAM 7
610 #define HCI_LEN_LE_SET_PER_ADV_DATA(len) (3 + (len))
611 #define HCI_LEN_LE_SET_PER_ADV_ENABLE 2
612 #define HCI_LEN_LE_SET_EXT_SCAN_PARAM(numPhys) (3 + (5 * (numPhys)))
613 #define HCI_LEN_LE_SET_EXT_SCAN_ENABLE 6
614 #define HCI_LEN_LE_EXT_CREATE_CONN(numPhys) (10 + (16 * (numPhys)))
615 #define HCI_LEN_LE_PER_ADV_CREATE_SYNC 14
616 #define HCI_LEN_LE_PER_ADV_CREATE_SYNC_CANCEL 0
617 #define HCI_LEN_LE_PER_ADV_TERMINATE_SYNC 2
618 #define HCI_LEN_LE_ADD_DEV_PER_ADV_LIST 8
619 #define HCI_LEN_LE_REMOVE_DEV_PER_ADV_LIST 8
620 #define HCI_LEN_LE_CLEAR_PER_ADV_LIST 0
621 #define HCI_LEN_LE_READ_PER_ADV_LIST_SIZE 0
622 #define HCI_LEN_LE_READ_TX_POWER 0
623 #define HCI_LEN_LE_READ_RF_PATH_COMP 0
624 #define HCI_LEN_LE_WRITE_RF_PATH_COMP 4
625 #define HCI_LEN_LE_SET_PRIVACY_MODE 8
626 /* Version 5.1 */
627 #define HCI_LEN_LE_SET_CONN_CTE_RX_PARAMS(spLen) (5 + (spLen))
628 #define HCI_LEN_LE_SET_CONN_CTE_TX_PARAMS(spLen) (4 + (spLen))
629 #define HCI_LEN_LE_CONN_CTE_REQ_ENABLE 7
630 #define HCI_LEN_LE_CONN_CTE_RSP_ENABLE 3
631 #define HCI_LEN_LE_READ_ANTENNA_INFO 0
632 #define HCI_LEN_LE_SET_PER_ADV_RCV_ENABLE 3
633 #define HCI_LEN_LE_PER_ADV_SYNC_TRANSFER 6
634 #define HCI_LEN_LE_PER_ADV_SET_INFO_TRANSFER 5
635 #define HCI_LEN_LE_SET_PAST_PARAM 8
636 #define HCI_LEN_LE_SET_DEFAULT_PAST_PARAM 6
637 #define HCI_LEN_LE_GENERATE_DHKEY_V2 65
638 
639 /* Version Milan */
640 #define HCI_LEN_LE_SET_CIG_PARAMS(numCis) (15 + (9 * (numCis)))
641 #define HCI_LEN_LE_CREATE_CIS(numCis) (1 + (4 * (numCis)))
642 #define HCI_LEN_LE_REMOVE_CIG 1
643 #define HCI_LEN_LE_ACCEPT_CIS_REQ 2
644 #define HCI_LEN_LE_REJECT_CIS_REQ 3
645 #define HCI_LEN_LE_REQUEST_PEER_SCA 2
646 #define HCI_LEN_LE_CREATE_BIS (15 + HCI_BC_LEN)
647 #define HCI_LEN_LE_TERMINATE_BIG 2
648 #define HCI_LEN_LE_BIG_CREATE_SYNC(numBis) (8 + HCI_BC_LEN + (numBis))
649 #define HCI_LEN_LE_BIG_TERMINATE_SYNC 1
650 #define HCI_LEN_LE_SETUP_ISO_DATA_PATH(ccLen) (13 + (ccLen))
651 #define HCI_LEN_LE_REMOVE_ISO_DATA_PATH 3
652 #define HCI_LEN_LE_ISO_TX_TEST 3
653 #define HCI_LEN_LE_ISO_RX_TEST 3
654 #define HCI_LEN_LE_ISO_READ_TEST_COUNTERS 2
655 #define HCI_LEN_LE_ISO_TEST_END 2
656 #define HCI_LEN_LE_SET_HOST_FEATURE 2
657 /**@}*/
658 
659 /** \name Events
660  *
661  */
662 /**@{*/
663 #define HCI_DISCONNECT_CMPL_EVT 0x05
664 #define HCI_ENC_CHANGE_EVT 0x08
665 #define HCI_READ_REMOTE_VER_INFO_CMPL_EVT 0x0C
666 #define HCI_CMD_CMPL_EVT 0x0E
667 #define HCI_CMD_STATUS_EVT 0x0F
668 #define HCI_HW_ERROR_EVT 0x10
669 #define HCI_NUM_CMPL_PKTS_EVT 0x13
670 #define HCI_DATA_BUF_OVERFLOW_EVT 0x1A
671 #define HCI_ENC_KEY_REFRESH_CMPL_EVT 0x30
672 #define HCI_LE_META_EVT 0x3E
673 #define HCI_AUTH_PAYLOAD_TIMEOUT_EVT 0x57
674 #define HCI_VENDOR_SPEC_EVT 0xFF
675 /**@}*/
676 
677 /** \name LE Subevents
678  *
679  */
680 /**@{*/
681 #define HCI_LE_CONN_CMPL_EVT 0x01
682 #define HCI_LE_ADV_REPORT_EVT 0x02
683 #define HCI_LE_CONN_UPDATE_CMPL_EVT 0x03
684 #define HCI_LE_READ_REMOTE_FEAT_CMPL_EVT 0x04
685 #define HCI_LE_LTK_REQ_EVT 0x05
686 /* Version 4.1 */
687 #define HCI_LE_REM_CONN_PARAM_REQ_EVT 0x06
688 /* Version 4.2 */
689 #define HCI_LE_DATA_LEN_CHANGE_EVT 0x07
690 #define HCI_LE_READ_LOCAL_P256_PUB_KEY_CMPL_EVT 0x08
691 #define HCI_LE_GENERATE_DHKEY_CMPL_EVT 0x09
692 #define HCI_LE_ENHANCED_CONN_CMPL_EVT 0x0A
693 #define HCI_LE_DIRECT_ADV_REPORT_EVT 0x0B
694 /* Version 5.0 */
695 #define HCI_LE_PHY_UPDATE_CMPL_EVT 0x0C
696 #define HCI_LE_EXT_ADV_REPORT_EVT 0x0D
697 #define HCI_LE_PER_ADV_SYNC_EST_EVT 0x0E
698 #define HCI_LE_PER_ADV_REPORT_EVT 0x0F
699 #define HCI_LE_PER_ADV_SYNC_LOST_EVT 0x10
700 #define HCI_LE_SCAN_TIMEOUT_EVT 0x11
701 #define HCI_LE_ADV_SET_TERM_EVT 0x12
702 #define HCI_LE_SCAN_REQ_RCVD_EVT 0x13
703 #define HCI_LE_CH_SEL_ALGO_EVT 0x14
704 /* Version 5.1 */
705 #define HCI_LE_CONNLESS_IQ_REPORT_EVT 0x15
706 #define HCI_LE_CONN_IQ_REPORT_EVT 0x16
707 #define HCI_LE_CTE_REQ_FAILED_EVT 0x17
708 #define HCI_LE_PER_SYNC_TRSF_RCVD_EVT 0x18
709 /* Version 5.2 */
710 #define HCI_LE_CIS_EST_EVT 0x19
711 #define HCI_LE_CIS_REQ_EVT 0x1A
712 #define HCI_LE_CREATE_BIG_CMPL_EVT 0x1B
713 #define HCI_LE_TERMINATE_BIG_CMPL_EVT 0x1C
714 #define HCI_LE_BIG_SYNC_EST_EVT 0x1D
715 #define HCI_LE_BIG_SYNC_LOST_EVT 0x1E
716 #define HCI_LE_REQ_PEER_SCA_CMPLT_EVT 0x1F
717 #define HCI_LE_PATH_LOSS_REPORT_EVT 0x20
718 #define HCI_LE_POWER_REPORT_EVT 0x21
719 #define HCI_LE_BIG_INFO_ADV_REPORT_EVT 0x22
720 /**@}*/
721 
722 /** \name Event parameter lengths
723  *
724  */
725 /**@{*/
726 #define HCI_LEN_DISCONNECT_CMPL 4 /*!< Disconnect event length. */
727 #define HCI_LEN_READ_REMOTE_VER_INFO_CMPL 8 /*!< Read remove version info complete event length. */
728 #define HCI_LEN_CMD_CMPL 3 /*!< Command complete event length. */
729 #define HCI_LEN_CMD_STATUS 4 /*!< Command status event length. */
730 #define HCI_LEN_HW_ERR 1 /*!< Hardware error event length. */
731 #define HCI_LEN_NUM_CMPL_PKTS(numHdls) (1 + (4 * numHdls)) /*!< Number of completed packets event length. */
732 #define HCI_LEN_ENC_CHANGE 4 /*!< Encryption change event length. */
733 #define HCI_LEN_ENC_KEY_REFRESH_CMPL 3 /*!< Encryption key refresh complete event length. */
734 #define HCI_LEN_LE_CONN_CMPL 19 /*!< Connection complete event length. */
735 #define HCI_LEN_LE_ADV_RPT_MIN 12 /*!< Advertising report event minimum length. */
736 #define HCI_LEN_LE_CONN_UPDATE_CMPL 10 /*!< Connection update complete event length. */
737 #define HCI_LEN_LE_READ_REMOTE_FEAT_CMPL 12 /*!< Read remote feature event length. */
738 #define HCI_LEN_LE_LTK_REQ 13 /*!< LTK request event length. */
739 /* Version 4.1 */
740 #define HCI_LEN_LE_REM_CONN_PARAM_REQ 11 /*!< Remote connection parameter event length. */
741 #define HCI_LEN_LE_DATA_LEN_CHANGE 11 /*!< Data length change event length. */
742 #define HCI_LEN_LE_READ_PUB_KEY_CMPL 66 /*!< Read local P256 public key compete event length. */
743 #define HCI_LEN_LE_GEN_DHKEY_CMPL 34 /*!< Generate DH key complete event length. */
744 #define HCI_LEN_LE_ENHANCED_CONN_CMPL 31 /*!< Enhanced connection complete event length. */
745 #define HCI_LEN_LE_DIRECT_ADV_REPORT 18 /*!< Direct advertising report event length. */
746 #define HCI_LEN_AUTH_PAYLOAD_TIMEOUT 2 /*!< Authenticated payload timeout event length. */
747 /* Version 5.0 */
748 #define HCI_LEN_LE_PHY_UPDATE_CMPL 6 /*!< PHY update complete event length. */
749 #define HCI_LEN_LE_CH_SEL_ALGO 4 /*!< Channel selection algorithm event length. */
750 #define HCI_LEN_LE_PHY_UPDATE_CMPL 6 /*!< PHY update complete event length. */
751 #define HCI_LEN_LE_EXT_ADV_REPORT_MIN 26 /*!< Extended advertising report minimum length. */
752 #define HCI_LEN_LE_PER_ADV_SYNC_EST 16 /*!< Periodic advertising sync established event length. */
753 #define HCI_LEN_LE_PER_ADV_REPORT 8 /*!< Periodic advertising report event length. */
754 #define HCI_LEN_LE_PER_ADV_SYNC_LOST 3 /*!< Periodic advertising sync lost event length. */
755 #define HCI_LEN_LE_SCAN_TIMEOUT 1 /*!< Scan timeout event length. */
756 #define HCI_LEN_LE_ADV_SET_TERM 6 /*!< Advertising set terminated event length. */
757 #define HCI_LEN_LE_SCAN_REQ_RCVD 9 /*!< Scan request received event length. */
758 /* Version 5.1 */
759 #define HCI_LEN_LE_PER_SYNC_TRSF_RCVT 20 /*!< Periodic advertising sync transfer received event length. */
760 /* Version 5.2 */
761 #define HCI_LEN_LE_CIS_EST 29 /*!< CIS established event length. */
762 #define HCI_LEN_LE_CIS_REQ 7 /*!< CIS request event length. */
763 #define HCI_LEN_LE_PEER_SCA_CMPL 5 /*!< Request peer SCA complete event length. */
764 #define HCI_LEN_LE_CREATE_BIG_CMPL(numBis) (19 + (2 * numBis)) /*!< Create BIG complete event length. */
765 #define HCI_LEN_LE_TERMINATE_BIG_CMPL 3 /*!< Terminate BIG complete event length. */
766 #define HCI_LEN_LE_BIG_SYNC_EST(numBis) (15 + (2 * numBis)) /*!< BIG sync established event length. */
767 #define HCI_LEN_LE_BIG_SYNC_LOST 3 /*!< BIG sync lost event length. */
768 #define HCI_LEN_LE_POWER_REPORT 9 /*!< Power reporting event length. */
769 #define HCI_LEN_LE_PATH_LOSS_ZONE 5 /*!< Path loss reporting event length. */
770 #define HCI_LEN_LE_BIG_INFO_ADV_REPORT 20 /*!< BIG Info advertising report length. */
771 
772 /**@}*/
773 
774 /** \name Supported commands
775  *
776  */
777 /**@{*/
778 #define HCI_SUP_DISCONNECT 0x20 /*!< Byte 0 */
779 #define HCI_SUP_READ_REMOTE_VER_INFO 0x80 /*!< Byte 2 */
780 #define HCI_SUP_SET_EVENT_MASK 0x40 /*!< Byte 5 */
781 #define HCI_SUP_RESET 0x80 /*!< Byte 5 */
782 #define HCI_SUP_READ_TX_PWR_LVL 0x04 /*!< Byte 10 */
783 #define HCI_SUP_READ_LOCAL_VER_INFO 0x08 /*!< Byte 14 */
784 #define HCI_SUP_READ_LOCAL_SUP_FEAT 0x20 /*!< Byte 14 */
785 #define HCI_SUP_READ_BD_ADDR 0x02 /*!< Byte 15 */
786 #define HCI_SUP_READ_RSSI 0x20 /*!< Byte 15 */
787 #define HCI_SUP_SET_EVENT_MASK_PAGE2 0x04 /*!< Byte 22 */
788 #define HCI_SUP_LE_SET_EVENT_MASK 0x01 /*!< Byte 25 */
789 #define HCI_SUP_LE_READ_BUF_SIZE 0x02 /*!< Byte 25 */
790 #define HCI_SUP_LE_READ_LOCAL_SUP_FEAT 0x04 /*!< Byte 25 */
791 #define HCI_SUP_LE_SET_RAND_ADDR 0x10 /*!< Byte 25 */
792 #define HCI_SUP_LE_SET_ADV_PARAM 0x20 /*!< Byte 25 */
793 #define HCI_SUP_LE_READ_ADV_TX_POWER 0x40 /*!< Byte 25 */
794 #define HCI_SUP_LE_SET_ADV_DATA 0x80 /*!< Byte 25 */
795 #define HCI_SUP_LE_SET_SCAN_RESP_DATA 0x01 /*!< Byte 26 */
796 #define HCI_SUP_LE_SET_ADV_ENABLE 0x02 /*!< Byte 26 */
797 #define HCI_SUP_LE_SET_SCAN_PARAM 0x04 /*!< Byte 26 */
798 #define HCI_SUP_LE_SET_SCAN_ENABLE 0x08 /*!< Byte 26 */
799 #define HCI_SUP_LE_CREATE_CONN 0x10 /*!< Byte 26 */
800 #define HCI_SUP_LE_CREATE_CONN_CANCEL 0x20 /*!< Byte 26 */
801 #define HCI_SUP_LE_READ_WHITE_LIST_SIZE 0x40 /*!< Byte 26 */
802 #define HCI_SUP_LE_CLEAR_WHITE_LIST 0x80 /*!< Byte 26 */
803 #define HCI_SUP_LE_ADD_DEV_WHITE_LIST 0x01 /*!< Byte 27 */
804 #define HCI_SUP_LE_REMOVE_DEV_WHITE_LIST 0x02 /*!< Byte 27 */
805 #define HCI_SUP_LE_CONN_UPDATE 0x04 /*!< Byte 27 */
806 #define HCI_SUP_LE_SET_HOST_CHAN_CLASS 0x08 /*!< Byte 27 */
807 #define HCI_SUP_LE_READ_CHAN_MAP 0x10 /*!< Byte 27 */
808 #define HCI_SUP_LE_READ_REMOTE_FEAT 0x20 /*!< Byte 27 */
809 #define HCI_SUP_LE_ENCRYPT 0x40 /*!< Byte 27 */
810 #define HCI_SUP_LE_RAND 0x80 /*!< Byte 27 */
811 #define HCI_SUP_LE_START_ENCRYPTION 0x01 /*!< Byte 28 */
812 #define HCI_SUP_LE_LTK_REQ_REPL 0x02 /*!< Byte 28 */
813 #define HCI_SUP_LE_LTK_REQ_NEG_REPL 0x04 /*!< Byte 28 */
814 #define HCI_SUP_LE_READ_SUP_STATES 0x08 /*!< Byte 28 */
815 #define HCI_SUP_LE_RECEIVER_TEST 0x10 /*!< Byte 28 */
816 #define HCI_SUP_LE_TRANSMITTER_TEST 0x20 /*!< Byte 28 */
817 #define HCI_SUP_LE_TEST_END 0x40 /*!< Byte 28 */
818 #define HCI_SUP_READ_AUTH_PAYLOAD_TO 0x10 /*!< Byte 32 */
819 #define HCI_SUP_WRITE_AUTH_PAYLOAD_TO 0x20 /*!< Byte 32 */
820 /* Version 4.1 */
821 #define HCI_SUP_LE_REM_CONN_PARAM_REQ_REPL 0x10 /*!< Byte 33 */
822 #define HCI_SUP_LE_REM_CONN_PARAM_REQ_NEG_REPL 0x20 /*!< Byte 33 */
823 /* Version 4.2 */
824 #define HCI_SUP_LE_SET_DATA_LEN 0x40 /*!< Byte 33 */
825 #define HCI_SUP_LE_READ_DEF_DATA_LEN 0x80 /*!< Byte 33 */
826 #define HCI_SUP_LE_WRITE_DEF_DATA_LEN 0x01 /*!< Byte 34 */
827 #define HCI_SUP_LE_READ_LOCAL_P256_PUB_KEY 0x02 /*!< Byte 34 */
828 #define HCI_SUP_LE_GENERATE_DHKEY 0x04 /*!< Byte 34 */
829 #define HCI_SUP_LE_ADD_DEV_RES_LIST_EVT 0x08 /*!< Byte 34 */
830 #define HCI_SUP_LE_REMOVE_DEV_RES_LIST 0x10 /*!< Byte 34 */
831 #define HCI_SUP_LE_CLEAR_RES_LIST 0x20 /*!< Byte 34 */
832 #define HCI_SUP_LE_READ_RES_LIST_SIZE 0x40 /*!< Byte 34 */
833 #define HCI_SUP_LE_READ_PEER_RES_ADDR 0x80 /*!< Byte 34 */
834 #define HCI_SUP_LE_READ_LOCAL_RES_ADDR 0x01 /*!< Byte 35 */
835 #define HCI_SUP_LE_SET_ADDR_RES_ENABLE 0x02 /*!< Byte 35 */
836 #define HCI_SUP_LE_SET_RES_PRIV_ADDR_TO 0x04 /*!< Byte 35 */
837 #define HCI_SUP_LE_READ_MAX_DATA_LEN 0x08 /*!< Byte 35 */
838 /* Version 5.0 */
839 #define HCI_SUP_LE_READ_PHY 0x10 /*!< Byte 35 */
840 #define HCI_SUP_LE_SET_DEF_PHY 0x20 /*!< Byte 35 */
841 #define HCI_SUP_LE_SET_PHY 0x40 /*!< Byte 35 */
842 #define HCI_SUP_LE_ENHANCED_RECEIVER_TEST 0x80 /*!< Byte 35 */
843 #define HCI_SUP_LE_ENHANCED_TRANSMITTER_TEST 0x01 /*!< Byte 36 */
844 #define HCI_SUP_LE_SET_ADV_SET_RAND_ADDR 0x02 /*!< Byte 36 */
845 #define HCI_SUP_LE_SET_EXT_ADV_PARAM 0x04 /*!< Byte 36 */
846 #define HCI_SUP_LE_SET_EXT_ADV_DATA 0x08 /*!< Byte 36 */
847 #define HCI_SUP_LE_SET_EXT_SCAN_RESP_DATA 0x10 /*!< Byte 36 */
848 #define HCI_SUP_LE_SET_EXT_ADV_ENABLE 0x20 /*!< Byte 36 */
849 #define HCI_SUP_LE_READ_MAX_ADV_DATA_LEN 0x40 /*!< Byte 36 */
850 #define HCI_SUP_LE_READ_NUM_OF_SUP_ADV_SETS 0x80 /*!< Byte 36 */
851 #define HCI_SUP_LE_REMOVE_ADV_SET 0x01 /*!< Byte 37 */
852 #define HCI_SUP_LE_CLEAR_ADV_SETS 0x02 /*!< Byte 37 */
853 #define HCI_SUP_LE_SET_PER_ADV_PARAM 0x04 /*!< Byte 37 */
854 #define HCI_SUP_LE_SET_PER_ADV_DATA 0x08 /*!< Byte 37 */
855 #define HCI_SUP_LE_SET_PER_ADV_ENABLE 0x10 /*!< Byte 37 */
856 #define HCI_SUP_LE_SET_EXT_SCAN_PARAM 0x20 /*!< Byte 37 */
857 #define HCI_SUP_LE_SET_EXT_SCAN_ENABLE 0x40 /*!< Byte 37 */
858 #define HCI_SUP_LE_EXT_CREATE_CONN 0x80 /*!< Byte 37 */
859 #define HCI_SUP_LE_PER_ADV_CREATE_SYNC 0x01 /*!< Byte 38 */
860 #define HCI_SUP_LE_PER_ADV_CREATE_SYNC_CANCEL 0x02 /*!< Byte 38 */
861 #define HCI_SUP_LE_PER_ADV_TERMINATE_SYNC 0x04 /*!< Byte 38 */
862 #define HCI_SUP_LE_ADD_DEV_PER_ADV_LIST 0x08 /*!< Byte 38 */
863 #define HCI_SUP_LE_REMOVE_DEV_PER_ADV_LIST 0x10 /*!< Byte 38 */
864 #define HCI_SUP_LE_CLEAR_PER_ADV_LIST 0x20 /*!< Byte 38 */
865 #define HCI_SUP_LE_READ_PER_ADV_LIST_SIZE 0x40 /*!< Byte 38 */
866 #define HCI_SUP_LE_READ_TX_POWER 0x80 /*!< Byte 38 */
867 #define HCI_SUP_LE_READ_RF_PATH_COMP 0x01 /*!< Byte 39 */
868 #define HCI_SUP_LE_WRITE_RF_PATH_COMP 0x02 /*!< Byte 39 */
869 #define HCI_SUP_LE_SET_PRIVACY_MODE 0x04 /*!< Byte 39 */
870 /* Version 5.1 */
871 #define HCI_SUP_LE_RECEIVER_TEST_V3 0x08 /*!< Byte 39 */
872 #define HCI_SUP_LE_TRANSMITTER_TEST_V3 0x10 /*!< Byte 39 */
873 #define HCI_SUP_LE_SET_CONNLESS_CTE_TX_PARAMS 0x20 /*!< Byte 39 */
874 #define HCI_SUP_LE_SET_CONNLESS_CTE_TX_ENABLE 0x40 /*!< Byte 39 */
875 #define HCI_SUP_LE_SET_CONNLESS_IQ_SAMP_ENABLE 0x80 /*!< Byte 39 */
876 #define HCI_SUP_LE_SET_CONN_CTE_RX_PARAMS 0x01 /*!< Byte 40 */
877 #define HCI_SUP_LE_SET_CONN_CTE_TX_PARAMS 0x02 /*!< Byte 40 */
878 #define HCI_SUP_LE_CONN_CTE_REQ_ENABLE 0x04 /*!< Byte 40 */
879 #define HCI_SUP_LE_CONN_CTE_RSP_ENABLE 0x08 /*!< Byte 40 */
880 #define HCI_SUP_LE_READ_ANTENNA_INFO 0x10 /*!< Byte 40 */
881 #define HCI_SUP_LE_SET_PER_ADV_RCV_ENABLE 0x20 /*!< Byte 40 */
882 #define HCI_SUP_LE_PER_ADV_SYNC_TRANSFER 0x40 /*!< Byte 40 */
883 #define HCI_SUP_LE_PER_ADV_SET_INFO_TRANSFER 0x80 /*!< Byte 40 */
884 #define HCI_SUP_LE_SET_PAST_PARAM 0x01 /*!< Byte 41 */
885 #define HCI_SUP_LE_SET_DEFAULT_PAST_PARAM 0x02 /*!< Byte 41 */
886 #define HCI_SUP_LE_GENERATE_DHKEY_V2 0x04 /*!< Byte 41 */
887 #define HCI_SUP_LE_MODIFY_SLEEP_CLK_ACCURACY 0x10 /*!< Byte 41 */
888 /* Version 5.2 */
889 #define HCI_SUP_LE_READ_BUF_SIZE_V2 0x20 /*!< Byte 41 */
890 #define HCI_SUP_LE_READ_ISO_TX_SYNC 0x40 /*!< Byte 41 */
891 #define HCI_SUP_LE_SET_CIG_PARAM 0x80 /*!< Byte 41 */
892 #define HCI_SUP_LE_SET_CIG_PARAM_TEST 0x01 /*!< Byte 42 */
893 #define HCI_SUP_LE_CREATE_CIS 0x02 /*!< Byte 42 */
894 #define HCI_SUP_LE_REMOVE_CIG 0x04 /*!< Byte 42 */
895 #define HCI_SUP_LE_ACCEPT_CIS_REQ 0x08 /*!< Byte 42 */
896 #define HCI_SUP_LE_REJECT_CIS_REQ 0x10 /*!< Byte 42 */
897 #define HCI_SUP_LE_CREATE_BIG 0x20 /*!< Byte 42 */
898 #define HCI_SUP_LE_CREATE_BIG_TEST 0x40 /*!< Byte 42 */
899 #define HCI_SUP_LE_TERMINATE_BIG 0x80 /*!< Byte 42 */
900 #define HCI_SUP_LE_BIG_CREATE_SYNC 0x01 /*!< Byte 43 */
901 #define HCI_SUP_LE_BIG_TERMINATE_SYNC 0x02 /*!< Byte 43 */
902 #define HCI_SUP_LE_REQ_PEER_SCA 0x04 /*!< Byte 43 */
903 #define HCI_SUP_LE_SETUP_ISO_DATA_PATH 0x08 /*!< Byte 43 */
904 #define HCI_SUP_LE_REMOVE_ISO_DATA_PATH 0x10 /*!< Byte 43 */
905 #define HCI_SUP_LE_ISO_TRANSMIT_TEST 0x20 /*!< Byte 43 */
906 #define HCI_SUP_LE_ISO_RECEIVE_TEST 0x40 /*!< Byte 43 */
907 #define HCI_SUP_LE_ISO_READ_TEST_COUNTERS 0x80 /*!< Byte 43 */
908 #define HCI_SUP_LE_ISO_TEST_END 0x01 /*!< Byte 44 */
909 #define HCI_SUP_LE_SET_HOST_FEATURE 0x02 /*!< Byte 44 */
910 #define HCI_SUP_LE_READ_ISO_LINK_QUALITY 0x04 /*!< Byte 44 */
911 #define HCI_SUP_LE_ENH_READ_TX_POWER_LEVEL 0x08 /*!< Byte 44 */
912 #define HCI_SUP_LE_READ_REMOTE_TX_POWER_LEVEL 0x01 /*!< Byte 44 */
913 #define HCI_SUP_LE_SET_PATH_LOSS_REPORT_PARAM 0x02 /*!< Byte 44 */
914 #define HCI_SUP_LE_SET_PATH_LOSS_REPORT_ENABLE 0x04 /*!< Byte 44 */
915 #define HCI_SUP_LE_SET_TX_POWER_REPORT_ENABLE 0x08 /*!< Byte 44 */
916 #define HCI_SUP_LE_TRANSMITTER_TEST_V4 0x01 /*!< Byte 45 */
917 #define HCI_SUP_READ_LOCAL_SUP_CODECS_V2 0x02 /*!< Byte 45 */
918 #define HCI_SUP_READ_LOCAL_SUP_CODEC_CAP 0x04 /*!< Byte 45 */
919 #define HCI_SUP_READ_LOCAL_SUP_CTR_DLY 0x08 /*!< Byte 45 */
920 #define HCI_SUP_CONFIG_DATA_PATH 0x10 /*!< Byte 45 */
921 
922 #define HCI_SUP_CMD_LEN 64 /*!< Byte length of support cmd field. */
923 
924 /**@}*/
925 
926 /** \name Event mask
927  *
928  */
929 /**@{*/
930 #define HCI_EVT_MASK_DISCONNECT_CMPL 0x10 /*!< Byte 0 */
931 #define HCI_EVT_MASK_ENC_CHANGE 0x80 /*!< Byte 0 */
932 #define HCI_EVT_MASK_READ_REMOTE_VER_INFO_CMPL 0x08 /*!< Byte 1 */
933 #define HCI_EVT_MASK_HW_ERROR 0x80 /*!< Byte 1 */
934 #define HCI_EVT_MASK_DATA_BUF_OVERFLOW 0x02 /*!< Byte 3 */
935 #define HCI_EVT_MASK_ENC_KEY_REFRESH_CMPL 0x80 /*!< Byte 5 */
936 #define HCI_EVT_MASK_LE_META 0x20 /*!< Byte 7 */
937 /**@}*/
938 
939 /** \name Event mask page 2
940  *
941  */
942 /**@{*/
943 #define HCI_EVT_MASK_AUTH_PAYLOAD_TIMEOUT 0x80 /*!< Byte 2 */
944 /**@}*/
945 
946 /** \name LE event mask
947  *
948  */
949 /**@{*/
950 #define HCI_EVT_MASK_LE_CONN_CMPL_EVT 0x01 /*!< Byte 0 */
951 #define HCI_EVT_MASK_LE_ADV_REPORT_EVT 0x02 /*!< Byte 0 */
952 #define HCI_EVT_MASK_LE_CONN_UPDATE_CMPL_EVT 0x04 /*!< Byte 0 */
953 #define HCI_EVT_MASK_LE_READ_REMOTE_FEAT_CMPL_EVT 0x08 /*!< Byte 0 */
954 #define HCI_EVT_MASK_LE_LTK_REQ_EVT 0x10 /*!< Byte 0 */
955 /* Version 4.1 */
956 #define HCI_EVT_MASK_LE_REMOTE_CONN_PARAM_REQ_EVT 0x20 /*!< Byte 0 */
957 /* Version 4.2 */
958 #define HCI_EVT_MASK_LE_DATA_LEN_CHANGE_EVT 0x40 /*!< Byte 0 */
959 #define HCI_EVT_MASK_LE_READ_LOCAL_P256_PUB_KEY_CMPL 0x80 /*!< Byte 0 */
960 #define HCI_EVT_MASK_LE_GENERATE_DHKEY_CMPL 0x01 /*!< Byte 1 */
961 #define HCI_EVT_MASK_LE_ENHANCED_CONN_CMPL_EVT 0x02 /*!< Byte 1 */
962 #define HCI_EVT_MASK_LE_DIRECT_ADV_REPORT_EVT 0x04 /*!< Byte 1 */
963 /* Version 5.0 */
964 #define HCI_EVT_MASK_LE_PHY_UPDATE_CMPL_EVT 0x08 /*!< Byte 1 */
965 #define HCI_EVT_MASK_LE_EXT_ADV_REPORT_EVT 0x10 /*!< Byte 1 */
966 #define HCI_EVT_MASK_LE_PER_ADV_SYNC_EST_EVT 0x20 /*!< Byte 1 */
967 #define HCI_EVT_MASK_LE_PER_ADV_REPORT_EVT 0x40 /*!< Byte 1 */
968 #define HCI_EVT_MASK_LE_PER_ADV_SYNC_LOST_EVT 0x80 /*!< Byte 1 */
969 #define HCI_EVT_MASK_LE_SCAN_TIMEOUT_EVT 0x01 /*!< Byte 2 */
970 #define HCI_EVT_MASK_LE_ADV_SET_TERM_EVT 0x02 /*!< Byte 2 */
971 #define HCI_EVT_MASK_LE_SCAN_REQ_RCVD_EVT 0x04 /*!< Byte 2 */
972 #define HCI_EVT_MASK_LE_CH_SEL_ALGO_EVT 0x08 /*!< Byte 2 (Bit 19) */
973 /* Version 5.1 */
974 #define HCI_EVT_MASK_LE_CONNLESS_IQ_REPORT_EVT 0x10 /*!< Byte 2 */
975 #define HCI_EVT_MASK_LE_CONN_IQ_REPORT_EVT 0x20 /*!< Byte 2 */
976 #define HCI_EVT_MASK_LE_CTE_REQ_FAILED_EVT 0x40 /*!< Byte 2 */
977 #define HCI_EVT_MASK_LE_PER_SYNC_TRSF_RCVT_EVT 0x80 /*!< Byte 2 (Bit 23) */
978 /* Version 5.2 */
979 #define HCI_EVT_MASK_LE_CIS_EST_EVT 0x01 /*!< Byte 3 (Bit 24) */
980 #define HCI_EVT_MASK_LE_CIS_REQ_EVT 0x02 /*!< Byte 3 */
981 #define HCI_EVT_MASK_LE_CREATE_BIG_CMPL_EVT 0x04 /*!< Byte 3 */
982 #define HCI_EVT_MASK_LE_TERMINATE_BIG_CMPL_EVT 0x08 /*!< Byte 3 */
983 #define HCI_EVT_MASK_LE_BIG_SYNC_EST_EVT 0x10 /*!< Byte 3 */
984 #define HCI_EVT_MASK_LE_BIG_SYNC_LOST_EVT 0x20 /*!< Byte 3 */
985 #define HCI_EVT_MASK_LE_PEER_SCA_CMPL_EVT 0x40 /*!< Byte 3 */
986 #define HCI_EVT_MASK_LE_PATH_LOSS_REPORT_EVT 0x80 /*!< Byte 3 */
987 
988 #define HCI_EVT_MASK_LE_TX_POWER_REPORT_EVT 0x01 /*!< Byte 4 (Bit 32)*/
989 #define HCI_EVT_MASK_LE_BIG_INFO_ADV_RPT_EVT 0x02 /*!< Byte 4 */
990 
991 /**@}*/
992 
993 /** \name LE supported features
994  *
995  */
996 /**@{*/
997 /* Version 4.0 */
998 #define HCI_LE_SUP_FEAT_ENCRYPTION 0x0000000000000001 /*!< Encryption supported */
999 /* Version 4.1 */
1000 #define HCI_LE_SUP_FEAT_CONN_PARAM_REQ_PROC 0x0000000000000002 /*!< Connection Parameters Request Procedure supported */
1001 #define HCI_LE_SUP_FEAT_EXT_REJECT_IND 0x0000000000000004 /*!< Extended Reject Indication supported */
1002 #define HCI_LE_SUP_FEAT_SLV_INIT_FEAT_EXCH 0x0000000000000008 /*!< Slave-Initiated Features Exchange supported */
1003 #define HCI_LE_SUP_FEAT_LE_PING 0x0000000000000010 /*!< LE Ping supported */
1004 /* Version 4.2 */
1005 #define HCI_LE_SUP_FEAT_DATA_LEN_EXT 0x0000000000000020 /*!< Data Length Extension supported */
1006 #define HCI_LE_SUP_FEAT_PRIVACY 0x0000000000000040 /*!< LL Privacy supported */
1007 #define HCI_LE_SUP_FEAT_EXT_SCAN_FILT_POLICY 0x0000000000000080 /*!< Extended Scan Filter Policy supported */
1008 /* Version 5.0 */
1009 #define HCI_LE_SUP_FEAT_LE_2M_PHY 0x0000000000000100 /*!< LE 2M PHY supported */
1010 #define HCI_LE_SUP_FEAT_STABLE_MOD_IDX_TRANSMITTER 0x0000000000000200 /*!< Stable Modulation Index - Transmitter supported */
1011 #define HCI_LE_SUP_FEAT_STABLE_MOD_IDX_RECEIVER 0x0000000000000400 /*!< Stable Modulation Index - Receiver supported */
1012 #define HCI_LE_SUP_FEAT_LE_CODED_PHY 0x0000000000000800 /*!< LE Coded PHY supported */
1013 #define HCI_LE_SUP_FEAT_LE_EXT_ADV 0x0000000000001000 /*!< LE Extended Advertising supported */
1014 #define HCI_LE_SUP_FEAT_LE_PER_ADV 0x0000000000002000 /*!< LE Periodic Advertising supported */
1015 #define HCI_LE_SUP_FEAT_CH_SEL_2 0x0000000000004000 /*!< Channel Selection Algorithm #2 supported */
1016 #define HCI_LE_SUP_FEAT_LE_POWER_CLASS_1 0x0000000000008000 /*!< LE Power Class 1 supported */
1017 #define HCI_LE_SUP_FEAT_MIN_NUN_USED_CHAN 0x0000000000010000 /*!< Minimum Number of Used Channels Procedure supported */
1018 /* Version 5.1 */
1019 #define HCI_LE_SUP_FEAT_CONN_CTE_REQ 0x0000000000020000 /*!< Connection CTE Request supported */
1020 #define HCI_LE_SUP_FEAT_CONN_CTE_RSP 0x0000000000040000 /*!< Connection CTE Response supported */
1021 #define HCI_LE_SUP_FEAT_CONNLESS_CTE_TRANS 0x0000000000080000 /*!< Connectionless CTE Transmitter supported */
1022 #define HCI_LE_SUP_FEAT_CONNLESS_CTE_RECV 0x0000000000100000 /*!< Connectionless CTE Receiver supported */
1023 #define HCI_LE_SUP_FEAT_ANTENNA_SWITCH_AOD 0x0000000000200000 /*!< Anetenna Switching during CTE Transmission (AoD) supported */
1024 #define HCI_LE_SUP_FEAT_ANTENNA_SWITCH_AOA 0x0000000000400000 /*!< Anetenna Switching during CTE Reception (AoA) supported */
1025 #define HCI_LE_SUP_FEAT_RECV_CTE 0x0000000000800000 /*!< Receive Constant Tone Extension supported */
1026 #define HCI_LE_SUP_FEAT_PAST_SENDER 0x0000000001000000 /*!< Periodic Advertising Sync Transfer Sender supported */
1027 #define HCI_LE_SUP_FEAT_PAST_RECIPIENT 0x0000000002000000 /*!< Periodic Advertising Sync Transfer Recipient supported */
1028 #define HCI_LE_SUP_FEAT_SCA_UPDATE 0x0000000004000000 /*!< Sleep Clock Accuracy Update supported */
1029 #define HCI_LE_SUP_FEAT_REMOTE_PUB_KEY_VALIDATION 0x0000000008000000 /*!< Remote Public Key Validation supported */
1030 /* Version Milan */
1031 #define HCI_LE_SUP_FEAT_CIS_MASTER 0x0000000010000000 /*!< Connected Isochronous Master Role supported */
1032 #define HCI_LE_SUP_FEAT_CIS_SLAVE 0x0000000020000000 /*!< Connected Isochronous Slave Role supported */
1033 #define HCI_LE_SUP_FEAT_ISO_BROADCASTER 0x0000000040000000 /*!< Isochronous Broadcaster Role supported */
1034 #define HCI_LE_SUP_FEAT_ISO_SYNC_RECEIVER 0x0000000080000000 /*!< Isochronous Synchronized Receiver Role supported */
1035 #define HCI_LE_SUP_FEAT_ISO_HOST_SUPPORT 0x0000000100000000 /*!< Host support for ISO Channels */
1036 #define HCI_LE_SUP_FEAT_POWER_CONTROL_REQUEST 0x0000000200000000 /*!< Power control requests supported */
1037 #define HCI_LE_SUP_FEAT_POWER_CHANGE_IND 0x0000000400000000 /*!< Power control power change indication supported */
1038 #define HCI_LE_SUP_FEAT_PATH_LOSS_MONITOR 0x0000000800000000 /*!< Path loss monitoring supported */
1039 /**@}*/
1040 
1041 /** \name LE feature bit positon in FeatureSet stored in the Controller
1042 *
1043 */
1044 /**@{*/
1045 #define HCI_LE_FEAT_BIT_ISO_HOST_SUPPORT 32 /*!< Host support for ISO Channels */
1046 /**@}*/
1047 
1048 /** \name Advertising command parameters
1049  *
1050  */
1051 /**@{*/
1052 #define HCI_ADV_MIN_INTERVAL 0x0020 /*!< Minimum advertising interval */
1053 #define HCI_ADV_MAX_INTERVAL 0x4000 /*!< Maximum advertising interval */
1054 #define HCI_ADV_DIRECTED_MAX_DURATION 0x0500 /*!< Maximum high duty cycle connectable directed advertising duration */
1055 #define HCI_ADV_TYPE_CONN_UNDIRECT 0x00 /*!< Connectable undirected advertising */
1056 #define HCI_ADV_TYPE_CONN_DIRECT 0x01 /*!< Connectable directed high duty cycle advertising */
1057 #define HCI_ADV_TYPE_DISC_UNDIRECT 0x02 /*!< Discoverable undirected advertising */
1058 #define HCI_ADV_TYPE_NONCONN_UNDIRECT 0x03 /*!< Nonconnectable undirected advertising */
1059 #define HCI_ADV_TYPE_CONN_DIRECT_LO_DUTY 0x04 /*!< Connectable directed low duty cycle advertising */
1060 #define HCI_ADV_CHAN_37 0x01 /*!< Advertising channel 37 */
1061 #define HCI_ADV_CHAN_38 0x02 /*!< Advertising channel 38 */
1062 #define HCI_ADV_CHAN_39 0x04 /*!< Advertising channel 39 */
1063 #define HCI_ADV_FILT_NONE 0x00 /*!< No scan request or connection filtering */
1064 #define HCI_ADV_FILT_SCAN 0x01 /*!< White list filters scan requests */
1065 #define HCI_ADV_FILT_CONN 0x02 /*!< White list filters connections */
1066 #define HCI_ADV_FILT_ALL 0x03 /*!< White list filters scan req. and conn. */
1067 /**@}*/
1068 
1069 /** \name Scan command parameters
1070  *
1071  */
1072 /**@{*/
1073 #define HCI_SCAN_TYPE_PASSIVE 0 /*!< Passive scan */
1074 #define HCI_SCAN_TYPE_ACTIVE 1 /*!< Active scan */
1075 #define HCI_SCAN_INTERVAL_MIN 0x0004 /*!< Minimum scan interval */
1076 #define HCI_SCAN_INTERVAL_MAX 0x4000 /*!< Maximum scan interval */
1077 #define HCI_SCAN_INTERVAL_DEFAULT 0x0010 /*!< Default scan interval */
1078 #define HCI_SCAN_WINDOW_MIN 0x0004 /*!< Minimum scan window */
1079 #define HCI_SCAN_WINDOW_MAX 0x4000 /*!< Maximum scan window */
1080 #define HCI_SCAN_WINDOW_DEFAULT 0x0010 /*!< Default scan window */
1081 /**@}*/
1082 
1083 /** \name Connection command parameters
1084  *
1085  */
1086 /**@{*/
1087 #define HCI_CONN_INTERVAL_MIN 0x0006 /*!< Minimum connection interval */
1088 #define HCI_CONN_INTERVAL_MAX 0x0C80 /*!< Maximum connection interval */
1089 #define HCI_CONN_LATENCY_MAX 0x01F3 /*!< Maximum connection latency */
1090 #define HCI_SUP_TIMEOUT_MIN 0x000A /*!< Minimum supervision timeout */
1091 #define HCI_SUP_TIMEOUT_MAX 0x0C80 /*!< Maximum supervision timeout */
1092 /**@}*/
1093 
1094 /** \name Connection event parameters
1095  *
1096  */
1097 /**@{*/
1098 #define HCI_ROLE_MASTER 0 /*!< Role is master */
1099 #define HCI_ROLE_SLAVE 1 /*!< Role is slave */
1100 #define HCI_CLOCK_500PPM 0x00 /*!< 500 ppm clock accuracy */
1101 #define HCI_CLOCK_250PPM 0x01 /*!< 250 ppm clock accuracy */
1102 #define HCI_CLOCK_150PPM 0x02 /*!< 150 ppm clock accuracy */
1103 #define HCI_CLOCK_100PPM 0x03 /*!< 100 ppm clock accuracy */
1104 #define HCI_CLOCK_75PPM 0x04 /*!< 75 ppm clock accuracy */
1105 #define HCI_CLOCK_50PPM 0x05 /*!< 50 ppm clock accuracy */
1106 #define HCI_CLOCK_30PPM 0x06 /*!< 30 ppm clock accuracy */
1107 #define HCI_CLOCK_20PPM 0x07 /*!< 20 ppm clock accuracy */
1108 /**@}*/
1109 
1110 /** \name Advertising report event parameters
1111  *
1112  */
1113 /**@{*/
1114 #define HCI_ADV_CONN_UNDIRECT 0x00 /*!< Connectable undirected advertising */
1115 #define HCI_ADV_CONN_DIRECT 0x01 /*!< Connectable directed advertising */
1116 #define HCI_ADV_DISC_UNDIRECT 0x02 /*!< Discoverable undirected advertising */
1117 #define HCI_ADV_NONCONN_UNDIRECT 0x03 /*!< Non-connectable undirected advertising */
1118 #define HCI_ADV_SCAN_RESPONSE 0x04 /*!< Scan response */
1119 /**@}*/
1120 
1121 /** \name Extended advertising data operations
1122  *
1123  */
1124 /**@{*/
1125 #define HCI_ADV_DATA_OP_FRAG_INTER 0x00 /*!< Intermediate fragment */
1126 #define HCI_ADV_DATA_OP_FRAG_FIRST 0x01 /*!< First fragment */
1127 #define HCI_ADV_DATA_OP_FRAG_LAST 0x02 /*!< Last fragment */
1128 #define HCI_ADV_DATA_OP_COMP_FRAG 0x03 /*!< Complete extended advertising data */
1129 #define HCI_ADV_DATA_OP_UNCHANGED_DATA 0x04 /*!< Unchanged data (just update Advertising DID) */
1130 /**@}*/
1131 
1132 /** \name Advertising data fragment preference
1133  *
1134  */
1135 /**@{*/
1136 #define HCI_ADV_DATA_FRAG_PREF_FRAG 0x00 /*!< Controller may fragment all Host advertising data */
1137 #define HCI_ADV_DATA_FRAG_PREF_NO_FRAG 0x01 /*!< Controller should not fragment nor minimize fragmentation of Host advertising data */
1138 /**@}*/
1139 
1140 /** \name Number of advertising sets
1141  *
1142  */
1143 /**@{*/
1144 #define HCI_ADV_NUM_SETS_ALL_DISABLE 0x00 /*!< Disable all advertising sets */
1145 /**@}*/
1146 
1147 /** \name Maximum number of scanning or initiating PHYs
1148  *
1149  */
1150 /**@{*/
1151 #define HCI_MAX_NUM_PHYS 3 /*!< Maximum number of scanning or initiating PHYs */
1152 /**@}*/
1153 
1154 /** \name Advertising PHY values
1155  *
1156  */
1157 /**@{*/
1158 #define HCI_ADV_PHY_LE_1M 0x01 /*!< LE 1M PHY */
1159 #define HCI_ADV_PHY_LE_2M 0x02 /*!< LE 2M PHY */
1160 #define HCI_ADV_PHY_LE_CODED 0x03 /*!< LE Coded PHY */
1161 /**@}*/
1162 
1163 /** \name Scanner PHY value bits
1164  *
1165  */
1166 /**@{*/
1167 #define HCI_SCAN_PHY_LE_1M_BIT (1<<0) /*!< LE 1M PHY */
1168 #define HCI_SCAN_PHY_LE_2M_BIT (1<<1) /*!< LE 2M PHY */
1169 #define HCI_SCAN_PHY_LE_CODED_BIT (1<<2) /*!< LE Coded PHY */
1170 /**@}*/
1171 
1172 /** \name Initiator PHY value bits
1173  *
1174  */
1175 /**@{*/
1176 #define HCI_INIT_PHY_LE_1M_BIT (1<<0) /*!< LE 1M PHY */
1177 #define HCI_INIT_PHY_LE_2M_BIT (1<<1) /*!< LE 2M PHY */
1178 #define HCI_INIT_PHY_LE_CODED_BIT (1<<2) /*!< LE Coded PHY */
1179 /**@}*/
1180 
1181 /** \name Transmitter PHY value bits
1182 *
1183 */
1184 /**@{*/
1185 #define HCI_TRANS_PHY_LE_1M_BIT (1<<0) /*!< LE 1M PHY */
1186 #define HCI_TRANS_PHY_LE_2M_BIT (1<<1) /*!< LE 2M PHY */
1187 #define HCI_TRABS_PHY_LE_CODED_BIT (1<<2) /*!< LE Coded PHY */
1188 /**@}*/
1189 
1190 /** \name Advertising event properties type bits
1191  *
1192  */
1193 /**@{*/
1194 #define HCI_ADV_PROP_CONN_ADV_BIT (1<<0) /*!< Connectable advertising bit */
1195 #define HCI_ADV_PROP_SCAN_ADV_BIT (1<<1) /*!< Scannable advertising bit */
1196 #define HCI_ADV_PROP_DIRECT_ADV_BIT (1<<2) /*!< Directed advertising bit */
1197 #define HCI_ADV_PROP_CONN_DIRECT_ADV_BIT (1<<3) /*!< High duty cycle connectable directed advertising bit */
1198 #define HCI_ADV_PROP_USE_LEG_PDU_BIT (1<<4) /*!< Use legacy advertising PDUs bit */
1199 #define HCI_ADV_PROP_OMIT_ADV_ADDR_BIT (1<<5) /*!< Omit advertiser's address from all PDUs (anonymous advertising) bit */
1200 #define HCI_ADV_PROP_INC_TX_PWR_BIT (1<<6) /*!< Include TxPower in extended header of advertising PDU bit */
1201 /**@}*/
1202 
1203 /** \name Advertising event properties for legacy PDUs
1204  *
1205  */
1206 /**@{*/
1207 #define HCI_ADV_PROP_LEG_CONN_UNDIRECT 0x13 /*!< Connectable and scannable undirected advertising (00010011b) */
1208 #define HCI_ADV_PROP_LEG_CONN_DIRECT 0x1D /*!< Connectable directed high duty cycle advertising (00011101b) */
1209 #define HCI_ADV_PROP_LEG_SCAN_UNDIRECT 0x12 /*!< Scannable undirected advertising (00010010b) */
1210 #define HCI_ADV_PROP_LEG_NONCONN_UNDIRECT 0x10 /*!< Non-connectable and non-scannable undirected advertising (00010000b) */
1211 #define HCI_ADV_PROP_LEG_CONN_DIRECT_LO_DUTY 0x15 /*!< Connectable directed low duty cycle advertising (00010101b) */
1212 /**@}*/
1213 
1214 /** \name Extended advertising report event type bits
1215  *
1216  */
1217 /**@{*/
1218 #define HCI_ADV_RPT_CONN_ADV_BIT (1<<0) /*!< Connectable advertising event bit */
1219 #define HCI_ADV_RPT_SCAN_ADV_BIT (1<<1) /*!< Scannable advertising event bit */
1220 #define HCI_ADV_RPT_DIRECT_ADV_BIT (1<<2) /*!< Directed advertising event bit */
1221 #define HCI_ADV_RPT_SCAN_RSP_BIT (1<<3) /*!< Scan response event bit */
1222 #define HCI_ADV_RPT_LEG_ADV_BIT (1<<4) /*!< Legacy advertising PDU event bit */
1223 #define HCI_ADV_RPT_DATA_STATUS_BITS (3<<5) /*!< Data status bits */
1224 /**@}*/
1225 
1226 /** \name Advertising report event types for legacy PDUs
1227  *
1228  */
1229 /**@{*/
1230 #define HCI_ADV_RPT_LEG_CONN_UNDIRECT 0x13 /*!< Connectable and scannable undirected advertising (0010011b) */
1231 #define HCI_ADV_RPT_LEG_CONN_DIRECT 0x15 /*!< Connectable directed advertising (0010101b) */
1232 #define HCI_ADV_RPT_LEG_SCAN_UNDIRECT 0x12 /*!< Scannable undirected advertising (0010010b) */
1233 #define HCI_ADV_RPT_LEG_NONCONN_UNDIRECT 0x10 /*!< Non-connectable and non-scannable undirected advertising (0010000b) */
1234 #define HCI_ADV_RPT_LEG_CONN_UNDIRECT_SCAN_RSP 0x1B /*!< Scan response to connectable and scannable undirected advertising (0011011b) */
1235 #define HCI_ADV_RPT_LEG_SCAN_UNDIRECT_SCAN_RSP 0x1A /*!< Scan response to scannable undirected advertising (0011010b) */
1236 /**@}*/
1237 
1238 /** \name Advertising report data status
1239  *
1240  */
1241 /**@{*/
1242 #define HCI_ADV_RPT_DATA_CMPL 0x00 /*!< Data complete */
1243 #define HCI_ADV_RPT_DATA_INCMPL_MORE 0x01 /*!< Data incomplete, more date to come */
1244 #define HCI_ADV_RPT_DATA_INCMPL_TRUNC 0x02 /*!< Data incomplete, data truncated, no more date to come */
1245 /**@}*/
1246 
1247 /** \name Extended advertising report event primary PHY values
1248  *
1249  */
1250 /**@{*/
1251 #define HCI_ADV_RPT_PHY_PRIM_LE_1M 0x01 /*!< Advertiser PHY is LE 1M */
1252 #define HCI_ADV_RPT_PHY_PRIM_LE_CODED 0x03 /*!< Advertiser PHY is LE Coded */
1253 /**@}*/
1254 
1255 /** \name Extended advertising report event seconday PHY values
1256  *
1257  */
1258 /**@{*/
1259 #define HCI_ADV_RPT_PHY_SEC_NONE 0x00 /*!< No packets on seconday advertising channel */
1260 #define HCI_ADV_RPT_PHY_SEC_LE_1M 0x01 /*!< Advertiser PHY is LE 1M */
1261 #define HCI_ADV_RPT_PHY_SEC_LE_2M 0x02 /*!< Advertiser PHY is LE 2M */
1262 #define HCI_ADV_RPT_PHY_SEC_LE_CODED 0x03 /*!< Advertiser PHY is LE Coded */
1263 /**@}*/
1264 
1265 /** \name Channel selection algorithm used
1266  *
1267  */
1268 /**@{*/
1269 #define HCI_CH_SEL_ALGO_1 0x00 /*!< LE channel selection algorithm #1 used */
1270 #define HCI_CH_SEL_ALGO_2 0x01 /*!< LE channel selection algorithm #2 used */
1271 /**@}*/
1272 
1273 /** \name KeyType parameters
1274  *
1275  */
1276 /**@{*/
1277 #define HCI_PRIVATE_KEY_GENERATED 0x00 /*!< Use generated private key */
1278 #define HCI_PRIVATE_KEY_DEBUG 0x01 /*!< Use debug private key */
1279 /**@{*/
1280 
1281 /**@{*/
1282 /** \name Minimum number of used channels
1283  *
1284  */
1285 /**@{*/
1286 #define HCI_MIN_NUM_OF_USED_CHAN 8 /*!< Minimum number of used channels */
1287 /**@}*/
1288 
1289 /** \name Synchronization timeout for the periodic advertising
1290 *
1291 */
1292 /**@{*/
1293 #define HCI_SYNC_MIN_TIMEOUT 0x000A /*!< Minimum synchronization timeout */
1294 #define HCI_SYNC_MAX_TIMEOUT 0x4000 /*!< Maximum synchronization timeout */
1295 /**@}*/
1296 
1297 /** \name Maximum synchronization skip
1298 *
1299 */
1300 /**@{*/
1301 #define HCI_SYNC_MAX_SKIP 0x01F3 /*!< Maximum synchronization skip */
1302 /**@}*/
1303 
1304 /** \name Maximum synchronization handle
1305 *
1306 */
1307 /**@{*/
1308 #define HCI_SYNC_MAX_HANDLE 0x0EFF /*!< Maximum synchronization handle */
1309 /**@}*/
1310 
1311 /** \name Periodic sync transfer receive mode
1312 *
1313 */
1314 /**@{*/
1315 #define HCI_SYNC_TRSF_MODE_OFF 0x00 /*!< Periodic sync transfer receive is disabled */
1316 #define HCI_SYNC_TRSF_MODE_REP_DISABLED 0x01, /*!< Periodic sync transfer receive is enabled, report event is disabled */
1317 #define HCI_SYNC_TRSF_MODE_REP_ENABLED 0x02, /*!< Periodic sync transfer receive is enabled, report event is enabled */
1318 /**@}*/
1319 
1320 /** \name Periodic advertising create sync options bits
1321 *
1322 */
1323 /**@{*/
1324 #define HCI_OPTIONS_FILT_POLICY_BIT (1<<0) /*!< filter policy bit */
1325 #define HCI_OPTIONS_INIT_RPT_ENABLE_BIT (1<<1) /*!< initial periodic advertisement reporting bit */
1326 /**@}*/
1327 
1328 /** \name Misc command parameters
1329  *
1330  */
1331 /**@{*/
1332 #define HCI_READ_TX_PWR_CURRENT 0 /*!< Read current tx power */
1333 #define HCI_READ_TX_PWR_MAX 1 /*!< Read maximum tx power */
1334 #define HCI_TX_PWR_MIN -30 /*!< Minimum tx power dBm */
1335 #define HCI_TX_PWR_MAX 20 /*!< Maximum tx power dBm */
1336 #define HCI_TX_PWR_NO_PREFERENCE 127 /*!< Tx power no preference */
1337 #define HCI_VERSION 6 /*!< HCI specification version */
1338 #define HCI_RSSI_MIN -127 /*!< Minimum RSSI dBm */
1339 #define HCI_RSSI_MAX 20 /*!< Maximum RSSI dBm */
1340 #define HCI_ADDR_TYPE_PUBLIC 0 /*!< Public device address */
1341 #define HCI_ADDR_TYPE_RANDOM 1 /*!< Random device address */
1342 #define HCI_ADDR_TYPE_PUBLIC_IDENTITY 2 /*!< Public identity address */
1343 #define HCI_ADDR_TYPE_RANDOM_IDENTITY 3 /*!< Random identity address */
1344 #define HCI_ADDR_TYPE_ANONYMOUS 0xFF /*!< Anonymous device address */
1345 #define HCI_FILT_NONE 0 /*!< Accept all advertising packets */
1346 #define HCI_FILT_WHITE_LIST 1 /*!< Accept from While List only */
1347 #define HCI_FILT_RES_INIT 2 /*!< Accept directed advertisements with RPAs */
1348 #define HCI_FILT_WHITE_LIST_RES_INIT 3 /*!< Accept from White List or directed advertisements with RPAs */
1349 #define HCI_FILT_PER_ADV_PARAM 0 /*!< Listen to advertiser specified by create sync command parameters */
1350 #define HCI_FILT_PER_ADV_LIST 1 /*!< Listen to advertiser from Periodic Advertiser List only */
1351 #define HCI_ROLE_MASTER 0 /*!< Role is master */
1352 #define HCI_ROLE_SLAVE 1 /*!< Role is slave */
1353 #define HCI_PRIV_MODE_NETWORK 0x00 /*!< Network privacy mode (default) */
1354 #define HCI_PRIV_MODE_DEVICE 0x01 /*!< Device privacy mode */
1355 /**@}*/
1356 
1357 /** \name PHY types
1358  *
1359  */
1360 /**@{*/
1361 #define HCI_PHY_NONE 0x00 /*!< No selected PHY */
1362 #define HCI_PHY_LE_1M_BIT (1<<0) /*!< LE 1M PHY */
1363 #define HCI_PHY_LE_2M_BIT (1<<1) /*!< LE 2M PHY */
1364 #define HCI_PHY_LE_CODED_BIT (1<<2) /*!< LE Coded PHY */
1365 /**@}*/
1366 
1367 /** \name All PHYs preference
1368  *
1369  */
1370 /**@{*/
1371 #define HCI_ALL_PHY_ALL_PREFERENCES 0x00 /*!< All PHY preferences */
1372 #define HCI_ALL_PHY_TX_PREFERENCE_BIT (1<<0) /*!< Tx PHY preference */
1373 #define HCI_ALL_PHY_RX_PREFERENCE_BIT (1<<1) /*!< Rx PHY preference */
1374 /**@}*/
1375 
1376 /** \name PHY options
1377  *
1378  */
1379 /**@{*/
1380 #define HCI_PHY_OPTIONS_NONE 0x00 /*!< No preferences */
1381 #define HCI_PHY_OPTIONS_S2_PREFERRED 0x01 /*!< S=2 coding preferred when transmitting on LE Coded PHY */
1382 #define HCI_PHY_OPTIONS_S8_PREFERRED 0x02 /*!< S=8 coding preferred when transmitting on LE Coded PHY */
1383 /**@}*/
1384 
1385 /** \name CTE Slot Durations
1386 *
1387 */
1388 /**@{*/
1389 #define HCI_CTE_SLOT_DURATION_NONE 0x00 /*!< No switching and sampling */
1390 #define HCI_CTE_SLOT_DURATION_1_US 0x01 /*!< Switching and sampling slots are 1 us each */
1391 #define HCI_CTE_SLOT_DURATION_2_US 0x02 /*!< Switching and sampling slots are 2 us each */
1392 /**@}*/
1393 
1394 /** \name Permitted CTE Type bits
1395 *
1396 */
1397 /**@{*/
1398 #define HCI_CTE_TYPE_PERMIT_AOA_RSP_BIT (1<<0) /*!< Allow AoA Constant Tone Extension Response */
1399 #define HCI_CTE_TYPE_PERMIT_AOD_RSP_1_US_BIT (1<<1) /*!< Allow AoD Constant Tone Extension Response with 1 us slots */
1400 #define HCI_CTE_TYPE_PERMIT_AOD_RSP_2_US_BIT (1<<2) /*!< Allow AoD Constant Tone Extension Response with 2 us slots */
1401 /**@}*/
1402 
1403 /** \name Requested CTE Types
1404 *
1405 */
1406 /**@{*/
1407 #define HCI_CTE_TYPE_REQ_AOA 0x00 /*!< AoA Constant Tone Extension */
1408 #define HCI_CTE_TYPE_REQ_AOD_1_US 0x01 /*!< AoD Constant Tone Extension with 1 us slots */
1409 #define HCI_CTE_TYPE_REQ_AOD_2_US 0x02 /*!< AoD Constant Tone Extension with 2 us slots */
1410 /**@}*/
1411 
1412 /** \name Bluetooth core specification versions
1413  *
1414  */
1415 /**@{*/
1416 #define HCI_VER_BT_CORE_SPEC_4_0 0x06 /*!< Bluetooth core specification 4.0 */
1417 #define HCI_VER_BT_CORE_SPEC_4_1 0x07 /*!< Bluetooth core specification 4.1 */
1418 #define HCI_VER_BT_CORE_SPEC_4_2 0x08 /*!< Bluetooth core specification 4.2 */
1419 #define HCI_VER_BT_CORE_SPEC_5_0 0x09 /*!< Bluetooth core specification 5.0 */
1420 #define HCI_VER_BT_CORE_SPEC_5_1 0x0A /*!< Bluetooth core specification 5.1 */
1421 #define HCI_VER_BT_CORE_SPEC_5_2 0x0B /*!< Bluetooth core specification 5.2 */
1422 /**@}*/
1423 
1424 #ifndef HCI_VER_BT
1425 #define HCI_VER_BT HCI_VER_BT_CORE_SPEC_5_1
1426 #endif
1427 
1428 
1429 /** \name Parameter lengths
1430  *
1431  */
1432 /**@{*/
1433 #define HCI_EVT_MASK_LEN 8 /*!< Length of event mask byte array */
1434 #define HCI_EVT_MASK_PAGE_2_LEN 8 /*!< Length of event mask page 2 byte array */
1435 #define HCI_LE_EVT_MASK_LEN 8 /*!< Length of LE event mask byte array */
1436 #define HCI_FEAT_LEN 8 /*!< Length of features byte array */
1437 #define HCI_ADV_DATA_LEN 31 /*!< Length of advertising data */
1438 #define HCI_SCAN_DATA_LEN 31 /*!< Length of scan response data */
1439 #define HCI_EXT_ADV_DATA_LEN 251 /*!< Length of extended advertising data */
1440 #define HCI_EXT_ADV_CONN_DATA_LEN 191 /*!< Length of extended connectable advertising data */
1441 #define HCI_PER_ADV_DATA_LEN 252 /*!< Length of periodic advertising data */
1442 #define HCI_EXT_ADV_RPT_DATA_LEN 229 /*!< Length of extended advertising report data */
1443 #define HCI_PER_ADV_RPT_DATA_LEN 247 /*!< Length of periodic advertising report data */
1444 #define HCI_CHAN_MAP_LEN 5 /*!< Length of channel map byte array */
1445 #define HCI_KEY_LEN 16 /*!< Length of encryption key */
1446 #define HCI_ENCRYPT_DATA_LEN 16 /*!< Length of data used in encryption */
1447 #define HCI_RAND_LEN 8 /*!< Length of random number */
1448 #define HCI_LE_STATES_LEN 8 /*!< Length of LE states byte array */
1449 #define HCI_P256_KEY_LEN 64 /*!< Length of P256 key */
1450 #define HCI_DH_KEY_LEN 32 /*!< Length of DH Key */
1451 #define HCI_BC_LEN 16 /*!< Broadcast code length */
1452 
1453 #define HCI_EXT_ADV_RPT_DATA_LEN_OFFSET 23 /*!< Length field offset of extended advertising report data */
1454 #define HCI_PER_ADV_RPT_DATA_LEN_OFFSET 6 /*!< Length field offset of periodic advertising report data */
1455 /**@}*/
1456 
1457 /** \name Number of Antenna IDs in Switching Pattern
1458 *
1459 */
1460 /**@{*/
1461 #define HCI_MIN_NUM_ANTENNA_IDS 2 /*!< Minimum number of Antenna IDs in switching pattern */
1462 #define HCI_MAX_NUM_ANTENNA_IDS 75 /*!< Maximum number of Antenna IDs in switching pattern */
1463 /**@}*/
1464 
1465 /** \name IQ Report Sample Counts
1466 *
1467 */
1468 /**@{*/
1469 #define HCI_IQ_RPT_SAMPLE_CNT_MIN 9 /*!< Minimum number of sample pairs in IQ report */
1470 #define HCI_IQ_RPT_SAMPLE_CNT_MAX 82 /*!< Maximum number of sample pairs in IQ report */
1471 
1472 #define HCI_CONN_IQ_RPT_SAMPLE_CNT_OFFSET 12 /*!< Sample count field offset of connection IQ report */
1473 /**@}*/
1474 
1475 /** \name CIS Count
1476 *
1477 */
1478 /**@{*/
1479 #define HCI_MAX_CIS_COUNT 0x10 /*!< Maximum count for CIS */
1480 /**@}*/
1481 
1482 /** \name BIS Count
1483 *
1484 */
1485 /**@{*/
1486 #define HCI_MAX_BIS_COUNT 0x10 /*!< Maximum count for BIS */
1487 /**@}*/
1488 
1489 /** \name CIG IDs
1490 *
1491 */
1492 /**@{*/
1493 #define HCI_MIN_CIG_ID 0x00 /*!< Minimum value for CIG ID. */
1494 #define HCI_MAX_CIG_ID 0xEF /*!< Maximum value for CIG ID. */
1495 /**@}*/
1496 
1497 /** \name CIS IDs
1498 *
1499 */
1500 /**@{*/
1501 #define HCI_MIN_CIS_ID 0x00 /*!< Minimum value for CIS ID. */
1502 #define HCI_MAX_CIS_ID 0xEF /*!< Maximum value for CIS ID. */
1503 /**@}*/
1504 
1505 /** \name Packing Scheme
1506 *
1507 */
1508 /**@{*/
1509 #define HCI_PACKING_SEQUENTIAL 0x00 /*!< Sequential */
1510 #define HCI_PACKING_INTERLEAVED 0x01 /*!< Interleaved */
1511 /**@}*/
1512 
1513 /** \name Framing
1514 *
1515 */
1516 /**@{*/
1517 #define HCI_FRAMING_UNFRAMED 0x00 /*!< Unframed */
1518 #define HCI_FRAMING_FRAMED 0x01 /*!< Framed */
1519 /**@}*/
1520 
1521 /** \name Slave Clock Accuracy
1522 *
1523 */
1524 /**@{*/
1525 #define HCI_MIN_SCA 0x00 /*!< Minimum value for SCA. */
1526 #define HCI_MAX_SCA 0x07 /*!< Maximum value for SCA. */
1527 
1528 /** \name SDU Size
1529 *
1530 */
1531 /**@{*/
1532 #define HCI_MIN_SDU_SIZE 0x0000 /*!< Minimum value for SDU size. */
1533 #define HCI_MAX_SDU_SIZE 0x0FFF /*!< Maximum value for SDU size. */
1534 /**@}*/
1535 
1536 /** \name SDU Interval
1537 *
1538 */
1539 /**@{*/
1540 #define HCI_MIN_SDU_INTERV 0x0000FF /*!< Minimum value for SDU interval. */
1541 #define HCI_MAX_SDU_INTERV 0x0FFFFF /*!< Maximum value for SDU interval. */
1542 #define HCI_DEFAULT_SDU_INTERV 0x004E20 /*!< Default value for SDU interval. */
1543 /**@}*/
1544 
1545 /** \name CIS Transport Latency
1546 *
1547 */
1548 /**@{*/
1549 #define HCI_MIN_CIS_TRANS_LAT 0x0005 /*!< Minimum value for CIS transport latency. */
1550 #define HCI_MAX_CIS_TRANS_LAT 0x0FA0 /*!< Maximum value for CIS transport latency. */
1551 #define HCI_DEFAULT_CIS_TRANS_LAT 0x0028 /*!< Default value for CIS transport latency. */
1552 /**@}*/
1553 
1554 /** \name CIS Flush Time
1555 *
1556 */
1557 /**@{*/
1558 #define HCI_MIN_CIS_FT 0x01 /*!< Minimum value for CIS flush time. */
1559 #define HCI_MAX_CIS_FT 0xFF /*!< Maximum value for CIS flush time. */
1560 /**@}*/
1561 
1562 /** \name CIS Burst Number
1563 *
1564 */
1565 /**@{*/
1566 #define HCI_MIN_CIS_BN 0x00 /*!< Minimum value for CIS burst number. */
1567 #define HCI_MAX_CIS_BN 0x0F /*!< Maximum value for CIS burst number. */
1568 /**@}*/
1569 
1570 /** \name CIS Retransmission Number
1571 *
1572 */
1573 /**@{*/
1574 #define HCI_MIN_CIS_RTN 0x00 /*!< Minimum value for CIS retransmission number. */
1575 #define HCI_MAX_CIS_RTN 0x0F /*!< Maximum value for CIS retransmission number. */
1576 /**@}*/
1577 
1578 /** \name ISO Data Path Direction
1579 *
1580 */
1581 /**@{*/
1582 #define HCI_ISO_DATA_DIR_INPUT 0 /*!< Input (Host to Controller) data path. */
1583 #define HCI_ISO_DATA_DIR_OUTPUT 1 /*!< Output (Controller to Host) data path. */
1584 /**@}*/
1585 
1586 /** \name ISO Data Path Direction Bit
1587 *
1588 */
1589 /**@{*/
1590 #define HCI_ISO_DATA_PATH_INPUT_BIT (1<<HCI_ISO_DATA_DIR_INPUT) /*!< Data path input bit. */
1591 #define HCI_ISO_DATA_PATH_OUTPUT_BIT (1<<HCI_ISO_DATA_DIR_OUTPUT) /*!< Data path output bit. */
1592 /**@}*/
1593 
1594 /** \name ISO Data Path ID
1595 *
1596 */
1597 /**@{*/
1598 #define HCI_ISO_DATA_PATH_HCI 0x00 /*!< HCI data path. */
1599 #define HCI_ISO_DATA_PATH_VS_I2S 0x01 /*!< Vendor Specific: I2S data path. */
1600 #define HCI_ISO_DATA_PATH_DISABLED 0xFF /*!< Data path is disabled. */
1601 /**@}*/
1602 
1603 /** \name ISO test packet payload type
1604 *
1605 */
1606 /**@{*/
1607 #define HCI_ISO_ISO_PLD_TYPE_ZERO_LEN 0x00 /*!< Zero length payload. */
1608 #define HCI_ISO_ISO_PLD_TYPE_VAR_LEN 0x01 /*!< Variable length payload. */
1609 #define HCI_ISO_ISO_PLD_TYPE_MAX_LEN 0x02 /*!< Maximum length payload. */
1610 /**@}*/
1611 
1612 /** \name Maximum number of codecs
1613 *
1614 */
1615 /**@{*/
1616 #define HCI_MAX_CODEC 5 /*!< Maximum number of codecs to read from the Controller. */
1617 /**@}*/
1618 
1619 /** \name Maximum length of codec-specific capability data
1620 *
1621 */
1622 /**@{*/
1623 #define HCI_CODEC_CAP_DATA_LEN 4 /*!< Maximum length of codec-specific capability data. */
1624 /**@}*/
1625 
1626 /** \name Codec transport types
1627 *
1628 */
1629 /**@{*/
1630 #define HCI_CODEC_TRANS_CIS_BIT (1<<2) /*!< Codec supported over LE CIS. */
1631 #define HCI_CODEC_TRANS_BIS_BIT (1<<3) /*!< Codec supported over LE BIS. */
1632 /**@}*/
1633 
1634 /** \name ISO Header Packet Boundary
1635 *
1636 */
1637 /**@{*/
1638 #define HCI_ISO_HDR_PB_START_FRAG 0x00 /*!< Start fragment of a fragmented SDU. */
1639 #define HCI_ISO_HDR_PB_CONT_FRAG 0x01 /*!< Continuation fragment of a fragmented SDU. */
1640 #define HCI_ISO_HDR_PB_COMP_FRAG 0x02 /*!< Complete SDU. */
1641 #define HCI_ISO_HDR_PB_END_FRAG 0x03 /*!< The end fragment of a fragmented SDU. */
1642 /**@}*/
1643 
1644 /** \name ISOAL Segmentation Header Start/Continuation Bit
1645 *
1646 */
1647 /**@{*/
1648 #define HCI_ISOAL_SEG_HDR_SC_START 0x00 /*!< ISOAL segmentation header start bit. */
1649 #define HCI_ISOAL_SEG_HDR_SC_CONT 0x01 /*!< ISOAL segmentation header continue bit. */
1650 /**@}*/
1651 
1652 /** \name Company ID
1653  *
1654  */
1655 /**@{*/
1656 #define HCI_ID_PACKETCRAFT 0x07E8 /*!< Packetcraft Inc. company ID */
1657 /**@}*/
1658 
1659 /** \name Manufacturer location in Local version
1660  *
1661  */
1662 /**@{*/
1663 #define HCI_LOCAL_VER_MANUFACTURER_POS 4 /*!< Manufacturer location in local version */
1664 /**@}*/
1665 
1666 /** \name Coding Format Assigned Numbers
1667  *
1668  */
1669 /**@{*/
1670 #define HCI_ID_LC3 0x01 /*!< LC3 ID */
1671 #define HCI_ID_VS 0xFF /*!< Vendor specific ID */
1672 /**@}*/
1673 
1674 /* \} */ /* STACK_HCI_API */
1675 
1676 #ifdef __cplusplus
1677 };
1678 #endif
1679 
1680 #endif /* HCI_DEFS_H */
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.