3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2011-2014 Intel Corporation
6 * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 } __attribute__ ((packed));
32 #define BT_LL_CONN_UPDATE_REQ 0x00
33 struct bt_ll_conn_update_req {
40 } __attribute__ ((packed));
42 #define BT_LL_CHANNEL_MAP_REQ 0x01
43 struct bt_ll_channel_map_req {
46 } __attribute__ ((packed));
48 #define BT_LL_TERMINATE_IND 0x02
49 struct bt_ll_terminate_ind {
51 } __attribute__ ((packed));
53 #define BT_LL_ENC_REQ 0x03
54 struct bt_ll_enc_req {
59 } __attribute__ ((packed));
61 #define BT_LL_ENC_RSP 0x04
62 struct bt_ll_enc_rsp {
65 } __attribute__ ((packed));
67 #define BT_LL_START_ENC_REQ 0x05
69 #define BT_LL_START_ENC_RSP 0x06
71 #define BT_LL_UNKNOWN_RSP 0x07
72 struct bt_ll_unknown_rsp {
74 } __attribute__ ((packed));
76 #define BT_LL_FEATURE_REQ 0x08
77 struct bt_ll_feature_req {
79 } __attribute__ ((packed));
81 #define BT_LL_FEATURE_RSP 0x09
82 struct bt_ll_feature_rsp {
84 } __attribute__ ((packed));
86 #define BT_LL_PAUSE_ENC_REQ 0x0a
88 #define BT_LL_PAUSE_ENC_RSP 0x0b
90 #define BT_LL_VERSION_IND 0x0c
91 struct bt_ll_version_ind {
95 } __attribute__ ((packed));
97 #define BT_LL_REJECT_IND 0x0d
98 struct bt_ll_reject_ind {
100 } __attribute__ ((packed));
102 #define BT_LL_SLAVE_FEATURE_REQ 0x0e
103 struct bt_ll_slave_feature_req {
105 } __attribute__ ((packed));
107 #define BT_LL_CONN_PARAM_REQ 0x0f
109 #define BT_LL_CONN_PARAM_RSP 0x10
111 #define BT_LL_REJECT_IND_EXT 0x11
112 struct bt_ll_reject_ind_ext {
115 } __attribute__ ((packed));
117 #define BT_LL_PING_REQ 0x12
119 #define BT_LL_PING_RSP 0x13
121 #define BT_LL_LENGTH_REQ 0x14
123 #define BT_LL_LENGTH_RSP 0x15
125 #define LMP_ESC4(x) ((127 << 8) | (x))
127 #define BT_LMP_NAME_REQ 1
128 struct bt_lmp_name_req {
130 } __attribute__ ((packed));
132 #define BT_LMP_NAME_RSP 2
133 struct bt_lmp_name_rsp {
136 uint8_t fragment[14];
137 } __attribute__ ((packed));
139 #define BT_LMP_ACCEPTED 3
140 struct bt_lmp_accepted {
142 } __attribute__ ((packed));
144 #define BT_LMP_NOT_ACCEPTED 4
145 struct bt_lmp_not_accepted {
148 } __attribute__ ((packed));
150 #define BT_LMP_CLKOFFSET_REQ 5
152 #define BT_LMP_CLKOFFSET_RSP 6
153 struct bt_lmp_clkoffset_rsp {
155 } __attribute__ ((packed));
157 #define BT_LMP_DETACH 7
158 struct bt_lmp_detach {
160 } __attribute__ ((packed));
162 #define BT_LMP_AU_RAND 11
163 struct bt_lmp_au_rand {
165 } __attribute__ ((packed));
167 #define BT_LMP_SRES 12
170 } __attribute__ ((packed));
172 #define BT_LMP_ENCRYPTION_MODE_REQ 15
173 struct bt_lmp_encryption_mode_req {
175 } __attribute__ ((packed));
177 #define BT_LMP_ENCRYPTION_KEY_SIZE_REQ 16
178 struct bt_lmp_encryption_key_size_req {
180 } __attribute__ ((packed));
182 #define BT_LMP_START_ENCRYPTION_REQ 17
183 struct bt_lmp_start_encryption_req {
185 } __attribute__ ((packed));
187 #define BT_LMP_STOP_ENCRYPTION_REQ 18
189 #define BT_LMP_SWITCH_REQ 19
190 struct bt_lmp_switch_req {
192 } __attribute__ ((packed));
194 #define BT_LMP_UNSNIFF_REQ 24
196 #define BT_LMP_MAX_POWER 33
198 #define BT_LMP_MIN_POWER 34
200 #define BT_LMP_AUTO_RATE 35
202 #define BT_LMP_PREFERRED_RATE 36
203 struct bt_lmp_preferred_rate {
205 } __attribute__ ((packed));
207 #define BT_LMP_VERSION_REQ 37
208 struct bt_lmp_version_req {
212 } __attribute__ ((packed));
214 #define BT_LMP_VERSION_RES 38
215 struct bt_lmp_version_res {
219 } __attribute__ ((packed));
221 #define BT_LMP_FEATURES_REQ 39
222 struct bt_lmp_features_req {
224 } __attribute__ ((packed));
226 #define BT_LMP_FEATURES_RES 40
227 struct bt_lmp_features_res {
229 } __attribute__ ((packed));
231 #define BT_LMP_MAX_SLOT 45
232 struct bt_lmp_max_slot {
234 } __attribute__ ((packed));
236 #define BT_LMP_MAX_SLOT_REQ 46
237 struct bt_lmp_max_slot_req {
239 } __attribute__ ((packed));
241 #define BT_LMP_TIMING_ACCURACY_REQ 47
243 #define BT_LMP_TIMING_ACCURACY_RES 48
244 struct bt_lmp_timing_accuracy_res {
247 } __attribute__ ((packed));
249 #define BT_LMP_SETUP_COMPLETE 49
251 #define BT_LMP_USE_SEMI_PERMANENT_KEY 50
253 #define BT_LMP_HOST_CONNECTION_REQ 51
255 #define BT_LMP_SLOT_OFFSET 52
256 struct bt_lmp_slot_offset {
259 } __attribute__ ((packed));
261 #define BT_LMP_PAGE_SCAN_MODE_REQ 54
262 struct bt_lmp_page_scan_mode_req {
265 } __attribute__ ((packed));
267 #define BT_LMP_TEST_ACTIVATE 56
269 #define BT_LMP_ENCRYPTION_KEY_SIZE_MASK_REQ 58
271 #define BT_LMP_SET_AFH 60
272 struct bt_lmp_set_afh {
276 } __attribute__ ((packed));
278 #define BT_LMP_ENCAPSULATED_HEADER 61
279 struct bt_lmp_encapsulated_header {
283 } __attribute__ ((packed));
285 #define BT_LMP_ENCAPSULATED_PAYLOAD 62
286 struct bt_lmp_encapsulated_payload {
288 } __attribute__ ((packed));
290 #define BT_LMP_SIMPLE_PAIRING_CONFIRM 63
291 struct bt_lmp_simple_pairing_confirm {
293 } __attribute__ ((packed));
295 #define BT_LMP_SIMPLE_PAIRING_NUMBER 64
296 struct bt_lmp_simple_pairing_number {
298 } __attribute__ ((packed));
300 #define BT_LMP_DHKEY_CHECK 65
301 struct bt_lmp_dhkey_check {
303 } __attribute__ ((packed));
305 #define BT_LMP_PAUSE_ENCRYPTION_AES_REQ 66
307 #define BT_LMP_ACCEPTED_EXT LMP_ESC4(1)
308 struct bt_lmp_accepted_ext {
311 } __attribute__ ((packed));
313 #define BT_LMP_NOT_ACCEPTED_EXT LMP_ESC4(2)
314 struct bt_lmp_not_accepted_ext {
318 } __attribute__ ((packed));
320 #define BT_LMP_FEATURES_REQ_EXT LMP_ESC4(3)
321 struct bt_lmp_features_req_ext {
325 } __attribute__ ((packed));
327 #define BT_LMP_FEATURES_RES_EXT LMP_ESC4(4)
328 struct bt_lmp_features_res_ext {
332 } __attribute__ ((packed));
334 #define BT_LMP_PACKET_TYPE_TABLE_REQ LMP_ESC4(11)
335 struct bt_lmp_packet_type_table_req {
337 } __attribute__ ((packed));
339 #define BT_LMP_CHANNEL_CLASSIFICATION_REQ LMP_ESC4(16)
340 struct bt_lmp_channel_classification_req {
342 uint16_t min_interval;
343 uint16_t max_interval;
344 } __attribute__ ((packed));
346 #define BT_LMP_CHANNEL_CLASSIFICATION LMP_ESC4(17)
347 struct bt_lmp_channel_classification {
348 uint8_t classification[10];
349 } __attribute__ ((packed));
351 #define BT_LMP_PAUSE_ENCRYPTION_REQ LMP_ESC4(23)
353 #define BT_LMP_RESUME_ENCRYPTION_REQ LMP_ESC4(24)
355 #define BT_LMP_IO_CAPABILITY_REQ LMP_ESC4(25)
356 struct bt_lmp_io_capability_req {
359 uint8_t authentication;
360 } __attribute__ ((packed));
362 #define BT_LMP_IO_CAPABILITY_RES LMP_ESC4(26)
363 struct bt_lmp_io_capability_res {
366 uint8_t authentication;
367 } __attribute__ ((packed));
369 #define BT_LMP_NUMERIC_COMPARISON_FAILED LMP_ESC(27)
371 #define BT_LMP_PASSKEY_FAILED LMP_ESC4(28)
373 #define BT_LMP_OOB_FAILED LMP_ESC(29)
375 #define BT_LMP_POWER_CONTROL_REQ LMP_ESC4(31)
376 struct bt_lmp_power_control_req {
378 } __attribute__ ((packed));
380 #define BT_LMP_POWER_CONTROL_RES LMP_ESC4(32)
381 struct bt_lmp_power_control_res {
383 } __attribute__ ((packed));
385 #define BT_LMP_PING_REQ LMP_ESC4(33)
387 #define BT_LMP_PING_RES LMP_ESC4(34)
389 #define BT_H4_CMD_PKT 0x01
390 #define BT_H4_ACL_PKT 0x02
391 #define BT_H4_SCO_PKT 0x03
392 #define BT_H4_EVT_PKT 0x04
394 struct bt_hci_cmd_hdr {
397 } __attribute__ ((packed));
399 struct bt_hci_acl_hdr {
402 } __attribute__ ((packed));
404 struct bt_hci_sco_hdr {
407 } __attribute__ ((packed));
409 struct bt_hci_evt_hdr {
412 } __attribute__ ((packed));
414 #define BT_HCI_CMD_NOP 0x0000
416 #define BT_HCI_CMD_INQUIRY 0x0401
417 struct bt_hci_cmd_inquiry {
421 } __attribute__ ((packed));
423 #define BT_HCI_CMD_INQUIRY_CANCEL 0x0402
425 #define BT_HCI_CMD_PERIODIC_INQUIRY 0x0403
426 struct bt_hci_cmd_periodic_inquiry {
432 } __attribute__ ((packed));
434 #define BT_HCI_CMD_EXIT_PERIODIC_INQUIRY 0x0404
436 #define BT_HCI_CMD_CREATE_CONN 0x0405
437 struct bt_hci_cmd_create_conn {
440 uint8_t pscan_rep_mode;
442 uint16_t clock_offset;
444 } __attribute__ ((packed));
446 #define BT_HCI_CMD_DISCONNECT 0x0406
447 struct bt_hci_cmd_disconnect {
450 } __attribute__ ((packed));
452 #define BT_HCI_CMD_ADD_SCO_CONN 0x0407
453 struct bt_hci_cmd_add_sco_conn {
456 } __attribute__ ((packed));
458 #define BT_HCI_CMD_CREATE_CONN_CANCEL 0x0408
459 struct bt_hci_cmd_create_conn_cancel {
461 } __attribute__ ((packed));
463 #define BT_HCI_CMD_ACCEPT_CONN_REQUEST 0x0409
464 struct bt_hci_cmd_accept_conn_request {
467 } __attribute__ ((packed));
469 #define BT_HCI_CMD_REJECT_CONN_REQUEST 0x040a
470 struct bt_hci_cmd_reject_conn_request {
473 } __attribute__ ((packed));
475 #define BT_HCI_CMD_LINK_KEY_REQUEST_REPLY 0x040b
476 struct bt_hci_cmd_link_key_request_reply {
478 uint8_t link_key[16];
479 } __attribute__ ((packed));
480 struct bt_hci_rsp_link_key_request_reply {
483 } __attribute__ ((packed));
485 #define BT_HCI_CMD_LINK_KEY_REQUEST_NEG_REPLY 0x040c
486 struct bt_hci_cmd_link_key_request_neg_reply {
488 } __attribute__ ((packed));
489 struct bt_hci_rsp_link_key_request_neg_reply {
492 } __attribute__ ((packed));
494 #define BT_HCI_CMD_PIN_CODE_REQUEST_REPLY 0x040d
495 struct bt_hci_cmd_pin_code_request_reply {
498 uint8_t pin_code[16];
499 } __attribute__ ((packed));
501 #define BT_HCI_CMD_PIN_CODE_REQUEST_NEG_REPLY 0x040e
502 struct bt_hci_cmd_pin_code_request_neg_reply {
504 } __attribute__ ((packed));
505 struct bt_hci_rsp_pin_code_request_neg_reply {
508 } __attribute__ ((packed));
510 #define BT_HCI_CMD_CHANGE_CONN_PKT_TYPE 0x040f
511 struct bt_hci_cmd_change_conn_pkt_type {
514 } __attribute__ ((packed));
516 #define BT_HCI_CMD_AUTH_REQUESTED 0x0411
517 struct bt_hci_cmd_auth_requested {
519 } __attribute__ ((packed));
521 #define BT_HCI_CMD_SET_CONN_ENCRYPT 0x0413
522 struct bt_hci_cmd_set_conn_encrypt {
525 } __attribute__ ((packed));
527 #define BT_HCI_CMD_CHANGE_CONN_LINK_KEY 0x0415
528 struct bt_hci_cmd_change_conn_link_key {
530 } __attribute__ ((packed));
532 #define BT_HCI_CMD_MASTER_LINK_KEY 0x0417
533 struct bt_hci_cmd_master_link_key {
535 } __attribute__ ((packed));
537 #define BT_HCI_CMD_REMOTE_NAME_REQUEST 0x0419
538 struct bt_hci_cmd_remote_name_request {
540 uint8_t pscan_rep_mode;
542 uint16_t clock_offset;
543 } __attribute__ ((packed));
545 #define BT_HCI_CMD_REMOTE_NAME_REQUEST_CANCEL 0x041a
546 struct bt_hci_cmd_remote_name_request_cancel {
548 } __attribute__ ((packed));
549 struct bt_hci_rsp_remote_name_request_cancel {
552 } __attribute__ ((packed));
554 #define BT_HCI_CMD_READ_REMOTE_FEATURES 0x041b
555 struct bt_hci_cmd_read_remote_features {
557 } __attribute__ ((packed));
559 #define BT_HCI_CMD_READ_REMOTE_EXT_FEATURES 0x041c
560 struct bt_hci_cmd_read_remote_ext_features {
563 } __attribute__ ((packed));
565 #define BT_HCI_CMD_READ_REMOTE_VERSION 0x041d
566 struct bt_hci_cmd_read_remote_version {
568 } __attribute__ ((packed));
570 #define BT_HCI_CMD_READ_CLOCK_OFFSET 0x041f
571 struct bt_hci_cmd_read_clock_offset {
573 } __attribute__ ((packed));
575 #define BT_HCI_CMD_READ_LMP_HANDLE 0x0420
576 struct bt_hci_cmd_read_lmp_handle {
578 } __attribute__ ((packed));
579 struct bt_hci_rsp_read_lmp_handle {
584 } __attribute__ ((packed));
586 #define BT_HCI_CMD_SETUP_SYNC_CONN 0x0428
587 struct bt_hci_cmd_setup_sync_conn {
589 uint32_t tx_bandwidth;
590 uint32_t rx_bandwidth;
591 uint16_t max_latency;
592 uint16_t voice_setting;
593 uint8_t retrans_effort;
595 } __attribute__ ((packed));
597 #define BT_HCI_CMD_ACCEPT_SYNC_CONN_REQUEST 0x0429
598 struct bt_hci_cmd_accept_sync_conn_request {
600 uint32_t tx_bandwidth;
601 uint32_t rx_bandwidth;
602 uint16_t max_latency;
603 uint16_t voice_setting;
604 uint8_t retrans_effort;
606 } __attribute__ ((packed));
608 #define BT_HCI_CMD_REJECT_SYNC_CONN_REQUEST 0x042a
609 struct bt_hci_cmd_reject_sync_conn_request {
612 } __attribute__ ((packed));
614 #define BT_HCI_CMD_IO_CAPABILITY_REQUEST_REPLY 0x042b
615 struct bt_hci_cmd_io_capability_request_reply {
619 uint8_t authentication;
620 } __attribute__ ((packed));
621 struct bt_hci_rsp_io_capability_request_reply {
624 } __attribute__ ((packed));
626 #define BT_HCI_CMD_USER_CONFIRM_REQUEST_REPLY 0x042c
627 struct bt_hci_cmd_user_confirm_request_reply {
629 } __attribute__ ((packed));
630 struct bt_hci_rsp_user_confirm_request_reply {
633 } __attribute__ ((packed));
635 #define BT_HCI_CMD_USER_CONFIRM_REQUEST_NEG_REPLY 0x042d
636 struct bt_hci_cmd_user_confirm_request_neg_reply {
638 } __attribute__ ((packed));
639 struct bt_hci_rsp_user_confirm_request_neg_reply {
642 } __attribute__ ((packed));
644 #define BT_HCI_CMD_USER_PASSKEY_REQUEST_REPLY 0x042e
645 struct bt_hci_cmd_user_passkey_request_reply {
648 } __attribute__ ((packed));
650 #define BT_HCI_CMD_USER_PASSKEY_REQUEST_NEG_REPLY 0x042f
651 struct bt_hci_cmd_user_passkey_request_neg_reply {
653 } __attribute__ ((packed));
655 #define BT_HCI_CMD_REMOTE_OOB_DATA_REQUEST_REPLY 0x0430
656 struct bt_hci_cmd_remote_oob_data_request_reply {
659 uint8_t randomizer[16];
660 } __attribute__ ((packed));
662 #define BT_HCI_CMD_REMOTE_OOB_DATA_REQUEST_NEG_REPLY 0x0433
663 struct bt_hci_cmd_remote_oob_data_request_neg_reply {
665 } __attribute__ ((packed));
667 #define BT_HCI_CMD_IO_CAPABILITY_REQUEST_NEG_REPLY 0x0434
668 struct bt_hci_cmd_io_capability_request_neg_reply {
671 } __attribute__ ((packed));
672 struct bt_hci_rsp_io_capability_request_neg_reply {
675 } __attribute__ ((packed));
677 #define BT_HCI_CMD_CREATE_PHY_LINK 0x0435
678 struct bt_hci_cmd_create_phy_link {
682 } __attribute__ ((packed));
684 #define BT_HCI_CMD_ACCEPT_PHY_LINK 0x0436
685 struct bt_hci_cmd_accept_phy_link {
689 } __attribute__ ((packed));
691 #define BT_HCI_CMD_DISCONN_PHY_LINK 0x0437
692 struct bt_hci_cmd_disconn_phy_link {
695 } __attribute__ ((packed));
697 #define BT_HCI_CMD_CREATE_LOGIC_LINK 0x0438
698 struct bt_hci_cmd_create_logic_link {
700 uint8_t tx_flow_spec[16];
701 uint8_t rx_flow_spec[16];
702 } __attribute__ ((packed));
704 #define BT_HCI_CMD_ACCEPT_LOGIC_LINK 0x0439
705 struct bt_hci_cmd_accept_logic_link {
707 uint8_t tx_flow_spec[16];
708 uint8_t rx_flow_spec[16];
709 } __attribute__ ((packed));
711 #define BT_HCI_CMD_DISCONN_LOGIC_LINK 0x043a
712 struct bt_hci_cmd_disconn_logic_link {
714 } __attribute__ ((packed));
716 #define BT_HCI_CMD_LOGIC_LINK_CANCEL 0x043b
717 struct bt_hci_cmd_logic_link_cancel {
720 } __attribute__ ((packed));
721 struct bt_hci_rsp_logic_link_cancel {
725 } __attribute__ ((packed));
727 #define BT_HCI_CMD_FLOW_SPEC_MODIFY 0x043c
728 struct bt_hci_cmd_flow_spec_modify {
730 uint8_t tx_flow_spec[16];
731 uint8_t rx_flow_spec[16];
732 } __attribute__ ((packed));
734 #define BT_HCI_CMD_ENHANCED_SETUP_SYNC_CONN 0x043d
735 struct bt_hci_cmd_enhanced_setup_sync_conn {
737 uint32_t tx_bandwidth;
738 uint32_t rx_bandwidth;
739 uint8_t tx_coding_format[5];
740 uint8_t rx_coding_format[5];
741 uint16_t tx_codec_frame_size;
742 uint16_t rx_codec_frame_size;
743 uint32_t input_bandwidth;
744 uint32_t output_bandwidth;
745 uint8_t input_coding_format[5];
746 uint8_t output_coding_format[5];
747 uint16_t input_coded_data_size;
748 uint16_t output_coded_data_size;
749 uint8_t input_pcm_data_format;
750 uint8_t output_pcm_data_format;
751 uint8_t input_pcm_msb_position;
752 uint8_t output_pcm_msb_position;
753 uint8_t input_data_path;
754 uint8_t output_data_path;
755 uint8_t input_unit_size;
756 uint8_t output_unit_size;
757 uint16_t max_latency;
759 uint8_t retrans_effort;
760 } __attribute__ ((packed));
762 #define BT_HCI_CMD_ENHANCED_ACCEPT_SYNC_CONN_REQUEST 0x043e
763 struct bt_hci_cmd_enhanced_accept_sync_conn_request {
765 uint32_t tx_bandwidth;
766 uint32_t rx_bandwidth;
767 uint8_t tx_coding_format[5];
768 uint8_t rx_coding_format[5];
769 uint16_t tx_codec_frame_size;
770 uint16_t rx_codec_frame_size;
771 uint32_t input_bandwidth;
772 uint32_t output_bandwidth;
773 uint8_t input_coding_format[5];
774 uint8_t output_coding_format[5];
775 uint16_t input_coded_data_size;
776 uint16_t output_coded_data_size;
777 uint8_t input_pcm_data_format;
778 uint8_t output_pcm_data_format;
779 uint8_t input_pcm_msb_position;
780 uint8_t output_pcm_msb_position;
781 uint8_t input_data_path;
782 uint8_t output_data_path;
783 uint8_t input_unit_size;
784 uint8_t output_unit_size;
785 uint16_t max_latency;
787 uint8_t retrans_effort;
788 } __attribute__ ((packed));
790 #define BT_HCI_CMD_TRUNCATED_PAGE 0x043f
791 struct bt_hci_cmd_truncated_page {
793 uint8_t pscan_rep_mode;
794 uint16_t clock_offset;
795 } __attribute__ ((packed));
797 #define BT_HCI_CMD_TRUNCATED_PAGE_CANCEL 0x0440
798 struct bt_hci_cmd_truncated_page_cancel {
800 } __attribute__ ((packed));
802 #define BT_HCI_CMD_SET_SLAVE_BROADCAST 0x0441
803 struct bt_hci_cmd_set_slave_broadcast {
808 uint16_t min_interval;
809 uint16_t max_interval;
811 } __attribute__ ((packed));
812 struct bt_hci_rsp_set_slave_broadcast {
816 } __attribute__ ((packed));
818 #define BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE 0x0442
819 struct bt_hci_cmd_set_slave_broadcast_receive {
831 } __attribute__ ((packed));
832 struct bt_hci_rsp_set_slave_broadcast_receive {
836 } __attribute__ ((packed));
838 #define BT_HCI_CMD_START_SYNC_TRAIN 0x0443
840 #define BT_HCI_CMD_RECEIVE_SYNC_TRAIN 0x0444
841 struct bt_hci_cmd_receive_sync_train {
846 } __attribute__ ((packed));
848 #define BT_HCI_CMD_REMOTE_OOB_EXT_DATA_REQUEST_REPLY 0x0445
849 struct bt_hci_cmd_remote_oob_ext_data_request_reply {
852 uint8_t randomizer192[16];
854 uint8_t randomizer256[16];
855 } __attribute__ ((packed));
857 #define BT_HCI_CMD_HOLD_MODE 0x0801
858 struct bt_hci_cmd_hold_mode {
860 uint16_t max_interval;
861 uint16_t min_interval;
862 } __attribute__ ((packed));
864 #define BT_HCI_CMD_SNIFF_MODE 0x0803
865 struct bt_hci_cmd_sniff_mode {
867 uint16_t max_interval;
868 uint16_t min_interval;
871 } __attribute__ ((packed));
873 #define BT_HCI_CMD_EXIT_SNIFF_MODE 0x0804
874 struct bt_hci_cmd_exit_sniff_mode {
876 } __attribute__ ((packed));
878 #define BT_HCI_CMD_PARK_STATE 0x0805
879 struct bt_hci_cmd_park_state {
881 uint16_t max_interval;
882 uint16_t min_interval;
883 } __attribute__ ((packed));
885 #define BT_HCI_CMD_EXIT_PARK_STATE 0x0806
886 struct bt_hci_cmd_exit_park_state {
888 } __attribute__ ((packed));
890 #define BT_HCI_CMD_QOS_SETUP 0x0807
891 struct bt_hci_cmd_qos_setup {
894 uint8_t service_type;
896 uint32_t peak_bandwidth;
898 uint32_t delay_variation;
899 } __attribute__ ((packed));
901 #define BT_HCI_CMD_ROLE_DISCOVERY 0x0809
902 struct bt_hci_cmd_role_discovery {
904 } __attribute__ ((packed));
905 struct bt_hci_rsp_role_discovery {
909 } __attribute__ ((packed));
911 #define BT_HCI_CMD_SWITCH_ROLE 0x080b
912 struct bt_hci_cmd_switch_role {
915 } __attribute__ ((packed));
917 #define BT_HCI_CMD_READ_LINK_POLICY 0x080c
918 struct bt_hci_cmd_read_link_policy {
920 } __attribute__ ((packed));
921 struct bt_hci_rsp_read_link_policy {
925 } __attribute__ ((packed));
927 #define BT_HCI_CMD_WRITE_LINK_POLICY 0x080d
928 struct bt_hci_cmd_write_link_policy {
931 } __attribute__ ((packed));
932 struct bt_hci_rsp_write_link_policy {
935 } __attribute__ ((packed));
937 #define BT_HCI_CMD_READ_DEFAULT_LINK_POLICY 0x080e
938 struct bt_hci_rsp_read_default_link_policy {
941 } __attribute__ ((packed));
943 #define BT_HCI_CMD_WRITE_DEFAULT_LINK_POLICY 0x080f
944 struct bt_hci_cmd_write_default_link_policy {
946 } __attribute__ ((packed));
948 #define BT_HCI_CMD_FLOW_SPEC 0x0810
949 struct bt_hci_cmd_flow_spec {
953 uint8_t service_type;
955 uint32_t token_bucket_size;
956 uint32_t peak_bandwidth;
957 uint32_t access_latency;
958 } __attribute__ ((packed));
960 #define BT_HCI_CMD_SNIFF_SUBRATING 0x0811
961 struct bt_hci_cmd_sniff_subrating {
963 uint16_t max_latency;
964 uint16_t min_remote_timeout;
965 uint16_t min_local_timeout;
966 } __attribute__ ((packed));
967 struct bt_hci_rsp_sniff_subrating {
970 } __attribute__ ((packed));
972 #define BT_HCI_CMD_SET_EVENT_MASK 0x0c01
973 struct bt_hci_cmd_set_event_mask {
975 } __attribute__ ((packed));
977 #define BT_HCI_CMD_RESET 0x0c03
979 #define BT_HCI_CMD_SET_EVENT_FILTER 0x0c05
980 struct bt_hci_cmd_set_event_filter {
984 } __attribute__ ((packed));
986 #define BT_HCI_CMD_FLUSH 0x0c08
987 struct bt_hci_cmd_flush {
989 } __attribute__ ((packed));
990 struct bt_hci_rsp_flush {
993 } __attribute__ ((packed));
995 #define BT_HCI_CMD_READ_PIN_TYPE 0x0c09
996 struct bt_hci_rsp_read_pin_type {
999 } __attribute__ ((packed));
1001 #define BT_HCI_CMD_WRITE_PIN_TYPE 0x0c0a
1002 struct bt_hci_cmd_write_pin_type {
1004 } __attribute__ ((packed));
1006 #define BT_HCI_CMD_CREATE_NEW_UNIT_KEY 0x0c0b
1008 #define BT_HCI_CMD_READ_STORED_LINK_KEY 0x0c0d
1009 struct bt_hci_cmd_read_stored_link_key {
1012 } __attribute__ ((packed));
1013 struct bt_hci_rsp_read_stored_link_key {
1015 uint16_t max_num_keys;
1017 } __attribute__ ((packed));
1019 #define BT_HCI_CMD_WRITE_STORED_LINK_KEY 0x0c11
1020 struct bt_hci_cmd_write_stored_link_key {
1022 } __attribute__ ((packed));
1023 struct bt_hci_rsp_write_stored_link_key {
1026 } __attribute__ ((packed));
1028 #define BT_HCI_CMD_DELETE_STORED_LINK_KEY 0x0c12
1029 struct bt_hci_cmd_delete_stored_link_key {
1032 } __attribute__ ((packed));
1033 struct bt_hci_rsp_delete_stored_link_key {
1036 } __attribute__ ((packed));
1038 #define BT_HCI_CMD_WRITE_LOCAL_NAME 0x0c13
1039 struct bt_hci_cmd_write_local_name {
1041 } __attribute__ ((packed));
1043 #define BT_HCI_CMD_READ_LOCAL_NAME 0x0c14
1044 struct bt_hci_rsp_read_local_name {
1047 } __attribute__ ((packed));
1049 #define BT_HCI_CMD_READ_CONN_ACCEPT_TIMEOUT 0x0c15
1050 struct bt_hci_rsp_read_conn_accept_timeout {
1053 } __attribute__ ((packed));
1055 #define BT_HCI_CMD_WRITE_CONN_ACCEPT_TIMEOUT 0x0c16
1056 struct bt_hci_cmd_write_conn_accept_timeout {
1058 } __attribute__ ((packed));
1060 #define BT_HCI_CMD_READ_PAGE_TIMEOUT 0x0c17
1061 struct bt_hci_rsp_read_page_timeout {
1064 } __attribute__ ((packed));
1066 #define BT_HCI_CMD_WRITE_PAGE_TIMEOUT 0x0c18
1067 struct bt_hci_cmd_write_page_timeout {
1069 } __attribute__ ((packed));
1071 #define BT_HCI_CMD_READ_SCAN_ENABLE 0x0c19
1072 struct bt_hci_rsp_read_scan_enable {
1075 } __attribute__ ((packed));
1077 #define BT_HCI_CMD_WRITE_SCAN_ENABLE 0x0c1a
1078 struct bt_hci_cmd_write_scan_enable {
1080 } __attribute__ ((packed));
1082 #define BT_HCI_CMD_READ_PAGE_SCAN_ACTIVITY 0x0c1b
1083 struct bt_hci_rsp_read_page_scan_activity {
1087 } __attribute__ ((packed));
1089 #define BT_HCI_CMD_WRITE_PAGE_SCAN_ACTIVITY 0x0c1c
1090 struct bt_hci_cmd_write_page_scan_activity {
1093 } __attribute__ ((packed));
1095 #define BT_HCI_CMD_READ_INQUIRY_SCAN_ACTIVITY 0x0c1d
1096 struct bt_hci_rsp_read_inquiry_scan_activity {
1100 } __attribute__ ((packed));
1102 #define BT_HCI_CMD_WRITE_INQUIRY_SCAN_ACTIVITY 0x0c1e
1103 struct bt_hci_cmd_write_inquiry_scan_activity {
1106 } __attribute__ ((packed));
1108 #define BT_HCI_CMD_READ_AUTH_ENABLE 0x0c1f
1109 struct bt_hci_rsp_read_auth_enable {
1112 } __attribute__ ((packed));
1114 #define BT_HCI_CMD_WRITE_AUTH_ENABLE 0x0c20
1115 struct bt_hci_cmd_write_auth_enable {
1117 } __attribute__ ((packed));
1119 #define BT_HCI_CMD_READ_ENCRYPT_MODE 0x0c21
1120 struct bt_hci_rsp_read_encrypt_mode {
1123 } __attribute__ ((packed));
1125 #define BT_HCI_CMD_WRITE_ENCRYPT_MODE 0x0c22
1126 struct bt_hci_cmd_write_encrypt_mode {
1128 } __attribute__ ((packed));
1130 #define BT_HCI_CMD_READ_CLASS_OF_DEV 0x0c23
1131 struct bt_hci_rsp_read_class_of_dev {
1133 uint8_t dev_class[3];
1134 } __attribute__ ((packed));
1136 #define BT_HCI_CMD_WRITE_CLASS_OF_DEV 0x0c24
1137 struct bt_hci_cmd_write_class_of_dev {
1138 uint8_t dev_class[3];
1139 } __attribute__ ((packed));
1141 #define BT_HCI_CMD_READ_VOICE_SETTING 0x0c25
1142 struct bt_hci_rsp_read_voice_setting {
1145 } __attribute__ ((packed));
1147 #define BT_HCI_CMD_WRITE_VOICE_SETTING 0x0c26
1148 struct bt_hci_cmd_write_voice_setting {
1150 } __attribute__ ((packed));
1152 #define BT_HCI_CMD_READ_AUTO_FLUSH_TIMEOUT 0x0c27
1153 struct bt_hci_cmd_read_auto_flush_timeout {
1155 } __attribute__ ((packed));
1156 struct bt_hci_rsp_read_auto_flush_timeout {
1160 } __attribute__ ((packed));
1162 #define BT_HCI_CMD_WRITE_AUTO_FLUSH_TIMEOUT 0x0c28
1163 struct bt_hci_cmd_write_auto_flush_timeout {
1166 } __attribute__ ((packed));
1167 struct bt_hci_rsp_write_auto_flush_timeout {
1170 } __attribute__ ((packed));
1172 #define BT_HCI_CMD_READ_NUM_BROADCAST_RETRANS 0x0c29
1173 struct bt_hci_rsp_read_num_broadcast_retrans {
1175 uint8_t num_retrans;
1176 } __attribute__ ((packed));
1178 #define BT_HCI_CMD_WRITE_NUM_BROADCAST_RETRANS 0x0c2a
1179 struct bt_hci_cmd_write_num_broadcast_retrans {
1180 uint8_t num_retrans;
1181 } __attribute__ ((packed));
1183 #define BT_HCI_CMD_READ_HOLD_MODE_ACTIVITY 0x0c2b
1184 struct bt_hci_rsp_read_hold_mode_activity {
1187 } __attribute__ ((packed));
1189 #define BT_HCI_CMD_WRITE_HOLD_MODE_ACTIVITY 0x0c2c
1190 struct bt_hci_cmd_write_hold_mode_activity {
1192 } __attribute__ ((packed));
1194 #define BT_HCI_CMD_READ_TX_POWER 0x0c2d
1195 struct bt_hci_cmd_read_tx_power {
1198 } __attribute__ ((packed));
1199 struct bt_hci_rsp_read_tx_power {
1203 } __attribute__ ((packed));
1205 #define BT_HCI_CMD_READ_SYNC_FLOW_CONTROL 0x0c2e
1206 struct bt_hci_rsp_read_sync_flow_control {
1209 } __attribute__ ((packed));
1211 #define BT_HCI_CMD_WRITE_SYNC_FLOW_CONTROL 0x0c2f
1212 struct bt_hci_cmd_write_sync_flow_control {
1214 } __attribute__ ((packed));
1216 #define BT_HCI_CMD_SET_HOST_FLOW_CONTROL 0x0c31
1217 struct bt_hci_cmd_set_host_flow_control {
1219 } __attribute__ ((packed));
1221 #define BT_HCI_CMD_HOST_BUFFER_SIZE 0x0c33
1222 struct bt_hci_cmd_host_buffer_size {
1225 uint16_t acl_max_pkt;
1226 uint16_t sco_max_pkt;
1227 } __attribute__ ((packed));
1229 #define BT_HCI_CMD_HOST_NUM_COMPLETED_PACKETS 0x0c35
1230 struct bt_hci_cmd_host_num_completed_packets {
1231 uint8_t num_handles;
1234 } __attribute__ ((packed));
1236 #define BT_HCI_CMD_READ_LINK_SUPV_TIMEOUT 0x0c36
1237 struct bt_hci_cmd_read_link_supv_timeout {
1239 } __attribute__ ((packed));
1240 struct bt_hci_rsp_read_link_supv_timeout {
1244 } __attribute__ ((packed));
1246 #define BT_HCI_CMD_WRITE_LINK_SUPV_TIMEOUT 0x0c37
1247 struct bt_hci_cmd_write_link_supv_timeout {
1250 } __attribute__ ((packed));
1251 struct bt_hci_rsp_write_link_supv_timeout {
1254 } __attribute__ ((packed));
1256 #define BT_HCI_CMD_READ_NUM_SUPPORTED_IAC 0x0c38
1257 struct bt_hci_rsp_read_num_supported_iac {
1260 } __attribute__ ((packed));
1262 #define BT_HCI_CMD_READ_CURRENT_IAC_LAP 0x0c39
1263 struct bt_hci_rsp_read_current_iac_lap {
1267 } __attribute__ ((packed));
1269 #define BT_HCI_CMD_WRITE_CURRENT_IAC_LAP 0x0c3a
1270 struct bt_hci_cmd_write_current_iac_lap {
1273 } __attribute__ ((packed));
1275 #define BT_HCI_CMD_READ_PAGE_SCAN_PERIOD_MODE 0x0c3b
1276 struct bt_hci_rsp_read_page_scan_period_mode {
1279 } __attribute__ ((packed));
1281 #define BT_HCI_CMD_WRITE_PAGE_SCAN_PERIOD_MODE 0x0c3c
1282 struct bt_hci_cmd_write_page_scan_period_mode {
1284 } __attribute__ ((packed));
1286 #define BT_HCI_CMD_READ_PAGE_SCAN_MODE 0x0c3d
1287 struct bt_hci_rsp_read_page_scan_mode {
1290 } __attribute__ ((packed));
1292 #define BT_HCI_CMD_WRITE_PAGE_SCAN_MODE 0x0c3e
1293 struct bt_hci_cmd_write_page_scan_mode {
1295 } __attribute__ ((packed));
1297 #define BT_HCI_CMD_SET_AFH_HOST_CLASSIFICATION 0x0c3f
1298 struct bt_hci_cmd_set_afh_host_classification {
1300 } __attribute__ ((packed));
1302 #define BT_HCI_CMD_READ_INQUIRY_SCAN_TYPE 0x0c42
1303 struct bt_hci_rsp_read_inquiry_scan_type {
1306 } __attribute__ ((packed));
1308 #define BT_HCI_CMD_WRITE_INQUIRY_SCAN_TYPE 0x0c43
1309 struct bt_hci_cmd_write_inquiry_scan_type {
1311 } __attribute__ ((packed));
1313 #define BT_HCI_CMD_READ_INQUIRY_MODE 0x0c44
1314 struct bt_hci_rsp_read_inquiry_mode {
1317 } __attribute__ ((packed));
1319 #define BT_HCI_CMD_WRITE_INQUIRY_MODE 0x0c45
1320 struct bt_hci_cmd_write_inquiry_mode {
1322 } __attribute__ ((packed));
1324 #define BT_HCI_CMD_READ_PAGE_SCAN_TYPE 0x0c46
1325 struct bt_hci_rsp_read_page_scan_type {
1328 } __attribute__ ((packed));
1330 #define BT_HCI_CMD_WRITE_PAGE_SCAN_TYPE 0x0c47
1331 struct bt_hci_cmd_write_page_scan_type {
1333 } __attribute__ ((packed));
1335 #define BT_HCI_CMD_READ_AFH_ASSESSMENT_MODE 0x0c48
1336 struct bt_hci_rsp_read_afh_assessment_mode {
1339 } __attribute__ ((packed));
1341 #define BT_HCI_CMD_WRITE_AFH_ASSESSMENT_MODE 0x0c49
1342 struct bt_hci_cmd_write_afh_assessment_mode {
1344 } __attribute__ ((packed));
1346 #define BT_HCI_CMD_READ_EXT_INQUIRY_RESPONSE 0x0c51
1347 struct bt_hci_rsp_read_ext_inquiry_response {
1351 } __attribute__ ((packed));
1353 #define BT_HCI_CMD_WRITE_EXT_INQUIRY_RESPONSE 0x0c52
1354 struct bt_hci_cmd_write_ext_inquiry_response {
1357 } __attribute__ ((packed));
1359 #define BT_HCI_CMD_REFRESH_ENCRYPT_KEY 0x0c53
1360 struct bt_hci_cmd_refresh_encrypt_key {
1362 } __attribute__ ((packed));
1364 #define BT_HCI_CMD_READ_SIMPLE_PAIRING_MODE 0x0c55
1365 struct bt_hci_rsp_read_simple_pairing_mode {
1368 } __attribute__ ((packed));
1370 #define BT_HCI_CMD_WRITE_SIMPLE_PAIRING_MODE 0x0c56
1371 struct bt_hci_cmd_write_simple_pairing_mode {
1373 } __attribute__ ((packed));
1375 #define BT_HCI_CMD_READ_LOCAL_OOB_DATA 0x0c57
1376 struct bt_hci_rsp_read_local_oob_data {
1379 uint8_t randomizer[16];
1380 } __attribute__ ((packed));
1382 #define BT_HCI_CMD_READ_INQUIRY_RESP_TX_POWER 0x0c58
1383 struct bt_hci_rsp_read_inquiry_resp_tx_power {
1386 } __attribute__ ((packed));
1388 #define BT_HCI_CMD_WRITE_INQUIRY_TX_POWER 0x0c59
1389 struct bt_hci_cmd_write_inquiry_tx_power {
1391 } __attribute__ ((packed));
1393 #define BT_HCI_CMD_READ_ERRONEOUS_REPORTING 0x0c5a
1394 struct bt_hci_rsp_read_erroneous_reporting {
1397 } __attribute__ ((packed));
1399 #define BT_HCI_CMD_WRITE_ERRONEOUS_REPORTING 0x0c5b
1400 struct bt_hci_cmd_write_erroneous_reporting {
1402 } __attribute__ ((packed));
1404 #define BT_HCI_CMD_ENHANCED_FLUSH 0x0c5f
1405 struct bt_hci_cmd_enhanced_flush {
1408 } __attribute__ ((packed));
1410 #define BT_HCI_CMD_SEND_KEYPRESS_NOTIFY 0x0c60
1411 struct bt_hci_cmd_send_keypress_notify {
1414 } __attribute__ ((packed));
1415 struct bt_hci_rsp_send_keypress_notify {
1418 } __attribute__ ((packed));
1420 #define BT_HCI_CMD_SET_EVENT_MASK_PAGE2 0x0c63
1421 struct bt_hci_cmd_set_event_mask_page2 {
1423 } __attribute__ ((packed));
1425 #define BT_HCI_CMD_READ_LOCATION_DATA 0x0c64
1426 struct bt_hci_rsp_read_location_data {
1428 uint8_t domain_aware;
1430 uint8_t domain_options;
1432 } __attribute__ ((packed));
1434 #define BT_HCI_CMD_WRITE_LOCATION_DATA 0x0c65
1435 struct bt_hci_cmd_write_location_data {
1436 uint8_t domain_aware;
1438 uint8_t domain_options;
1440 } __attribute__ ((packed));
1442 #define BT_HCI_CMD_READ_FLOW_CONTROL_MODE 0x0c66
1443 struct bt_hci_rsp_read_flow_control_mode {
1446 } __attribute__ ((packed));
1448 #define BT_HCI_CMD_WRITE_FLOW_CONTROL_MODE 0x0c67
1449 struct bt_hci_cmd_write_flow_control_mode {
1451 } __attribute__ ((packed));
1453 #define BT_HCI_CMD_READ_ENHANCED_TX_POWER 0x0c68
1454 struct bt_hci_cmd_read_enhanced_tx_power {
1457 } __attribute__ ((packed));
1458 struct bt_hci_rsp_read_enhanced_tx_power {
1464 } __attribute__ ((packed));
1466 #define BT_HCI_CMD_SHORT_RANGE_MODE 0x0c6b
1467 struct bt_hci_cmd_short_range_mode {
1470 } __attribute__ ((packed));
1472 #define BT_HCI_CMD_READ_LE_HOST_SUPPORTED 0x0c6c
1473 struct bt_hci_rsp_read_le_host_supported {
1476 uint8_t simultaneous;
1477 } __attribute__ ((packed));
1479 #define BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED 0x0c6d
1480 struct bt_hci_cmd_write_le_host_supported {
1482 uint8_t simultaneous;
1483 } __attribute__ ((packed));
1485 #define BT_HCI_CMD_SET_RESERVED_LT_ADDR 0x0c74
1486 struct bt_hci_cmd_set_reserved_lt_addr {
1488 } __attribute__ ((packed));
1489 struct bt_hci_rsp_set_reserved_lt_addr {
1492 } __attribute__ ((packed));
1494 #define BT_HCI_CMD_DELETE_RESERVED_LT_ADDR 0x0c75
1495 struct bt_hci_cmd_delete_reserved_lt_addr {
1497 } __attribute__ ((packed));
1498 struct bt_hci_rsp_delete_reserved_lt_addr {
1501 } __attribute__ ((packed));
1503 #define BT_HCI_CMD_SET_SLAVE_BROADCAST_DATA 0x0c76
1504 struct bt_hci_cmd_set_slave_broadcast_data {
1508 } __attribute__ ((packed));
1509 struct bt_hci_rsp_set_slave_broadcast_data {
1512 } __attribute__ ((packed));
1514 #define BT_HCI_CMD_READ_SYNC_TRAIN_PARAMS 0x0c77
1515 struct bt_hci_rsp_read_sync_train_params {
1519 uint8_t service_data;
1520 } __attribute__ ((packed));
1522 #define BT_HCI_CMD_WRITE_SYNC_TRAIN_PARAMS 0x0c78
1523 struct bt_hci_cmd_write_sync_train_params {
1524 uint16_t min_interval;
1525 uint16_t max_interval;
1527 uint8_t service_data;
1528 } __attribute__ ((packed));
1529 struct bt_hci_rsp_write_sync_train_params {
1532 } __attribute__ ((packed));
1534 #define BT_HCI_CMD_READ_SECURE_CONN_SUPPORT 0x0c79
1535 struct bt_hci_rsp_read_secure_conn_support {
1538 } __attribute__ ((packed));
1540 #define BT_HCI_CMD_WRITE_SECURE_CONN_SUPPORT 0x0c7a
1541 struct bt_hci_cmd_write_secure_conn_support {
1543 } __attribute__ ((packed));
1545 #define BT_HCI_CMD_READ_AUTH_PAYLOAD_TIMEOUT 0x0c7b
1546 struct bt_hci_cmd_read_auth_payload_timeout {
1548 } __attribute__ ((packed));
1549 struct bt_hci_rsp_read_auth_payload_timeout {
1553 } __attribute__ ((packed));
1555 #define BT_HCI_CMD_WRITE_AUTH_PAYLOAD_TIMEOUT 0x0c7c
1556 struct bt_hci_cmd_write_auth_payload_timeout {
1559 } __attribute__ ((packed));
1560 struct bt_hci_rsp_write_auth_payload_timeout {
1563 } __attribute__ ((packed));
1565 #define BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA 0x0c7d
1566 struct bt_hci_rsp_read_local_oob_ext_data {
1568 uint8_t hash192[16];
1569 uint8_t randomizer192[16];
1570 uint8_t hash256[16];
1571 uint8_t randomizer256[16];
1572 } __attribute__ ((packed));
1574 #define BT_HCI_CMD_READ_EXT_PAGE_TIMEOUT 0x0c7e
1575 struct bt_hci_rsp_read_ext_page_timeout {
1578 } __attribute__ ((packed));
1580 #define BT_HCI_CMD_WRITE_EXT_PAGE_TIMEOUT 0x0c7f
1581 struct bt_hci_cmd_write_ext_page_timeout {
1583 } __attribute__ ((packed));
1585 #define BT_HCI_CMD_READ_EXT_INQUIRY_LENGTH 0x0c80
1586 struct bt_hci_rsp_read_ext_inquiry_length {
1589 } __attribute__ ((packed));
1591 #define BT_HCI_CMD_WRITE_EXT_INQUIRY_LENGTH 0x0c81
1592 struct bt_hci_cmd_write_ext_inquiry_length {
1594 } __attribute__ ((packed));
1596 #define BT_HCI_CMD_READ_LOCAL_VERSION 0x1001
1597 struct bt_hci_rsp_read_local_version {
1602 uint16_t manufacturer;
1603 uint16_t lmp_subver;
1604 } __attribute__ ((packed));
1606 #define BT_HCI_CMD_READ_LOCAL_COMMANDS 0x1002
1607 struct bt_hci_rsp_read_local_commands {
1609 uint8_t commands[64];
1610 } __attribute__ ((packed));
1612 #define BT_HCI_CMD_READ_LOCAL_FEATURES 0x1003
1613 struct bt_hci_rsp_read_local_features {
1615 uint8_t features[8];
1616 } __attribute__ ((packed));
1618 #define BT_HCI_CMD_READ_LOCAL_EXT_FEATURES 0x1004
1619 struct bt_hci_cmd_read_local_ext_features {
1621 } __attribute__ ((packed));
1622 struct bt_hci_rsp_read_local_ext_features {
1626 uint8_t features[8];
1627 } __attribute__ ((packed));
1629 #define BT_HCI_CMD_READ_BUFFER_SIZE 0x1005
1630 struct bt_hci_rsp_read_buffer_size {
1634 uint16_t acl_max_pkt;
1635 uint16_t sco_max_pkt;
1636 } __attribute__ ((packed));
1638 #define BT_HCI_CMD_READ_COUNTRY_CODE 0x1007
1639 struct bt_hci_rsp_read_country_code {
1642 } __attribute__ ((packed));
1644 #define BT_HCI_CMD_READ_BD_ADDR 0x1009
1645 struct bt_hci_rsp_read_bd_addr {
1648 } __attribute__ ((packed));
1650 #define BT_HCI_CMD_READ_DATA_BLOCK_SIZE 0x100a
1651 struct bt_hci_rsp_read_data_block_size {
1653 uint16_t max_acl_len;
1655 uint16_t num_blocks;
1656 } __attribute__ ((packed));
1658 #define BT_HCI_CMD_READ_LOCAL_CODECS 0x100b
1659 struct bt_hci_rsp_read_local_codecs {
1663 } __attribute__ ((packed));
1665 #define BT_HCI_CMD_READ_FAILED_CONTACT_COUNTER 0x1401
1666 struct bt_hci_cmd_read_failed_contact_counter {
1668 } __attribute__ ((packed));
1669 struct bt_hci_rsp_read_failed_contact_counter {
1673 } __attribute__ ((packed));
1675 #define BT_HCI_CMD_RESET_FAILED_CONTACT_COUNTER 0x1402
1676 struct bt_hci_cmd_reset_failed_contact_counter {
1678 } __attribute__ ((packed));
1679 struct bt_hci_rsp_reset_failed_contact_counter {
1682 } __attribute__ ((packed));
1684 #define BT_HCI_CMD_READ_LINK_QUALITY 0x1403
1685 struct bt_hci_cmd_read_link_quality {
1687 } __attribute__ ((packed));
1688 struct bt_hci_rsp_read_link_quality {
1691 uint8_t link_quality;
1692 } __attribute__ ((packed));
1694 #define BT_HCI_CMD_READ_RSSI 0x1405
1695 struct bt_hci_cmd_read_rssi {
1697 } __attribute__ ((packed));
1698 struct bt_hci_rsp_read_rssi {
1702 } __attribute__ ((packed));
1704 #define BT_HCI_CMD_READ_AFH_CHANNEL_MAP 0x1406
1705 struct bt_hci_cmd_read_afh_channel_map {
1707 } __attribute__ ((packed));
1708 struct bt_hci_rsp_read_afh_channel_map {
1713 } __attribute__ ((packed));
1715 #define BT_HCI_CMD_READ_CLOCK 0x1407
1716 struct bt_hci_cmd_read_clock {
1719 } __attribute__ ((packed));
1720 struct bt_hci_rsp_read_clock {
1725 } __attribute__ ((packed));
1727 #define BT_HCI_CMD_READ_ENCRYPT_KEY_SIZE 0x1408
1728 struct bt_hci_cmd_read_encrypt_key_size {
1730 } __attribute__ ((packed));
1731 struct bt_hci_rsp_read_encrypt_key_size {
1735 } __attribute__ ((packed));
1737 #define BT_HCI_CMD_READ_LOCAL_AMP_INFO 0x1409
1738 struct bt_hci_rsp_read_local_amp_info {
1743 uint32_t min_latency;
1747 uint16_t max_assoc_len;
1748 uint32_t max_flush_to;
1749 uint32_t be_flush_to;
1750 } __attribute__ ((packed));
1752 #define BT_HCI_CMD_READ_LOCAL_AMP_ASSOC 0x140a
1753 struct bt_hci_cmd_read_local_amp_assoc {
1755 uint16_t len_so_far;
1756 uint16_t max_assoc_len;
1757 } __attribute__ ((packed));
1758 struct bt_hci_rsp_read_local_amp_assoc {
1761 uint16_t remain_assoc_len;
1762 uint8_t assoc_fragment[248];
1763 } __attribute__ ((packed));
1765 #define BT_HCI_CMD_WRITE_REMOTE_AMP_ASSOC 0x140b
1766 struct bt_hci_cmd_write_remote_amp_assoc {
1768 uint16_t len_so_far;
1769 uint16_t remain_assoc_len;
1770 uint8_t assoc_fragment[248];
1771 } __attribute__ ((packed));
1772 struct bt_hci_rsp_write_remote_amp_assoc {
1775 } __attribute__ ((packed));
1777 #define BT_HCI_CMD_GET_MWS_TRANSPORT_CONFIG 0x140c
1778 struct bt_hci_rsp_get_mws_transport_config {
1780 uint8_t num_transports;
1781 uint8_t transport[0];
1782 } __attribute__ ((packed));
1784 #define BT_HCI_CMD_SET_TRIGGERED_CLOCK_CAPTURE 0x140d
1785 struct bt_hci_cmd_set_triggered_clock_capture {
1789 uint8_t lpo_allowed;
1791 } __attribute__ ((packed));
1793 #define BT_HCI_CMD_READ_LOOPBACK_MODE 0x1801
1794 struct bt_hci_rsp_read_loopback_mode {
1797 } __attribute__ ((packed));
1799 #define BT_HCI_CMD_WRITE_LOOPBACK_MODE 0x1802
1800 struct bt_hci_cmd_write_loopback_mode {
1802 } __attribute__ ((packed));
1804 #define BT_HCI_CMD_ENABLE_DUT_MODE 0x1803
1806 #define BT_HCI_CMD_WRITE_SSP_DEBUG_MODE 0x1804
1807 struct bt_hci_cmd_write_ssp_debug_mode {
1809 } __attribute__ ((packed));
1811 #define BT_HCI_CMD_LE_SET_EVENT_MASK 0x2001
1812 struct bt_hci_cmd_le_set_event_mask {
1814 } __attribute__ ((packed));
1816 #define BT_HCI_CMD_LE_READ_BUFFER_SIZE 0x2002
1817 struct bt_hci_rsp_le_read_buffer_size {
1821 } __attribute__ ((packed));
1823 #define BT_HCI_CMD_LE_READ_LOCAL_FEATURES 0x2003
1824 struct bt_hci_rsp_le_read_local_features {
1826 uint8_t features[8];
1827 } __attribute__ ((packed));
1829 #define BT_HCI_CMD_LE_SET_RANDOM_ADDRESS 0x2005
1830 struct bt_hci_cmd_le_set_random_address {
1832 } __attribute__ ((packed));
1834 #define BT_HCI_CMD_LE_SET_ADV_PARAMETERS 0x2006
1835 struct bt_hci_cmd_le_set_adv_parameters {
1836 uint16_t min_interval;
1837 uint16_t max_interval;
1839 uint8_t own_addr_type;
1840 uint8_t direct_addr_type;
1841 uint8_t direct_addr[6];
1842 uint8_t channel_map;
1843 uint8_t filter_policy;
1844 } __attribute__ ((packed));
1846 #define BT_HCI_CMD_LE_READ_ADV_TX_POWER 0x2007
1847 struct bt_hci_rsp_le_read_adv_tx_power {
1850 } __attribute__ ((packed));
1852 #define BT_HCI_CMD_LE_SET_ADV_DATA 0x2008
1853 struct bt_hci_cmd_le_set_adv_data {
1856 } __attribute__ ((packed));
1858 #define BT_HCI_CMD_LE_SET_SCAN_RSP_DATA 0x2009
1859 struct bt_hci_cmd_le_set_scan_rsp_data {
1862 } __attribute__ ((packed));
1864 #define BT_HCI_CMD_LE_SET_ADV_ENABLE 0x200a
1865 struct bt_hci_cmd_le_set_adv_enable {
1867 } __attribute__ ((packed));
1869 #define BT_HCI_CMD_LE_SET_SCAN_PARAMETERS 0x200b
1870 struct bt_hci_cmd_le_set_scan_parameters {
1874 uint8_t own_addr_type;
1875 uint8_t filter_policy;
1876 } __attribute__ ((packed));
1878 #define BT_HCI_CMD_LE_SET_SCAN_ENABLE 0x200c
1879 struct bt_hci_cmd_le_set_scan_enable {
1882 } __attribute__ ((packed));
1884 #define BT_HCI_CMD_LE_CREATE_CONN 0x200d
1885 struct bt_hci_cmd_le_create_conn {
1886 uint16_t scan_interval;
1887 uint16_t scan_window;
1888 uint8_t filter_policy;
1889 uint8_t peer_addr_type;
1890 uint8_t peer_addr[6];
1891 uint8_t own_addr_type;
1892 uint16_t min_interval;
1893 uint16_t max_interval;
1895 uint16_t supv_timeout;
1896 uint16_t min_length;
1897 uint16_t max_length;
1898 } __attribute__ ((packed));
1900 #define BT_HCI_CMD_LE_CREATE_CONN_CANCEL 0x200e
1902 #define BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE 0x200f
1903 struct bt_hci_rsp_le_read_white_list_size {
1906 } __attribute__ ((packed));
1908 #define BT_HCI_CMD_LE_CLEAR_WHITE_LIST 0x2010
1910 #define BT_HCI_CMD_LE_ADD_TO_WHITE_LIST 0x2011
1911 struct bt_hci_cmd_le_add_to_white_list {
1914 } __attribute__ ((packed));
1916 #define BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST 0x2012
1917 struct bt_hci_cmd_le_remove_from_white_list {
1920 } __attribute__ ((packed));
1922 #define BT_HCI_CMD_LE_CONN_UPDATE 0x2013
1923 struct bt_hci_cmd_le_conn_update {
1925 uint16_t min_interval;
1926 uint16_t max_interval;
1928 uint16_t supv_timeout;
1929 uint16_t min_length;
1930 uint16_t max_length;
1931 } __attribute__ ((packed));
1933 #define BT_HCI_CMD_LE_SET_HOST_CLASSIFICATION 0x2014
1934 struct bt_hci_cmd_le_set_host_classification {
1936 } __attribute__ ((packed));
1938 #define BT_HCI_CMD_LE_READ_CHANNEL_MAP 0x2015
1939 struct bt_hci_cmd_le_read_channel_map {
1941 } __attribute__ ((packed));
1942 struct bt_hci_rsp_le_read_channel_map {
1946 } __attribute__ ((packed));
1948 #define BT_HCI_CMD_LE_READ_REMOTE_FEATURES 0x2016
1949 struct bt_hci_cmd_le_read_remote_features {
1951 } __attribute__ ((packed));
1953 #define BT_HCI_CMD_LE_ENCRYPT 0x2017
1954 struct bt_hci_cmd_le_encrypt {
1956 uint8_t plaintext[16];
1957 } __attribute__ ((packed));
1958 struct bt_hci_rsp_le_encrypt {
1961 } __attribute__ ((packed));
1963 #define BT_HCI_CMD_LE_RAND 0x2018
1964 struct bt_hci_rsp_le_rand {
1967 } __attribute__ ((packed));
1969 #define BT_HCI_CMD_LE_START_ENCRYPT 0x2019
1970 struct bt_hci_cmd_le_start_encrypt {
1975 } __attribute__ ((packed));
1977 #define BT_HCI_CMD_LE_LTK_REQ_REPLY 0x201a
1978 struct bt_hci_cmd_le_ltk_req_reply {
1981 } __attribute__ ((packed));
1982 struct bt_hci_rsp_le_ltk_req_reply {
1985 } __attribute__ ((packed));
1987 #define BT_HCI_CMD_LE_LTK_REQ_NEG_REPLY 0x201b
1988 struct bt_hci_cmd_le_ltk_req_neg_reply {
1990 } __attribute__ ((packed));
1991 struct bt_hci_rsp_le_ltk_req_neg_reply {
1994 } __attribute__ ((packed));
1996 #define BT_HCI_CMD_LE_READ_SUPPORTED_STATES 0x201c
1997 struct bt_hci_rsp_le_read_supported_states {
2000 } __attribute__ ((packed));
2002 #define BT_HCI_CMD_LE_RECEIVER_TEST 0x201d
2003 struct bt_hci_cmd_le_receiver_test {
2005 } __attribute__ ((packed));
2007 #define BT_HCI_CMD_LE_TRANSMITTER_TEST 0x201e
2008 struct bt_hci_cmd_le_transmitter_test {
2012 } __attribute__ ((packed));
2014 #define BT_HCI_CMD_LE_TEST_END 0x201f
2015 struct bt_hci_rsp_le_test_end {
2017 uint16_t num_packets;
2018 } __attribute__ ((packed));
2020 #define BT_HCI_CMD_LE_CONN_PARAM_REQ_REPLY 0x2020
2021 struct bt_hci_cmd_le_conn_param_req_reply {
2023 uint16_t min_interval;
2024 uint16_t max_interval;
2026 uint16_t supv_timeout;
2027 uint16_t min_length;
2028 uint16_t max_length;
2029 } __attribute__ ((packed));
2030 struct bt_hci_rsp_le_conn_param_req_reply {
2033 } __attribute__ ((packed));
2035 #define BT_HCI_CMD_LE_CONN_PARAM_REQ_NEG_REPLY 0x2021
2036 struct bt_hci_cmd_le_conn_param_req_neg_reply {
2039 } __attribute__ ((packed));
2040 struct bt_hci_rsp_le_conn_param_req_neg_reply {
2043 } __attribute__ ((packed));
2045 #define BT_HCI_CMD_LE_SET_DATA_LENGTH 0x2022
2046 struct bt_hci_cmd_le_set_data_length {
2050 } __attribute__ ((packed));
2051 struct bt_hci_rsp_le_set_data_length {
2054 } __attribute__ ((packed));
2056 #define BT_HCI_CMD_LE_READ_DEFAULT_DATA_LENGTH 0x2023
2057 struct bt_hci_rsp_le_read_default_data_length {
2061 } __attribute__ ((packed));
2063 #define BT_HCI_CMD_LE_WRITE_DEFAULT_DATA_LENGTH 0x2024
2064 struct bt_hci_cmd_le_write_default_data_length {
2067 } __attribute__ ((packed));
2069 #define BT_HCI_CMD_LE_READ_LOCAL_PK256 0x2025
2071 #define BT_HCI_CMD_LE_GENERATE_DHKEY 0x2026
2072 struct bt_hci_cmd_le_generate_dhkey {
2073 uint8_t remote_pk256[64];
2074 } __attribute__ ((packed));
2076 #define BT_HCI_CMD_LE_ADD_TO_RESOLV_LIST 0x2027
2077 struct bt_hci_cmd_le_add_to_resolv_list {
2080 uint8_t peer_irk[16];
2081 uint8_t local_irk[16];
2082 } __attribute__ ((packed));
2084 #define BT_HCI_CMD_LE_REMOVE_FROM_RESOLV_LIST 0x2028
2085 struct bt_hci_cmd_le_remove_from_resolv_list {
2088 } __attribute__ ((packed));
2090 #define BT_HCI_CMD_LE_CLEAR_RESOLV_LIST 0x2029
2092 #define BT_HCI_CMD_LE_READ_RESOLV_LIST_SIZE 0x202a
2093 struct bt_hci_rsp_le_read_resolv_list_size {
2096 } __attribute__ ((packed));
2098 #define BT_HCI_CMD_LE_READ_PEER_RESOLV_ADDR 0x202b
2099 struct bt_hci_cmd_le_read_peer_resolv_addr {
2102 } __attribute__ ((packed));
2103 struct bt_hci_rsp_le_read_peer_resolv_addr {
2106 } __attribute__ ((packed));
2108 #define BT_HCI_CMD_LE_READ_LOCAL_RESOLV_ADDR 0x202c
2109 struct bt_hci_cmd_le_read_local_resolv_addr {
2112 } __attribute__ ((packed));
2113 struct bt_hci_rsp_le_read_local_resolv_addr {
2116 } __attribute__ ((packed));
2118 #define BT_HCI_CMD_LE_SET_RESOLV_ENABLE 0x202d
2119 struct bt_hci_cmd_le_set_resolv_enable {
2121 } __attribute__ ((packed));
2123 #define BT_HCI_CMD_LE_SET_RESOLV_TIMEOUT 0x202e
2124 struct bt_hci_cmd_le_set_resolv_timeout {
2126 } __attribute__ ((packed));
2128 #define BT_HCI_CMD_LE_READ_MAX_DATA_LENGTH 0x202f
2129 struct bt_hci_rsp_le_read_max_data_length {
2131 uint16_t max_tx_len;
2132 uint16_t max_tx_time;
2133 uint16_t max_rx_len;
2134 uint16_t max_rx_time;
2135 } __attribute__ ((packed));
2137 #define BT_HCI_EVT_INQUIRY_COMPLETE 0x01
2138 struct bt_hci_evt_inquiry_complete {
2140 } __attribute__ ((packed));
2142 #define BT_HCI_EVT_INQUIRY_RESULT 0x02
2143 struct bt_hci_evt_inquiry_result {
2146 uint8_t pscan_rep_mode;
2147 uint8_t pscan_period_mode;
2149 uint8_t dev_class[3];
2150 uint16_t clock_offset;
2151 } __attribute__ ((packed));
2153 #define BT_HCI_EVT_CONN_COMPLETE 0x03
2154 struct bt_hci_evt_conn_complete {
2160 } __attribute__ ((packed));
2162 #define BT_HCI_EVT_CONN_REQUEST 0x04
2163 struct bt_hci_evt_conn_request {
2165 uint8_t dev_class[3];
2167 } __attribute__ ((packed));
2169 #define BT_HCI_EVT_DISCONNECT_COMPLETE 0x05
2170 struct bt_hci_evt_disconnect_complete {
2174 } __attribute__ ((packed));
2176 #define BT_HCI_EVT_AUTH_COMPLETE 0x06
2177 struct bt_hci_evt_auth_complete {
2180 } __attribute__ ((packed));
2182 #define BT_HCI_EVT_REMOTE_NAME_REQUEST_COMPLETE 0x07
2183 struct bt_hci_evt_remote_name_request_complete {
2187 } __attribute__ ((packed));
2189 #define BT_HCI_EVT_ENCRYPT_CHANGE 0x08
2190 struct bt_hci_evt_encrypt_change {
2194 } __attribute__ ((packed));
2196 #define BT_HCI_EVT_CHANGE_CONN_LINK_KEY_COMPLETE 0x09
2197 struct bt_hci_evt_change_conn_link_key_complete {
2200 } __attribute__ ((packed));
2202 #define BT_HCI_EVT_MASTER_LINK_KEY_COMPLETE 0x0a
2203 struct bt_hci_evt_master_link_key_complete {
2207 } __attribute__ ((packed));
2209 #define BT_HCI_EVT_REMOTE_FEATURES_COMPLETE 0x0b
2210 struct bt_hci_evt_remote_features_complete {
2213 uint8_t features[8];
2214 } __attribute__ ((packed));
2216 #define BT_HCI_EVT_REMOTE_VERSION_COMPLETE 0x0c
2217 struct bt_hci_evt_remote_version_complete {
2221 uint16_t manufacturer;
2222 uint16_t lmp_subver;
2223 } __attribute__ ((packed));
2225 #define BT_HCI_EVT_QOS_SETUP_COMPLETE 0x0d
2226 struct bt_hci_evt_qos_setup_complete {
2230 uint8_t service_type;
2231 uint32_t token_rate;
2232 uint32_t peak_bandwidth;
2234 uint32_t delay_variation;
2235 } __attribute__ ((packed));
2237 #define BT_HCI_EVT_CMD_COMPLETE 0x0e
2238 struct bt_hci_evt_cmd_complete {
2241 } __attribute__ ((packed));
2243 #define BT_HCI_EVT_CMD_STATUS 0x0f
2244 struct bt_hci_evt_cmd_status {
2248 } __attribute__ ((packed));
2250 #define BT_HCI_EVT_HARDWARE_ERROR 0x10
2251 struct bt_hci_evt_hardware_error {
2253 } __attribute__ ((packed));
2255 #define BT_HCI_EVT_FLUSH_OCCURRED 0x11
2256 struct bt_hci_evt_flush_occurred {
2258 } __attribute__ ((packed));
2260 #define BT_HCI_EVT_ROLE_CHANGE 0x12
2261 struct bt_hci_evt_role_change {
2265 } __attribute__ ((packed));
2267 #define BT_HCI_EVT_NUM_COMPLETED_PACKETS 0x13
2268 struct bt_hci_evt_num_completed_packets {
2269 uint8_t num_handles;
2272 } __attribute__ ((packed));
2274 #define BT_HCI_EVT_MODE_CHANGE 0x14
2275 struct bt_hci_evt_mode_change {
2280 } __attribute__ ((packed));
2282 #define BT_HCI_EVT_RETURN_LINK_KEYS 0x15
2283 struct bt_hci_evt_return_link_keys {
2286 } __attribute__ ((packed));
2288 #define BT_HCI_EVT_PIN_CODE_REQUEST 0x16
2289 struct bt_hci_evt_pin_code_request {
2291 } __attribute__ ((packed));
2293 #define BT_HCI_EVT_LINK_KEY_REQUEST 0x17
2294 struct bt_hci_evt_link_key_request {
2296 } __attribute__ ((packed));
2298 #define BT_HCI_EVT_LINK_KEY_NOTIFY 0x18
2299 struct bt_hci_evt_link_key_notify {
2301 uint8_t link_key[16];
2303 } __attribute__ ((packed));
2305 #define BT_HCI_EVT_LOOPBACK_COMMAND 0x19
2307 #define BT_HCI_EVT_DATA_BUFFER_OVERFLOW 0x1a
2308 struct bt_hci_evt_data_buffer_overflow {
2310 } __attribute__ ((packed));
2312 #define BT_HCI_EVT_MAX_SLOTS_CHANGE 0x1b
2313 struct bt_hci_evt_max_slots_change {
2316 } __attribute__ ((packed));
2318 #define BT_HCI_EVT_CLOCK_OFFSET_COMPLETE 0x1c
2319 struct bt_hci_evt_clock_offset_complete {
2322 uint16_t clock_offset;
2323 } __attribute__ ((packed));
2325 #define BT_HCI_EVT_CONN_PKT_TYPE_CHANGED 0x1d
2326 struct bt_hci_evt_conn_pkt_type_changed {
2330 } __attribute__ ((packed));
2332 #define BT_HCI_EVT_QOS_VIOLATION 0x1e
2333 struct bt_hci_evt_qos_violation {
2335 } __attribute__ ((packed));
2337 #define BT_HCI_EVT_PSCAN_MODE_CHANGE 0x1f
2338 struct bt_hci_evt_pscan_mode_change {
2341 } __attribute__ ((packed));
2343 #define BT_HCI_EVT_PSCAN_REP_MODE_CHANGE 0x20
2344 struct bt_hci_evt_pscan_rep_mode_change {
2346 uint8_t pscan_rep_mode;
2347 } __attribute__ ((packed));
2349 #define BT_HCI_EVT_FLOW_SPEC_COMPLETE 0x21
2350 struct bt_hci_evt_flow_spec_complete {
2355 uint8_t service_type;
2356 uint32_t token_rate;
2357 uint32_t token_bucket_size;
2358 uint32_t peak_bandwidth;
2359 uint32_t access_latency;
2360 } __attribute__ ((packed));
2362 #define BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI 0x22
2363 struct bt_hci_evt_inquiry_result_with_rssi {
2366 uint8_t pscan_rep_mode;
2367 uint8_t pscan_period_mode;
2368 uint8_t dev_class[3];
2369 uint16_t clock_offset;
2371 } __attribute__ ((packed));
2373 #define BT_HCI_EVT_REMOTE_EXT_FEATURES_COMPLETE 0x23
2374 struct bt_hci_evt_remote_ext_features_complete {
2379 uint8_t features[8];
2380 } __attribute__ ((packed));
2382 #define BT_HCI_EVT_SYNC_CONN_COMPLETE 0x2c
2383 struct bt_hci_evt_sync_conn_complete {
2388 uint8_t tx_interval;
2389 uint8_t retrans_window;
2390 uint16_t rx_pkt_len;
2391 uint16_t tx_pkt_len;
2393 } __attribute__ ((packed));
2395 #define BT_HCI_EVT_SYNC_CONN_CHANGED 0x2d
2396 struct bt_hci_evt_sync_conn_changed {
2399 uint8_t tx_interval;
2400 uint8_t retrans_window;
2401 uint16_t rx_pkt_len;
2402 uint16_t tx_pkt_len;
2403 } __attribute__ ((packed));
2405 #define BT_HCI_EVT_SNIFF_SUBRATING 0x2e
2406 struct bt_hci_evt_sniff_subrating {
2409 uint16_t max_tx_latency;
2410 uint16_t max_rx_latency;
2411 uint16_t min_remote_timeout;
2412 uint16_t min_local_timeout;
2413 } __attribute__ ((packed));
2415 #define BT_HCI_EVT_EXT_INQUIRY_RESULT 0x2f
2416 struct bt_hci_evt_ext_inquiry_result {
2419 uint8_t pscan_rep_mode;
2420 uint8_t pscan_period_mode;
2421 uint8_t dev_class[3];
2422 uint16_t clock_offset;
2425 } __attribute__ ((packed));
2427 #define BT_HCI_EVT_ENCRYPT_KEY_REFRESH_COMPLETE 0x30
2428 struct bt_hci_evt_encrypt_key_refresh_complete {
2431 } __attribute__ ((packed));
2433 #define BT_HCI_EVT_IO_CAPABILITY_REQUEST 0x31
2434 struct bt_hci_evt_io_capability_request {
2436 } __attribute__ ((packed));
2438 #define BT_HCI_EVT_IO_CAPABILITY_RESPONSE 0x32
2439 struct bt_hci_evt_io_capability_response {
2443 uint8_t authentication;
2444 } __attribute__ ((packed));
2446 #define BT_HCI_EVT_USER_CONFIRM_REQUEST 0x33
2447 struct bt_hci_evt_user_confirm_request {
2450 } __attribute__ ((packed));
2452 #define BT_HCI_EVT_USER_PASSKEY_REQUEST 0x34
2453 struct bt_hci_evt_user_passkey_request {
2455 } __attribute__ ((packed));
2457 #define BT_HCI_EVT_REMOTE_OOB_DATA_REQUEST 0x35
2458 struct bt_hci_evt_remote_oob_data_request {
2460 } __attribute__ ((packed));
2462 #define BT_HCI_EVT_SIMPLE_PAIRING_COMPLETE 0x36
2463 struct bt_hci_evt_simple_pairing_complete {
2466 } __attribute__ ((packed));
2468 #define BT_HCI_EVT_LINK_SUPV_TIMEOUT_CHANGED 0x38
2469 struct bt_hci_evt_link_supv_timeout_changed {
2472 } __attribute__ ((packed));
2474 #define BT_HCI_EVT_ENHANCED_FLUSH_COMPLETE 0x39
2475 struct bt_hci_evt_enhanced_flush_complete {
2477 } __attribute__ ((packed));
2479 #define BT_HCI_EVT_USER_PASSKEY_NOTIFY 0x3b
2480 struct bt_hci_evt_user_passkey_notify {
2483 } __attribute__ ((packed));
2485 #define BT_HCI_EVT_KEYPRESS_NOTIFY 0x3c
2486 struct bt_hci_evt_keypress_notify {
2489 } __attribute__ ((packed));
2491 #define BT_HCI_EVT_REMOTE_HOST_FEATURES_NOTIFY 0x3d
2492 struct bt_hci_evt_remote_host_features_notify {
2494 uint8_t features[8];
2495 } __attribute__ ((packed));
2497 #define BT_HCI_EVT_LE_META_EVENT 0x3e
2499 #define BT_HCI_EVT_PHY_LINK_COMPLETE 0x40
2500 struct bt_hci_evt_phy_link_complete {
2503 } __attribute__ ((packed));
2505 #define BT_HCI_EVT_CHANNEL_SELECTED 0x41
2506 struct bt_hci_evt_channel_selected {
2508 } __attribute__ ((packed));
2510 #define BT_HCI_EVT_DISCONN_PHY_LINK_COMPLETE 0x42
2511 struct bt_hci_evt_disconn_phy_link_complete {
2515 } __attribute__ ((packed));
2517 #define BT_HCI_EVT_PHY_LINK_LOSS_EARLY_WARNING 0x43
2518 struct bt_hci_evt_phy_link_loss_early_warning {
2521 } __attribute__ ((packed));
2523 #define BT_HCI_EVT_PHY_LINK_RECOVERY 0x44
2524 struct bt_hci_evt_phy_link_recovery {
2526 } __attribute__ ((packed));
2528 #define BT_HCI_EVT_LOGIC_LINK_COMPLETE 0x45
2529 struct bt_hci_evt_logic_link_complete {
2534 } __attribute__ ((packed));
2536 #define BT_HCI_EVT_DISCONN_LOGIC_LINK_COMPLETE 0x46
2537 struct bt_hci_evt_disconn_logic_link_complete {
2541 } __attribute__ ((packed));
2543 #define BT_HCI_EVT_FLOW_SPEC_MODIFY_COMPLETE 0x47
2544 struct bt_hci_evt_flow_spec_modify_complete {
2547 } __attribute__ ((packed));
2549 #define BT_HCI_EVT_NUM_COMPLETED_DATA_BLOCKS 0x48
2550 struct bt_hci_evt_num_completed_data_blocks {
2551 uint16_t total_num_blocks;
2552 uint8_t num_handles;
2554 uint16_t num_packets;
2555 uint16_t num_blocks;
2556 } __attribute__ ((packed));
2558 #define BT_HCI_EVT_SHORT_RANGE_MODE_CHANGE 0x4c
2559 struct bt_hci_evt_short_range_mode_change {
2563 } __attribute__ ((packed));
2565 #define BT_HCI_EVT_AMP_STATUS_CHANGE 0x4d
2566 struct bt_hci_evt_amp_status_change {
2569 } __attribute__ ((packed));
2571 #define BT_HCI_EVT_TRIGGERED_CLOCK_CAPTURE 0x4e
2572 struct bt_hci_evt_triggered_clock_capture {
2576 uint16_t clock_offset;
2577 } __attribute__ ((packed));
2579 #define BT_HCI_EVT_SYNC_TRAIN_COMPLETE 0x4f
2580 struct bt_hci_evt_sync_train_complete {
2582 } __attribute__ ((packed));
2584 #define BT_HCI_EVT_SYNC_TRAIN_RECEIVED 0x50
2585 struct bt_hci_evt_sync_train_received {
2593 uint8_t service_data;
2594 } __attribute__ ((packed));
2596 #define BT_HCI_EVT_SLAVE_BROADCAST_RECEIVE 0x51
2597 struct bt_hci_evt_slave_broadcast_receive {
2605 } __attribute__ ((packed));
2607 #define BT_HCI_EVT_SLAVE_BROADCAST_TIMEOUT 0x52
2608 struct bt_hci_evt_slave_broadcast_timeout {
2611 } __attribute__ ((packed));
2613 #define BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE 0x53
2614 struct bt_hci_evt_truncated_page_complete {
2617 } __attribute__ ((packed));
2619 #define BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT 0x54
2621 #define BT_HCI_EVT_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE 0x55
2622 struct bt_hci_evt_slave_broadcast_channel_map_change {
2624 } __attribute__ ((packed));
2626 #define BT_HCI_EVT_INQUIRY_RESPONSE_NOTIFY 0x56
2627 struct bt_hci_evt_inquiry_response_notify {
2630 } __attribute__ ((packed));
2632 #define BT_HCI_EVT_AUTH_PAYLOAD_TIMEOUT_EXPIRED 0x57
2633 struct bt_hci_evt_auth_payload_timeout_expired {
2635 } __attribute__ ((packed));
2637 #define BT_HCI_EVT_LE_CONN_COMPLETE 0x01
2638 struct bt_hci_evt_le_conn_complete {
2642 uint8_t peer_addr_type;
2643 uint8_t peer_addr[6];
2646 uint16_t supv_timeout;
2647 uint8_t clock_accuracy;
2648 } __attribute__ ((packed));
2650 #define BT_HCI_EVT_LE_ADV_REPORT 0x02
2651 struct bt_hci_evt_le_adv_report {
2652 uint8_t num_reports;
2658 } __attribute__ ((packed));
2660 #define BT_HCI_EVT_LE_CONN_UPDATE_COMPLETE 0x03
2661 struct bt_hci_evt_le_conn_update_complete {
2666 uint16_t supv_timeout;
2667 } __attribute__ ((packed));
2669 #define BT_HCI_EVT_LE_REMOTE_FEATURES_COMPLETE 0x04
2670 struct bt_hci_evt_le_remote_features_complete {
2673 uint8_t features[8];
2674 } __attribute__ ((packed));
2676 #define BT_HCI_EVT_LE_LONG_TERM_KEY_REQUEST 0x05
2677 struct bt_hci_evt_le_long_term_key_request {
2681 } __attribute__ ((packed));
2683 #define BT_HCI_EVT_LE_CONN_PARAM_REQUEST 0x06
2684 struct bt_hci_evt_le_conn_param_request {
2686 uint16_t min_interval;
2687 uint16_t max_interval;
2689 uint16_t supv_timeout;
2690 } __attribute__ ((packed));
2692 #define BT_HCI_EVT_LE_DATA_LENGTH_CHANGE 0x07
2693 struct bt_hci_evt_le_data_length_change {
2695 uint16_t max_tx_len;
2696 uint16_t max_tx_time;
2697 uint16_t max_rx_len;
2698 uint16_t max_rx_time;
2699 } __attribute__ ((packed));
2701 #define BT_HCI_EVT_LE_READ_LOCAL_PK256_COMPLETE 0x08
2702 struct bt_hci_evt_le_read_local_pk256_complete {
2704 uint8_t local_pk256[64];
2705 } __attribute__ ((packed));
2707 #define BT_HCI_EVT_LE_GENERATE_DHKEY_COMPLETE 0x09
2708 struct bt_hci_evt_le_generate_dhkey_complete {
2711 } __attribute__ ((packed));
2713 #define BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE 0x0a
2714 struct bt_hci_evt_le_enhanced_conn_complete {
2718 uint8_t peer_addr_type;
2719 uint8_t peer_addr[6];
2720 uint8_t local_rpa[6];
2721 uint8_t peer_rpa[6];
2724 uint16_t supv_timeout;
2725 uint8_t clock_accuracy;
2726 } __attribute__ ((packed));
2728 #define BT_HCI_EVT_LE_DIRECT_ADV_REPORT 0x0b
2729 struct bt_hci_evt_le_direct_adv_report {
2730 uint8_t num_reports;
2734 uint8_t direct_addr_type;
2735 uint8_t direct_addr[6];
2737 } __attribute__ ((packed));
2739 #define BT_HCI_ERR_SUCCESS 0x00
2740 #define BT_HCI_ERR_UNKNOWN_COMMAND 0x01
2741 #define BT_HCI_ERR_UNKNOWN_CONN_ID 0x02
2742 #define BT_HCI_ERR_HARDWARE_FAILURE 0x03
2743 #define BT_HCI_ERR_PAGE_TIMEOUT 0x04
2744 #define BT_HCI_ERR_AUTH_FAILURE 0x05
2745 #define BT_HCI_ERR_PIN_OR_KEY_MISSING 0x06
2746 #define BT_HCI_ERR_MEM_CAPACITY_EXCEEDED 0x07
2747 #define BT_HCI_ERR_COMMAND_DISALLOWED 0x0c
2748 #define BT_HCI_ERR_UNSUPPORTED_FEATURE 0x11
2749 #define BT_HCI_ERR_INVALID_PARAMETERS 0x12
2750 #define BT_HCI_ERR_UNSPECIFIED_ERROR 0x1f
2751 #define BT_HCI_ERR_CONN_FAILED_TO_ESTABLISH 0x3e
2753 struct bt_l2cap_hdr {
2756 } __attribute__ ((packed));
2758 struct bt_l2cap_hdr_sig {
2762 } __attribute__ ((packed));
2764 #define BT_L2CAP_PDU_CMD_REJECT 0x01
2765 struct bt_l2cap_pdu_cmd_reject {
2767 } __attribute__ ((packed));
2769 #define BT_L2CAP_PDU_CONN_REQ 0x02
2770 struct bt_l2cap_pdu_conn_req {
2773 } __attribute__ ((packed));
2775 #define BT_L2CAP_PDU_CONN_RSP 0x03
2776 struct bt_l2cap_pdu_conn_rsp {
2781 } __attribute__ ((packed));
2783 #define BT_L2CAP_PDU_CONFIG_REQ 0x04
2784 struct bt_l2cap_pdu_config_req {
2787 } __attribute__ ((packed));
2789 #define BT_L2CAP_PDU_CONFIG_RSP 0x05
2790 struct bt_l2cap_pdu_config_rsp {
2794 } __attribute__ ((packed));
2796 #define BT_L2CAP_PDU_DISCONN_REQ 0x06
2797 struct bt_l2cap_pdu_disconn_req {
2800 } __attribute__ ((packed));
2802 #define BT_L2CAP_PDU_DISCONN_RSP 0x07
2803 struct bt_l2cap_pdu_disconn_rsp {
2806 } __attribute__ ((packed));
2808 #define BT_L2CAP_PDU_ECHO_REQ 0x08
2810 #define BT_L2CAP_PDU_ECHO_RSP 0x09
2812 #define BT_L2CAP_PDU_INFO_REQ 0x0a
2813 struct bt_l2cap_pdu_info_req {
2815 } __attribute__ ((packed));
2817 #define BT_L2CAP_PDU_INFO_RSP 0x0b
2818 struct bt_l2cap_pdu_info_rsp {
2822 } __attribute__ ((packed));
2824 #define BT_L2CAP_PDU_CREATE_CHAN_REQ 0x0c
2825 struct bt_l2cap_pdu_create_chan_req {
2829 } __attribute__ ((packed));
2831 #define BT_L2CAP_PDU_CREATE_CHAN_RSP 0x0d
2832 struct bt_l2cap_pdu_create_chan_rsp {
2837 } __attribute__ ((packed));
2839 #define BT_L2CAP_PDU_MOVE_CHAN_REQ 0x0e
2840 struct bt_l2cap_pdu_move_chan_req {
2843 } __attribute__ ((packed));
2845 #define BT_L2CAP_PDU_MOVE_CHAN_RSP 0x0f
2846 struct bt_l2cap_pdu_move_chan_rsp {
2849 } __attribute__ ((packed));
2851 #define BT_L2CAP_PDU_MOVE_CHAN_CFM 0x10
2852 struct bt_l2cap_pdu_move_chan_cfm {
2855 } __attribute__ ((packed));
2857 #define BT_L2CAP_PDU_MOVE_CHAN_CFM_RSP 0x11
2858 struct bt_l2cap_pdu_move_chan_cfm_rsp {
2860 } __attribute__ ((packed));
2862 #define BT_L2CAP_PDU_CONN_PARAM_REQ 0x12
2863 struct bt_l2cap_pdu_conn_param_req {
2864 uint16_t min_interval;
2865 uint16_t max_interval;
2868 } __attribute__ ((packed));
2870 #define BT_L2CAP_PDU_CONN_PARAM_RSP 0x13
2871 struct bt_l2cap_pdu_conn_param_rsp {
2873 } __attribute__ ((packed));
2875 #define BT_L2CAP_PDU_LE_CONN_REQ 0x14
2876 struct bt_l2cap_pdu_le_conn_req {
2882 } __attribute__ ((packed));
2884 #define BT_L2CAP_PDU_LE_CONN_RSP 0x15
2885 struct bt_l2cap_pdu_le_conn_rsp {
2891 } __attribute__ ((packed));
2893 #define BT_L2CAP_PDU_LE_FLOWCTL_CREDS 0x16
2894 struct bt_l2cap_pdu_le_flowctl_creds {
2897 } __attribute__ ((packed));
2899 struct bt_l2cap_hdr_connless {
2901 } __attribute__ ((packed));
2903 struct bt_l2cap_hdr_amp {
2907 } __attribute__ ((packed));
2909 #define BT_L2CAP_AMP_CMD_REJECT 0x01
2910 struct bt_l2cap_amp_cmd_reject {
2912 } __attribute__ ((packed));
2914 #define BT_L2CAP_AMP_DISCOVER_REQ 0x02
2915 struct bt_l2cap_amp_discover_req {
2918 } __attribute__ ((packed));
2920 #define BT_L2CAP_AMP_DISCOVER_RSP 0x03
2921 struct bt_l2cap_amp_discover_rsp {
2924 } __attribute__ ((packed));
2926 #define BT_L2CAP_AMP_CHANGE_NOTIFY 0x04
2928 #define BT_L2CAP_AMP_CHANGE_RESPONSE 0x05
2930 #define BT_L2CAP_AMP_GET_INFO_REQ 0x06
2931 struct bt_l2cap_amp_get_info_req {
2933 } __attribute__ ((packed));
2935 #define BT_L2CAP_AMP_GET_INFO_RSP 0x07
2936 struct bt_l2cap_amp_get_info_rsp {
2941 uint32_t min_latency;
2943 uint16_t max_assoc_len;
2944 } __attribute__ ((packed));
2946 #define BT_L2CAP_AMP_GET_ASSOC_REQ 0x08
2947 struct bt_l2cap_amp_get_assoc_req {
2949 } __attribute__ ((packed));
2951 #define BT_L2CAP_AMP_GET_ASSOC_RSP 0x09
2952 struct bt_l2cap_amp_get_assoc_rsp {
2955 } __attribute__ ((packed));
2957 #define BT_L2CAP_AMP_CREATE_PHY_LINK_REQ 0x0a
2958 struct bt_l2cap_amp_create_phy_link_req {
2959 uint8_t local_ctrlid;
2960 uint8_t remote_ctrlid;
2961 } __attribute__ ((packed));
2963 #define BT_L2CAP_AMP_CREATE_PHY_LINK_RSP 0x0b
2964 struct bt_l2cap_amp_create_phy_link_rsp {
2965 uint8_t local_ctrlid;
2966 uint8_t remote_ctrlid;
2968 } __attribute__ ((packed));
2970 #define BT_L2CAP_AMP_DISCONN_PHY_LINK_REQ 0x0c
2971 struct bt_l2cap_amp_disconn_phy_link_req {
2972 uint8_t local_ctrlid;
2973 uint8_t remote_ctrlid;
2974 } __attribute__ ((packed));
2976 #define BT_L2CAP_AMP_DISCONN_PHY_LINK_RSP 0x0d
2977 struct bt_l2cap_amp_disconn_phy_link_rsp {
2978 uint8_t local_ctrlid;
2979 uint8_t remote_ctrlid;
2981 } __attribute__ ((packed));
2983 struct bt_l2cap_hdr_att {
2985 } __attribute__ ((packed));
2987 #define BT_L2CAP_ATT_ERROR_RESPONSE 0x01
2988 struct bt_l2cap_att_error_response {
2992 } __attribute__ ((packed));
2994 #define BT_L2CAP_ATT_EXCHANGE_MTU_REQ 0x02
2995 struct bt_l2cap_att_exchange_mtu_req {
2997 } __attribute__ ((packed));
2999 #define BT_L2CAP_ATT_EXCHANGE_MTU_RSP 0x03
3000 struct bt_l2cap_att_exchange_mtu_rsp {
3002 } __attribute__ ((packed));
3004 #define BT_L2CAP_ATT_READ_TYPE_REQ 0x08
3005 struct bt_l2cap_att_read_type_req {
3006 uint16_t start_handle;
3007 uint16_t end_handle;
3008 } __attribute__ ((packed));
3010 #define BT_L2CAP_ATT_READ_TYPE_RSP 0x09
3011 struct bt_l2cap_att_read_type_rsp {
3013 } __attribute__ ((packed));
3015 #define BT_L2CAP_ATT_READ_REQ 0x0a
3016 struct bt_l2cap_att_read_req {
3018 } __attribute__ ((packed));
3020 #define BT_L2CAP_ATT_READ_RSP 0x0b
3022 #define BT_L2CAP_ATT_READ_GROUP_TYPE_REQ 0x10
3023 struct bt_l2cap_att_read_group_type_req {
3024 uint16_t start_handle;
3025 uint16_t end_handle;
3026 } __attribute__ ((packed));
3028 #define BT_L2CAP_ATT_READ_GROUP_TYPE_RSP 0x11
3029 struct bt_l2cap_att_read_group_type_rsp {
3031 } __attribute__ ((packed));
3033 #define BT_L2CAP_ATT_HANDLE_VALUE_NOTIFY 0x1b
3034 struct bt_l2cap_att_handle_value_notify {
3036 } __attribute__ ((packed));
3038 #define BT_L2CAP_ATT_HANDLE_VALUE_IND 0x1d
3039 struct bt_l2cap_att_handle_value_ind {
3041 } __attribute__ ((packed));
3043 #define BT_L2CAP_ATT_HANDLE_VALUE_CONF 0x1e
3045 struct bt_l2cap_hdr_smp {
3047 } __attribute__ ((packed));
3049 #define BT_L2CAP_SMP_PAIRING_REQUEST 0x01
3050 struct bt_l2cap_smp_pairing_request {
3054 uint8_t max_key_size;
3055 uint8_t init_key_dist;
3056 uint8_t resp_key_dist;
3057 } __attribute__ ((packed));
3059 #define BT_L2CAP_SMP_PAIRING_RESPONSE 0x02
3060 struct bt_l2cap_smp_pairing_response {
3064 uint8_t max_key_size;
3065 uint8_t init_key_dist;
3066 uint8_t resp_key_dist;
3067 } __attribute__ ((packed));
3069 #define BT_L2CAP_SMP_PAIRING_CONFIRM 0x03
3070 struct bt_l2cap_smp_pairing_confirm {
3072 } __attribute__ ((packed));
3074 #define BT_L2CAP_SMP_PAIRING_RANDOM 0x04
3075 struct bt_l2cap_smp_pairing_random {
3077 } __attribute__ ((packed));
3079 #define BT_L2CAP_SMP_PAIRING_FAILED 0x05
3080 struct bt_l2cap_smp_pairing_failed {
3082 } __attribute__ ((packed));
3084 #define BT_L2CAP_SMP_ENCRYPT_INFO 0x06
3085 struct bt_l2cap_smp_encrypt_info {
3087 } __attribute__ ((packed));
3089 #define BT_L2CAP_SMP_MASTER_IDENT 0x07
3090 struct bt_l2cap_smp_master_ident {
3093 } __attribute__ ((packed));
3095 #define BT_L2CAP_SMP_IDENT_INFO 0x08
3096 struct bt_l2cap_smp_ident_info {
3098 } __attribute__ ((packed));
3100 #define BT_L2CAP_SMP_IDENT_ADDR_INFO 0x09
3101 struct bt_l2cap_smp_ident_addr_info {
3104 } __attribute__ ((packed));
3106 #define BT_L2CAP_SMP_SIGNING_INFO 0x0a
3107 struct bt_l2cap_smp_signing_info {
3109 } __attribute__ ((packed));
3111 #define BT_L2CAP_SMP_SECURITY_REQUEST 0x0b
3112 struct bt_l2cap_smp_security_request {
3114 } __attribute__ ((packed));
3116 #define BT_L2CAP_SMP_PUBLIC_KEY 0x0c
3117 struct bt_l2cap_smp_public_key {
3120 } __attribute__ ((packed));
3122 #define BT_L2CAP_SMP_DHKEY_CHECK 0x0d
3123 struct bt_l2cap_smp_dhkey_check {
3125 } __attribute__ ((packed));
3127 #define BT_L2CAP_SMP_KEYPRESS_NOTIFY 0x0e
3128 struct bt_l2cap_smp_keypress_notify {
3130 } __attribute__ ((packed));
3136 } __attribute__ ((packed));