1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 * BlueZ - Bluetooth protocol stack for Linux
6 * Copyright (C) 2011-2014 Intel Corporation
7 * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
15 #define BT_HCI_CMD_BIT(_byte, _bit) ((8 * _byte) + _bit)
20 } __attribute__ ((packed));
22 #define BT_LL_CONN_UPDATE_REQ 0x00
23 struct bt_ll_conn_update_req {
30 } __attribute__ ((packed));
32 #define BT_LL_CHANNEL_MAP_REQ 0x01
33 struct bt_ll_channel_map_req {
36 } __attribute__ ((packed));
38 #define BT_LL_TERMINATE_IND 0x02
39 struct bt_ll_terminate_ind {
41 } __attribute__ ((packed));
43 #define BT_LL_ENC_REQ 0x03
44 struct bt_ll_enc_req {
49 } __attribute__ ((packed));
51 #define BT_LL_ENC_RSP 0x04
52 struct bt_ll_enc_rsp {
55 } __attribute__ ((packed));
57 #define BT_LL_START_ENC_REQ 0x05
59 #define BT_LL_START_ENC_RSP 0x06
61 #define BT_LL_UNKNOWN_RSP 0x07
62 struct bt_ll_unknown_rsp {
64 } __attribute__ ((packed));
66 #define BT_LL_FEATURE_REQ 0x08
67 struct bt_ll_feature_req {
69 } __attribute__ ((packed));
71 #define BT_LL_FEATURE_RSP 0x09
72 struct bt_ll_feature_rsp {
74 } __attribute__ ((packed));
76 #define BT_LL_PAUSE_ENC_REQ 0x0a
78 #define BT_LL_PAUSE_ENC_RSP 0x0b
80 #define BT_LL_VERSION_IND 0x0c
81 struct bt_ll_version_ind {
85 } __attribute__ ((packed));
87 #define BT_LL_REJECT_IND 0x0d
88 struct bt_ll_reject_ind {
90 } __attribute__ ((packed));
92 #define BT_LL_PERIPHERAL_FEATURE_REQ 0x0e
93 struct bt_ll_peripheral_feature_req {
95 } __attribute__ ((packed));
97 #define BT_LL_CONN_PARAM_REQ 0x0f
98 struct bt_ll_conn_param_req {
99 uint16_t interval_min;
100 uint16_t interval_max;
104 uint16_t pref_conn_evt_count;
111 } __attribute__ ((packed));
113 #define BT_LL_CONN_PARAM_RSP 0x10
114 struct bt_ll_conn_param_rsp {
115 uint16_t interval_min;
116 uint16_t interval_max;
120 uint16_t pref_conn_evt_count;
127 } __attribute__ ((packed));
129 #define BT_LL_REJECT_IND_EXT 0x11
130 struct bt_ll_reject_ind_ext {
133 } __attribute__ ((packed));
135 #define BT_LL_PING_REQ 0x12
137 #define BT_LL_PING_RSP 0x13
139 #define BT_LL_LENGTH_REQ 0x14
140 struct bt_ll_length {
145 } __attribute__ ((packed));
147 #define BT_LL_LENGTH_RSP 0x15
149 #define BT_LL_PHY_REQ 0x16
153 } __attribute__ ((packed));
155 #define BT_LL_PHY_RSP 0x17
157 #define BT_LL_PHY_UPDATE_IND 0x18
158 struct bt_ll_phy_update_ind {
162 } __attribute__ ((packed));
164 #define BT_LL_MIN_USED_CHANNELS 0x19
165 struct bt_ll_min_used_channels {
167 uint8_t min_channels;
168 } __attribute__ ((packed));
170 #define BT_LL_CTE_REQ 0x1a
171 struct bt_ll_cte_req {
173 } __attribute__ ((packed));
175 #define BT_LL_CTE_RSP 0x1b
177 #define BT_LL_PERIODIC_SYNC_IND 0x1c
178 struct bt_ll_periodic_sync_ind {
181 uint16_t event_count;
182 uint16_t last_counter;
186 uint16_t sync_counter;
187 } __attribute__ ((packed));
189 #define BT_LL_CLOCK_ACCURACY_REQ 0x1d
190 struct bt_ll_clock_acc {
192 } __attribute__ ((packed));
194 #define BT_LL_CLOCK_ACCURACY_RSP 0x1e
196 #define BT_LL_CIS_REQ 0x1f
197 struct bt_ll_cis_req {
204 uint8_t c_interval[3];
205 uint8_t p_interval[3];
209 uint8_t sub_interval[3];
213 uint16_t iso_interval;
214 uint8_t offset_min[3];
215 uint8_t offset_max[3];
216 uint16_t conn_event_count;
217 } __attribute__ ((packed));
219 #define BT_LL_CIS_RSP 0x20
220 struct bt_ll_cis_rsp {
221 uint8_t offset_min[3];
222 uint8_t offset_max[3];
223 uint16_t conn_event_count;
224 } __attribute__ ((packed));
226 #define BT_LL_CIS_IND 0x21
227 struct bt_ll_cis_ind {
229 uint8_t cis_offset[3];
230 uint8_t cig_sync_delay[3];
231 uint8_t cis_sync_delay[3];
232 uint16_t conn_event_count;
233 } __attribute__ ((packed));
235 #define BT_LL_CIS_TERMINATE_IND 0x22
236 struct bt_ll_cis_term_ind {
240 } __attribute__ ((packed));
242 #define LMP_ESC4(x) ((127 << 8) | (x))
244 #define BT_LMP_NAME_REQ 1
245 struct bt_lmp_name_req {
247 } __attribute__ ((packed));
249 #define BT_LMP_NAME_RSP 2
250 struct bt_lmp_name_rsp {
253 uint8_t fragment[14];
254 } __attribute__ ((packed));
256 #define BT_LMP_ACCEPTED 3
257 struct bt_lmp_accepted {
259 } __attribute__ ((packed));
261 #define BT_LMP_NOT_ACCEPTED 4
262 struct bt_lmp_not_accepted {
265 } __attribute__ ((packed));
267 #define BT_LMP_CLKOFFSET_REQ 5
269 #define BT_LMP_CLKOFFSET_RSP 6
270 struct bt_lmp_clkoffset_rsp {
272 } __attribute__ ((packed));
274 #define BT_LMP_DETACH 7
275 struct bt_lmp_detach {
277 } __attribute__ ((packed));
279 #define BT_LMP_AU_RAND 11
280 struct bt_lmp_au_rand {
282 } __attribute__ ((packed));
284 #define BT_LMP_SRES 12
287 } __attribute__ ((packed));
289 #define BT_LMP_ENCRYPTION_MODE_REQ 15
290 struct bt_lmp_encryption_mode_req {
292 } __attribute__ ((packed));
294 #define BT_LMP_ENCRYPTION_KEY_SIZE_REQ 16
295 struct bt_lmp_encryption_key_size_req {
297 } __attribute__ ((packed));
299 #define BT_LMP_START_ENCRYPTION_REQ 17
300 struct bt_lmp_start_encryption_req {
302 } __attribute__ ((packed));
304 #define BT_LMP_STOP_ENCRYPTION_REQ 18
306 #define BT_LMP_SWITCH_REQ 19
307 struct bt_lmp_switch_req {
309 } __attribute__ ((packed));
311 #define BT_LMP_UNSNIFF_REQ 24
313 #define BT_LMP_MAX_POWER 33
315 #define BT_LMP_MIN_POWER 34
317 #define BT_LMP_AUTO_RATE 35
319 #define BT_LMP_PREFERRED_RATE 36
320 struct bt_lmp_preferred_rate {
322 } __attribute__ ((packed));
324 #define BT_LMP_VERSION_REQ 37
325 struct bt_lmp_version_req {
329 } __attribute__ ((packed));
331 #define BT_LMP_VERSION_RES 38
332 struct bt_lmp_version_res {
336 } __attribute__ ((packed));
338 #define BT_LMP_FEATURES_REQ 39
339 struct bt_lmp_features_req {
341 } __attribute__ ((packed));
343 #define BT_LMP_FEATURES_RES 40
344 struct bt_lmp_features_res {
346 } __attribute__ ((packed));
348 #define BT_LMP_MAX_SLOT 45
349 struct bt_lmp_max_slot {
351 } __attribute__ ((packed));
353 #define BT_LMP_MAX_SLOT_REQ 46
354 struct bt_lmp_max_slot_req {
356 } __attribute__ ((packed));
358 #define BT_LMP_TIMING_ACCURACY_REQ 47
360 #define BT_LMP_TIMING_ACCURACY_RES 48
361 struct bt_lmp_timing_accuracy_res {
364 } __attribute__ ((packed));
366 #define BT_LMP_SETUP_COMPLETE 49
368 #define BT_LMP_USE_SEMI_PERMANENT_KEY 50
370 #define BT_LMP_HOST_CONNECTION_REQ 51
372 #define BT_LMP_SLOT_OFFSET 52
373 struct bt_lmp_slot_offset {
376 } __attribute__ ((packed));
378 #define BT_LMP_PAGE_SCAN_MODE_REQ 54
379 struct bt_lmp_page_scan_mode_req {
382 } __attribute__ ((packed));
384 #define BT_LMP_TEST_ACTIVATE 56
386 #define BT_LMP_ENCRYPTION_KEY_SIZE_MASK_REQ 58
388 #define BT_LMP_SET_AFH 60
389 struct bt_lmp_set_afh {
393 } __attribute__ ((packed));
395 #define BT_LMP_ENCAPSULATED_HEADER 61
396 struct bt_lmp_encapsulated_header {
400 } __attribute__ ((packed));
402 #define BT_LMP_ENCAPSULATED_PAYLOAD 62
403 struct bt_lmp_encapsulated_payload {
405 } __attribute__ ((packed));
407 #define BT_LMP_SIMPLE_PAIRING_CONFIRM 63
408 struct bt_lmp_simple_pairing_confirm {
410 } __attribute__ ((packed));
412 #define BT_LMP_SIMPLE_PAIRING_NUMBER 64
413 struct bt_lmp_simple_pairing_number {
415 } __attribute__ ((packed));
417 #define BT_LMP_DHKEY_CHECK 65
418 struct bt_lmp_dhkey_check {
420 } __attribute__ ((packed));
422 #define BT_LMP_PAUSE_ENCRYPTION_AES_REQ 66
424 #define BT_LMP_ACCEPTED_EXT LMP_ESC4(1)
425 struct bt_lmp_accepted_ext {
428 } __attribute__ ((packed));
430 #define BT_LMP_NOT_ACCEPTED_EXT LMP_ESC4(2)
431 struct bt_lmp_not_accepted_ext {
435 } __attribute__ ((packed));
437 #define BT_LMP_FEATURES_REQ_EXT LMP_ESC4(3)
438 struct bt_lmp_features_req_ext {
442 } __attribute__ ((packed));
444 #define BT_LMP_FEATURES_RES_EXT LMP_ESC4(4)
445 struct bt_lmp_features_res_ext {
449 } __attribute__ ((packed));
451 #define BT_LMP_PACKET_TYPE_TABLE_REQ LMP_ESC4(11)
452 struct bt_lmp_packet_type_table_req {
454 } __attribute__ ((packed));
456 #define BT_LMP_CHANNEL_CLASSIFICATION_REQ LMP_ESC4(16)
457 struct bt_lmp_channel_classification_req {
459 uint16_t min_interval;
460 uint16_t max_interval;
461 } __attribute__ ((packed));
463 #define BT_LMP_CHANNEL_CLASSIFICATION LMP_ESC4(17)
464 struct bt_lmp_channel_classification {
465 uint8_t classification[10];
466 } __attribute__ ((packed));
468 #define BT_LMP_PAUSE_ENCRYPTION_REQ LMP_ESC4(23)
470 #define BT_LMP_RESUME_ENCRYPTION_REQ LMP_ESC4(24)
472 #define BT_LMP_IO_CAPABILITY_REQ LMP_ESC4(25)
473 struct bt_lmp_io_capability_req {
476 uint8_t authentication;
477 } __attribute__ ((packed));
479 #define BT_LMP_IO_CAPABILITY_RES LMP_ESC4(26)
480 struct bt_lmp_io_capability_res {
483 uint8_t authentication;
484 } __attribute__ ((packed));
486 #define BT_LMP_NUMERIC_COMPARISON_FAILED LMP_ESC(27)
488 #define BT_LMP_PASSKEY_FAILED LMP_ESC4(28)
490 #define BT_LMP_OOB_FAILED LMP_ESC(29)
492 #define BT_LMP_POWER_CONTROL_REQ LMP_ESC4(31)
493 struct bt_lmp_power_control_req {
495 } __attribute__ ((packed));
497 #define BT_LMP_POWER_CONTROL_RES LMP_ESC4(32)
498 struct bt_lmp_power_control_res {
500 } __attribute__ ((packed));
502 #define BT_LMP_PING_REQ LMP_ESC4(33)
504 #define BT_LMP_PING_RES LMP_ESC4(34)
506 #define BT_H4_CMD_PKT 0x01
507 #define BT_H4_ACL_PKT 0x02
508 #define BT_H4_SCO_PKT 0x03
509 #define BT_H4_EVT_PKT 0x04
510 #define BT_H4_ISO_PKT 0x05
512 struct bt_hci_cmd_hdr {
515 } __attribute__ ((packed));
517 struct bt_hci_acl_hdr {
521 } __attribute__ ((packed));
523 struct bt_hci_sco_hdr {
526 } __attribute__ ((packed));
528 struct bt_hci_iso_hdr {
532 } __attribute__ ((packed));
534 struct bt_hci_iso_data_start {
538 } __attribute__ ((packed));
540 struct bt_hci_evt_hdr {
543 } __attribute__ ((packed));
545 #define BT_HCI_CMD_NOP 0x0000
547 #define BT_HCI_CMD_INQUIRY 0x0401
548 struct bt_hci_cmd_inquiry {
552 } __attribute__ ((packed));
554 #define BT_HCI_CMD_INQUIRY_CANCEL 0x0402
556 #define BT_HCI_CMD_PERIODIC_INQUIRY 0x0403
557 struct bt_hci_cmd_periodic_inquiry {
563 } __attribute__ ((packed));
565 #define BT_HCI_CMD_EXIT_PERIODIC_INQUIRY 0x0404
567 #define BT_HCI_CMD_CREATE_CONN 0x0405
568 struct bt_hci_cmd_create_conn {
571 uint8_t pscan_rep_mode;
573 uint16_t clock_offset;
575 } __attribute__ ((packed));
577 #define BT_HCI_CMD_DISCONNECT 0x0406
578 struct bt_hci_cmd_disconnect {
581 } __attribute__ ((packed));
583 #define BT_HCI_CMD_ADD_SCO_CONN 0x0407
584 struct bt_hci_cmd_add_sco_conn {
587 } __attribute__ ((packed));
589 #define BT_HCI_CMD_CREATE_CONN_CANCEL 0x0408
590 struct bt_hci_cmd_create_conn_cancel {
592 } __attribute__ ((packed));
593 struct bt_hci_rsp_create_conn_cancel {
596 } __attribute__ ((packed));
598 #define BT_HCI_CMD_ACCEPT_CONN_REQUEST 0x0409
599 struct bt_hci_cmd_accept_conn_request {
602 } __attribute__ ((packed));
604 #define BT_HCI_CMD_REJECT_CONN_REQUEST 0x040a
605 struct bt_hci_cmd_reject_conn_request {
608 } __attribute__ ((packed));
610 #define BT_HCI_CMD_LINK_KEY_REQUEST_REPLY 0x040b
611 struct bt_hci_cmd_link_key_request_reply {
613 uint8_t link_key[16];
614 } __attribute__ ((packed));
615 struct bt_hci_rsp_link_key_request_reply {
618 } __attribute__ ((packed));
620 #define BT_HCI_CMD_LINK_KEY_REQUEST_NEG_REPLY 0x040c
621 struct bt_hci_cmd_link_key_request_neg_reply {
623 } __attribute__ ((packed));
624 struct bt_hci_rsp_link_key_request_neg_reply {
627 } __attribute__ ((packed));
629 #define BT_HCI_CMD_PIN_CODE_REQUEST_REPLY 0x040d
630 struct bt_hci_cmd_pin_code_request_reply {
633 uint8_t pin_code[16];
634 } __attribute__ ((packed));
636 #define BT_HCI_CMD_PIN_CODE_REQUEST_NEG_REPLY 0x040e
637 struct bt_hci_cmd_pin_code_request_neg_reply {
639 } __attribute__ ((packed));
640 struct bt_hci_rsp_pin_code_request_neg_reply {
643 } __attribute__ ((packed));
645 #define BT_HCI_CMD_CHANGE_CONN_PKT_TYPE 0x040f
646 struct bt_hci_cmd_change_conn_pkt_type {
649 } __attribute__ ((packed));
651 #define BT_HCI_CMD_AUTH_REQUESTED 0x0411
652 struct bt_hci_cmd_auth_requested {
654 } __attribute__ ((packed));
656 #define BT_HCI_CMD_SET_CONN_ENCRYPT 0x0413
657 struct bt_hci_cmd_set_conn_encrypt {
660 } __attribute__ ((packed));
662 #define BT_HCI_CMD_CHANGE_CONN_LINK_KEY 0x0415
663 struct bt_hci_cmd_change_conn_link_key {
665 } __attribute__ ((packed));
667 #define BT_HCI_CMD_LINK_KEY_SELECTION 0x0417
668 struct bt_hci_cmd_link_key_selection {
670 } __attribute__ ((packed));
672 #define BT_HCI_CMD_REMOTE_NAME_REQUEST 0x0419
673 struct bt_hci_cmd_remote_name_request {
675 uint8_t pscan_rep_mode;
677 uint16_t clock_offset;
678 } __attribute__ ((packed));
680 #define BT_HCI_CMD_REMOTE_NAME_REQUEST_CANCEL 0x041a
681 struct bt_hci_cmd_remote_name_request_cancel {
683 } __attribute__ ((packed));
684 struct bt_hci_rsp_remote_name_request_cancel {
687 } __attribute__ ((packed));
689 #define BT_HCI_CMD_READ_REMOTE_FEATURES 0x041b
690 struct bt_hci_cmd_read_remote_features {
692 } __attribute__ ((packed));
694 #define BT_HCI_CMD_READ_REMOTE_EXT_FEATURES 0x041c
695 struct bt_hci_cmd_read_remote_ext_features {
698 } __attribute__ ((packed));
700 #define BT_HCI_CMD_READ_REMOTE_VERSION 0x041d
701 struct bt_hci_cmd_read_remote_version {
703 } __attribute__ ((packed));
705 #define BT_HCI_CMD_READ_CLOCK_OFFSET 0x041f
706 struct bt_hci_cmd_read_clock_offset {
708 } __attribute__ ((packed));
710 #define BT_HCI_CMD_READ_LMP_HANDLE 0x0420
711 struct bt_hci_cmd_read_lmp_handle {
713 } __attribute__ ((packed));
714 struct bt_hci_rsp_read_lmp_handle {
719 } __attribute__ ((packed));
721 #define BT_HCI_CMD_SETUP_SYNC_CONN 0x0428
722 struct bt_hci_cmd_setup_sync_conn {
724 uint32_t tx_bandwidth;
725 uint32_t rx_bandwidth;
726 uint16_t max_latency;
727 uint16_t voice_setting;
728 uint8_t retrans_effort;
730 } __attribute__ ((packed));
732 #define BT_HCI_CMD_ACCEPT_SYNC_CONN_REQUEST 0x0429
733 struct bt_hci_cmd_accept_sync_conn_request {
735 uint32_t tx_bandwidth;
736 uint32_t rx_bandwidth;
737 uint16_t max_latency;
738 uint16_t voice_setting;
739 uint8_t retrans_effort;
741 } __attribute__ ((packed));
743 #define BT_HCI_CMD_REJECT_SYNC_CONN_REQUEST 0x042a
744 struct bt_hci_cmd_reject_sync_conn_request {
747 } __attribute__ ((packed));
749 #define BT_HCI_CMD_IO_CAPABILITY_REQUEST_REPLY 0x042b
750 struct bt_hci_cmd_io_capability_request_reply {
754 uint8_t authentication;
755 } __attribute__ ((packed));
756 struct bt_hci_rsp_io_capability_request_reply {
759 } __attribute__ ((packed));
761 #define BT_HCI_CMD_USER_CONFIRM_REQUEST_REPLY 0x042c
762 struct bt_hci_cmd_user_confirm_request_reply {
764 } __attribute__ ((packed));
765 struct bt_hci_rsp_user_confirm_request_reply {
768 } __attribute__ ((packed));
770 #define BT_HCI_CMD_USER_CONFIRM_REQUEST_NEG_REPLY 0x042d
771 struct bt_hci_cmd_user_confirm_request_neg_reply {
773 } __attribute__ ((packed));
774 struct bt_hci_rsp_user_confirm_request_neg_reply {
777 } __attribute__ ((packed));
779 #define BT_HCI_CMD_USER_PASSKEY_REQUEST_REPLY 0x042e
780 struct bt_hci_cmd_user_passkey_request_reply {
783 } __attribute__ ((packed));
785 #define BT_HCI_CMD_USER_PASSKEY_REQUEST_NEG_REPLY 0x042f
786 struct bt_hci_cmd_user_passkey_request_neg_reply {
788 } __attribute__ ((packed));
790 #define BT_HCI_CMD_REMOTE_OOB_DATA_REQUEST_REPLY 0x0430
791 struct bt_hci_cmd_remote_oob_data_request_reply {
794 uint8_t randomizer[16];
795 } __attribute__ ((packed));
797 #define BT_HCI_CMD_REMOTE_OOB_DATA_REQUEST_NEG_REPLY 0x0433
798 struct bt_hci_cmd_remote_oob_data_request_neg_reply {
800 } __attribute__ ((packed));
802 #define BT_HCI_CMD_IO_CAPABILITY_REQUEST_NEG_REPLY 0x0434
803 struct bt_hci_cmd_io_capability_request_neg_reply {
806 } __attribute__ ((packed));
807 struct bt_hci_rsp_io_capability_request_neg_reply {
810 } __attribute__ ((packed));
812 #define BT_HCI_CMD_CREATE_PHY_LINK 0x0435
813 struct bt_hci_cmd_create_phy_link {
817 } __attribute__ ((packed));
819 #define BT_HCI_CMD_ACCEPT_PHY_LINK 0x0436
820 struct bt_hci_cmd_accept_phy_link {
824 } __attribute__ ((packed));
826 #define BT_HCI_CMD_DISCONN_PHY_LINK 0x0437
827 struct bt_hci_cmd_disconn_phy_link {
830 } __attribute__ ((packed));
832 #define BT_HCI_CMD_CREATE_LOGIC_LINK 0x0438
833 struct bt_hci_cmd_create_logic_link {
835 uint8_t tx_flow_spec[16];
836 uint8_t rx_flow_spec[16];
837 } __attribute__ ((packed));
839 #define BT_HCI_CMD_ACCEPT_LOGIC_LINK 0x0439
840 struct bt_hci_cmd_accept_logic_link {
842 uint8_t tx_flow_spec[16];
843 uint8_t rx_flow_spec[16];
844 } __attribute__ ((packed));
846 #define BT_HCI_CMD_DISCONN_LOGIC_LINK 0x043a
847 struct bt_hci_cmd_disconn_logic_link {
849 } __attribute__ ((packed));
851 #define BT_HCI_CMD_LOGIC_LINK_CANCEL 0x043b
852 struct bt_hci_cmd_logic_link_cancel {
855 } __attribute__ ((packed));
856 struct bt_hci_rsp_logic_link_cancel {
860 } __attribute__ ((packed));
862 #define BT_HCI_CMD_FLOW_SPEC_MODIFY 0x043c
863 struct bt_hci_cmd_flow_spec_modify {
865 uint8_t tx_flow_spec[16];
866 uint8_t rx_flow_spec[16];
867 } __attribute__ ((packed));
869 #define BT_HCI_CMD_ENHANCED_SETUP_SYNC_CONN 0x043d
870 struct bt_hci_cmd_enhanced_setup_sync_conn {
872 uint32_t tx_bandwidth;
873 uint32_t rx_bandwidth;
874 uint8_t tx_coding_format[5];
875 uint8_t rx_coding_format[5];
876 uint16_t tx_codec_frame_size;
877 uint16_t rx_codec_frame_size;
878 uint32_t input_bandwidth;
879 uint32_t output_bandwidth;
880 uint8_t input_coding_format[5];
881 uint8_t output_coding_format[5];
882 uint16_t input_coded_data_size;
883 uint16_t output_coded_data_size;
884 uint8_t input_pcm_data_format;
885 uint8_t output_pcm_data_format;
886 uint8_t input_pcm_msb_position;
887 uint8_t output_pcm_msb_position;
888 uint8_t input_data_path;
889 uint8_t output_data_path;
890 uint8_t input_unit_size;
891 uint8_t output_unit_size;
892 uint16_t max_latency;
894 uint8_t retrans_effort;
895 } __attribute__ ((packed));
897 #define BT_HCI_CMD_ENHANCED_ACCEPT_SYNC_CONN_REQUEST 0x043e
898 struct bt_hci_cmd_enhanced_accept_sync_conn_request {
900 uint32_t tx_bandwidth;
901 uint32_t rx_bandwidth;
902 uint8_t tx_coding_format[5];
903 uint8_t rx_coding_format[5];
904 uint16_t tx_codec_frame_size;
905 uint16_t rx_codec_frame_size;
906 uint32_t input_bandwidth;
907 uint32_t output_bandwidth;
908 uint8_t input_coding_format[5];
909 uint8_t output_coding_format[5];
910 uint16_t input_coded_data_size;
911 uint16_t output_coded_data_size;
912 uint8_t input_pcm_data_format;
913 uint8_t output_pcm_data_format;
914 uint8_t input_pcm_msb_position;
915 uint8_t output_pcm_msb_position;
916 uint8_t input_data_path;
917 uint8_t output_data_path;
918 uint8_t input_unit_size;
919 uint8_t output_unit_size;
920 uint16_t max_latency;
922 uint8_t retrans_effort;
923 } __attribute__ ((packed));
925 #define BT_HCI_CMD_TRUNCATED_PAGE 0x043f
926 struct bt_hci_cmd_truncated_page {
928 uint8_t pscan_rep_mode;
929 uint16_t clock_offset;
930 } __attribute__ ((packed));
932 #define BT_HCI_CMD_TRUNCATED_PAGE_CANCEL 0x0440
933 struct bt_hci_cmd_truncated_page_cancel {
935 } __attribute__ ((packed));
937 #define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST 0x0441
938 struct bt_hci_cmd_set_peripheral_broadcast {
943 uint16_t min_interval;
944 uint16_t max_interval;
946 } __attribute__ ((packed));
947 struct bt_hci_rsp_set_peripheral_broadcast {
951 } __attribute__ ((packed));
953 #define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE 0x0442
954 struct bt_hci_cmd_set_peripheral_broadcast_receive {
966 } __attribute__ ((packed));
967 struct bt_hci_rsp_set_peripheral_broadcast_receive {
971 } __attribute__ ((packed));
973 #define BT_HCI_CMD_START_SYNC_TRAIN 0x0443
975 #define BT_HCI_CMD_RECEIVE_SYNC_TRAIN 0x0444
976 struct bt_hci_cmd_receive_sync_train {
981 } __attribute__ ((packed));
983 #define BT_HCI_CMD_REMOTE_OOB_EXT_DATA_REQUEST_REPLY 0x0445
984 struct bt_hci_cmd_remote_oob_ext_data_request_reply {
987 uint8_t randomizer192[16];
989 uint8_t randomizer256[16];
990 } __attribute__ ((packed));
992 #define BT_HCI_CMD_HOLD_MODE 0x0801
993 struct bt_hci_cmd_hold_mode {
995 uint16_t max_interval;
996 uint16_t min_interval;
997 } __attribute__ ((packed));
999 #define BT_HCI_CMD_SNIFF_MODE 0x0803
1000 struct bt_hci_cmd_sniff_mode {
1002 uint16_t max_interval;
1003 uint16_t min_interval;
1006 } __attribute__ ((packed));
1008 #define BT_HCI_CMD_EXIT_SNIFF_MODE 0x0804
1009 struct bt_hci_cmd_exit_sniff_mode {
1011 } __attribute__ ((packed));
1013 #define BT_HCI_CMD_PARK_STATE 0x0805
1014 struct bt_hci_cmd_park_state {
1016 uint16_t max_interval;
1017 uint16_t min_interval;
1018 } __attribute__ ((packed));
1020 #define BT_HCI_CMD_EXIT_PARK_STATE 0x0806
1021 struct bt_hci_cmd_exit_park_state {
1023 } __attribute__ ((packed));
1025 #define BT_HCI_CMD_QOS_SETUP 0x0807
1026 struct bt_hci_cmd_qos_setup {
1029 uint8_t service_type;
1030 uint32_t token_rate;
1031 uint32_t peak_bandwidth;
1033 uint32_t delay_variation;
1034 } __attribute__ ((packed));
1036 #define BT_HCI_CMD_ROLE_DISCOVERY 0x0809
1037 struct bt_hci_cmd_role_discovery {
1039 } __attribute__ ((packed));
1040 struct bt_hci_rsp_role_discovery {
1044 } __attribute__ ((packed));
1046 #define BT_HCI_CMD_SWITCH_ROLE 0x080b
1047 struct bt_hci_cmd_switch_role {
1050 } __attribute__ ((packed));
1052 #define BT_HCI_CMD_READ_LINK_POLICY 0x080c
1053 struct bt_hci_cmd_read_link_policy {
1055 } __attribute__ ((packed));
1056 struct bt_hci_rsp_read_link_policy {
1060 } __attribute__ ((packed));
1062 #define BT_HCI_CMD_WRITE_LINK_POLICY 0x080d
1063 struct bt_hci_cmd_write_link_policy {
1066 } __attribute__ ((packed));
1067 struct bt_hci_rsp_write_link_policy {
1070 } __attribute__ ((packed));
1072 #define BT_HCI_CMD_READ_DEFAULT_LINK_POLICY 0x080e
1073 struct bt_hci_rsp_read_default_link_policy {
1076 } __attribute__ ((packed));
1078 #define BT_HCI_CMD_WRITE_DEFAULT_LINK_POLICY 0x080f
1079 struct bt_hci_cmd_write_default_link_policy {
1081 } __attribute__ ((packed));
1083 #define BT_HCI_CMD_FLOW_SPEC 0x0810
1084 struct bt_hci_cmd_flow_spec {
1088 uint8_t service_type;
1089 uint32_t token_rate;
1090 uint32_t token_bucket_size;
1091 uint32_t peak_bandwidth;
1092 uint32_t access_latency;
1093 } __attribute__ ((packed));
1095 #define BT_HCI_CMD_SNIFF_SUBRATING 0x0811
1096 struct bt_hci_cmd_sniff_subrating {
1098 uint16_t max_latency;
1099 uint16_t min_remote_timeout;
1100 uint16_t min_local_timeout;
1101 } __attribute__ ((packed));
1102 struct bt_hci_rsp_sniff_subrating {
1105 } __attribute__ ((packed));
1107 #define BT_HCI_CMD_SET_EVENT_MASK 0x0c01
1108 struct bt_hci_cmd_set_event_mask {
1110 } __attribute__ ((packed));
1112 #define BT_HCI_CMD_RESET 0x0c03
1114 #define BT_HCI_CMD_SET_EVENT_FILTER 0x0c05
1115 struct bt_hci_cmd_set_event_filter {
1119 } __attribute__ ((packed));
1121 #define BT_HCI_CMD_FLUSH 0x0c08
1122 struct bt_hci_cmd_flush {
1124 } __attribute__ ((packed));
1125 struct bt_hci_rsp_flush {
1128 } __attribute__ ((packed));
1130 #define BT_HCI_CMD_READ_PIN_TYPE 0x0c09
1131 struct bt_hci_rsp_read_pin_type {
1134 } __attribute__ ((packed));
1136 #define BT_HCI_CMD_WRITE_PIN_TYPE 0x0c0a
1137 struct bt_hci_cmd_write_pin_type {
1139 } __attribute__ ((packed));
1141 #define BT_HCI_CMD_CREATE_NEW_UNIT_KEY 0x0c0b
1143 #define BT_HCI_CMD_READ_STORED_LINK_KEY 0x0c0d
1144 struct bt_hci_cmd_read_stored_link_key {
1147 } __attribute__ ((packed));
1148 struct bt_hci_rsp_read_stored_link_key {
1150 uint16_t max_num_keys;
1152 } __attribute__ ((packed));
1154 #define BT_HCI_CMD_WRITE_STORED_LINK_KEY 0x0c11
1155 struct bt_hci_cmd_write_stored_link_key {
1157 } __attribute__ ((packed));
1158 struct bt_hci_rsp_write_stored_link_key {
1161 } __attribute__ ((packed));
1163 #define BT_HCI_CMD_DELETE_STORED_LINK_KEY 0x0c12
1164 struct bt_hci_cmd_delete_stored_link_key {
1167 } __attribute__ ((packed));
1168 struct bt_hci_rsp_delete_stored_link_key {
1171 } __attribute__ ((packed));
1173 #define BT_HCI_CMD_WRITE_LOCAL_NAME 0x0c13
1174 struct bt_hci_cmd_write_local_name {
1176 } __attribute__ ((packed));
1178 #define BT_HCI_CMD_READ_LOCAL_NAME 0x0c14
1179 struct bt_hci_rsp_read_local_name {
1182 } __attribute__ ((packed));
1184 #define BT_HCI_CMD_READ_CONN_ACCEPT_TIMEOUT 0x0c15
1185 struct bt_hci_rsp_read_conn_accept_timeout {
1188 } __attribute__ ((packed));
1190 #define BT_HCI_CMD_WRITE_CONN_ACCEPT_TIMEOUT 0x0c16
1191 struct bt_hci_cmd_write_conn_accept_timeout {
1193 } __attribute__ ((packed));
1195 #define BT_HCI_CMD_READ_PAGE_TIMEOUT 0x0c17
1196 struct bt_hci_rsp_read_page_timeout {
1199 } __attribute__ ((packed));
1201 #define BT_HCI_CMD_WRITE_PAGE_TIMEOUT 0x0c18
1202 struct bt_hci_cmd_write_page_timeout {
1204 } __attribute__ ((packed));
1206 #define BT_HCI_CMD_READ_SCAN_ENABLE 0x0c19
1207 struct bt_hci_rsp_read_scan_enable {
1210 } __attribute__ ((packed));
1212 #define BT_HCI_CMD_WRITE_SCAN_ENABLE 0x0c1a
1213 struct bt_hci_cmd_write_scan_enable {
1215 } __attribute__ ((packed));
1217 #define BT_HCI_CMD_READ_PAGE_SCAN_ACTIVITY 0x0c1b
1218 struct bt_hci_rsp_read_page_scan_activity {
1222 } __attribute__ ((packed));
1224 #define BT_HCI_CMD_WRITE_PAGE_SCAN_ACTIVITY 0x0c1c
1225 struct bt_hci_cmd_write_page_scan_activity {
1228 } __attribute__ ((packed));
1230 #define BT_HCI_CMD_READ_INQUIRY_SCAN_ACTIVITY 0x0c1d
1231 struct bt_hci_rsp_read_inquiry_scan_activity {
1235 } __attribute__ ((packed));
1237 #define BT_HCI_CMD_WRITE_INQUIRY_SCAN_ACTIVITY 0x0c1e
1238 struct bt_hci_cmd_write_inquiry_scan_activity {
1241 } __attribute__ ((packed));
1243 #define BT_HCI_CMD_READ_AUTH_ENABLE 0x0c1f
1244 struct bt_hci_rsp_read_auth_enable {
1247 } __attribute__ ((packed));
1249 #define BT_HCI_CMD_WRITE_AUTH_ENABLE 0x0c20
1250 struct bt_hci_cmd_write_auth_enable {
1252 } __attribute__ ((packed));
1254 #define BT_HCI_CMD_READ_ENCRYPT_MODE 0x0c21
1255 struct bt_hci_rsp_read_encrypt_mode {
1258 } __attribute__ ((packed));
1260 #define BT_HCI_CMD_WRITE_ENCRYPT_MODE 0x0c22
1261 struct bt_hci_cmd_write_encrypt_mode {
1263 } __attribute__ ((packed));
1265 #define BT_HCI_CMD_READ_CLASS_OF_DEV 0x0c23
1266 struct bt_hci_rsp_read_class_of_dev {
1268 uint8_t dev_class[3];
1269 } __attribute__ ((packed));
1271 #define BT_HCI_CMD_WRITE_CLASS_OF_DEV 0x0c24
1272 struct bt_hci_cmd_write_class_of_dev {
1273 uint8_t dev_class[3];
1274 } __attribute__ ((packed));
1276 #define BT_HCI_CMD_READ_VOICE_SETTING 0x0c25
1277 struct bt_hci_rsp_read_voice_setting {
1280 } __attribute__ ((packed));
1282 #define BT_HCI_CMD_WRITE_VOICE_SETTING 0x0c26
1283 struct bt_hci_cmd_write_voice_setting {
1285 } __attribute__ ((packed));
1287 #define BT_HCI_CMD_READ_AUTO_FLUSH_TIMEOUT 0x0c27
1288 struct bt_hci_cmd_read_auto_flush_timeout {
1290 } __attribute__ ((packed));
1291 struct bt_hci_rsp_read_auto_flush_timeout {
1295 } __attribute__ ((packed));
1297 #define BT_HCI_CMD_WRITE_AUTO_FLUSH_TIMEOUT 0x0c28
1298 struct bt_hci_cmd_write_auto_flush_timeout {
1301 } __attribute__ ((packed));
1302 struct bt_hci_rsp_write_auto_flush_timeout {
1305 } __attribute__ ((packed));
1307 #define BT_HCI_CMD_READ_NUM_BROADCAST_RETRANS 0x0c29
1308 struct bt_hci_rsp_read_num_broadcast_retrans {
1310 uint8_t num_retrans;
1311 } __attribute__ ((packed));
1313 #define BT_HCI_CMD_WRITE_NUM_BROADCAST_RETRANS 0x0c2a
1314 struct bt_hci_cmd_write_num_broadcast_retrans {
1315 uint8_t num_retrans;
1316 } __attribute__ ((packed));
1318 #define BT_HCI_CMD_READ_HOLD_MODE_ACTIVITY 0x0c2b
1319 struct bt_hci_rsp_read_hold_mode_activity {
1322 } __attribute__ ((packed));
1324 #define BT_HCI_CMD_WRITE_HOLD_MODE_ACTIVITY 0x0c2c
1325 struct bt_hci_cmd_write_hold_mode_activity {
1327 } __attribute__ ((packed));
1329 #define BT_HCI_CMD_READ_TX_POWER 0x0c2d
1330 struct bt_hci_cmd_read_tx_power {
1333 } __attribute__ ((packed));
1334 struct bt_hci_rsp_read_tx_power {
1338 } __attribute__ ((packed));
1340 #define BT_HCI_CMD_READ_SYNC_FLOW_CONTROL 0x0c2e
1341 struct bt_hci_rsp_read_sync_flow_control {
1344 } __attribute__ ((packed));
1346 #define BT_HCI_CMD_WRITE_SYNC_FLOW_CONTROL 0x0c2f
1347 struct bt_hci_cmd_write_sync_flow_control {
1349 } __attribute__ ((packed));
1351 #define BT_HCI_CMD_SET_HOST_FLOW_CONTROL 0x0c31
1352 struct bt_hci_cmd_set_host_flow_control {
1354 } __attribute__ ((packed));
1356 #define BT_HCI_CMD_HOST_BUFFER_SIZE 0x0c33
1357 struct bt_hci_cmd_host_buffer_size {
1360 uint16_t acl_max_pkt;
1361 uint16_t sco_max_pkt;
1362 } __attribute__ ((packed));
1364 #define BT_HCI_CMD_HOST_NUM_COMPLETED_PACKETS 0x0c35
1365 struct bt_hci_cmd_host_num_completed_packets {
1366 uint8_t num_handles;
1369 } __attribute__ ((packed));
1371 #define BT_HCI_CMD_READ_LINK_SUPV_TIMEOUT 0x0c36
1372 struct bt_hci_cmd_read_link_supv_timeout {
1374 } __attribute__ ((packed));
1375 struct bt_hci_rsp_read_link_supv_timeout {
1379 } __attribute__ ((packed));
1381 #define BT_HCI_CMD_WRITE_LINK_SUPV_TIMEOUT 0x0c37
1382 struct bt_hci_cmd_write_link_supv_timeout {
1385 } __attribute__ ((packed));
1386 struct bt_hci_rsp_write_link_supv_timeout {
1389 } __attribute__ ((packed));
1391 #define BT_HCI_CMD_READ_NUM_SUPPORTED_IAC 0x0c38
1392 struct bt_hci_rsp_read_num_supported_iac {
1395 } __attribute__ ((packed));
1397 #define BT_HCI_CMD_READ_CURRENT_IAC_LAP 0x0c39
1398 struct bt_hci_rsp_read_current_iac_lap {
1402 } __attribute__ ((packed));
1404 #define BT_HCI_CMD_WRITE_CURRENT_IAC_LAP 0x0c3a
1405 struct bt_hci_cmd_write_current_iac_lap {
1408 } __attribute__ ((packed));
1410 #define BT_HCI_CMD_READ_PAGE_SCAN_PERIOD_MODE 0x0c3b
1411 struct bt_hci_rsp_read_page_scan_period_mode {
1414 } __attribute__ ((packed));
1416 #define BT_HCI_CMD_WRITE_PAGE_SCAN_PERIOD_MODE 0x0c3c
1417 struct bt_hci_cmd_write_page_scan_period_mode {
1419 } __attribute__ ((packed));
1421 #define BT_HCI_CMD_READ_PAGE_SCAN_MODE 0x0c3d
1422 struct bt_hci_rsp_read_page_scan_mode {
1425 } __attribute__ ((packed));
1427 #define BT_HCI_CMD_WRITE_PAGE_SCAN_MODE 0x0c3e
1428 struct bt_hci_cmd_write_page_scan_mode {
1430 } __attribute__ ((packed));
1432 #define BT_HCI_CMD_SET_AFH_HOST_CLASSIFICATION 0x0c3f
1433 struct bt_hci_cmd_set_afh_host_classification {
1435 } __attribute__ ((packed));
1437 #define BT_HCI_CMD_READ_INQUIRY_SCAN_TYPE 0x0c42
1438 struct bt_hci_rsp_read_inquiry_scan_type {
1441 } __attribute__ ((packed));
1443 #define BT_HCI_CMD_WRITE_INQUIRY_SCAN_TYPE 0x0c43
1444 struct bt_hci_cmd_write_inquiry_scan_type {
1446 } __attribute__ ((packed));
1448 #define BT_HCI_CMD_READ_INQUIRY_MODE 0x0c44
1449 struct bt_hci_rsp_read_inquiry_mode {
1452 } __attribute__ ((packed));
1454 #define BT_HCI_CMD_WRITE_INQUIRY_MODE 0x0c45
1455 struct bt_hci_cmd_write_inquiry_mode {
1457 } __attribute__ ((packed));
1459 #define BT_HCI_CMD_READ_PAGE_SCAN_TYPE 0x0c46
1460 struct bt_hci_rsp_read_page_scan_type {
1463 } __attribute__ ((packed));
1465 #define BT_HCI_CMD_WRITE_PAGE_SCAN_TYPE 0x0c47
1466 struct bt_hci_cmd_write_page_scan_type {
1468 } __attribute__ ((packed));
1470 #define BT_HCI_CMD_READ_AFH_ASSESSMENT_MODE 0x0c48
1471 struct bt_hci_rsp_read_afh_assessment_mode {
1474 } __attribute__ ((packed));
1476 #define BT_HCI_CMD_WRITE_AFH_ASSESSMENT_MODE 0x0c49
1477 struct bt_hci_cmd_write_afh_assessment_mode {
1479 } __attribute__ ((packed));
1481 #define BT_HCI_CMD_READ_EXT_INQUIRY_RESPONSE 0x0c51
1482 struct bt_hci_rsp_read_ext_inquiry_response {
1486 } __attribute__ ((packed));
1488 #define BT_HCI_CMD_WRITE_EXT_INQUIRY_RESPONSE 0x0c52
1489 struct bt_hci_cmd_write_ext_inquiry_response {
1492 } __attribute__ ((packed));
1494 #define BT_HCI_CMD_REFRESH_ENCRYPT_KEY 0x0c53
1495 struct bt_hci_cmd_refresh_encrypt_key {
1497 } __attribute__ ((packed));
1499 #define BT_HCI_CMD_READ_SIMPLE_PAIRING_MODE 0x0c55
1500 struct bt_hci_rsp_read_simple_pairing_mode {
1503 } __attribute__ ((packed));
1505 #define BT_HCI_CMD_WRITE_SIMPLE_PAIRING_MODE 0x0c56
1506 struct bt_hci_cmd_write_simple_pairing_mode {
1508 } __attribute__ ((packed));
1510 #define BT_HCI_CMD_READ_LOCAL_OOB_DATA 0x0c57
1511 struct bt_hci_rsp_read_local_oob_data {
1514 uint8_t randomizer[16];
1515 } __attribute__ ((packed));
1517 #define BT_HCI_CMD_READ_INQUIRY_RESP_TX_POWER 0x0c58
1518 struct bt_hci_rsp_read_inquiry_resp_tx_power {
1521 } __attribute__ ((packed));
1523 #define BT_HCI_CMD_WRITE_INQUIRY_TX_POWER 0x0c59
1524 struct bt_hci_cmd_write_inquiry_tx_power {
1526 } __attribute__ ((packed));
1528 #define BT_HCI_CMD_READ_ERRONEOUS_REPORTING 0x0c5a
1529 struct bt_hci_rsp_read_erroneous_reporting {
1532 } __attribute__ ((packed));
1534 #define BT_HCI_CMD_WRITE_ERRONEOUS_REPORTING 0x0c5b
1535 struct bt_hci_cmd_write_erroneous_reporting {
1537 } __attribute__ ((packed));
1539 #define BT_HCI_CMD_ENHANCED_FLUSH 0x0c5f
1540 struct bt_hci_cmd_enhanced_flush {
1543 } __attribute__ ((packed));
1545 #define BT_HCI_CMD_SEND_KEYPRESS_NOTIFY 0x0c60
1546 struct bt_hci_cmd_send_keypress_notify {
1549 } __attribute__ ((packed));
1550 struct bt_hci_rsp_send_keypress_notify {
1553 } __attribute__ ((packed));
1555 #define BT_HCI_CMD_SET_EVENT_MASK_PAGE2 0x0c63
1556 struct bt_hci_cmd_set_event_mask_page2 {
1558 } __attribute__ ((packed));
1560 #define BT_HCI_CMD_READ_LOCATION_DATA 0x0c64
1561 struct bt_hci_rsp_read_location_data {
1563 uint8_t domain_aware;
1565 uint8_t domain_options;
1567 } __attribute__ ((packed));
1569 #define BT_HCI_CMD_WRITE_LOCATION_DATA 0x0c65
1570 struct bt_hci_cmd_write_location_data {
1571 uint8_t domain_aware;
1573 uint8_t domain_options;
1575 } __attribute__ ((packed));
1577 #define BT_HCI_CMD_READ_FLOW_CONTROL_MODE 0x0c66
1578 struct bt_hci_rsp_read_flow_control_mode {
1581 } __attribute__ ((packed));
1583 #define BT_HCI_CMD_WRITE_FLOW_CONTROL_MODE 0x0c67
1584 struct bt_hci_cmd_write_flow_control_mode {
1586 } __attribute__ ((packed));
1588 #define BT_HCI_CMD_READ_ENHANCED_TX_POWER 0x0c68
1589 struct bt_hci_cmd_read_enhanced_tx_power {
1592 } __attribute__ ((packed));
1593 struct bt_hci_rsp_read_enhanced_tx_power {
1599 } __attribute__ ((packed));
1601 #define BT_HCI_CMD_SHORT_RANGE_MODE 0x0c6b
1602 struct bt_hci_cmd_short_range_mode {
1605 } __attribute__ ((packed));
1607 #define BT_HCI_CMD_READ_LE_HOST_SUPPORTED 0x0c6c
1608 struct bt_hci_rsp_read_le_host_supported {
1611 uint8_t simultaneous;
1612 } __attribute__ ((packed));
1614 #define BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED 0x0c6d
1615 struct bt_hci_cmd_write_le_host_supported {
1617 uint8_t simultaneous;
1618 } __attribute__ ((packed));
1620 #define BT_HCI_CMD_SET_RESERVED_LT_ADDR 0x0c74
1621 struct bt_hci_cmd_set_reserved_lt_addr {
1623 } __attribute__ ((packed));
1624 struct bt_hci_rsp_set_reserved_lt_addr {
1627 } __attribute__ ((packed));
1629 #define BT_HCI_CMD_DELETE_RESERVED_LT_ADDR 0x0c75
1630 struct bt_hci_cmd_delete_reserved_lt_addr {
1632 } __attribute__ ((packed));
1633 struct bt_hci_rsp_delete_reserved_lt_addr {
1636 } __attribute__ ((packed));
1638 #define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_DATA 0x0c76
1639 struct bt_hci_cmd_set_peripheral_broadcast_data {
1643 } __attribute__ ((packed));
1644 struct bt_hci_rsp_set_peripheral_broadcast_data {
1647 } __attribute__ ((packed));
1649 #define BT_HCI_CMD_READ_SYNC_TRAIN_PARAMS 0x0c77
1650 struct bt_hci_rsp_read_sync_train_params {
1654 uint8_t service_data;
1655 } __attribute__ ((packed));
1657 #define BT_HCI_CMD_WRITE_SYNC_TRAIN_PARAMS 0x0c78
1658 struct bt_hci_cmd_write_sync_train_params {
1659 uint16_t min_interval;
1660 uint16_t max_interval;
1662 uint8_t service_data;
1663 } __attribute__ ((packed));
1664 struct bt_hci_rsp_write_sync_train_params {
1667 } __attribute__ ((packed));
1669 #define BT_HCI_CMD_READ_SECURE_CONN_SUPPORT 0x0c79
1670 struct bt_hci_rsp_read_secure_conn_support {
1673 } __attribute__ ((packed));
1675 #define BT_HCI_CMD_WRITE_SECURE_CONN_SUPPORT 0x0c7a
1676 struct bt_hci_cmd_write_secure_conn_support {
1678 } __attribute__ ((packed));
1680 #define BT_HCI_CMD_READ_AUTH_PAYLOAD_TIMEOUT 0x0c7b
1681 struct bt_hci_cmd_read_auth_payload_timeout {
1683 } __attribute__ ((packed));
1684 struct bt_hci_rsp_read_auth_payload_timeout {
1688 } __attribute__ ((packed));
1690 #define BT_HCI_CMD_WRITE_AUTH_PAYLOAD_TIMEOUT 0x0c7c
1691 struct bt_hci_cmd_write_auth_payload_timeout {
1694 } __attribute__ ((packed));
1695 struct bt_hci_rsp_write_auth_payload_timeout {
1698 } __attribute__ ((packed));
1700 #define BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA 0x0c7d
1701 struct bt_hci_rsp_read_local_oob_ext_data {
1703 uint8_t hash192[16];
1704 uint8_t randomizer192[16];
1705 uint8_t hash256[16];
1706 uint8_t randomizer256[16];
1707 } __attribute__ ((packed));
1709 #define BT_HCI_CMD_READ_EXT_PAGE_TIMEOUT 0x0c7e
1710 struct bt_hci_rsp_read_ext_page_timeout {
1713 } __attribute__ ((packed));
1715 #define BT_HCI_CMD_WRITE_EXT_PAGE_TIMEOUT 0x0c7f
1716 struct bt_hci_cmd_write_ext_page_timeout {
1718 } __attribute__ ((packed));
1720 #define BT_HCI_CMD_READ_EXT_INQUIRY_LENGTH 0x0c80
1721 struct bt_hci_rsp_read_ext_inquiry_length {
1724 } __attribute__ ((packed));
1726 #define BT_HCI_CMD_WRITE_EXT_INQUIRY_LENGTH 0x0c81
1727 struct bt_hci_cmd_write_ext_inquiry_length {
1729 } __attribute__ ((packed));
1731 #define BT_HCI_CMD_CONFIG_DATA_PATH 0x0c83
1732 #define BT_HCI_BIT_CONFIG_DATA_PATH BT_HCI_CMD_BIT(45, 5)
1733 struct bt_hci_cmd_config_data_path {
1736 uint8_t vnd_config_len;
1737 uint8_t vnd_config[0];
1738 } __attribute__ ((packed));
1740 #define BT_HCI_CMD_READ_LOCAL_VERSION 0x1001
1741 struct bt_hci_rsp_read_local_version {
1746 uint16_t manufacturer;
1747 uint16_t lmp_subver;
1748 } __attribute__ ((packed));
1750 #define BT_HCI_CMD_READ_LOCAL_COMMANDS 0x1002
1751 struct bt_hci_rsp_read_local_commands {
1753 uint8_t commands[64];
1754 } __attribute__ ((packed));
1756 #define BT_HCI_CMD_READ_LOCAL_FEATURES 0x1003
1757 struct bt_hci_rsp_read_local_features {
1759 uint8_t features[8];
1760 } __attribute__ ((packed));
1762 #define BT_HCI_CMD_READ_LOCAL_EXT_FEATURES 0x1004
1763 struct bt_hci_cmd_read_local_ext_features {
1765 } __attribute__ ((packed));
1766 struct bt_hci_rsp_read_local_ext_features {
1770 uint8_t features[8];
1771 } __attribute__ ((packed));
1773 #define BT_HCI_CMD_READ_BUFFER_SIZE 0x1005
1774 struct bt_hci_rsp_read_buffer_size {
1778 uint16_t acl_max_pkt;
1779 uint16_t sco_max_pkt;
1780 } __attribute__ ((packed));
1782 #define BT_HCI_CMD_READ_COUNTRY_CODE 0x1007
1783 struct bt_hci_rsp_read_country_code {
1786 } __attribute__ ((packed));
1788 #define BT_HCI_CMD_READ_BD_ADDR 0x1009
1789 struct bt_hci_rsp_read_bd_addr {
1792 } __attribute__ ((packed));
1794 #define BT_HCI_CMD_READ_DATA_BLOCK_SIZE 0x100a
1795 struct bt_hci_rsp_read_data_block_size {
1797 uint16_t max_acl_len;
1799 uint16_t num_blocks;
1800 } __attribute__ ((packed));
1802 #define BT_HCI_CMD_READ_LOCAL_CODECS 0x100b
1803 struct bt_hci_rsp_read_local_codecs {
1807 } __attribute__ ((packed));
1809 #define BT_HCI_CMD_READ_LOCAL_PAIRING_OPTIONS 0x100c
1810 struct bt_hci_rsp_read_local_pairing_options {
1812 uint8_t pairing_options;
1813 uint8_t max_key_size;
1814 } __attribute__ ((packed));
1816 #define BT_HCI_CMD_READ_LOCAL_CODECS_V2 0x100d
1817 #define BT_HCI_BIT_READ_LOCAL_CODECS_V2 BT_HCI_CMD_BIT(45, 2)
1818 #define BT_HCI_LOCAL_CODEC_BREDR_ACL BIT(0)
1819 #define BT_HCI_LOCAL_CODEC_BREDR_SCO BIT(1)
1820 #define BT_HCI_LOCAL_CODEC_LE_CIS BIT(2)
1821 #define BT_HCI_LOCAL_CODEC_LE_BIS BIT(3)
1823 struct bt_hci_vnd_codec_v2 {
1827 } __attribute__ ((packed));
1829 struct bt_hci_vnd_codec {
1834 } __attribute__ ((packed));
1836 struct bt_hci_codec {
1839 } __attribute__ ((packed));
1841 struct bt_hci_rsp_read_local_codecs_v2 {
1844 struct bt_hci_codec codec[0];
1845 } __attribute__ ((packed));
1847 #define BT_HCI_CMD_READ_LOCAL_CODEC_CAPS 0x100e
1848 #define BT_HCI_BIT_READ_LOCAL_CODEC_CAPS BT_HCI_CMD_BIT(45, 3)
1849 struct bt_hci_cmd_read_local_codec_caps {
1850 struct bt_hci_vnd_codec codec;
1852 } __attribute__ ((packed));
1854 struct bt_hci_codec_caps {
1857 } __attribute__ ((packed));
1859 struct bt_hci_rsp_read_local_codec_caps {
1862 struct bt_hci_codec_caps caps[0];
1863 } __attribute__ ((packed));
1865 #define BT_HCI_CMD_READ_LOCAL_CTRL_DELAY 0x100f
1866 #define BT_HCI_BIT_READ_LOCAL_CTRL_DELAY BT_HCI_CMD_BIT(45, 4)
1867 struct bt_hci_cmd_read_local_ctrl_delay {
1868 struct bt_hci_vnd_codec codec;
1870 uint8_t codec_cfg_len;
1871 uint8_t codec_cfg[0];
1872 } __attribute__ ((packed));
1874 struct bt_hci_rsp_read_local_ctrl_delay {
1876 uint8_t min_delay[3];
1877 uint8_t max_delay[3];
1878 } __attribute__ ((packed));
1880 #define BT_HCI_CMD_READ_FAILED_CONTACT_COUNTER 0x1401
1881 struct bt_hci_cmd_read_failed_contact_counter {
1883 } __attribute__ ((packed));
1884 struct bt_hci_rsp_read_failed_contact_counter {
1888 } __attribute__ ((packed));
1890 #define BT_HCI_CMD_RESET_FAILED_CONTACT_COUNTER 0x1402
1891 struct bt_hci_cmd_reset_failed_contact_counter {
1893 } __attribute__ ((packed));
1894 struct bt_hci_rsp_reset_failed_contact_counter {
1897 } __attribute__ ((packed));
1899 #define BT_HCI_CMD_READ_LINK_QUALITY 0x1403
1900 struct bt_hci_cmd_read_link_quality {
1902 } __attribute__ ((packed));
1903 struct bt_hci_rsp_read_link_quality {
1906 uint8_t link_quality;
1907 } __attribute__ ((packed));
1909 #define BT_HCI_CMD_READ_RSSI 0x1405
1910 struct bt_hci_cmd_read_rssi {
1912 } __attribute__ ((packed));
1913 struct bt_hci_rsp_read_rssi {
1917 } __attribute__ ((packed));
1919 #define BT_HCI_CMD_READ_AFH_CHANNEL_MAP 0x1406
1920 struct bt_hci_cmd_read_afh_channel_map {
1922 } __attribute__ ((packed));
1923 struct bt_hci_rsp_read_afh_channel_map {
1928 } __attribute__ ((packed));
1930 #define BT_HCI_CMD_READ_CLOCK 0x1407
1931 struct bt_hci_cmd_read_clock {
1934 } __attribute__ ((packed));
1935 struct bt_hci_rsp_read_clock {
1940 } __attribute__ ((packed));
1942 #define BT_HCI_CMD_READ_ENCRYPT_KEY_SIZE 0x1408
1943 struct bt_hci_cmd_read_encrypt_key_size {
1945 } __attribute__ ((packed));
1946 struct bt_hci_rsp_read_encrypt_key_size {
1950 } __attribute__ ((packed));
1952 #define BT_HCI_CMD_READ_LOCAL_AMP_INFO 0x1409
1953 struct bt_hci_rsp_read_local_amp_info {
1958 uint32_t min_latency;
1962 uint16_t max_assoc_len;
1963 uint32_t max_flush_to;
1964 uint32_t be_flush_to;
1965 } __attribute__ ((packed));
1967 #define BT_HCI_CMD_READ_LOCAL_AMP_ASSOC 0x140a
1968 struct bt_hci_cmd_read_local_amp_assoc {
1970 uint16_t len_so_far;
1971 uint16_t max_assoc_len;
1972 } __attribute__ ((packed));
1973 struct bt_hci_rsp_read_local_amp_assoc {
1976 uint16_t remain_assoc_len;
1977 uint8_t assoc_fragment[248];
1978 } __attribute__ ((packed));
1980 #define BT_HCI_CMD_WRITE_REMOTE_AMP_ASSOC 0x140b
1981 struct bt_hci_cmd_write_remote_amp_assoc {
1983 uint16_t len_so_far;
1984 uint16_t remain_assoc_len;
1985 uint8_t assoc_fragment[248];
1986 } __attribute__ ((packed));
1987 struct bt_hci_rsp_write_remote_amp_assoc {
1990 } __attribute__ ((packed));
1992 #define BT_HCI_CMD_GET_MWS_TRANSPORT_CONFIG 0x140c
1993 struct bt_hci_rsp_get_mws_transport_config {
1995 uint8_t num_transports;
1996 uint8_t transport[0];
1997 } __attribute__ ((packed));
1999 #define BT_HCI_CMD_SET_TRIGGERED_CLOCK_CAPTURE 0x140d
2000 struct bt_hci_cmd_set_triggered_clock_capture {
2004 uint8_t lpo_allowed;
2006 } __attribute__ ((packed));
2008 #define BT_HCI_CMD_READ_LOOPBACK_MODE 0x1801
2009 struct bt_hci_rsp_read_loopback_mode {
2012 } __attribute__ ((packed));
2014 #define BT_HCI_CMD_WRITE_LOOPBACK_MODE 0x1802
2015 struct bt_hci_cmd_write_loopback_mode {
2017 } __attribute__ ((packed));
2019 #define BT_HCI_CMD_ENABLE_DUT_MODE 0x1803
2021 #define BT_HCI_CMD_WRITE_SSP_DEBUG_MODE 0x1804
2022 struct bt_hci_cmd_write_ssp_debug_mode {
2024 } __attribute__ ((packed));
2026 #define BT_HCI_CMD_LE_SET_EVENT_MASK 0x2001
2027 struct bt_hci_cmd_le_set_event_mask {
2029 } __attribute__ ((packed));
2031 #define BT_HCI_CMD_LE_READ_BUFFER_SIZE 0x2002
2032 struct bt_hci_rsp_le_read_buffer_size {
2036 } __attribute__ ((packed));
2038 #define BT_HCI_CMD_LE_READ_LOCAL_FEATURES 0x2003
2039 struct bt_hci_rsp_le_read_local_features {
2041 uint8_t features[8];
2042 } __attribute__ ((packed));
2044 #define BT_HCI_CMD_LE_SET_RANDOM_ADDRESS 0x2005
2045 struct bt_hci_cmd_le_set_random_address {
2047 } __attribute__ ((packed));
2049 #define BT_HCI_CMD_LE_SET_ADV_PARAMETERS 0x2006
2050 struct bt_hci_cmd_le_set_adv_parameters {
2051 uint16_t min_interval;
2052 uint16_t max_interval;
2054 uint8_t own_addr_type;
2055 uint8_t direct_addr_type;
2056 uint8_t direct_addr[6];
2057 uint8_t channel_map;
2058 uint8_t filter_policy;
2059 } __attribute__ ((packed));
2061 #define BT_HCI_CMD_LE_READ_ADV_TX_POWER 0x2007
2062 struct bt_hci_rsp_le_read_adv_tx_power {
2065 } __attribute__ ((packed));
2067 #define BT_HCI_CMD_LE_SET_ADV_DATA 0x2008
2068 struct bt_hci_cmd_le_set_adv_data {
2071 } __attribute__ ((packed));
2073 #define BT_HCI_CMD_LE_SET_SCAN_RSP_DATA 0x2009
2074 struct bt_hci_cmd_le_set_scan_rsp_data {
2077 } __attribute__ ((packed));
2079 #define BT_HCI_CMD_LE_SET_ADV_ENABLE 0x200a
2080 struct bt_hci_cmd_le_set_adv_enable {
2082 } __attribute__ ((packed));
2084 #define BT_HCI_CMD_LE_SET_SCAN_PARAMETERS 0x200b
2085 struct bt_hci_cmd_le_set_scan_parameters {
2089 uint8_t own_addr_type;
2090 uint8_t filter_policy;
2091 } __attribute__ ((packed));
2093 #define BT_HCI_CMD_LE_SET_SCAN_ENABLE 0x200c
2094 struct bt_hci_cmd_le_set_scan_enable {
2097 } __attribute__ ((packed));
2099 #define BT_HCI_CMD_LE_CREATE_CONN 0x200d
2100 struct bt_hci_cmd_le_create_conn {
2101 uint16_t scan_interval;
2102 uint16_t scan_window;
2103 uint8_t filter_policy;
2104 uint8_t peer_addr_type;
2105 uint8_t peer_addr[6];
2106 uint8_t own_addr_type;
2107 uint16_t min_interval;
2108 uint16_t max_interval;
2110 uint16_t supv_timeout;
2111 uint16_t min_length;
2112 uint16_t max_length;
2113 } __attribute__ ((packed));
2115 #define BT_HCI_CMD_LE_CREATE_CONN_CANCEL 0x200e
2117 #define BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE 0x200f
2118 struct bt_hci_rsp_le_read_accept_list_size {
2121 } __attribute__ ((packed));
2123 #define BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST 0x2010
2125 #define BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST 0x2011
2126 struct bt_hci_cmd_le_add_to_accept_list {
2129 } __attribute__ ((packed));
2131 #define BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST 0x2012
2132 struct bt_hci_cmd_le_remove_from_accept_list {
2135 } __attribute__ ((packed));
2137 #define BT_HCI_CMD_LE_CONN_UPDATE 0x2013
2138 struct bt_hci_cmd_le_conn_update {
2140 uint16_t min_interval;
2141 uint16_t max_interval;
2143 uint16_t supv_timeout;
2144 uint16_t min_length;
2145 uint16_t max_length;
2146 } __attribute__ ((packed));
2148 #define BT_HCI_CMD_LE_SET_HOST_CLASSIFICATION 0x2014
2149 struct bt_hci_cmd_le_set_host_classification {
2151 } __attribute__ ((packed));
2153 #define BT_HCI_CMD_LE_READ_CHANNEL_MAP 0x2015
2154 struct bt_hci_cmd_le_read_channel_map {
2156 } __attribute__ ((packed));
2157 struct bt_hci_rsp_le_read_channel_map {
2161 } __attribute__ ((packed));
2163 #define BT_HCI_CMD_LE_READ_REMOTE_FEATURES 0x2016
2164 struct bt_hci_cmd_le_read_remote_features {
2166 } __attribute__ ((packed));
2168 #define BT_HCI_CMD_LE_ENCRYPT 0x2017
2169 struct bt_hci_cmd_le_encrypt {
2171 uint8_t plaintext[16];
2172 } __attribute__ ((packed));
2173 struct bt_hci_rsp_le_encrypt {
2176 } __attribute__ ((packed));
2178 #define BT_HCI_CMD_LE_RAND 0x2018
2179 struct bt_hci_rsp_le_rand {
2182 } __attribute__ ((packed));
2184 #define BT_HCI_CMD_LE_START_ENCRYPT 0x2019
2185 struct bt_hci_cmd_le_start_encrypt {
2190 } __attribute__ ((packed));
2192 #define BT_HCI_CMD_LE_LTK_REQ_REPLY 0x201a
2193 struct bt_hci_cmd_le_ltk_req_reply {
2196 } __attribute__ ((packed));
2197 struct bt_hci_rsp_le_ltk_req_reply {
2200 } __attribute__ ((packed));
2202 #define BT_HCI_CMD_LE_LTK_REQ_NEG_REPLY 0x201b
2203 struct bt_hci_cmd_le_ltk_req_neg_reply {
2205 } __attribute__ ((packed));
2206 struct bt_hci_rsp_le_ltk_req_neg_reply {
2209 } __attribute__ ((packed));
2211 #define BT_HCI_CMD_LE_READ_SUPPORTED_STATES 0x201c
2212 struct bt_hci_rsp_le_read_supported_states {
2215 } __attribute__ ((packed));
2217 #define BT_HCI_CMD_LE_RECEIVER_TEST 0x201d
2218 struct bt_hci_cmd_le_receiver_test {
2220 } __attribute__ ((packed));
2222 #define BT_HCI_CMD_LE_TRANSMITTER_TEST 0x201e
2223 struct bt_hci_cmd_le_transmitter_test {
2227 } __attribute__ ((packed));
2229 #define BT_HCI_CMD_LE_TEST_END 0x201f
2230 struct bt_hci_rsp_le_test_end {
2232 uint16_t num_packets;
2233 } __attribute__ ((packed));
2235 #define BT_HCI_CMD_LE_CONN_PARAM_REQ_REPLY 0x2020
2236 struct bt_hci_cmd_le_conn_param_req_reply {
2238 uint16_t min_interval;
2239 uint16_t max_interval;
2241 uint16_t supv_timeout;
2242 uint16_t min_length;
2243 uint16_t max_length;
2244 } __attribute__ ((packed));
2245 struct bt_hci_rsp_le_conn_param_req_reply {
2248 } __attribute__ ((packed));
2250 #define BT_HCI_CMD_LE_CONN_PARAM_REQ_NEG_REPLY 0x2021
2251 struct bt_hci_cmd_le_conn_param_req_neg_reply {
2254 } __attribute__ ((packed));
2255 struct bt_hci_rsp_le_conn_param_req_neg_reply {
2258 } __attribute__ ((packed));
2260 #define BT_HCI_CMD_LE_SET_DATA_LENGTH 0x2022
2261 struct bt_hci_cmd_le_set_data_length {
2265 } __attribute__ ((packed));
2266 struct bt_hci_rsp_le_set_data_length {
2269 } __attribute__ ((packed));
2271 #define BT_HCI_CMD_LE_READ_DEFAULT_DATA_LENGTH 0x2023
2272 struct bt_hci_rsp_le_read_default_data_length {
2276 } __attribute__ ((packed));
2278 #define BT_HCI_CMD_LE_WRITE_DEFAULT_DATA_LENGTH 0x2024
2279 struct bt_hci_cmd_le_write_default_data_length {
2282 } __attribute__ ((packed));
2284 #define BT_HCI_CMD_LE_READ_LOCAL_PK256 0x2025
2286 #define BT_HCI_CMD_LE_GENERATE_DHKEY 0x2026
2287 struct bt_hci_cmd_le_generate_dhkey {
2288 uint8_t remote_pk256[64];
2289 } __attribute__ ((packed));
2291 #define BT_HCI_CMD_LE_ADD_TO_RESOLV_LIST 0x2027
2292 struct bt_hci_cmd_le_add_to_resolv_list {
2295 uint8_t peer_irk[16];
2296 uint8_t local_irk[16];
2297 } __attribute__ ((packed));
2299 #define BT_HCI_CMD_LE_REMOVE_FROM_RESOLV_LIST 0x2028
2300 struct bt_hci_cmd_le_remove_from_resolv_list {
2303 } __attribute__ ((packed));
2305 #define BT_HCI_CMD_LE_CLEAR_RESOLV_LIST 0x2029
2307 #define BT_HCI_CMD_LE_READ_RESOLV_LIST_SIZE 0x202a
2308 struct bt_hci_rsp_le_read_resolv_list_size {
2311 } __attribute__ ((packed));
2313 #define BT_HCI_CMD_LE_READ_PEER_RESOLV_ADDR 0x202b
2314 struct bt_hci_cmd_le_read_peer_resolv_addr {
2317 } __attribute__ ((packed));
2318 struct bt_hci_rsp_le_read_peer_resolv_addr {
2321 } __attribute__ ((packed));
2323 #define BT_HCI_CMD_LE_READ_LOCAL_RESOLV_ADDR 0x202c
2324 struct bt_hci_cmd_le_read_local_resolv_addr {
2327 } __attribute__ ((packed));
2328 struct bt_hci_rsp_le_read_local_resolv_addr {
2331 } __attribute__ ((packed));
2333 #define BT_HCI_CMD_LE_SET_RESOLV_ENABLE 0x202d
2334 struct bt_hci_cmd_le_set_resolv_enable {
2336 } __attribute__ ((packed));
2338 #define BT_HCI_CMD_LE_SET_RESOLV_TIMEOUT 0x202e
2339 struct bt_hci_cmd_le_set_resolv_timeout {
2341 } __attribute__ ((packed));
2343 #define BT_HCI_CMD_LE_READ_MAX_DATA_LENGTH 0x202f
2344 struct bt_hci_rsp_le_read_max_data_length {
2346 uint16_t max_tx_len;
2347 uint16_t max_tx_time;
2348 uint16_t max_rx_len;
2349 uint16_t max_rx_time;
2350 } __attribute__ ((packed));
2352 #define BT_HCI_CMD_LE_READ_PHY 0x2030
2353 struct bt_hci_cmd_le_read_phy {
2355 } __attribute__((packed));
2356 struct bt_hci_rsp_le_read_phy {
2361 } __attribute__((packed));
2363 #define BT_HCI_CMD_LE_SET_DEFAULT_PHY 0x2031
2364 struct bt_hci_cmd_le_set_default_phy {
2368 } __attribute__((packed));
2370 #define BT_HCI_CMD_LE_SET_PHY 0x2032
2371 struct bt_hci_cmd_le_set_phy {
2377 } __attribute__((packed));
2379 #define BT_HCI_CMD_LE_ENHANCED_RECEIVER_TEST 0x2033
2380 struct bt_hci_cmd_le_enhanced_receiver_test {
2383 uint8_t modulation_index;
2384 } __attribute__((packed));
2386 #define BT_HCI_CMD_LE_ENHANCED_TRANSMITTER_TEST 0x2034
2387 struct bt_hci_cmd_le_enhanced_transmitter_test {
2392 } __attribute__((packed));
2394 #define BT_HCI_CMD_LE_SET_ADV_SET_RAND_ADDR 0x2035
2395 struct bt_hci_cmd_le_set_adv_set_rand_addr {
2398 } __attribute__ ((packed));
2400 #define BT_HCI_CMD_LE_SET_EXT_ADV_PARAMS 0x2036
2401 struct bt_hci_cmd_le_set_ext_adv_params {
2403 uint16_t evt_properties;
2404 uint8_t min_interval[3];
2405 uint8_t max_interval[3];
2406 uint8_t channel_map;
2407 uint8_t own_addr_type;
2408 uint8_t peer_addr_type;
2409 uint8_t peer_addr[6];
2410 uint8_t filter_policy;
2412 uint8_t primary_phy;
2413 uint8_t secondary_max_skip;
2414 uint8_t secondary_phy;
2416 uint8_t notif_enable;
2417 } __attribute__ ((packed));
2418 struct bt_hci_rsp_le_set_ext_adv_params {
2421 } __attribute__ ((packed));
2423 #define BT_HCI_CMD_LE_SET_EXT_ADV_DATA 0x2037
2424 struct bt_hci_cmd_le_set_ext_adv_data {
2427 uint8_t fragment_preference;
2430 } __attribute__ ((packed));
2432 #define BT_HCI_CMD_LE_SET_EXT_SCAN_RSP_DATA 0x2038
2433 struct bt_hci_cmd_le_set_ext_scan_rsp_data {
2436 uint8_t fragment_preference;
2439 } __attribute__ ((packed));
2441 #define BT_HCI_CMD_LE_SET_EXT_ADV_ENABLE 0x2039
2442 struct bt_hci_cmd_le_set_ext_adv_enable {
2444 uint8_t num_of_sets;
2445 } __attribute__ ((packed));
2446 struct bt_hci_cmd_ext_adv_set {
2450 } __attribute__ ((packed));
2452 #define BT_HCI_CMD_LE_READ_MAX_ADV_DATA_LEN 0x203a
2453 struct bt_hci_rsp_le_read_max_adv_data_len {
2456 } __attribute__ ((packed));
2458 #define BT_HCI_CMD_LE_READ_NUM_SUPPORTED_ADV_SETS 0x203b
2459 struct bt_hci_rsp_le_read_num_supported_adv_sets {
2461 uint8_t num_of_sets;
2462 } __attribute__ ((packed));
2464 #define BT_HCI_CMD_LE_REMOVE_ADV_SET 0x203c
2465 struct bt_hci_cmd_le_remove_adv_set {
2467 } __attribute__ ((packed));
2469 #define BT_HCI_CMD_LE_CLEAR_ADV_SETS 0x203d
2471 #define BT_HCI_CMD_LE_SET_PA_PARAMS 0x203e
2472 struct bt_hci_cmd_le_set_pa_params {
2474 uint16_t min_interval;
2475 uint16_t max_interval;
2476 uint16_t properties;
2477 } __attribute__ ((packed));
2479 #define BT_HCI_CMD_LE_SET_PA_DATA 0x203f
2480 struct bt_hci_cmd_le_set_pa_data {
2485 } __attribute__ ((packed));
2487 #define BT_HCI_CMD_LE_SET_PA_ENABLE 0x2040
2488 struct bt_hci_cmd_le_set_pa_enable {
2491 } __attribute__ ((packed));
2493 #define BT_HCI_CMD_LE_SET_EXT_SCAN_PARAMS 0x2041
2494 struct bt_hci_cmd_le_set_ext_scan_params {
2495 uint8_t own_addr_type;
2496 uint8_t filter_policy;
2499 } __attribute__ ((packed));
2500 struct bt_hci_le_scan_phy {
2504 } __attribute__ ((packed));
2506 #define BT_HCI_CMD_LE_SET_EXT_SCAN_ENABLE 0x2042
2507 struct bt_hci_cmd_le_set_ext_scan_enable {
2512 } __attribute__ ((packed));
2514 #define BT_HCI_CMD_LE_EXT_CREATE_CONN 0x2043
2515 struct bt_hci_cmd_le_ext_create_conn {
2516 uint8_t filter_policy;
2517 uint8_t own_addr_type;
2518 uint8_t peer_addr_type;
2519 uint8_t peer_addr[6];
2522 } __attribute__ ((packed));
2523 struct bt_hci_le_ext_create_conn {
2524 uint16_t scan_interval;
2525 uint16_t scan_window;
2526 uint16_t min_interval;
2527 uint16_t max_interval;
2529 uint16_t supv_timeout;
2530 uint16_t min_length;
2531 uint16_t max_length;
2532 } __attribute__ ((packed));
2534 #define BT_HCI_CMD_LE_PA_CREATE_SYNC 0x2044
2535 struct bt_hci_cmd_le_pa_create_sync {
2541 uint16_t sync_timeout;
2542 uint8_t sync_cte_type;
2543 } __attribute__ ((packed));
2545 #define BT_HCI_CMD_LE_PA_CREATE_SYNC_CANCEL 0x2045
2547 #define BT_HCI_CMD_LE_PA_TERM_SYNC 0x2046
2548 struct bt_hci_cmd_le_pa_term_sync {
2549 uint16_t sync_handle;
2550 } __attribute__ ((packed));
2552 #define BT_HCI_CMD_LE_ADD_DEV_PA_LIST 0x2047
2553 struct bt_hci_cmd_le_add_dev_pa_list {
2557 } __attribute__ ((packed));
2559 #define BT_HCI_CMD_LE_REMOVE_DEV_PA_LIST 0x2048
2560 struct bt_hci_cmd_le_remove_dev_pa_list {
2564 } __attribute__ ((packed));
2566 #define BT_HCI_CMD_LE_CLEAR_PA_LIST 0x2049
2568 #define BT_HCI_CMD_LE_READ_PA_LIST_SIZE 0x204a
2569 struct bt_hci_rsp_le_read_dev_pa_list_size {
2572 } __attribute__ ((packed));
2574 #define BT_HCI_CMD_LE_READ_TX_POWER 0x204b
2575 struct bt_hci_rsp_le_read_tx_power {
2577 int8_t min_tx_power;
2578 int8_t max_tx_power;
2579 } __attribute__ ((packed));
2581 #define BT_HCI_CMD_LE_READ_RF_PATH_COMPENSATION 0x204c
2582 struct bt_hci_rsp_le_read_rf_path_comp {
2584 uint16_t rf_tx_path_comp;
2585 uint16_t rf_rx_path_comp;
2586 } __attribute__ ((packed));
2588 #define BT_HCI_CMD_LE_WRITE_RF_PATH_COMPENSATION 0x204d
2589 struct bt_hci_cmd_le_write_rf_path_comp {
2590 uint16_t rf_tx_path_comp;
2591 uint16_t rf_rx_path_comp;
2592 } __attribute__ ((packed));
2594 #define BT_HCI_CMD_LE_SET_PRIV_MODE 0x204e
2595 struct bt_hci_cmd_le_set_priv_mode {
2596 uint8_t peer_id_addr_type;
2597 uint8_t peer_id_addr[6];
2599 } __attribute__ ((packed));
2601 #define BT_HCI_CMD_LE_RECEIVER_TEST_V3 0x204f
2602 struct bt_hci_cmd_le_receiver_test_v3 {
2609 uint8_t num_antenna_id;
2610 uint8_t antenna_ids[0];
2611 } __attribute__ ((packed));
2613 #define BT_HCI_CMD_LE_TX_TEST_V3 0x2050
2614 struct bt_hci_cmd_le_tx_test_v3 {
2622 uint8_t num_antenna_id;
2623 uint8_t antenna_ids[0];
2624 } __attribute__ ((packed));
2626 #define BT_HCI_CMD_SET_PA_REC_ENABLE 0x2059
2627 struct bt_hci_cmd_set_pa_rec_enable {
2628 uint16_t sync_handle;
2630 } __attribute__ ((packed));
2632 #define BT_HCI_CMD_PERIODIC_SYNC_TRANS 0x205a
2633 struct bt_hci_cmd_periodic_sync_trans {
2635 uint16_t service_data;
2636 uint16_t sync_handle;
2637 } __attribute__ ((packed));
2639 #define BT_HCI_CMD_PA_SET_INFO_TRANS 0x205b
2640 struct bt_hci_cmd_pa_set_info_trans {
2642 uint16_t service_data;
2644 } __attribute__ ((packed));
2646 #define BT_HCI_CMD_PA_SYNC_TRANS_PARAMS 0x205c
2647 struct bt_hci_cmd_pa_sync_trans_params {
2651 uint16_t sync_timeout;
2653 } __attribute__ ((packed));
2655 #define BT_HCI_CMD_DEFAULT_PA_SYNC_TRANS_PARAMS 0x205d
2656 struct bt_hci_cmd_default_pa_sync_trans_params {
2659 uint16_t sync_timeout;
2661 } __attribute__ ((packed));
2663 #define BT_HCI_CMD_LE_READ_BUFFER_SIZE_V2 0x2060
2664 #define BT_HCI_BIT_LE_READ_BUFFER_SIZE_V2 BT_HCI_CMD_BIT(41, 5)
2665 struct bt_hci_rsp_le_read_buffer_size_v2 {
2668 uint8_t acl_max_pkt;
2670 uint8_t iso_max_pkt;
2671 } __attribute__ ((packed));
2673 #define BT_HCI_CMD_LE_READ_ISO_TX_SYNC 0x2061
2674 #define BT_HCI_BIT_LE_READ_ISO_TX_SYNC BT_HCI_CMD_BIT(41, 6)
2675 struct bt_hci_cmd_le_read_iso_tx_sync {
2677 } __attribute__ ((packed));
2679 struct bt_hci_rsp_le_read_iso_tx_sync {
2685 } __attribute__ ((packed));
2687 #define BT_HCI_CMD_LE_SET_CIG_PARAMS 0x2062
2688 #define BT_HCI_BIT_LE_SET_CIG_PARAMS BT_HCI_CMD_BIT(41, 7)
2689 struct bt_hci_cis_params {
2697 } __attribute__ ((packed));
2699 struct bt_hci_cmd_le_set_cig_params {
2701 uint8_t c_interval[3];
2702 uint8_t p_interval[3];
2709 struct bt_hci_cis_params cis[0];
2710 } __attribute__ ((packed));
2712 struct bt_hci_rsp_le_set_cig_params {
2715 uint8_t num_handles;
2717 } __attribute__ ((packed));
2719 #define BT_HCI_CMD_LE_SET_CIG_PARAMS_TEST 0x2063
2720 #define BT_HCI_BIT_LE_SET_CIG_PARAMS_TEST BT_HCI_CMD_BIT(42, 0)
2721 struct bt_hci_cis_params_test {
2732 } __attribute__ ((packed));
2734 struct bt_hci_cmd_le_set_cig_params_test {
2736 uint8_t c_interval[3];
2737 uint8_t p_interval[3];
2740 uint16_t iso_interval;
2745 struct bt_hci_cis_params_test cis[0];
2746 } __attribute__ ((packed));
2748 #define BT_HCI_CMD_LE_CREATE_CIS 0x2064
2749 #define BT_HCI_BIT_LE_CREATE_CIS BT_HCI_CMD_BIT(42, 1)
2751 uint16_t cis_handle;
2752 uint16_t acl_handle;
2753 } __attribute__ ((packed));
2755 struct bt_hci_cmd_le_create_cis {
2757 struct bt_hci_cis cis[0];
2758 } __attribute__ ((packed));
2760 #define BT_HCI_CMD_LE_REMOVE_CIG 0x2065
2761 #define BT_HCI_BIT_LE_REMOVE_CIG BT_HCI_CMD_BIT(42, 2)
2762 struct bt_hci_cmd_le_remove_cig {
2764 } __attribute__ ((packed));
2766 struct bt_hci_rsp_le_remove_cig {
2769 } __attribute__ ((packed));
2771 #define BT_HCI_CMD_LE_ACCEPT_CIS 0x2066
2772 #define BT_HCI_BIT_LE_ACCEPT_CIS BT_HCI_CMD_BIT(42, 3)
2773 struct bt_hci_cmd_le_accept_cis {
2775 } __attribute__ ((packed));
2776 #define BT_HCI_CMD_LE_REJECT_CIS 0x2067
2777 #define BT_HCI_BIT_LE_REJECT_CIS BT_HCI_CMD_BIT(42, 4)
2778 struct bt_hci_cmd_le_reject_cis {
2781 } __attribute__ ((packed));
2783 #define BT_HCI_CMD_LE_CREATE_BIG 0x2068
2784 #define BT_HCI_BIT_LE_CREATE_BIG BT_HCI_CMD_BIT(42, 5)
2786 uint8_t sdu_interval[3];
2795 } __attribute__ ((packed));
2797 struct bt_hci_cmd_le_create_big {
2801 struct bt_hci_bis bis;
2802 } __attribute__ ((packed));
2804 #define BT_HCI_CMD_LE_CREATE_BIG_TEST 0x2069
2805 #define BT_HCI_BIT_LE_CREATE_BIG_TEST BT_HCI_CMD_BIT(42, 6)
2806 struct bt_hci_bis_test {
2807 uint8_t sdu_interval[3];
2808 uint16_t iso_interval;
2820 } __attribute__ ((packed));
2822 struct bt_hci_cmd_le_create_big_test {
2826 struct bt_hci_bis_test bis[0];
2827 } __attribute__ ((packed));
2829 #define BT_HCI_CMD_LE_TERM_BIG 0x206a
2830 #define BT_HCI_BIT_LE_TERM_BIG BT_HCI_CMD_BIT(42, 7)
2831 struct bt_hci_cmd_le_term_big {
2834 } __attribute__ ((packed));
2836 #define BT_HCI_CMD_LE_BIG_CREATE_SYNC 0x206b
2837 #define BT_HCI_BIT_LE_BIG_CREATE_SYNC BT_HCI_CMD_BIT(43, 0)
2838 struct bt_hci_bis_sync {
2840 } __attribute__ ((packed));
2842 struct bt_hci_cmd_le_big_create_sync {
2844 uint16_t sync_handle;
2850 struct bt_hci_bis_sync bis[0];
2851 } __attribute__ ((packed));
2853 #define BT_HCI_CMD_LE_BIG_TERM_SYNC 0x206c
2854 #define BT_HCI_BIT_LE_BIG_TERM_SYNC BT_HCI_CMD_BIT(43, 1)
2855 struct bt_hci_cmd_le_big_term_sync {
2857 } __attribute__ ((packed));
2859 struct bt_hci_rsp_le_big_term_sync {
2862 } __attribute__ ((packed));
2864 #define BT_HCI_CMD_LE_REQ_PEER_SCA 0x206d
2865 #define BT_HCI_BIT_LE_REQ_PEER_SCA BT_HCI_CMD_BIT(43, 2)
2866 struct bt_hci_cmd_le_req_peer_sca {
2868 } __attribute__ ((packed));
2870 #define BT_HCI_CMD_LE_SETUP_ISO_PATH 0x206e
2871 #define BT_HCI_BIT_LE_SETUP_ISO_PATH BT_HCI_CMD_BIT(43, 3)
2872 struct bt_hci_cmd_le_setup_iso_path {
2880 uint8_t codec_cfg_len;
2881 uint8_t codec_cfg[0];
2882 } __attribute__ ((packed));
2884 struct bt_hci_rsp_le_setup_iso_path {
2887 } __attribute__ ((packed));
2889 #define BT_HCI_CMD_LE_REMOVE_ISO_PATH 0x206f
2890 #define BT_HCI_BIT_LE_REMOVE_ISO_PATH BT_HCI_CMD_BIT(43, 4)
2891 struct bt_hci_cmd_le_remove_iso_path {
2894 } __attribute__ ((packed));
2896 struct bt_hci_rsp_le_remove_iso_path {
2899 } __attribute__ ((packed));
2901 #define BT_HCI_CMD_LE_ISO_TX_TEST 0x2070
2902 #define BT_HCI_BIT_LE_ISO_TX_TEST BT_HCI_CMD_BIT(43, 5)
2904 #define BT_HCI_CMD_LE_ISO_RX_TEST 0x2071
2905 #define BT_HCI_BIT_LE_ISO_RX_TEST BT_HCI_CMD_BIT(43, 6)
2907 #define BT_HCI_CMD_LE_ISO_READ_TEST_COUNTER 0x2072
2908 #define BT_HCI_BIT_LE_ISO_READ_TEST_COUNTER BT_HCI_CMD_BIT(43, 7)
2910 #define BT_HCI_CMD_LE_ISO_TEST_END 0x2073
2911 #define BT_HCI_BIT_LE_ISO_TEST_END BT_HCI_CMD_BIT(44, 0)
2913 #define BT_HCI_CMD_LE_SET_HOST_FEATURE 0x2074
2914 #define BT_HCI_BIT_LE_SET_HOST_FEATURE BT_HCI_CMD_BIT(44, 1)
2915 struct bt_hci_cmd_le_set_host_feature {
2918 } __attribute__ ((packed));
2920 #define BT_HCI_CMD_LE_READ_ISO_LINK_QUALITY 0x2075
2921 #define BT_HCI_BIT_LE_READ_ISO_LINK_QUALITY BT_HCI_CMD_BIT(45, 1)
2922 struct bt_hci_cmd_le_read_iso_link_quality {
2924 } __attribute__ ((packed));
2926 struct bt_hci_rsp_le_read_iso_link_quality {
2929 uint32_t tx_unacked_packets;
2930 uint32_t tx_flushed_packets;
2931 uint32_t tx_last_subevent_packets;
2932 uint32_t retransmitted_packets;
2933 uint32_t crc_error_packets;
2934 uint32_t rx_unreceived_packets;
2935 uint32_t duplicated_packets;
2936 } __attribute__ ((packed));
2938 #define BT_HCI_EVT_INQUIRY_COMPLETE 0x01
2939 struct bt_hci_evt_inquiry_complete {
2941 } __attribute__ ((packed));
2943 #define BT_HCI_EVT_INQUIRY_RESULT 0x02
2944 struct bt_hci_evt_inquiry_result {
2947 uint8_t pscan_rep_mode;
2948 uint8_t pscan_period_mode;
2950 uint8_t dev_class[3];
2951 uint16_t clock_offset;
2952 } __attribute__ ((packed));
2954 #define BT_HCI_EVT_CONN_COMPLETE 0x03
2955 struct bt_hci_evt_conn_complete {
2961 } __attribute__ ((packed));
2963 #define BT_HCI_EVT_CONN_REQUEST 0x04
2964 struct bt_hci_evt_conn_request {
2966 uint8_t dev_class[3];
2968 } __attribute__ ((packed));
2970 #define BT_HCI_EVT_DISCONNECT_COMPLETE 0x05
2971 struct bt_hci_evt_disconnect_complete {
2975 } __attribute__ ((packed));
2977 #define BT_HCI_EVT_AUTH_COMPLETE 0x06
2978 struct bt_hci_evt_auth_complete {
2981 } __attribute__ ((packed));
2983 #define BT_HCI_EVT_REMOTE_NAME_REQUEST_COMPLETE 0x07
2984 struct bt_hci_evt_remote_name_request_complete {
2988 } __attribute__ ((packed));
2990 #define BT_HCI_EVT_ENCRYPT_CHANGE 0x08
2991 struct bt_hci_evt_encrypt_change {
2995 } __attribute__ ((packed));
2997 #define BT_HCI_EVT_CHANGE_CONN_LINK_KEY_COMPLETE 0x09
2998 struct bt_hci_evt_change_conn_link_key_complete {
3001 } __attribute__ ((packed));
3003 #define BT_HCI_EVT_LINK_KEY_TYPE_CHANGED 0x0a
3004 struct bt_hci_evt_link_key_type_changed {
3008 } __attribute__ ((packed));
3010 #define BT_HCI_EVT_REMOTE_FEATURES_COMPLETE 0x0b
3011 struct bt_hci_evt_remote_features_complete {
3014 uint8_t features[8];
3015 } __attribute__ ((packed));
3017 #define BT_HCI_EVT_REMOTE_VERSION_COMPLETE 0x0c
3018 struct bt_hci_evt_remote_version_complete {
3022 uint16_t manufacturer;
3023 uint16_t lmp_subver;
3024 } __attribute__ ((packed));
3026 #define BT_HCI_EVT_QOS_SETUP_COMPLETE 0x0d
3027 struct bt_hci_evt_qos_setup_complete {
3031 uint8_t service_type;
3032 uint32_t token_rate;
3033 uint32_t peak_bandwidth;
3035 uint32_t delay_variation;
3036 } __attribute__ ((packed));
3038 #define BT_HCI_EVT_CMD_COMPLETE 0x0e
3039 struct bt_hci_evt_cmd_complete {
3042 } __attribute__ ((packed));
3044 #define BT_HCI_EVT_CMD_STATUS 0x0f
3045 struct bt_hci_evt_cmd_status {
3049 } __attribute__ ((packed));
3051 #define BT_HCI_EVT_HARDWARE_ERROR 0x10
3052 struct bt_hci_evt_hardware_error {
3054 } __attribute__ ((packed));
3056 #define BT_HCI_EVT_FLUSH_OCCURRED 0x11
3057 struct bt_hci_evt_flush_occurred {
3059 } __attribute__ ((packed));
3061 #define BT_HCI_EVT_ROLE_CHANGE 0x12
3062 struct bt_hci_evt_role_change {
3066 } __attribute__ ((packed));
3068 #define BT_HCI_EVT_NUM_COMPLETED_PACKETS 0x13
3069 struct bt_hci_evt_num_completed_packets {
3070 uint8_t num_handles;
3073 } __attribute__ ((packed));
3075 #define BT_HCI_EVT_MODE_CHANGE 0x14
3076 struct bt_hci_evt_mode_change {
3081 } __attribute__ ((packed));
3083 #define BT_HCI_EVT_RETURN_LINK_KEYS 0x15
3084 struct bt_hci_evt_return_link_keys {
3087 } __attribute__ ((packed));
3089 #define BT_HCI_EVT_PIN_CODE_REQUEST 0x16
3090 struct bt_hci_evt_pin_code_request {
3092 } __attribute__ ((packed));
3094 #define BT_HCI_EVT_LINK_KEY_REQUEST 0x17
3095 struct bt_hci_evt_link_key_request {
3097 } __attribute__ ((packed));
3099 #define BT_HCI_EVT_LINK_KEY_NOTIFY 0x18
3100 struct bt_hci_evt_link_key_notify {
3102 uint8_t link_key[16];
3104 } __attribute__ ((packed));
3106 #define BT_HCI_EVT_LOOPBACK_COMMAND 0x19
3108 #define BT_HCI_EVT_DATA_BUFFER_OVERFLOW 0x1a
3109 struct bt_hci_evt_data_buffer_overflow {
3111 } __attribute__ ((packed));
3113 #define BT_HCI_EVT_MAX_SLOTS_CHANGE 0x1b
3114 struct bt_hci_evt_max_slots_change {
3117 } __attribute__ ((packed));
3119 #define BT_HCI_EVT_CLOCK_OFFSET_COMPLETE 0x1c
3120 struct bt_hci_evt_clock_offset_complete {
3123 uint16_t clock_offset;
3124 } __attribute__ ((packed));
3126 #define BT_HCI_EVT_CONN_PKT_TYPE_CHANGED 0x1d
3127 struct bt_hci_evt_conn_pkt_type_changed {
3131 } __attribute__ ((packed));
3133 #define BT_HCI_EVT_QOS_VIOLATION 0x1e
3134 struct bt_hci_evt_qos_violation {
3136 } __attribute__ ((packed));
3138 #define BT_HCI_EVT_PSCAN_MODE_CHANGE 0x1f
3139 struct bt_hci_evt_pscan_mode_change {
3142 } __attribute__ ((packed));
3144 #define BT_HCI_EVT_PSCAN_REP_MODE_CHANGE 0x20
3145 struct bt_hci_evt_pscan_rep_mode_change {
3147 uint8_t pscan_rep_mode;
3148 } __attribute__ ((packed));
3150 #define BT_HCI_EVT_FLOW_SPEC_COMPLETE 0x21
3151 struct bt_hci_evt_flow_spec_complete {
3156 uint8_t service_type;
3157 uint32_t token_rate;
3158 uint32_t token_bucket_size;
3159 uint32_t peak_bandwidth;
3160 uint32_t access_latency;
3161 } __attribute__ ((packed));
3163 #define BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI 0x22
3164 struct bt_hci_evt_inquiry_result_with_rssi {
3167 uint8_t pscan_rep_mode;
3168 uint8_t pscan_period_mode;
3169 uint8_t dev_class[3];
3170 uint16_t clock_offset;
3172 } __attribute__ ((packed));
3174 #define BT_HCI_EVT_REMOTE_EXT_FEATURES_COMPLETE 0x23
3175 struct bt_hci_evt_remote_ext_features_complete {
3180 uint8_t features[8];
3181 } __attribute__ ((packed));
3183 #define BT_HCI_EVT_SYNC_CONN_COMPLETE 0x2c
3184 struct bt_hci_evt_sync_conn_complete {
3189 uint8_t tx_interval;
3190 uint8_t retrans_window;
3191 uint16_t rx_pkt_len;
3192 uint16_t tx_pkt_len;
3194 } __attribute__ ((packed));
3196 #define BT_HCI_EVT_SYNC_CONN_CHANGED 0x2d
3197 struct bt_hci_evt_sync_conn_changed {
3200 uint8_t tx_interval;
3201 uint8_t retrans_window;
3202 uint16_t rx_pkt_len;
3203 uint16_t tx_pkt_len;
3204 } __attribute__ ((packed));
3206 #define BT_HCI_EVT_SNIFF_SUBRATING 0x2e
3207 struct bt_hci_evt_sniff_subrating {
3210 uint16_t max_tx_latency;
3211 uint16_t max_rx_latency;
3212 uint16_t min_remote_timeout;
3213 uint16_t min_local_timeout;
3214 } __attribute__ ((packed));
3216 #define BT_HCI_EVT_EXT_INQUIRY_RESULT 0x2f
3217 struct bt_hci_evt_ext_inquiry_result {
3220 uint8_t pscan_rep_mode;
3221 uint8_t pscan_period_mode;
3222 uint8_t dev_class[3];
3223 uint16_t clock_offset;
3226 } __attribute__ ((packed));
3228 #define BT_HCI_EVT_ENCRYPT_KEY_REFRESH_COMPLETE 0x30
3229 struct bt_hci_evt_encrypt_key_refresh_complete {
3232 } __attribute__ ((packed));
3234 #define BT_HCI_EVT_IO_CAPABILITY_REQUEST 0x31
3235 struct bt_hci_evt_io_capability_request {
3237 } __attribute__ ((packed));
3239 #define BT_HCI_EVT_IO_CAPABILITY_RESPONSE 0x32
3240 struct bt_hci_evt_io_capability_response {
3244 uint8_t authentication;
3245 } __attribute__ ((packed));
3247 #define BT_HCI_EVT_USER_CONFIRM_REQUEST 0x33
3248 struct bt_hci_evt_user_confirm_request {
3251 } __attribute__ ((packed));
3253 #define BT_HCI_EVT_USER_PASSKEY_REQUEST 0x34
3254 struct bt_hci_evt_user_passkey_request {
3256 } __attribute__ ((packed));
3258 #define BT_HCI_EVT_REMOTE_OOB_DATA_REQUEST 0x35
3259 struct bt_hci_evt_remote_oob_data_request {
3261 } __attribute__ ((packed));
3263 #define BT_HCI_EVT_SIMPLE_PAIRING_COMPLETE 0x36
3264 struct bt_hci_evt_simple_pairing_complete {
3267 } __attribute__ ((packed));
3269 #define BT_HCI_EVT_LINK_SUPV_TIMEOUT_CHANGED 0x38
3270 struct bt_hci_evt_link_supv_timeout_changed {
3273 } __attribute__ ((packed));
3275 #define BT_HCI_EVT_ENHANCED_FLUSH_COMPLETE 0x39
3276 struct bt_hci_evt_enhanced_flush_complete {
3278 } __attribute__ ((packed));
3280 #define BT_HCI_EVT_USER_PASSKEY_NOTIFY 0x3b
3281 struct bt_hci_evt_user_passkey_notify {
3284 } __attribute__ ((packed));
3286 #define BT_HCI_EVT_KEYPRESS_NOTIFY 0x3c
3287 struct bt_hci_evt_keypress_notify {
3290 } __attribute__ ((packed));
3292 #define BT_HCI_EVT_REMOTE_HOST_FEATURES_NOTIFY 0x3d
3293 struct bt_hci_evt_remote_host_features_notify {
3295 uint8_t features[8];
3296 } __attribute__ ((packed));
3298 #define BT_HCI_EVT_LE_META_EVENT 0x3e
3300 #define BT_HCI_EVT_PHY_LINK_COMPLETE 0x40
3301 struct bt_hci_evt_phy_link_complete {
3304 } __attribute__ ((packed));
3306 #define BT_HCI_EVT_CHANNEL_SELECTED 0x41
3307 struct bt_hci_evt_channel_selected {
3309 } __attribute__ ((packed));
3311 #define BT_HCI_EVT_DISCONN_PHY_LINK_COMPLETE 0x42
3312 struct bt_hci_evt_disconn_phy_link_complete {
3316 } __attribute__ ((packed));
3318 #define BT_HCI_EVT_PHY_LINK_LOSS_EARLY_WARNING 0x43
3319 struct bt_hci_evt_phy_link_loss_early_warning {
3322 } __attribute__ ((packed));
3324 #define BT_HCI_EVT_PHY_LINK_RECOVERY 0x44
3325 struct bt_hci_evt_phy_link_recovery {
3327 } __attribute__ ((packed));
3329 #define BT_HCI_EVT_LOGIC_LINK_COMPLETE 0x45
3330 struct bt_hci_evt_logic_link_complete {
3335 } __attribute__ ((packed));
3337 #define BT_HCI_EVT_DISCONN_LOGIC_LINK_COMPLETE 0x46
3338 struct bt_hci_evt_disconn_logic_link_complete {
3342 } __attribute__ ((packed));
3344 #define BT_HCI_EVT_FLOW_SPEC_MODIFY_COMPLETE 0x47
3345 struct bt_hci_evt_flow_spec_modify_complete {
3348 } __attribute__ ((packed));
3350 #define BT_HCI_EVT_NUM_COMPLETED_DATA_BLOCKS 0x48
3351 struct bt_hci_evt_num_completed_data_blocks {
3352 uint16_t total_num_blocks;
3353 uint8_t num_handles;
3355 uint16_t num_packets;
3356 uint16_t num_blocks;
3357 } __attribute__ ((packed));
3359 #define BT_HCI_EVT_SHORT_RANGE_MODE_CHANGE 0x4c
3360 struct bt_hci_evt_short_range_mode_change {
3364 } __attribute__ ((packed));
3366 #define BT_HCI_EVT_AMP_STATUS_CHANGE 0x4d
3367 struct bt_hci_evt_amp_status_change {
3370 } __attribute__ ((packed));
3372 #define BT_HCI_EVT_TRIGGERED_CLOCK_CAPTURE 0x4e
3373 struct bt_hci_evt_triggered_clock_capture {
3377 uint16_t clock_offset;
3378 } __attribute__ ((packed));
3380 #define BT_HCI_EVT_SYNC_TRAIN_COMPLETE 0x4f
3381 struct bt_hci_evt_sync_train_complete {
3383 } __attribute__ ((packed));
3385 #define BT_HCI_EVT_SYNC_TRAIN_RECEIVED 0x50
3386 struct bt_hci_evt_sync_train_received {
3394 uint8_t service_data;
3395 } __attribute__ ((packed));
3397 #define BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE 0x51
3398 struct bt_hci_evt_peripheral_broadcast_receive {
3406 } __attribute__ ((packed));
3408 #define BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT 0x52
3409 struct bt_hci_evt_peripheral_broadcast_timeout {
3412 } __attribute__ ((packed));
3414 #define BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE 0x53
3415 struct bt_hci_evt_truncated_page_complete {
3418 } __attribute__ ((packed));
3420 #define BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT 0x54
3422 #define BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE 0x55
3423 struct bt_hci_evt_channel_map_change {
3425 } __attribute__ ((packed));
3427 #define BT_HCI_EVT_INQUIRY_RESPONSE_NOTIFY 0x56
3428 struct bt_hci_evt_inquiry_response_notify {
3431 } __attribute__ ((packed));
3433 #define BT_HCI_EVT_AUTH_PAYLOAD_TIMEOUT_EXPIRED 0x57
3434 struct bt_hci_evt_auth_payload_timeout_expired {
3436 } __attribute__ ((packed));
3438 #define BT_HCI_EVT_LE_CONN_COMPLETE 0x01
3439 struct bt_hci_evt_le_conn_complete {
3443 uint8_t peer_addr_type;
3444 uint8_t peer_addr[6];
3447 uint16_t supv_timeout;
3448 uint8_t clock_accuracy;
3449 } __attribute__ ((packed));
3451 #define BT_HCI_EVT_LE_ADV_REPORT 0x02
3452 struct bt_hci_evt_le_adv_report {
3453 uint8_t num_reports;
3459 } __attribute__ ((packed));
3461 #define BT_HCI_EVT_LE_CONN_UPDATE_COMPLETE 0x03
3462 struct bt_hci_evt_le_conn_update_complete {
3467 uint16_t supv_timeout;
3468 } __attribute__ ((packed));
3470 #define BT_HCI_EVT_LE_REMOTE_FEATURES_COMPLETE 0x04
3471 struct bt_hci_evt_le_remote_features_complete {
3474 uint8_t features[8];
3475 } __attribute__ ((packed));
3477 #define BT_HCI_EVT_LE_LONG_TERM_KEY_REQUEST 0x05
3478 struct bt_hci_evt_le_long_term_key_request {
3482 } __attribute__ ((packed));
3484 #define BT_HCI_EVT_LE_CONN_PARAM_REQUEST 0x06
3485 struct bt_hci_evt_le_conn_param_request {
3487 uint16_t min_interval;
3488 uint16_t max_interval;
3490 uint16_t supv_timeout;
3491 } __attribute__ ((packed));
3493 #define BT_HCI_EVT_LE_DATA_LENGTH_CHANGE 0x07
3494 struct bt_hci_evt_le_data_length_change {
3496 uint16_t max_tx_len;
3497 uint16_t max_tx_time;
3498 uint16_t max_rx_len;
3499 uint16_t max_rx_time;
3500 } __attribute__ ((packed));
3502 #define BT_HCI_EVT_LE_READ_LOCAL_PK256_COMPLETE 0x08
3503 struct bt_hci_evt_le_read_local_pk256_complete {
3505 uint8_t local_pk256[64];
3506 } __attribute__ ((packed));
3508 #define BT_HCI_EVT_LE_GENERATE_DHKEY_COMPLETE 0x09
3509 struct bt_hci_evt_le_generate_dhkey_complete {
3512 } __attribute__ ((packed));
3514 #define BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE 0x0a
3515 struct bt_hci_evt_le_enhanced_conn_complete {
3519 uint8_t peer_addr_type;
3520 uint8_t peer_addr[6];
3521 uint8_t local_rpa[6];
3522 uint8_t peer_rpa[6];
3525 uint16_t supv_timeout;
3526 uint8_t clock_accuracy;
3527 } __attribute__ ((packed));
3529 #define BT_HCI_EVT_LE_DIRECT_ADV_REPORT 0x0b
3530 struct bt_hci_evt_le_direct_adv_report {
3531 uint8_t num_reports;
3535 uint8_t direct_addr_type;
3536 uint8_t direct_addr[6];
3538 } __attribute__ ((packed));
3540 #define BT_HCI_EVT_LE_PHY_UPDATE_COMPLETE 0x0c
3541 struct bt_hci_evt_le_phy_update_complete {
3546 } __attribute__ ((packed));
3548 #define BT_HCI_EVT_LE_EXT_ADV_REPORT 0x0d
3549 struct bt_hci_evt_le_ext_adv_report {
3550 uint8_t num_reports;
3551 } __attribute__ ((packed));
3552 struct bt_hci_le_ext_adv_report {
3553 uint16_t event_type;
3556 uint8_t primary_phy;
3557 uint8_t secondary_phy;
3562 uint8_t direct_addr_type;
3563 uint8_t direct_addr[6];
3566 } __attribute__ ((packed));
3568 #define BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED 0x0e
3569 struct bt_hci_evt_le_per_sync_established {
3577 uint8_t clock_accuracy;
3578 } __attribute__ ((packed));
3580 struct bt_hci_le_pa_base_codec {
3584 } __attribute__ ((packed));
3586 struct bt_hci_lv_data {
3589 } __attribute__ ((packed));
3591 struct bt_hci_le_pa_base_bis {
3593 struct bt_hci_lv_data codec_cfg[];
3594 } __attribute__ ((packed));
3596 struct bt_hci_le_pa_base_subgroup {
3598 struct bt_hci_le_pa_base_codec codec;
3600 } __attribute__ ((packed));
3602 struct bt_hci_le_pa_base_data {
3604 uint8_t num_subgroups;
3605 struct bt_hci_le_pa_base_subgroup subgroups[];
3606 } __attribute__ ((packed));
3608 #define BT_HCI_EVT_LE_PA_REPORT 0x0f
3609 struct bt_hci_le_pa_report {
3614 uint8_t data_status;
3617 } __attribute__ ((packed));
3619 #define BT_HCI_EVT_LE_PA_SYNC_LOST 0x10
3620 struct bt_hci_evt_le_per_sync_lost {
3622 } __attribute__ ((packed));
3624 #define BT_HCI_EVT_LE_ADV_SET_TERM 0x12
3625 struct bt_hci_evt_le_adv_set_term {
3628 uint16_t conn_handle;
3630 } __attribute__ ((packed));
3632 #define BT_HCI_EVT_LE_SCAN_REQ_RECEIVED 0x13
3633 struct bt_hci_evt_le_scan_req_received {
3635 uint8_t scanner_addr_type;
3636 uint8_t scanner_addr[6];
3637 } __attribute__ ((packed));
3639 #define BT_HCI_EVT_LE_CHAN_SELECT_ALG 0x14
3640 struct bt_hci_evt_le_chan_select_alg {
3643 } __attribute__ ((packed));
3645 #define BT_HCI_EVT_LE_CTE_REQUEST_FAILED 0x17
3646 struct bt_hci_evt_le_cte_request_failed {
3649 } __attribute__ ((packed));
3651 #define BT_HCI_EVT_LE_PA_SYNC_TRANS_REC 0x18
3652 struct bt_hci_evt_le_pa_sync_trans_rec {
3655 uint16_t service_data;
3656 uint16_t sync_handle;
3662 uint8_t clock_accuracy;
3663 } __attribute__ ((packed));
3665 #define BT_HCI_EVT_LE_CIS_ESTABLISHED 0x19
3666 struct bt_hci_evt_le_cis_established {
3668 uint16_t conn_handle;
3669 uint8_t cig_sync_delay[3];
3670 uint8_t cis_sync_delay[3];
3671 uint8_t c_latency[3];
3672 uint8_t p_latency[3];
3683 } __attribute__ ((packed));
3685 #define BT_HCI_EVT_LE_CIS_REQ 0x1a
3686 struct bt_hci_evt_le_cis_req {
3687 uint16_t acl_handle;
3688 uint16_t cis_handle;
3691 } __attribute__ ((packed));
3693 #define BT_HCI_EVT_LE_BIG_COMPLETE 0x1b
3694 struct bt_hci_evt_le_big_complete {
3697 uint8_t sync_delay[3];
3707 uint16_t bis_handle[0];
3708 } __attribute__ ((packed));
3710 #define BT_HCI_EVT_LE_BIG_TERMINATE 0x1c
3711 struct bt_hci_evt_le_big_terminate {
3714 } __attribute__ ((packed));
3716 #define BT_HCI_EVT_LE_BIG_SYNC_ESTABILISHED 0x1d
3717 struct bt_hci_evt_le_big_sync_estabilished {
3729 } __attribute__ ((packed));
3731 #define BT_HCI_EVT_LE_BIG_SYNC_LOST 0x1e
3732 struct bt_hci_evt_le_big_sync_lost {
3735 } __attribute__ ((packed));
3737 #define BT_HCI_EVT_LE_REQ_PEER_SCA_COMPLETE 0x1f
3738 struct bt_hci_evt_le_req_peer_sca_complete {
3742 } __attribute__ ((packed));
3744 #define BT_HCI_EVT_LE_BIG_INFO_ADV_REPORT 0x22
3745 struct bt_hci_evt_le_big_info_adv_report {
3746 uint16_t sync_handle;
3749 uint16_t iso_interval;
3754 uint8_t sdu_interval[3];
3759 } __attribute__ ((packed));
3761 #define BT_HCI_ERR_SUCCESS 0x00
3762 #define BT_HCI_ERR_UNKNOWN_COMMAND 0x01
3763 #define BT_HCI_ERR_UNKNOWN_CONN_ID 0x02
3764 #define BT_HCI_ERR_HARDWARE_FAILURE 0x03
3765 #define BT_HCI_ERR_PAGE_TIMEOUT 0x04
3766 #define BT_HCI_ERR_AUTH_FAILURE 0x05
3767 #define BT_HCI_ERR_PIN_OR_KEY_MISSING 0x06
3768 #define BT_HCI_ERR_MEM_CAPACITY_EXCEEDED 0x07
3769 #define BT_HCI_ERR_CONN_ALREADY_EXISTS 0x0b
3770 #define BT_HCI_ERR_COMMAND_DISALLOWED 0x0c
3771 #define BT_HCI_ERR_UNSUPPORTED_FEATURE 0x11
3772 #define BT_HCI_ERR_INVALID_PARAMETERS 0x12
3773 #define BT_HCI_ERR_LOCAL_HOST_TERM 0x16
3774 #define BT_HCI_ERR_UNSPECIFIED_ERROR 0x1f
3775 #define BT_HCI_ERR_ADV_TIMEOUT 0x3c
3776 #define BT_HCI_ERR_CONN_FAILED_TO_ESTABLISH 0x3e
3777 #define BT_HCI_ERR_UNKNOWN_ADVERTISING_ID 0x42
3778 #define BT_HCI_ERR_CANCELLED 0x44
3779 #define BT_HCI_ERR_ENC_MODE_NOT_ACCEPTABLE 0x25
3781 struct bt_l2cap_hdr {
3785 } __attribute__ ((packed));
3787 struct bt_l2cap_hdr_sig {
3791 } __attribute__ ((packed));
3793 #define BT_L2CAP_PDU_CMD_REJECT 0x01
3794 struct bt_l2cap_pdu_cmd_reject {
3796 } __attribute__ ((packed));
3798 #define BT_L2CAP_PDU_CONN_REQ 0x02
3799 struct bt_l2cap_pdu_conn_req {
3802 } __attribute__ ((packed));
3804 #define BT_L2CAP_PDU_CONN_RSP 0x03
3805 struct bt_l2cap_pdu_conn_rsp {
3810 } __attribute__ ((packed));
3812 #define BT_L2CAP_PDU_CONFIG_REQ 0x04
3813 struct bt_l2cap_pdu_config_req {
3816 } __attribute__ ((packed));
3818 #define BT_L2CAP_PDU_CONFIG_RSP 0x05
3819 struct bt_l2cap_pdu_config_rsp {
3823 } __attribute__ ((packed));
3825 #define BT_L2CAP_PDU_DISCONN_REQ 0x06
3826 struct bt_l2cap_pdu_disconn_req {
3829 } __attribute__ ((packed));
3831 #define BT_L2CAP_PDU_DISCONN_RSP 0x07
3832 struct bt_l2cap_pdu_disconn_rsp {
3835 } __attribute__ ((packed));
3837 #define BT_L2CAP_PDU_ECHO_REQ 0x08
3839 #define BT_L2CAP_PDU_ECHO_RSP 0x09
3841 #define BT_L2CAP_PDU_INFO_REQ 0x0a
3842 struct bt_l2cap_pdu_info_req {
3844 } __attribute__ ((packed));
3846 #define BT_L2CAP_PDU_INFO_RSP 0x0b
3847 struct bt_l2cap_pdu_info_rsp {
3851 } __attribute__ ((packed));
3853 #define BT_L2CAP_PDU_CREATE_CHAN_REQ 0x0c
3854 struct bt_l2cap_pdu_create_chan_req {
3858 } __attribute__ ((packed));
3860 #define BT_L2CAP_PDU_CREATE_CHAN_RSP 0x0d
3861 struct bt_l2cap_pdu_create_chan_rsp {
3866 } __attribute__ ((packed));
3868 #define BT_L2CAP_PDU_MOVE_CHAN_REQ 0x0e
3869 struct bt_l2cap_pdu_move_chan_req {
3872 } __attribute__ ((packed));
3874 #define BT_L2CAP_PDU_MOVE_CHAN_RSP 0x0f
3875 struct bt_l2cap_pdu_move_chan_rsp {
3878 } __attribute__ ((packed));
3880 #define BT_L2CAP_PDU_MOVE_CHAN_CFM 0x10
3881 struct bt_l2cap_pdu_move_chan_cfm {
3884 } __attribute__ ((packed));
3886 #define BT_L2CAP_PDU_MOVE_CHAN_CFM_RSP 0x11
3887 struct bt_l2cap_pdu_move_chan_cfm_rsp {
3889 } __attribute__ ((packed));
3891 #define BT_L2CAP_PDU_CONN_PARAM_REQ 0x12
3892 struct bt_l2cap_pdu_conn_param_req {
3893 uint16_t min_interval;
3894 uint16_t max_interval;
3897 } __attribute__ ((packed));
3899 #define BT_L2CAP_PDU_CONN_PARAM_RSP 0x13
3900 struct bt_l2cap_pdu_conn_param_rsp {
3902 } __attribute__ ((packed));
3904 #define BT_L2CAP_PDU_LE_CONN_REQ 0x14
3905 struct bt_l2cap_pdu_le_conn_req {
3911 } __attribute__ ((packed));
3913 #define BT_L2CAP_PDU_LE_CONN_RSP 0x15
3914 struct bt_l2cap_pdu_le_conn_rsp {
3920 } __attribute__ ((packed));
3922 #define BT_L2CAP_PDU_LE_FLOWCTL_CREDS 0x16
3923 struct bt_l2cap_pdu_le_flowctl_creds {
3926 } __attribute__ ((packed));
3928 #define BT_L2CAP_PDU_ECRED_CONN_REQ 0x17
3929 struct bt_l2cap_pdu_ecred_conn_req {
3935 } __attribute__ ((packed));
3937 #define BT_L2CAP_PDU_ECRED_CONN_RSP 0x18
3938 struct bt_l2cap_pdu_ecred_conn_rsp {
3944 } __attribute__ ((packed));
3946 #define BT_L2CAP_PDU_ECRED_RECONF_REQ 0x19
3947 struct bt_l2cap_pdu_ecred_reconf_req {
3951 } __attribute__ ((packed));
3953 #define BT_L2CAP_PDU_ECRED_RECONF_RSP 0x1a
3954 struct bt_l2cap_pdu_ecred_reconf_rsp {
3956 } __attribute__ ((packed));
3958 struct bt_l2cap_hdr_connless {
3960 } __attribute__ ((packed));
3962 struct bt_l2cap_hdr_amp {
3966 } __attribute__ ((packed));
3968 #define BT_L2CAP_AMP_CMD_REJECT 0x01
3969 struct bt_l2cap_amp_cmd_reject {
3971 } __attribute__ ((packed));
3973 #define BT_L2CAP_AMP_DISCOVER_REQ 0x02
3974 struct bt_l2cap_amp_discover_req {
3977 } __attribute__ ((packed));
3979 #define BT_L2CAP_AMP_DISCOVER_RSP 0x03
3980 struct bt_l2cap_amp_discover_rsp {
3983 } __attribute__ ((packed));
3985 #define BT_L2CAP_AMP_CHANGE_NOTIFY 0x04
3987 #define BT_L2CAP_AMP_CHANGE_RESPONSE 0x05
3989 #define BT_L2CAP_AMP_GET_INFO_REQ 0x06
3990 struct bt_l2cap_amp_get_info_req {
3992 } __attribute__ ((packed));
3994 #define BT_L2CAP_AMP_GET_INFO_RSP 0x07
3995 struct bt_l2cap_amp_get_info_rsp {
4000 uint32_t min_latency;
4002 uint16_t max_assoc_len;
4003 } __attribute__ ((packed));
4005 #define BT_L2CAP_AMP_GET_ASSOC_REQ 0x08
4006 struct bt_l2cap_amp_get_assoc_req {
4008 } __attribute__ ((packed));
4010 #define BT_L2CAP_AMP_GET_ASSOC_RSP 0x09
4011 struct bt_l2cap_amp_get_assoc_rsp {
4014 } __attribute__ ((packed));
4016 #define BT_L2CAP_AMP_CREATE_PHY_LINK_REQ 0x0a
4017 struct bt_l2cap_amp_create_phy_link_req {
4018 uint8_t local_ctrlid;
4019 uint8_t remote_ctrlid;
4020 } __attribute__ ((packed));
4022 #define BT_L2CAP_AMP_CREATE_PHY_LINK_RSP 0x0b
4023 struct bt_l2cap_amp_create_phy_link_rsp {
4024 uint8_t local_ctrlid;
4025 uint8_t remote_ctrlid;
4027 } __attribute__ ((packed));
4029 #define BT_L2CAP_AMP_DISCONN_PHY_LINK_REQ 0x0c
4030 struct bt_l2cap_amp_disconn_phy_link_req {
4031 uint8_t local_ctrlid;
4032 uint8_t remote_ctrlid;
4033 } __attribute__ ((packed));
4035 #define BT_L2CAP_AMP_DISCONN_PHY_LINK_RSP 0x0d
4036 struct bt_l2cap_amp_disconn_phy_link_rsp {
4037 uint8_t local_ctrlid;
4038 uint8_t remote_ctrlid;
4040 } __attribute__ ((packed));
4042 struct bt_l2cap_hdr_att {
4044 } __attribute__ ((packed));
4046 #define BT_L2CAP_ATT_ERROR_RESPONSE 0x01
4047 struct bt_l2cap_att_error_response {
4051 } __attribute__ ((packed));
4053 #define BT_L2CAP_ATT_EXCHANGE_MTU_REQ 0x02
4054 struct bt_l2cap_att_exchange_mtu_req {
4056 } __attribute__ ((packed));
4058 #define BT_L2CAP_ATT_EXCHANGE_MTU_RSP 0x03
4059 struct bt_l2cap_att_exchange_mtu_rsp {
4061 } __attribute__ ((packed));
4063 #define BT_L2CAP_ATT_READ_TYPE_REQ 0x08
4064 struct bt_l2cap_att_read_type_req {
4065 uint16_t start_handle;
4066 uint16_t end_handle;
4067 } __attribute__ ((packed));
4069 #define BT_L2CAP_ATT_READ_TYPE_RSP 0x09
4070 struct bt_l2cap_att_read_type_rsp {
4072 } __attribute__ ((packed));
4074 #define BT_L2CAP_ATT_READ_REQ 0x0a
4075 struct bt_l2cap_att_read_req {
4077 } __attribute__ ((packed));
4079 #define BT_L2CAP_ATT_READ_RSP 0x0b
4081 #define BT_L2CAP_ATT_READ_GROUP_TYPE_REQ 0x10
4082 struct bt_l2cap_att_read_group_type_req {
4083 uint16_t start_handle;
4084 uint16_t end_handle;
4085 } __attribute__ ((packed));
4087 #define BT_L2CAP_ATT_READ_GROUP_TYPE_RSP 0x11
4088 struct bt_l2cap_att_read_group_type_rsp {
4090 } __attribute__ ((packed));
4092 #define BT_L2CAP_ATT_HANDLE_VALUE_NOTIFY 0x1b
4093 struct bt_l2cap_att_handle_value_notify {
4095 } __attribute__ ((packed));
4097 #define BT_L2CAP_ATT_HANDLE_VALUE_IND 0x1d
4098 struct bt_l2cap_att_handle_value_ind {
4100 } __attribute__ ((packed));
4102 #define BT_L2CAP_ATT_HANDLE_VALUE_CONF 0x1e
4104 struct bt_l2cap_hdr_smp {
4106 } __attribute__ ((packed));
4108 #define BT_L2CAP_SMP_PAIRING_REQUEST 0x01
4109 struct bt_l2cap_smp_pairing_request {
4113 uint8_t max_key_size;
4114 uint8_t init_key_dist;
4115 uint8_t resp_key_dist;
4116 } __attribute__ ((packed));
4118 #define BT_L2CAP_SMP_PAIRING_RESPONSE 0x02
4119 struct bt_l2cap_smp_pairing_response {
4123 uint8_t max_key_size;
4124 uint8_t init_key_dist;
4125 uint8_t resp_key_dist;
4126 } __attribute__ ((packed));
4128 #define BT_L2CAP_SMP_PAIRING_CONFIRM 0x03
4129 struct bt_l2cap_smp_pairing_confirm {
4131 } __attribute__ ((packed));
4133 #define BT_L2CAP_SMP_PAIRING_RANDOM 0x04
4134 struct bt_l2cap_smp_pairing_random {
4136 } __attribute__ ((packed));
4138 #define BT_L2CAP_SMP_PAIRING_FAILED 0x05
4139 struct bt_l2cap_smp_pairing_failed {
4141 } __attribute__ ((packed));
4143 #define BT_L2CAP_SMP_ENCRYPT_INFO 0x06
4144 struct bt_l2cap_smp_encrypt_info {
4146 } __attribute__ ((packed));
4148 #define BT_L2CAP_SMP_CENTRAL_IDENT 0x07
4149 struct bt_l2cap_smp_central_ident {
4152 } __attribute__ ((packed));
4154 #define BT_L2CAP_SMP_IDENT_INFO 0x08
4155 struct bt_l2cap_smp_ident_info {
4157 } __attribute__ ((packed));
4159 #define BT_L2CAP_SMP_IDENT_ADDR_INFO 0x09
4160 struct bt_l2cap_smp_ident_addr_info {
4163 } __attribute__ ((packed));
4165 #define BT_L2CAP_SMP_SIGNING_INFO 0x0a
4166 struct bt_l2cap_smp_signing_info {
4168 } __attribute__ ((packed));
4170 #define BT_L2CAP_SMP_SECURITY_REQUEST 0x0b
4171 struct bt_l2cap_smp_security_request {
4173 } __attribute__ ((packed));
4175 #define BT_L2CAP_SMP_PUBLIC_KEY 0x0c
4176 struct bt_l2cap_smp_public_key {
4179 } __attribute__ ((packed));
4181 #define BT_L2CAP_SMP_DHKEY_CHECK 0x0d
4182 struct bt_l2cap_smp_dhkey_check {
4184 } __attribute__ ((packed));
4186 #define BT_L2CAP_SMP_KEYPRESS_NOTIFY 0x0e
4187 struct bt_l2cap_smp_keypress_notify {
4189 } __attribute__ ((packed));
4195 } __attribute__ ((packed));