1 /* packet-bthci_vendor.c
2 * Routines for the Bluetooth HCI Vendors Commands/Events
4 * Copyright 2014, Michal Labedzki for Tieto Corporation
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/packet.h>
16 #include <epan/expert.h>
19 #include "packet-bluetooth.h"
20 #include "packet-bthci_cmd.h"
21 #include "packet-bthci_evt.h"
23 static int proto_bthci_vendor_broadcom
;
25 static int hf_broadcom_opcode
;
26 static int hf_broadcom_opcode_ogf
;
27 static int hf_broadcom_opcode_ocf
;
28 static int hf_broadcom_parameter_length
;
29 static int hf_broadcom_number_of_allowed_command_packets
;
30 static int hf_broadcom_event_code
;
31 static int hf_broadcom_le_advertising_filter_subcode
;
32 static int hf_broadcom_le_scan_condition
;
33 static int hf_broadcom_le_filter_index
;
34 static int hf_broadcom_le_number_of_available_filters
;
35 static int hf_broadcom_mem_data
;
36 static int hf_broadcom_mem_address
;
37 static int hf_broadcom_mem_rdlen
;
38 static int hf_broadcom_baudrate
;
39 static int hf_broadcom_status
;
40 static int hf_broadcom_bd_addr
;
41 static int hf_broadcom_max_advertising_instance
;
42 static int hf_broadcom_max_advertising_instance_reserved
;
43 static int hf_broadcom_resolvable_private_address_offloading
;
44 static int hf_broadcom_resolvable_private_address_offloading_reserved
;
45 static int hf_broadcom_total_scan_results
;
46 static int hf_broadcom_max_irk_list
;
47 static int hf_broadcom_filter_support
;
48 static int hf_broadcom_max_filter
;
49 static int hf_broadcom_energy_support
;
50 static int hf_broadcom_version_support
;
51 static int hf_broadcom_total_num_of_advt_tracked
;
52 static int hf_broadcom_extended_scan_support
;
53 static int hf_broadcom_debug_logging_support
;
54 static int hf_broadcom_le_address_generation_offloading_support
;
55 static int hf_broadcom_le_address_generation_offloading_support_reserved
;
56 static int hf_broadcom_a2dp_source_offload_capability_mask
;
57 static int hf_broadcom_a2dp_source_offload_capability_mask_sbc
;
58 static int hf_broadcom_a2dp_source_offload_capability_mask_aac
;
59 static int hf_broadcom_a2dp_source_offload_capability_mask_aptx
;
60 static int hf_broadcom_a2dp_source_offload_capability_mask_aptx_hd
;
61 static int hf_broadcom_a2dp_source_offload_capability_mask_ldac
;
62 static int hf_broadcom_a2dp_source_offload_capability_mask_reserved
;
63 static int hf_broadcom_bluetooth_quality_report_support
;
64 static int hf_broadcom_dynamic_audio_buffer_support_mask
;
65 static int hf_broadcom_dynamic_audio_buffer_support_mask_sbc
;
66 static int hf_broadcom_dynamic_audio_buffer_support_mask_aac
;
67 static int hf_broadcom_dynamic_audio_buffer_support_mask_aptx
;
68 static int hf_broadcom_dynamic_audio_buffer_support_mask_aptx_hd
;
69 static int hf_broadcom_dynamic_audio_buffer_support_mask_ldac
;
70 static int hf_broadcom_dynamic_audio_buffer_support_mask_reserved
;
71 static int hf_broadcom_a2dp_offload_v2_support
;
72 static int hf_broadcom_connection_handle
;
73 static int hf_broadcom_connection_priority
;
74 static int hf_broadcom_sleep_mode
;
75 static int hf_broadcom_host_stack_idle_threshold
;
76 static int hf_broadcom_host_controller_idle_threshold
;
77 static int hf_broadcom_wake_polarity
;
78 static int hf_broadcom_host_wake_polarity
;
79 static int hf_broadcom_allow_host_sleep_during_sco
;
80 static int hf_broadcom_combine_sleep_mode_and_lpm
;
81 static int hf_broadcom_enable_uart_txd_tri_state
;
82 static int hf_broadcom_sleep_guard_time
;
83 static int hf_broadcom_wakeup_guard_time
;
84 static int hf_broadcom_txd_config
;
85 static int hf_broadcom_pulsed_host_wake
;
86 static int hf_broadcom_uart_clock
;
87 static int hf_broadcom_codec_state
;
88 static int hf_broadcom_codec
;
89 static int hf_broadcom_sco_pcm_routing
;
90 static int hf_broadcom_sco_pcm_interface_clock_rate
;
91 static int hf_broadcom_sco_pcm_interface_frame_type
;
92 static int hf_broadcom_sco_pcm_interface_sync_mode
;
93 static int hf_broadcom_sco_pcm_interface_clock_mode
;
94 static int hf_broadcom_pcm_shift_mode
;
95 static int hf_broadcom_pcm_fill_bits
;
96 static int hf_broadcom_pcm_fill_method
;
97 static int hf_broadcom_pcm_fill_number_of_bits
;
98 static int hf_broadcom_pcm_justify_mode
;
99 static int hf_broadcom_sco_i2s_pcm_interface_mode
;
100 static int hf_broadcom_sco_i2s_pcm_interface_role
;
101 static int hf_broadcom_sco_i2s_pcm_interface_sample_rate
;
102 static int hf_broadcom_sco_i2s_pcm_interface_clock_rate
;
103 static int hf_broadcom_le_energy_total_rx_time
;
104 static int hf_broadcom_le_energy_total_tx_time
;
105 static int hf_broadcom_le_energy_total_idle_time
;
106 static int hf_broadcom_le_energy_total_energy_used
;
107 static int hf_broadcom_le_batch_scan_subcode
;
108 static int hf_broadcom_le_batch_scan_report_format
;
109 static int hf_broadcom_le_batch_scan_number_of_records
;
110 static int hf_broadcom_le_batch_scan_mode
;
111 static int hf_broadcom_le_batch_scan_enable
;
112 static int hf_broadcom_le_batch_scan_full_max
;
113 static int hf_broadcom_le_batch_scan_truncate_max
;
114 static int hf_broadcom_le_batch_scan_notify_threshold
;
115 static int hf_broadcom_le_batch_scan_window
;
116 static int hf_broadcom_le_batch_scan_interval
;
117 static int hf_broadcom_le_batch_scan_address_type
;
118 static int hf_broadcom_le_batch_scan_discard_rule
;
119 static int hf_broadcom_le_multi_advertising_subcode
;
120 static int hf_broadcom_le_multi_advertising_enable
;
121 static int hf_broadcom_le_multi_advertising_instance_id
;
122 static int hf_broadcom_le_multi_advertising_type
;
123 static int hf_broadcom_le_multi_advertising_min_interval
;
124 static int hf_broadcom_le_multi_advertising_max_interval
;
125 static int hf_broadcom_le_multi_advertising_address_type
;
126 static int hf_broadcom_le_multi_advertising_filter_policy
;
127 static int hf_broadcom_le_multi_advertising_tx_power
;
128 static int hf_broadcom_le_multi_advertising_channel_map
;
129 static int hf_broadcom_le_multi_advertising_channel_map_reserved
;
130 static int hf_broadcom_le_multi_advertising_channel_map_39
;
131 static int hf_broadcom_le_multi_advertising_channel_map_38
;
132 static int hf_broadcom_le_multi_advertising_channel_map_37
;
133 static int hf_broadcom_hid_emulation_mode
;
134 static int hf_broadcom_vid
;
135 static int hf_broadcom_pid
;
136 static int hf_broadcom_chip_id
;
137 static int hf_broadcom_target_id
;
138 static int hf_broadcom_build_base
;
139 static int hf_broadcom_build_number
;
140 static int hf_broadcom_data
;
141 static int hf_broadcom_a2dp_hardware_offload_subcode
;
142 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec
;
143 static int hf_broadcom_a2dp_hardware_offload_start_legacy_max_latency
;
144 static int hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_flag
;
145 static int hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value
;
146 static int hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved
;
147 static int hf_broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency
;
148 static int hf_broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample
;
149 static int hf_broadcom_a2dp_hardware_offload_start_legacy_channel_mode
;
150 static int hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate
;
151 static int hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified
;
152 static int hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved
;
153 static int hf_broadcom_a2dp_hardware_offload_start_legacy_connection_handle
;
154 static int hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_cid
;
155 static int hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_mtu_size
;
156 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information
;
157 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length
;
158 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands
;
159 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method
;
160 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool
;
161 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool
;
162 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency
;
163 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode
;
164 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved
;
165 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type
;
166 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr
;
167 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved
;
168 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id
;
169 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id
;
170 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index
;
171 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved
;
172 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
;
173 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo
;
174 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual
;
175 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono
;
176 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved
;
177 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved
;
178 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_reserved
;
179 static int hf_broadcom_a2dp_hardware_offload_start_connection_handle
;
180 static int hf_broadcom_a2dp_hardware_offload_start_l2cap_cid
;
181 static int hf_broadcom_a2dp_hardware_offload_start_data_path_direction
;
182 static int hf_broadcom_a2dp_hardware_offload_start_peer_mtu
;
183 static int hf_broadcom_a2dp_hardware_offload_start_cp_enable_scmst
;
184 static int hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst
;
185 static int hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst_reserved
;
186 static int hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters_length
;
187 static int hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters
;
188 static int hf_broadcom_a2dp_hardware_offload_stop_connection_handle
;
189 static int hf_broadcom_a2dp_hardware_offload_stop_l2cap_cid
;
190 static int hf_broadcom_a2dp_hardware_offload_stop_data_path_direction
;
193 static int * const hfx_le_multi_advertising_channel_map
[] = {
194 &hf_broadcom_le_multi_advertising_channel_map_reserved
,
195 &hf_broadcom_le_multi_advertising_channel_map_39
,
196 &hf_broadcom_le_multi_advertising_channel_map_38
,
197 &hf_broadcom_le_multi_advertising_channel_map_37
,
201 static int * const hfx_broadcom_a2dp_source_offload_capability
[] = {
202 &hf_broadcom_a2dp_source_offload_capability_mask_reserved
,
203 &hf_broadcom_a2dp_source_offload_capability_mask_ldac
,
204 &hf_broadcom_a2dp_source_offload_capability_mask_aptx_hd
,
205 &hf_broadcom_a2dp_source_offload_capability_mask_aptx
,
206 &hf_broadcom_a2dp_source_offload_capability_mask_aac
,
207 &hf_broadcom_a2dp_source_offload_capability_mask_sbc
,
211 static int * const hfx_broadcom_dynamic_audio_buffer_support
[] = {
212 &hf_broadcom_dynamic_audio_buffer_support_mask_reserved
,
213 &hf_broadcom_dynamic_audio_buffer_support_mask_ldac
,
214 &hf_broadcom_dynamic_audio_buffer_support_mask_aptx_hd
,
215 &hf_broadcom_dynamic_audio_buffer_support_mask_aptx
,
216 &hf_broadcom_dynamic_audio_buffer_support_mask_aac
,
217 &hf_broadcom_dynamic_audio_buffer_support_mask_sbc
,
221 static int * const hfx_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode
[] = {
222 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved
,
223 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono
,
224 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual
,
225 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo
,
229 static int ett_broadcom
;
230 static int ett_broadcom_opcode
;
231 static int ett_broadcom_channel_map
;
232 static int ett_broadcom_a2dp_source_offload_capability_mask
;
233 static int ett_broadcom_dynamic_audio_buffer_support_mask
;
234 static int ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information
;
235 static int ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
;
237 static expert_field ei_broadcom_undecoded
;
238 static expert_field ei_broadcom_unexpected_parameter
;
239 static expert_field ei_broadcom_unexpected_data
;
241 static dissector_handle_t bthci_vendor_broadcom_handle
;
242 static dissector_handle_t btcommon_ad_handle
;
244 #define BROADCOM_OPCODE_VALS(base) \
245 /* Bluetooth Core 4.0 */ \
246 { (base) | 0x0001, "Write BD ADDR" }, \
247 { (base) | 0x0018, "Update Baudrate" }, \
248 { (base) | 0x001C, "Write SCO PCM INT Parameter" }, \
249 { (base) | 0x001E, "Write PCM Data Format Parameter" }, \
250 { (base) | 0x0027, "Write Sleep Mode" }, \
251 { (base) | 0x002E, "Download MiniDriver" }, \
252 { (base) | 0x003B, "Enable USB HID Emulation" }, \
253 { (base) | 0x0045, "Write UART Clock Setting" }, \
254 { (base) | 0x004C, "Write Memory" }, \
255 { (base) | 0x004D, "Read Memory" }, \
256 { (base) | 0x004E, "Launch RAM" }, \
257 { (base) | 0x0057, "Set ACL Priority" }, \
258 { (base) | 0x005A, "Read VID PID" }, \
259 { (base) | 0x006D, "Write I2S PCM Interface Parameter" }, \
260 { (base) | 0x0079, "Read Verbose Config Version Info" }, \
261 { (base) | 0x007E, "Enable WBS" }, \
262 { (base) | 0x0102, "Enable WBS Modified" }, \
263 { (base) | 0x0111, "Set ConnectionLess Broadcast Stream" }, \
264 { (base) | 0x0112, "Receive ConnectionLess Broadcast Stream" }, \
265 { (base) | 0x0113, "Write ConnectionLess Broadcast Stream Data" }, \
266 { (base) | 0x0114, "ConnectionLess Broadcast Stream Flush" }, \
267 { (base) | 0x0153, "LE Get Vendor Capabilities" }, \
268 { (base) | 0x0154, "LE Multi Advertising" }, \
269 { (base) | 0x0156, "LE Batch Scan" }, \
270 { (base) | 0x0157, "LE Advertising Filter" }, \
271 { (base) | 0x0158, "LE Tracking Advertising" }, \
272 { (base) | 0x0159, "LE Energy Info" }, \
273 { (base) | 0x015D, "A2DP Hardware Offload" }
275 static const value_string broadcom_opcode_ocf_vals
[] = {
276 BROADCOM_OPCODE_VALS(0x0),
280 static const value_string broadcom_opcode_vals
[] = {
281 BROADCOM_OPCODE_VALS(0x3F << 10),
285 static const value_string broadcom_le_subcode_advertising_filter_vals
[] = {
287 { 0x01, "Feature Select" },
290 { 0x04, "Solicitate UUID" },
291 { 0x05, "Local Name" },
292 { 0x06, "Manufacturer Data" },
293 { 0x07, "Service Data" },
298 static const value_string broadcom_le_scan_condition_vals
[] = {
305 static const value_string broadcom_uart_clock_vals
[] = {
311 static const value_string broadcom_sleep_mode_vals
[] = {
318 static const value_string broadcom_wake_polarity_vals
[] = {
319 { 0x00, "Active Low" },
320 { 0x01, "Active High" },
324 static const value_string broadcom_connection_priority_vals
[] = {
330 static const value_string broadcom_codec_state_vals
[] = {
336 static const value_string broadcom_codec_vals
[] = {
343 static const value_string broadcom_sco_pcm_routing_vals
[] = {
345 { 0x01, "Transport" },
351 static const value_string broadcom_sco_pcm_interface_clock_rate_vals
[] = {
360 static const value_string broadcom_sco_pcm_interface_frame_type_vals
[] = {
366 static const value_string broadcom_mode_peripheral_central_vals
[] = {
367 { 0x00, "Peripheral" },
372 static const value_string broadcom_pcm_shift_mode_vals
[] = {
378 static const value_string broadcom_pcm_fill_method_vals
[] = {
382 { 0x03, "Programmable" },
386 static const value_string broadcom_pcm_justify_mode_vals
[] = {
392 static const value_string broadcom_sco_i2s_pcm_interface_mode_vals
[] = {
398 static const value_string broadcom_sco_i2s_pcm_interface_sample_rate_vals
[] = {
405 static const value_string broadcom_sco_i2s_pcm_interface_clock_rate_vals
[] = {
414 static const value_string broadcom_le_subcode_batch_scan_vals
[] = {
415 { 0x01, "Enable/Disable Customer Feature" },
416 { 0x02, "Set Storage Parameter" },
417 { 0x03, "Set Parameter" },
418 { 0x04, "Read Results" },
422 static const value_string broadcom_batch_scan_mode_vals
[] = {
426 { 0x03, "Pass ACTI" },
430 static const value_string broadcom_batch_scan_discard_rule_vals
[] = {
431 { 0x00, "Old Items" },
432 { 0x01, "Lower RSSI Items" },
436 static const value_string broadcom_disable_enable_vals
[] = {
442 static const value_string broadcom_le_subcode_multi_advertising_vals
[] = {
443 { 0x01, "Set Parameter" },
444 { 0x02, "Write Advertising Data" },
445 { 0x03, "Write Scan Response Data" },
446 { 0x04, "Set Random Address" },
447 { 0x05, "MultiAdvertising Enable/Disable Customer Feature" },
451 static const value_string broadcom_le_filter_policy_vals
[] = {
452 { 0x00, "All Connections" },
453 { 0x01, "Whitelist Connections All" },
454 { 0x02, "All Connections Whitelist" },
455 { 0x03, "Whitelist Connections" },
459 static const value_string broadcom_hid_emulation_mode_vals
[] = {
460 { 0x00, "Bluetooth" },
465 static const value_string broadcom_target_id_vals
[] = {
467 { 0xFF, "Undefined" },
471 static const value_string broadcom_a2dp_hardware_offload_vals
[] = {
472 { 0x01, "Start A2DP offload (legacy)" },
473 { 0x02, "Stop A2DP offload (legacy)" },
474 { 0x03, "Start A2DP offload" },
475 { 0x04, "Stop A2DP offload" },
479 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_vals
[] = {
488 static const value_string broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency_vals
[] = {
489 { 0x00000001, "44100 Hz" },
490 { 0x00000002, "48000 Hz" },
491 { 0x00000004, "88200 Hz" },
492 { 0x00000008, "96000 Hz" },
496 static const value_string broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample_vals
[] = {
497 { 0x01, "16 bits per sample" },
498 { 0x02, "24 bits per sample" },
499 { 0x04, "32 bits per sample" },
503 static const value_string broadcom_a2dp_hardware_offload_start_legacy_channel_mode_vals
[] = {
509 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length_vals
[] = {
517 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands_vals
[] = {
523 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method_vals
[] = {
524 { 0x01, "Loudness" },
529 static const value_string broadcom_a2dp_hardware_offload_start_legacy_sbc_sampling_frequency_vals
[] = {
530 { 0x01, "48000 Hz" },
531 { 0x02, "44100 Hz" },
532 { 0x04, "32000 Hz" },
533 { 0x08, "16000 Hz" },
537 static const value_string broadcom_a2dp_hardware_offload_start_legacy_sbc_channel_mode_vals
[] = {
538 { 0x01, "Joint Stereo" },
540 { 0x04, "Dual Channel" },
545 static const value_string broadcom_a2dp_hardware_offload_data_path_direction_vals
[] = {
546 { 0x00, "Output (AVDTP Source/Merge)" },
547 { 0x01, "Input (AVDTP Sink/Split)" },
551 static const value_string broadcom_a2dp_hardware_offload_start_legacy_aac_object_type_vals
[] = {
552 { 0x01, "RFA (b0)" },
553 { 0x02, "RFA (b1)" },
554 { 0x04, "RFA (b2)" },
555 { 0x08, "RFA (b3)" },
556 { 0x10, "MPEG-4 AAC scalable" },
557 { 0x20, "MPEG-4 AAC LTP" },
558 { 0x40, "MPEG-4 AAC LC" },
559 { 0x80, "MPEG-2 AAC LC" },
563 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_vals
[] = {
567 { 0x7f, "ABR (Adaptive Bit Rate)" },
571 void proto_register_bthci_vendor_broadcom(void);
572 void proto_reg_handoff_bthci_vendor_broadcom(void);
575 dissect_bthci_vendor_broadcom(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
577 proto_item
*main_item
;
578 proto_tree
*main_tree
;
579 proto_item
*opcode_item
;
580 proto_tree
*opcode_tree
;
581 proto_item
*sub_item
;
582 bluetooth_data_t
*bluetooth_data
;
586 const char *description
;
593 uint32_t interface_id
;
595 proto_item
*codec_information_item
;
596 proto_tree
*codec_information_tree
;
598 bluetooth_data
= (bluetooth_data_t
*) data
;
599 if (bluetooth_data
) {
600 interface_id
= bluetooth_data
->interface_id
;
601 adapter_id
= bluetooth_data
->adapter_id
;
603 interface_id
= HCI_INTERFACE_DEFAULT
;
604 adapter_id
= HCI_ADAPTER_DEFAULT
;
607 main_item
= proto_tree_add_item(tree
, proto_bthci_vendor_broadcom
, tvb
, 0, -1, ENC_NA
);
608 main_tree
= proto_item_add_subtree(main_item
, ett_broadcom
);
610 switch (pinfo
->p2p_dir
) {
613 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HCI_CMD_BROADCOM");
614 col_set_str(pinfo
->cinfo
, COL_INFO
, "Sent Broadcom ");
616 opcode_item
= proto_tree_add_item(main_tree
, hf_broadcom_opcode
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
617 opcode_tree
= proto_item_add_subtree(opcode_item
, ett_broadcom_opcode
);
618 opcode
= tvb_get_letohs(tvb
, offset
);
619 proto_tree_add_item(opcode_tree
, hf_broadcom_opcode_ogf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
621 proto_tree_add_item(opcode_tree
, hf_broadcom_opcode_ocf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
622 ocf
= opcode
& 0x03ff;
625 description
= val_to_str_const(ocf
, broadcom_opcode_ocf_vals
, "unknown");
626 if (g_strcmp0(description
, "unknown") != 0)
627 col_append_str(pinfo
->cinfo
, COL_INFO
, description
);
629 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Unknown Command 0x%04X (opcode 0x%04X)", ocf
, opcode
);
631 if (have_tap_listener(bluetooth_hci_summary_tap
)) {
632 bluetooth_hci_summary_tap_t
*tap_hci_summary
;
634 tap_hci_summary
= wmem_new(pinfo
->pool
, bluetooth_hci_summary_tap_t
);
635 tap_hci_summary
->interface_id
= interface_id
;
636 tap_hci_summary
->adapter_id
= adapter_id
;
638 tap_hci_summary
->type
= BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE
;
639 tap_hci_summary
->ogf
= opcode
>> 10;
640 tap_hci_summary
->ocf
= ocf
;
641 if (try_val_to_str(ocf
, broadcom_opcode_ocf_vals
))
642 tap_hci_summary
->name
= description
;
644 tap_hci_summary
->name
= NULL
;
645 tap_queue_packet(bluetooth_hci_summary_tap
, pinfo
, tap_hci_summary
);
648 proto_tree_add_item(main_tree
, hf_broadcom_parameter_length
, tvb
, offset
, 1, ENC_NA
);
649 length
= tvb_get_uint8(tvb
, offset
);
653 case 0x0001: /* Write BDADDR */
654 offset
= dissect_bd_addr(hf_broadcom_bd_addr
, pinfo
, main_tree
, tvb
, offset
, true, interface_id
, adapter_id
, bd_addr
);
656 /* TODO: This is command, but in respose (event Command Complete) there is a status for that,
657 so write bdaddr can fail, but we store bdaddr as valid for now... */
658 if (!pinfo
->fd
->visited
&& bluetooth_data
) {
659 wmem_tree_key_t key
[4];
660 uint32_t frame_number
;
661 localhost_bdaddr_entry_t
*localhost_bdaddr_entry
;
663 frame_number
= pinfo
->num
;
666 key
[0].key
= &interface_id
;
668 key
[1].key
= &adapter_id
;
670 key
[2].key
= &frame_number
;
674 localhost_bdaddr_entry
= (localhost_bdaddr_entry_t
*) wmem_new(wmem_file_scope(), localhost_bdaddr_entry_t
);
675 localhost_bdaddr_entry
->interface_id
= interface_id
;
676 localhost_bdaddr_entry
->adapter_id
= adapter_id
;
677 memcpy(localhost_bdaddr_entry
->bd_addr
, bd_addr
, 6);
678 wmem_tree_insert32_array(bluetooth_data
->localhost_bdaddr
, key
, localhost_bdaddr_entry
);
681 case 0x0018: /* Update Baudrate */
682 /* TODO: Implement - two unknown parameters... */
683 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, 1, ENC_NA
);
684 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
687 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, 1, ENC_NA
);
688 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
691 proto_tree_add_item(main_tree
, hf_broadcom_baudrate
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
695 case 0x001C: /* Write SCO PCM INT Parameter */
696 proto_tree_add_item(main_tree
, hf_broadcom_sco_pcm_routing
, tvb
, offset
, 1, ENC_NA
);
699 proto_tree_add_item(main_tree
, hf_broadcom_sco_pcm_interface_clock_rate
, tvb
, offset
, 1, ENC_NA
);
702 proto_tree_add_item(main_tree
, hf_broadcom_sco_pcm_interface_frame_type
, tvb
, offset
, 1, ENC_NA
);
705 proto_tree_add_item(main_tree
, hf_broadcom_sco_pcm_interface_sync_mode
, tvb
, offset
, 1, ENC_NA
);
708 proto_tree_add_item(main_tree
, hf_broadcom_sco_pcm_interface_clock_mode
, tvb
, offset
, 1, ENC_NA
);
712 case 0x001E: /* Write PCM Data Format Parameter */
713 proto_tree_add_item(main_tree
, hf_broadcom_pcm_shift_mode
, tvb
, offset
, 1, ENC_NA
);
716 proto_tree_add_item(main_tree
, hf_broadcom_pcm_fill_bits
, tvb
, offset
, 1, ENC_NA
);
719 proto_tree_add_item(main_tree
, hf_broadcom_pcm_fill_method
, tvb
, offset
, 1, ENC_NA
);
722 proto_tree_add_item(main_tree
, hf_broadcom_pcm_fill_number_of_bits
, tvb
, offset
, 1, ENC_NA
);
725 proto_tree_add_item(main_tree
, hf_broadcom_pcm_justify_mode
, tvb
, offset
, 1, ENC_NA
);
729 case 0x0027: /* Write Sleep Mode */
730 proto_tree_add_item(main_tree
, hf_broadcom_sleep_mode
, tvb
, offset
, 1, ENC_NA
);
733 proto_tree_add_item(main_tree
, hf_broadcom_host_stack_idle_threshold
, tvb
, offset
, 1, ENC_NA
);
736 proto_tree_add_item(main_tree
, hf_broadcom_host_controller_idle_threshold
, tvb
, offset
, 1, ENC_NA
);
739 proto_tree_add_item(main_tree
, hf_broadcom_wake_polarity
, tvb
, offset
, 1, ENC_NA
);
742 proto_tree_add_item(main_tree
, hf_broadcom_host_wake_polarity
, tvb
, offset
, 1, ENC_NA
);
745 proto_tree_add_item(main_tree
, hf_broadcom_allow_host_sleep_during_sco
, tvb
, offset
, 1, ENC_NA
);
748 proto_tree_add_item(main_tree
, hf_broadcom_combine_sleep_mode_and_lpm
, tvb
, offset
, 1, ENC_NA
);
751 proto_tree_add_item(main_tree
, hf_broadcom_enable_uart_txd_tri_state
, tvb
, offset
, 1, ENC_NA
);
754 proto_tree_add_item(main_tree
, hf_broadcom_sleep_guard_time
, tvb
, offset
, 1, ENC_NA
);
757 proto_tree_add_item(main_tree
, hf_broadcom_wakeup_guard_time
, tvb
, offset
, 1, ENC_NA
);
760 proto_tree_add_item(main_tree
, hf_broadcom_txd_config
, tvb
, offset
, 1, ENC_NA
);
763 proto_tree_add_item(main_tree
, hf_broadcom_pulsed_host_wake
, tvb
, offset
, 1, ENC_NA
);
767 case 0x003B: /* Enable USB HID Emulation */
768 proto_tree_add_item(main_tree
, hf_broadcom_hid_emulation_mode
, tvb
, offset
, 1, ENC_NA
);
772 case 0x0045: /* Write UART Clock Setting */
773 proto_tree_add_item(main_tree
, hf_broadcom_uart_clock
, tvb
, offset
, 1, ENC_NA
);
777 case 0x004C: /* Write Memory */
778 proto_tree_add_item(main_tree
, hf_broadcom_mem_address
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
781 proto_tree_add_item(main_tree
, hf_broadcom_mem_data
, tvb
, offset
, length
- 4, ENC_NA
);
782 offset
+= length
- 4;
784 case 0x004D: /* Read RAM */
785 proto_tree_add_item(main_tree
, hf_broadcom_mem_address
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
788 proto_tree_add_item(main_tree
, hf_broadcom_mem_rdlen
, tvb
, offset
, 1, ENC_NA
);
791 case 0x004E: /* Launch RAM */
792 proto_tree_add_item(main_tree
, hf_broadcom_mem_address
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
796 case 0x0057: /* Set ACL Priority */
797 proto_tree_add_item(main_tree
, hf_broadcom_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
800 proto_tree_add_item(main_tree
, hf_broadcom_connection_priority
, tvb
, offset
, 1, ENC_NA
);
804 case 0x006D: /* Write I2S PCM Interface Parameter */
805 proto_tree_add_item(main_tree
, hf_broadcom_sco_i2s_pcm_interface_mode
, tvb
, offset
, 1, ENC_NA
);
808 proto_tree_add_item(main_tree
, hf_broadcom_sco_i2s_pcm_interface_role
, tvb
, offset
, 1, ENC_NA
);
811 proto_tree_add_item(main_tree
, hf_broadcom_sco_i2s_pcm_interface_sample_rate
, tvb
, offset
, 1, ENC_NA
);
814 proto_tree_add_item(main_tree
, hf_broadcom_sco_i2s_pcm_interface_clock_rate
, tvb
, offset
, 1, ENC_NA
);
818 case 0x007E: /* Enable WBS */
819 proto_tree_add_item(main_tree
, hf_broadcom_codec_state
, tvb
, offset
, 1, ENC_NA
);
820 status
= tvb_get_uint8(tvb
, offset
);
823 if (status
== 0x01) { /* Enable */
824 proto_tree_add_item(main_tree
, hf_broadcom_codec
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
828 case 0x0154: /* LE Multi Advertising */
829 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_subcode
, tvb
, offset
, 1, ENC_NA
);
830 subcode
= tvb_get_uint8(tvb
, offset
);
834 case 0x01: /* Set Parameter */
835 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_min_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
838 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_max_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
841 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_type
, tvb
, offset
, 1, ENC_NA
);
844 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_address_type
, tvb
, offset
, 1, ENC_NA
);
847 offset
= dissect_bd_addr(hf_broadcom_bd_addr
, pinfo
, main_tree
, tvb
, offset
, false, interface_id
, adapter_id
, NULL
);
849 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_address_type
, tvb
, offset
, 1, ENC_NA
);
852 offset
= dissect_bd_addr(hf_broadcom_bd_addr
, pinfo
, main_tree
, tvb
, offset
, false, interface_id
, adapter_id
, NULL
);
854 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_broadcom_le_multi_advertising_channel_map
, ett_broadcom_channel_map
, hfx_le_multi_advertising_channel_map
, ENC_NA
);
857 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_filter_policy
, tvb
, offset
, 1, ENC_NA
);
860 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
863 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_tx_power
, tvb
, offset
, 1, ENC_NA
);
867 case 0x02: /* Write Advertising Data */
868 case 0x03: /* Write Scan Response Data */
869 call_dissector_with_data(btcommon_ad_handle
, tvb_new_subset_length(tvb
, offset
, 31), pinfo
, tree
, bluetooth_data
);
870 save_local_device_name_from_eir_ad(tvb
, offset
, pinfo
, 31, bluetooth_data
);
873 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
877 case 0x04: /* Set Random Address */
878 offset
= dissect_bd_addr(hf_broadcom_bd_addr
, pinfo
, main_tree
, tvb
, offset
, false, interface_id
, adapter_id
, NULL
);
880 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
884 case 0x05: /* MultiAdvertising Enable/Disable Customer Feature */
885 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_enable
, tvb
, offset
, 1, ENC_NA
);
888 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
895 case 0x0156: /* LE Batch Scan */
896 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_subcode
, tvb
, offset
, 1, ENC_NA
);
897 subcode
= tvb_get_uint8(tvb
, offset
);
901 case 0x01: /* Enable/Disable Customer Feature */
902 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_enable
, tvb
, offset
, 1, ENC_NA
);
906 case 0x02: /* Set Storage Parameter */
907 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_full_max
, tvb
, offset
, 1, ENC_NA
);
910 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_truncate_max
, tvb
, offset
, 1, ENC_NA
);
913 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_notify_threshold
, tvb
, offset
, 1, ENC_NA
);
917 case 0x03: /* Set Parameter */
918 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_mode
, tvb
, offset
, 1, ENC_NA
);
921 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_window
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
924 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_interval
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
927 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_address_type
, tvb
, offset
, 1, ENC_NA
);
930 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_discard_rule
, tvb
, offset
, 1, ENC_NA
);
934 case 0x04: /* Read Results */
935 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_mode
, tvb
, offset
, 1, ENC_NA
);
942 case 0x0157: /* LE Advertising Filter */
943 proto_tree_add_item(main_tree
, hf_broadcom_le_advertising_filter_subcode
, tvb
, offset
, 1, ENC_NA
);
944 subcode
= tvb_get_uint8(tvb
, offset
);
947 proto_tree_add_item(main_tree
, hf_broadcom_le_scan_condition
, tvb
, offset
, 1, ENC_NA
);
948 condition
= tvb_get_uint8(tvb
, offset
);
951 proto_tree_add_item(main_tree
, hf_broadcom_le_filter_index
, tvb
, offset
, 1, ENC_NA
);
954 if (condition
== 0x00) { /* Add */
956 case 0x00: /* Enable */
957 case 0x01: /* Feature Select */
958 case 0x02: /* BDADDR */
959 case 0x03: /* UUID */
960 case 0x04: /* Solicitate UUID */
961 case 0x05: /* Local Name */
962 case 0x06: /* Manufacturer Data */
963 case 0x07: /* Service Data */
966 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
- 3, ENC_NA
);
967 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
968 offset
+= length
- 3;
972 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
- 3, ENC_NA
);
973 expert_add_info(pinfo
, sub_item
, &ei_broadcom_unexpected_data
);
974 offset
+= length
- 3;
979 case 0x0102: /* Enable WBS Modified */
980 case 0x0111: /* Set ConnectionLess Broadcast Stream */
981 case 0x0112: /* Receive ConnectionLess Broadcast Stream */
982 case 0x0113: /* Write ConnectionLess Broadcast Stream Data */
983 case 0x0114: /* ConnectionLess Broadcast Stream Flush */
984 case 0x0158: /* LE Tracking Advertising */
985 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
986 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
991 case 0x002E: /* Download MiniDriver */
992 case 0x005A: /* Read VID PID */
993 case 0x0079: /* Read Verbose Config Version Info */
994 case 0x0153: /* LE Get Vendor Capabilities */
995 case 0x0159: /* LE Energy Info */
996 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
997 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
998 expert_add_info(pinfo
, sub_item
, &ei_broadcom_unexpected_parameter
);
1001 case 0x015D: /* A2DP Hardware Offload */
1002 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_subcode
, tvb
, offset
, 1, ENC_NA
);
1003 subcode
= tvb_get_uint8(tvb
, offset
);
1007 case 0x01: { /* Start A2DP offload (legacy) */
1008 int codec_id
= tvb_get_uint32(tvb
, offset
, ENC_LITTLE_ENDIAN
);
1010 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1013 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_max_latency
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1016 /* Flag is the LSB out of the two, read it first */
1017 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_flag
, tvb
, offset
, 1, ENC_NA
);
1020 bool scms_t_enabled
= tvb_get_uint8(tvb
, offset
) == 0x01;
1021 if (scms_t_enabled
) {
1022 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value
, tvb
, offset
, 1, ENC_NA
);
1024 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved
, tvb
, offset
, 1, ENC_NA
);
1028 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1031 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample
, tvb
, offset
, 1, ENC_NA
);
1034 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_channel_mode
, tvb
, offset
, 1, ENC_NA
);
1037 uint32_t encoded_audio_bitrate
= tvb_get_uint32(tvb
, offset
, ENC_LITTLE_ENDIAN
);
1038 if (encoded_audio_bitrate
== 0x00000000) {
1039 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1040 } else if (encoded_audio_bitrate
>= 0x01000000) {
1041 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1043 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1047 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1050 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_cid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1053 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_mtu_size
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1056 codec_information_item
= proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information
, tvb
, offset
, 32, ENC_NA
);
1057 codec_information_tree
= proto_item_add_subtree(codec_information_item
, ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information
);
1060 case 0x00000001: /* SBC */
1061 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length
, tvb
, offset
, 1, ENC_NA
);
1062 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands
, tvb
, offset
, 1, ENC_NA
);
1063 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method
, tvb
, offset
, 1, ENC_NA
);
1066 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool
, tvb
, offset
, 1, ENC_NA
);
1069 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool
, tvb
, offset
, 1, ENC_NA
);
1072 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency
, tvb
, offset
, 1, ENC_NA
);
1073 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode
, tvb
, offset
, 1, ENC_NA
);
1076 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved
, tvb
, offset
, 28, ENC_NA
);
1079 case 0x00000002: /* AAC */
1080 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type
, tvb
, offset
, 1, ENC_NA
);
1083 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr
, tvb
, offset
, 1, ENC_NA
);
1086 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved
, tvb
, offset
, 30, ENC_NA
);
1089 case 0x00000010: /* LDAC */
1090 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1093 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1096 uint8_t bitrate_index
= tvb_get_uint8(tvb
, offset
);
1097 if (bitrate_index
>= 0x03 && bitrate_index
!= 0x7F) {
1098 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved
, tvb
, offset
, 1, ENC_NA
);
1100 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index
, tvb
, offset
, 1, ENC_NA
);
1104 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
,
1105 ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
, hfx_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode
, ENC_NA
);
1108 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved
, tvb
, offset
, 24, ENC_NA
);
1111 default: /* All other codecs */
1112 proto_tree_add_item(codec_information_tree
, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_reserved
, tvb
, offset
, 32, ENC_NA
);
1119 case 0x02: { /* Stop A2DP offload (legacy) */
1120 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1121 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
1122 expert_add_info(pinfo
, sub_item
, &ei_broadcom_unexpected_parameter
);
1123 offset
+= tvb_captured_length_remaining(tvb
, offset
);
1127 case 0x03: { /* Start A2DP offload */
1128 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1131 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_l2cap_cid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1134 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_data_path_direction
, tvb
, offset
, 1, ENC_NA
);
1137 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_peer_mtu
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1140 bool cp_enable_scmst
= tvb_get_uint8(tvb
, offset
) == 0x01;
1141 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_cp_enable_scmst
, tvb
, offset
, 1, ENC_NA
);
1144 if (cp_enable_scmst
) {
1145 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst
, tvb
, offset
, 1, ENC_NA
);
1147 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst_reserved
, tvb
, offset
, 1, ENC_NA
);
1151 uint8_t vendor_specific_parameters_length
= tvb_get_uint8(tvb
, offset
);
1152 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters_length
, tvb
, offset
, 1, ENC_NA
);
1155 if (vendor_specific_parameters_length
> 0 && vendor_specific_parameters_length
<= 128) {
1156 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters
, tvb
, offset
, vendor_specific_parameters_length
, ENC_NA
);
1157 offset
+= vendor_specific_parameters_length
;
1161 case 0x04: { /* Stop A2DP offload */
1162 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_stop_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1165 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_stop_l2cap_cid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1168 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_stop_data_path_direction
, tvb
, offset
, 1, ENC_NA
);
1174 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1175 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
1176 expert_add_info(pinfo
, sub_item
, &ei_broadcom_unexpected_parameter
);
1177 offset
+= tvb_captured_length_remaining(tvb
, offset
);
1185 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
1186 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
1193 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HCI_EVT_BROADCOM");
1194 col_set_str(pinfo
->cinfo
, COL_INFO
, "Rcvd Broadcom ");
1196 event_code
= tvb_get_uint8(tvb
, offset
);
1197 description
= val_to_str_ext(event_code
, &bthci_evt_evt_code_vals_ext
, "Unknown 0x%08x");
1198 col_append_str(pinfo
->cinfo
, COL_INFO
, description
);
1199 proto_tree_add_item(main_tree
, hf_broadcom_event_code
, tvb
, offset
, 1, ENC_NA
);
1202 if (have_tap_listener(bluetooth_hci_summary_tap
)) {
1203 bluetooth_hci_summary_tap_t
*tap_hci_summary
;
1205 tap_hci_summary
= wmem_new(pinfo
->pool
, bluetooth_hci_summary_tap_t
);
1206 tap_hci_summary
->interface_id
= interface_id
;
1207 tap_hci_summary
->adapter_id
= adapter_id
;
1209 tap_hci_summary
->type
= BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT
;
1210 tap_hci_summary
->event
= event_code
;
1211 if (try_val_to_str_ext(event_code
, &bthci_evt_evt_code_vals_ext
))
1212 tap_hci_summary
->name
= description
;
1214 tap_hci_summary
->name
= NULL
;
1215 tap_queue_packet(bluetooth_hci_summary_tap
, pinfo
, tap_hci_summary
);
1218 proto_tree_add_item(main_tree
, hf_broadcom_parameter_length
, tvb
, offset
, 1, ENC_NA
);
1219 length
= tvb_get_uint8(tvb
, offset
);
1222 switch (event_code
) {
1223 case 0x0e: /* Command Complete */
1224 proto_tree_add_item(main_tree
, hf_broadcom_number_of_allowed_command_packets
, tvb
, offset
, 1, ENC_NA
);
1227 opcode_item
= proto_tree_add_item(main_tree
, hf_broadcom_opcode
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1228 opcode_tree
= proto_item_add_subtree(opcode_item
, ett_broadcom_opcode
);
1229 opcode
= tvb_get_letohs(tvb
, offset
);
1230 proto_tree_add_item(opcode_tree
, hf_broadcom_opcode_ogf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1232 proto_tree_add_item(opcode_tree
, hf_broadcom_opcode_ocf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1233 ocf
= opcode
& 0x03ff;
1236 description
= val_to_str_const(ocf
, broadcom_opcode_ocf_vals
, "unknown");
1237 if (g_strcmp0(description
, "unknown") != 0)
1238 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (%s)", description
);
1240 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (Unknown Command 0x%04X [opcode 0x%04X])", ocf
, opcode
);
1242 if (have_tap_listener(bluetooth_hci_summary_tap
)) {
1243 bluetooth_hci_summary_tap_t
*tap_hci_summary
;
1245 tap_hci_summary
= wmem_new(pinfo
->pool
, bluetooth_hci_summary_tap_t
);
1246 tap_hci_summary
->interface_id
= interface_id
;
1247 tap_hci_summary
->adapter_id
= adapter_id
;
1249 tap_hci_summary
->type
= BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT_OPCODE
;
1250 tap_hci_summary
->ogf
= opcode
>> 10;
1251 tap_hci_summary
->ocf
= ocf
;
1252 if (try_val_to_str(ocf
, broadcom_opcode_ocf_vals
))
1253 tap_hci_summary
->name
= description
;
1255 tap_hci_summary
->name
= NULL
;
1256 tap_queue_packet(bluetooth_hci_summary_tap
, pinfo
, tap_hci_summary
);
1259 proto_tree_add_item(main_tree
, hf_broadcom_status
, tvb
, offset
, 1, ENC_NA
);
1260 status
= tvb_get_uint8(tvb
, offset
);
1264 case 0x004D: /* Read Memory */
1265 if (status
== STATUS_SUCCESS
) {
1266 proto_tree_add_item(main_tree
, hf_broadcom_mem_data
, tvb
, offset
, length
, ENC_NA
);
1270 case 0x005A: /* Read VID PID */
1271 proto_tree_add_item(main_tree
, hf_broadcom_vid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1274 proto_tree_add_item(main_tree
, hf_broadcom_pid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1278 case 0x0079: /* Read Verbose Config Version Info */
1279 proto_tree_add_item(main_tree
, hf_broadcom_chip_id
, tvb
, offset
, 1, ENC_NA
);
1282 proto_tree_add_item(main_tree
, hf_broadcom_target_id
, tvb
, offset
, 1, ENC_NA
);
1285 proto_tree_add_item(main_tree
, hf_broadcom_build_base
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1288 proto_tree_add_item(main_tree
, hf_broadcom_build_number
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1292 case 0x0153: /* LE Get Vendor Capabilities */
1293 if (status
!= STATUS_SUCCESS
)
1296 uint16_t google_feature_spec_version
= tvb_get_uint16(tvb
, offset
+ 8, ENC_LITTLE_ENDIAN
);
1297 if (google_feature_spec_version
< 0x0098) {
1298 proto_tree_add_item(main_tree
, hf_broadcom_max_advertising_instance
, tvb
, offset
, 1, ENC_NA
);
1300 proto_tree_add_item(main_tree
, hf_broadcom_max_advertising_instance_reserved
, tvb
, offset
, 1, ENC_NA
);
1304 if (google_feature_spec_version
< 0x0098) {
1305 proto_tree_add_item(main_tree
, hf_broadcom_resolvable_private_address_offloading
, tvb
, offset
, 1, ENC_NA
);
1307 proto_tree_add_item(main_tree
, hf_broadcom_resolvable_private_address_offloading_reserved
, tvb
, offset
, 1, ENC_NA
);
1311 proto_tree_add_item(main_tree
, hf_broadcom_total_scan_results
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1314 proto_tree_add_item(main_tree
, hf_broadcom_max_irk_list
, tvb
, offset
, 1, ENC_NA
);
1317 proto_tree_add_item(main_tree
, hf_broadcom_filter_support
, tvb
, offset
, 1, ENC_NA
);
1320 proto_tree_add_item(main_tree
, hf_broadcom_max_filter
, tvb
, offset
, 1, ENC_NA
);
1323 proto_tree_add_item(main_tree
, hf_broadcom_energy_support
, tvb
, offset
, 1, ENC_NA
);
1326 proto_tree_add_item(main_tree
, hf_broadcom_version_support
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1329 proto_tree_add_item(main_tree
, hf_broadcom_total_num_of_advt_tracked
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1332 proto_tree_add_item(main_tree
, hf_broadcom_extended_scan_support
, tvb
, offset
, 1, ENC_NA
);
1335 proto_tree_add_item(main_tree
, hf_broadcom_debug_logging_support
, tvb
, offset
, 1, ENC_NA
);
1338 if (google_feature_spec_version
< 0x0098) {
1339 proto_tree_add_item(main_tree
, hf_broadcom_le_address_generation_offloading_support
, tvb
, offset
, 1, ENC_NA
);
1341 proto_tree_add_item(main_tree
, hf_broadcom_le_address_generation_offloading_support_reserved
, tvb
, offset
, 1, ENC_NA
);
1345 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_broadcom_a2dp_source_offload_capability_mask
, ett_broadcom_a2dp_source_offload_capability_mask
, hfx_broadcom_a2dp_source_offload_capability
, ENC_LITTLE_ENDIAN
);
1348 proto_tree_add_item(main_tree
, hf_broadcom_bluetooth_quality_report_support
, tvb
, offset
, 1, ENC_NA
);
1351 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_broadcom_dynamic_audio_buffer_support_mask
, ett_broadcom_dynamic_audio_buffer_support_mask
, hfx_broadcom_dynamic_audio_buffer_support
, ENC_LITTLE_ENDIAN
);
1354 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1355 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_offload_v2_support
, tvb
, offset
, 1, ENC_NA
);
1360 case 0x0154: /* LE Multi Advertising */
1361 proto_tree_add_item(main_tree
, hf_broadcom_le_multi_advertising_subcode
, tvb
, offset
, 1, ENC_NA
);
1365 case 0x0156: /* LE Batch Scan */
1366 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_subcode
, tvb
, offset
, 1, ENC_NA
);
1367 subcode
= tvb_get_uint8(tvb
, offset
);
1370 if (subcode
== 0x04 && status
== STATUS_SUCCESS
) { /* Read Results*/
1371 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_report_format
, tvb
, offset
, 1, ENC_NA
);
1374 proto_tree_add_item(main_tree
, hf_broadcom_le_batch_scan_number_of_records
, tvb
, offset
, 1, ENC_NA
);
1380 case 0x0157: /* LE Advertising Filter */
1381 proto_tree_add_item(main_tree
, hf_broadcom_le_advertising_filter_subcode
, tvb
, offset
, 1, ENC_NA
);
1384 if (status
== STATUS_SUCCESS
) {
1385 proto_tree_add_item(main_tree
, hf_broadcom_le_scan_condition
, tvb
, offset
, 1, ENC_NA
);
1388 proto_tree_add_item(main_tree
, hf_broadcom_le_number_of_available_filters
, tvb
, offset
, 1, ENC_NA
);
1393 case 0x0159: /* LE Energy Info */
1394 if (status
== STATUS_SUCCESS
) {
1395 proto_tree_add_item(main_tree
, hf_broadcom_le_energy_total_rx_time
, tvb
, offset
, 1, ENC_NA
);
1398 proto_tree_add_item(main_tree
, hf_broadcom_le_energy_total_tx_time
, tvb
, offset
, 1, ENC_NA
);
1401 proto_tree_add_item(main_tree
, hf_broadcom_le_energy_total_idle_time
, tvb
, offset
, 1, ENC_NA
);
1404 proto_tree_add_item(main_tree
, hf_broadcom_le_energy_total_energy_used
, tvb
, offset
, 1, ENC_NA
);
1409 case 0x015D: /* A2DP Hardware Offload */
1410 proto_tree_add_item(main_tree
, hf_broadcom_a2dp_hardware_offload_subcode
, tvb
, offset
, 1, ENC_NA
);
1414 case 0x0102: /* Enable WBS Modified */
1415 case 0x0111: /* Set ConnectionLess Broadcast Stream */
1416 case 0x0112: /* Receive ConnectionLess Broadcast Stream */
1417 case 0x0113: /* Write ConnectionLess Broadcast Stream Data */
1418 case 0x0114: /* ConnectionLess Broadcast Stream Flush */
1419 case 0x0158: /* LE Tracking Advertising */
1420 /* TODO: Implement - parameters not known */
1421 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
1422 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
1426 case 0x0001: /* Write BDADDR */
1427 case 0x0018: /* Update Baudrate */
1428 case 0x001C: /* Write SCO PCM INT Parameter */
1429 case 0x001E: /* Write PCM Data Format Parameter */
1430 case 0x0027: /* Write Sleep Mode */
1431 case 0x002E: /* Download MiniDriver */
1432 case 0x003B: /* Enable USB HID Emulation */
1433 case 0x0045: /* Write UART Clock Setting */
1434 case 0x004C: /* Write Memory */
1435 case 0x004E: /* Launch RAM */
1436 case 0x0057: /* Set ACL Priority */
1437 case 0x006D: /* Write I2S PCM Interface Parameter */
1438 case 0x007E: /* Enable WBS */
1439 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1440 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
1441 expert_add_info(pinfo
, sub_item
, &ei_broadcom_unexpected_parameter
);
1442 offset
+= tvb_captured_length_remaining(tvb
, offset
);
1447 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
1448 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
1456 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, length
, ENC_NA
);
1457 expert_add_info(pinfo
, sub_item
, &ei_broadcom_undecoded
);
1465 case P2P_DIR_UNKNOWN
:
1467 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HCI_BROADCOM");
1468 col_set_str(pinfo
->cinfo
, COL_INFO
, "UnknownDirection Broadcom ");
1470 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1471 proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, tvb_captured_length_remaining(tvb
, offset
), ENC_NA
);
1472 offset
+= tvb_captured_length_remaining(tvb
, offset
);
1477 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1478 sub_item
= proto_tree_add_item(main_tree
, hf_broadcom_data
, tvb
, offset
, tvb_captured_length_remaining(tvb
, offset
), ENC_NA
);
1479 expert_add_info(pinfo
, sub_item
, &ei_broadcom_unexpected_data
);
1480 offset
+= tvb_captured_length_remaining(tvb
, offset
);
1487 proto_register_bthci_vendor_broadcom(void)
1489 expert_module_t
*expert_module
;
1491 static hf_register_info hf
[] = {
1492 { &hf_broadcom_opcode
,
1493 { "Command Opcode", "bthci_vendor.broadcom.opcode",
1494 FT_UINT16
, BASE_HEX
, VALS(broadcom_opcode_vals
), 0x0,
1495 "HCI Command Opcode", HFILL
}
1497 { &hf_broadcom_opcode_ogf
,
1498 { "Opcode Group Field", "bthci_vendor.broadcom.opcode.ogf",
1499 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_ogf_vals_ext
, 0xfc00,
1502 { &hf_broadcom_opcode_ocf
,
1503 { "Opcode Command Field", "bthci_vendor.broadcom.opcode.ocf",
1504 FT_UINT16
, BASE_HEX
, VALS(broadcom_opcode_ocf_vals
), 0x03ff,
1507 { &hf_broadcom_parameter_length
,
1508 { "Parameter Total Length", "bthci_vendor.broadcom.parameter_length",
1509 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1512 { &hf_broadcom_event_code
,
1513 { "Event Code", "bthci_vendor.broadcom.event_code",
1514 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_evt_evt_code_vals_ext
, 0x0,
1517 { &hf_broadcom_number_of_allowed_command_packets
,
1518 { "Number of Allowed Command Packets", "bthci_vendor.broadcom.number_of_allowed_command_packets",
1519 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1522 { &hf_broadcom_le_advertising_filter_subcode
,
1523 { "Subcode", "bthci_vendor.broadcom.le.advertising_filter.subcode",
1524 FT_UINT8
, BASE_HEX
, VALS(broadcom_le_subcode_advertising_filter_vals
), 0x0,
1527 { &hf_broadcom_le_scan_condition
,
1528 { "Scan Condition", "bthci_vendor.broadcom.le.scan_condition",
1529 FT_UINT8
, BASE_HEX
, VALS(broadcom_le_scan_condition_vals
), 0x0,
1532 { &hf_broadcom_le_filter_index
,
1533 { "Filter Index", "bthci_vendor.broadcom.le.filter_index",
1534 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1537 { &hf_broadcom_le_number_of_available_filters
,
1538 { "Number of Available Filters", "bthci_vendor.broadcom.le.number_of_available_filters",
1539 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1542 { &hf_broadcom_mem_address
,
1543 { "Address", "bthci_vendor.broadcom.mem.address",
1544 FT_UINT32
, BASE_HEX_DEC
, NULL
, 0x0,
1547 { &hf_broadcom_mem_data
,
1548 { "Firmware", "bthci_vendor.broadcom.mem.data",
1549 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1552 { &hf_broadcom_mem_rdlen
,
1553 { "Length", "bthci_vendor.broadcom.mem.rd_len",
1554 FT_UINT8
, BASE_HEX_DEC
, NULL
, 0x0,
1557 { &hf_broadcom_baudrate
,
1558 { "Baudrate", "bthci_vendor.broadcom.baudrate",
1559 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1562 { &hf_broadcom_bd_addr
,
1563 { "BD_ADDR", "bthci_vendor.broadcom.bd_addr",
1564 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
1565 "Bluetooth Device Address", HFILL
}
1567 { &hf_broadcom_max_advertising_instance
,
1568 { "Max Advertising Instance", "bthci_vendor.broadcom.max_advertising_instance",
1569 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1572 { &hf_broadcom_max_advertising_instance_reserved
,
1573 { "Reserved", "bthci_vendor.broadcom.max_advertising_instance_reserved",
1574 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1577 { &hf_broadcom_resolvable_private_address_offloading
,
1578 { "Resolvable Private Address Offloading", "bthci_vendor.broadcom.resolvable_private_address_offloading",
1579 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1582 { &hf_broadcom_resolvable_private_address_offloading_reserved
,
1583 { "Reserved", "bthci_vendor.broadcom.resolvable_private_address_offloading_reserved",
1584 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1587 { &hf_broadcom_total_scan_results
,
1588 { "Total Scan Results", "bthci_vendor.broadcom.total_scan_results",
1589 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1592 { &hf_broadcom_max_irk_list
,
1593 { "Max IRK List", "bthci_vendor.broadcom.max_irk_list",
1594 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1597 { &hf_broadcom_filter_support
,
1598 { "Filter Support", "bthci_vendor.broadcom.filter_support",
1599 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1602 { &hf_broadcom_max_filter
,
1603 { "Max Filter", "bthci_vendor.broadcom.max_filter",
1604 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1607 { &hf_broadcom_energy_support
,
1608 { "Energy Support", "bthci_vendor.broadcom.energy_support",
1609 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1612 { &hf_broadcom_version_support
,
1613 { "Version Support", "bthci_vendor.broadcom.version_support",
1614 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1617 { &hf_broadcom_total_num_of_advt_tracked
,
1618 { "Total Number of Advertisers Tracked", "bthci_vendor.broadcom.total_num_of_advt_tracked",
1619 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1622 { &hf_broadcom_extended_scan_support
,
1623 { "Extended Scan Support", "bthci_vendor.broadcom.extended_scan_support",
1624 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1627 { &hf_broadcom_debug_logging_support
,
1628 { "Debug Logging Support", "bthci_vendor.broadcom.debug_logging_support",
1629 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1632 { &hf_broadcom_le_address_generation_offloading_support
,
1633 { "LE Address Generation Offloading Support", "bthci_vendor.broadcom.le_address_generation_offloading_support",
1634 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1637 { &hf_broadcom_le_address_generation_offloading_support_reserved
,
1638 { "Reserved", "bthci_vendor.broadcom.le_address_generation_offloading_support_reserved",
1639 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1642 { &hf_broadcom_a2dp_source_offload_capability_mask
,
1643 { "A2DP Source Offload Capability", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask",
1644 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1647 { &hf_broadcom_a2dp_source_offload_capability_mask_sbc
,
1648 { "SBC", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.sbc",
1649 FT_BOOLEAN
, 32, NULL
, 0x00000001,
1652 { &hf_broadcom_a2dp_source_offload_capability_mask_aac
,
1653 { "AAC", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.aac",
1654 FT_BOOLEAN
, 32, NULL
, 0x00000002,
1657 { &hf_broadcom_a2dp_source_offload_capability_mask_aptx
,
1658 { "APTX", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.aptx",
1659 FT_BOOLEAN
, 32, NULL
, 0x00000004,
1662 { &hf_broadcom_a2dp_source_offload_capability_mask_aptx_hd
,
1663 { "APTX HD", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.aptx_hd",
1664 FT_BOOLEAN
, 32, NULL
, 0x00000008,
1667 { &hf_broadcom_a2dp_source_offload_capability_mask_ldac
,
1668 { "LDAC", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.ldac",
1669 FT_BOOLEAN
, 32, NULL
, 0x00000010,
1672 { &hf_broadcom_a2dp_source_offload_capability_mask_reserved
,
1673 { "Reserved", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.reserved",
1674 FT_UINT32
, BASE_HEX
, NULL
, UINT32_C(0xFFFFFFE0),
1677 { &hf_broadcom_bluetooth_quality_report_support
,
1678 { "Bluetooth Quality Report Support", "bthci_vendor.broadcom.bluetooth_quality_report_support",
1679 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1682 { &hf_broadcom_dynamic_audio_buffer_support_mask
,
1683 { "Dynamic Audio Buffer Support", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask",
1684 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1687 { &hf_broadcom_dynamic_audio_buffer_support_mask_sbc
,
1688 { "SBC", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.sbc",
1689 FT_BOOLEAN
, 32, NULL
, 0x00000001,
1692 { &hf_broadcom_dynamic_audio_buffer_support_mask_aac
,
1693 { "AAC", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.aac",
1694 FT_BOOLEAN
, 32, NULL
, 0x00000002,
1697 { &hf_broadcom_dynamic_audio_buffer_support_mask_aptx
,
1698 { "APTX", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.aptx",
1699 FT_BOOLEAN
, 32, NULL
, 0x00000004,
1702 { &hf_broadcom_dynamic_audio_buffer_support_mask_aptx_hd
,
1703 { "APTX HD", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.aptx_hd",
1704 FT_BOOLEAN
, 32, NULL
, 0x00000008,
1707 { &hf_broadcom_dynamic_audio_buffer_support_mask_ldac
,
1708 { "LDAC", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.ldac",
1709 FT_BOOLEAN
, 32, NULL
, 0x00000010,
1712 { &hf_broadcom_dynamic_audio_buffer_support_mask_reserved
,
1713 { "Reserved", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.reserved",
1714 FT_UINT32
, BASE_HEX
, NULL
, UINT32_C(0xFFFFFFE0),
1717 { &hf_broadcom_a2dp_offload_v2_support
,
1718 { "A2DP Offload V2 Support", "bthci_vendor.broadcom.a2dp_offload_v2_support",
1719 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1722 { &hf_broadcom_uart_clock
,
1723 { "UART Clock", "bthci_vendor.broadcom.uart_clock",
1724 FT_UINT8
, BASE_HEX
, VALS(broadcom_uart_clock_vals
), 0x0,
1727 { &hf_broadcom_connection_handle
,
1728 { "Connection Handle", "bthci_vendor.broadcom.connection_handle",
1729 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1732 { &hf_broadcom_connection_priority
,
1733 { "Connection Priority", "bthci_vendor.broadcom.connection_priority",
1734 FT_UINT8
, BASE_HEX
, VALS(broadcom_connection_priority_vals
), 0x0,
1737 { &hf_broadcom_sleep_mode
,
1738 { "Sleep Mode", "bthci_vendor.broadcom.sleep_mode",
1739 FT_UINT8
, BASE_HEX
, VALS(broadcom_sleep_mode_vals
), 0x0,
1742 { &hf_broadcom_host_stack_idle_threshold
,
1743 { "Host Stack Idle Threshold", "bthci_vendor.broadcom.host_stack_idle_threshold",
1744 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1747 { &hf_broadcom_host_controller_idle_threshold
,
1748 { "Host Controller Idle Threshold", "bthci_vendor.broadcom.host_controller_idle_threshold",
1749 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1752 { &hf_broadcom_wake_polarity
,
1753 { "Wake Polarity", "bthci_vendor.broadcom.wake_polarity",
1754 FT_UINT8
, BASE_HEX
, VALS(broadcom_wake_polarity_vals
), 0x0,
1757 { &hf_broadcom_host_wake_polarity
,
1758 { "Host Wake Polarity", "bthci_vendor.broadcom.host_wake_polarity",
1759 FT_UINT8
, BASE_HEX
, VALS(broadcom_wake_polarity_vals
), 0x0,
1762 { &hf_broadcom_allow_host_sleep_during_sco
,
1763 { "Allow Host Sleep During SCO", "bthci_vendor.broadcom.allow_host_sleep_during_sco",
1764 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1767 { &hf_broadcom_combine_sleep_mode_and_lpm
,
1768 { "Combine Sleep Mode and LPM", "bthci_vendor.broadcom.combine_sleep_mode_and_lpm",
1769 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1772 { &hf_broadcom_enable_uart_txd_tri_state
,
1773 { "Enable UART TXD Tri-state", "bthci_vendor.broadcom.enable_uart_txd_tri_state",
1774 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1777 { &hf_broadcom_sleep_guard_time
,
1778 { "Sleep Guard Time", "bthci_vendor.broadcom.sleep_guard_time",
1779 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1782 { &hf_broadcom_wakeup_guard_time
,
1783 { "Wakeup Guard Time", "bthci_vendor.broadcom.wakeup_guard_time",
1784 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1787 { &hf_broadcom_txd_config
,
1788 { "TXD Config", "bthci_vendor.broadcom.txd_config",
1789 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1792 { &hf_broadcom_pulsed_host_wake
,
1793 { "Pulsed Host Wake", "bthci_vendor.broadcom.pulsed_host_wake",
1794 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1797 { &hf_broadcom_codec_state
,
1798 { "Codec State", "bthci_vendor.broadcom.codec_state",
1799 FT_UINT8
, BASE_HEX
, VALS(broadcom_codec_state_vals
), 0x0,
1802 { &hf_broadcom_codec
,
1803 { "Codec", "bthci_vendor.broadcom.codec",
1804 FT_UINT16
, BASE_HEX
, VALS(broadcom_codec_vals
), 0x0,
1807 { &hf_broadcom_status
,
1808 { "Status", "bthci_vendor.broadcom.status",
1809 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_status_vals_ext
, 0x0,
1812 { &hf_broadcom_sco_pcm_routing
,
1813 { "SCO PCM Routing", "bthci_vendor.broadcom.sco.pcm_routing",
1814 FT_UINT8
, BASE_HEX
, VALS(broadcom_sco_pcm_routing_vals
), 0x0,
1817 { &hf_broadcom_sco_pcm_interface_clock_rate
,
1818 { "SCO PCM Interface Clock Rate", "bthci_vendor.broadcom.sco.interface.clock_rate",
1819 FT_UINT8
, BASE_HEX
, VALS(broadcom_sco_pcm_interface_clock_rate_vals
), 0x0,
1822 { &hf_broadcom_sco_pcm_interface_frame_type
,
1823 { "SCO PCM Interface Frame Type", "bthci_vendor.broadcom.sco.interface.frame_type",
1824 FT_UINT8
, BASE_HEX
, VALS(broadcom_sco_pcm_interface_frame_type_vals
), 0x0,
1827 { &hf_broadcom_sco_pcm_interface_sync_mode
,
1828 { "SCO PCM Interface Sync Mode", "bthci_vendor.broadcom.sco.interface.sync_mode",
1829 FT_UINT8
, BASE_HEX
, VALS(broadcom_mode_peripheral_central_vals
), 0x0,
1832 { &hf_broadcom_sco_pcm_interface_clock_mode
,
1833 { "SCO PCM Interface Clock Mode", "bthci_vendor.broadcom.sco.interface.clock_mode",
1834 FT_UINT8
, BASE_HEX
, VALS(broadcom_mode_peripheral_central_vals
), 0x0,
1837 { &hf_broadcom_pcm_shift_mode
,
1838 { "PCM shift_mode", "bthci_vendor.broadcom.pcm.shift_mode",
1839 FT_UINT8
, BASE_HEX
, VALS(broadcom_pcm_shift_mode_vals
), 0x0,
1842 { &hf_broadcom_pcm_fill_bits
,
1843 { "PCM Fill Bits", "bthci_vendor.broadcom.pcm.fill_bits",
1844 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1847 { &hf_broadcom_pcm_fill_method
,
1848 { "PCM Fill Method", "bthci_vendor.broadcom.pcm.fill_method",
1849 FT_UINT8
, BASE_HEX
, VALS(broadcom_pcm_fill_method_vals
), 0x0,
1852 { &hf_broadcom_pcm_fill_number_of_bits
,
1853 { "PCM fill_number_of_bits", "bthci_vendor.broadcom.pcm.fill_number_of_bits",
1854 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1857 { &hf_broadcom_pcm_justify_mode
,
1858 { "PCM Justify Mode", "bthci_vendor.broadcom.pcm.justify_mode",
1859 FT_UINT8
, BASE_HEX
, VALS(broadcom_pcm_justify_mode_vals
), 0x0,
1862 { &hf_broadcom_sco_i2s_pcm_interface_mode
,
1863 { "SCO I2S PCM Interface Mode", "bthci_vendor.broadcom.pcm.i2s_pcm_interface.mode",
1864 FT_UINT8
, BASE_HEX
, VALS(broadcom_sco_i2s_pcm_interface_mode_vals
), 0x0,
1867 { &hf_broadcom_sco_i2s_pcm_interface_role
,
1868 { "SCO I2S PCM Interface Role", "bthci_vendor.broadcom.pcm.i2s_pcm_interface.role",
1869 FT_UINT8
, BASE_HEX
, VALS(broadcom_mode_peripheral_central_vals
), 0x0,
1872 { &hf_broadcom_sco_i2s_pcm_interface_sample_rate
,
1873 { "SCO I2S PCM Interface Sample_Rate", "bthci_vendor.broadcom.sco.i2s_pcm_interface.sample_rate",
1874 FT_UINT8
, BASE_HEX
, VALS(broadcom_sco_i2s_pcm_interface_sample_rate_vals
), 0x0,
1877 { &hf_broadcom_sco_i2s_pcm_interface_clock_rate
,
1878 { "SCO I2S PCM Interface Clock Rate", "bthci_vendor.broadcom.pcm.i2s_pcm_interface.clock_rate",
1879 FT_UINT8
, BASE_HEX
, VALS(broadcom_sco_i2s_pcm_interface_clock_rate_vals
), 0x0,
1882 { &hf_broadcom_le_energy_total_rx_time
,
1883 { "Total RX Time", "bthci_vendor.broadcom.le.total_rx_time",
1884 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1887 { &hf_broadcom_le_energy_total_tx_time
,
1888 { "Total TX Time", "bthci_vendor.broadcom.le.total_tx_time",
1889 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1892 { &hf_broadcom_le_energy_total_idle_time
,
1893 { "Total Idle Time", "bthci_vendor.broadcom.le.total_idle_time",
1894 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1897 { &hf_broadcom_le_energy_total_energy_used
,
1898 { "Total Energy Used Time", "bthci_vendor.broadcom.le.total_energy_used",
1899 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1902 { &hf_broadcom_le_batch_scan_subcode
,
1903 { "Subcode", "bthci_vendor.broadcom.le.batch_scan.subcode",
1904 FT_UINT8
, BASE_HEX
, VALS(broadcom_le_subcode_batch_scan_vals
), 0x0,
1907 { &hf_broadcom_le_batch_scan_report_format
,
1908 { "Report Format", "bthci_vendor.broadcom.le.batch_scan.report_format",
1909 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1912 { &hf_broadcom_le_batch_scan_number_of_records
,
1913 { "Number of Records", "bthci_vendor.broadcom.le.batch_scan.number_of_records",
1914 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1917 { &hf_broadcom_le_batch_scan_mode
,
1918 { "Mode", "bthci_vendor.broadcom.le.batch_scan.mode",
1919 FT_UINT8
, BASE_HEX
, VALS(broadcom_batch_scan_mode_vals
), 0x0,
1922 { &hf_broadcom_le_batch_scan_enable
,
1923 { "Enable", "bthci_vendor.broadcom.le.batch_scan.enable",
1924 FT_UINT8
, BASE_HEX
, VALS(broadcom_disable_enable_vals
), 0x0,
1927 { &hf_broadcom_le_batch_scan_full_max
,
1928 { "Full Max", "bthci_vendor.broadcom.le.batch_scan.full_max",
1929 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1932 { &hf_broadcom_le_batch_scan_truncate_max
,
1933 { "Truncate Max", "bthci_vendor.broadcom.le.batch_scan.truncate_max",
1934 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1937 { &hf_broadcom_le_batch_scan_notify_threshold
,
1938 { "notify_threshold", "bthci_vendor.broadcom.le.batch_scan.notify_threshold",
1939 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1942 { &hf_broadcom_le_batch_scan_window
,
1943 { "Window", "bthci_vendor.broadcom.le.batch_scan.window",
1944 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1947 { &hf_broadcom_le_batch_scan_interval
,
1948 { "Interval", "bthci_vendor.broadcom.le.batch_scan.interval",
1949 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1952 { &hf_broadcom_le_batch_scan_address_type
,
1953 { "Address Type", "bthci_vendor.broadcom.le.batch_scan.address_type",
1954 FT_UINT8
, BASE_HEX
, VALS(bluetooth_address_type_vals
), 0x0,
1957 { &hf_broadcom_le_batch_scan_discard_rule
,
1958 { "Discard Rule", "bthci_vendor.broadcom.le.batch_scan.discard_rule",
1959 FT_UINT8
, BASE_HEX
, VALS(broadcom_batch_scan_discard_rule_vals
), 0x0,
1962 { &hf_broadcom_le_multi_advertising_subcode
,
1963 { "Subcode", "bthci_vendor.broadcom.le.multi_advertising.subcode",
1964 FT_UINT8
, BASE_HEX
, VALS(broadcom_le_subcode_multi_advertising_vals
), 0x0,
1967 { &hf_broadcom_le_multi_advertising_enable
,
1968 { "Enable", "bthci_vendor.broadcom.le.multi_advertising.enable",
1969 FT_UINT8
, BASE_HEX
, VALS(broadcom_disable_enable_vals
), 0x0,
1972 { &hf_broadcom_le_multi_advertising_instance_id
,
1973 { "Instance Id", "bthci_vendor.broadcom.le.multi_advertising.instance_id",
1974 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1977 { &hf_broadcom_le_multi_advertising_min_interval
,
1978 { "Min Interval", "bthci_vendor.broadcom.le.multi_advertising.min_interval",
1979 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1982 { &hf_broadcom_le_multi_advertising_max_interval
,
1983 { "Max Interval", "bthci_vendor.broadcom.le.multi_advertising.max_interval",
1984 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1987 { &hf_broadcom_le_multi_advertising_address_type
,
1988 { "Address Type", "bthci_vendor.broadcom.le.multi_advertising.address_type",
1989 FT_UINT8
, BASE_HEX
, VALS(bluetooth_address_type_vals
), 0x0,
1992 { &hf_broadcom_le_multi_advertising_type
,
1993 { "Type", "bthci_vendor.broadcom.le.multi_advertising.type",
1994 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_eir_data_type_vals_ext
, 0x0,
1997 { &hf_broadcom_le_multi_advertising_channel_map
,
1998 { "Channel Map", "bthci_vendor.broadcom.le.multi_advertising.channel_map",
1999 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2002 { &hf_broadcom_le_multi_advertising_channel_map_reserved
,
2003 { "Reserved", "bthci_vendor.broadcom.le.multi_advertising.channel_map.reserved",
2004 FT_UINT8
, BASE_HEX
, NULL
, 0xF8,
2007 { &hf_broadcom_le_multi_advertising_channel_map_39
,
2008 { "Channel 39", "bthci_vendor.broadcom.le.multi_advertising.channel_map.39",
2009 FT_UINT8
, BASE_HEX
, NULL
, 0x04,
2012 { &hf_broadcom_le_multi_advertising_channel_map_38
,
2013 { "Channel 38", "bthci_vendor.broadcom.le.multi_advertising.channel_map.38",
2014 FT_UINT8
, BASE_HEX
, NULL
, 0x02,
2017 { &hf_broadcom_le_multi_advertising_channel_map_37
,
2018 { "Channel 37", "bthci_vendor.broadcom.le.multi_advertising.channel_map.37",
2019 FT_UINT8
, BASE_HEX
, NULL
, 0x01,
2022 { &hf_broadcom_le_multi_advertising_filter_policy
,
2023 { "Filter Policy", "bthci_vendor.broadcom.le.multi_advertising.filter_policy",
2024 FT_UINT8
, BASE_HEX
, VALS(broadcom_le_filter_policy_vals
), 0x0,
2027 { &hf_broadcom_le_multi_advertising_tx_power
,
2028 { "Tx power", "bthci_vendor.broadcom.le.multi_advertising.tx_power",
2029 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2032 { &hf_broadcom_hid_emulation_mode
,
2033 { "Emulation Mode", "bthci_vendor.broadcom.hid_emulation_mode",
2034 FT_UINT8
, BASE_HEX
, VALS(broadcom_hid_emulation_mode_vals
), 0x0,
2038 { "VID", "bthci_vendor.broadcom.vid",
2039 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2043 { "PID", "bthci_vendor.broadcom.pid",
2044 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2047 { &hf_broadcom_chip_id
,
2048 { "Chip ID", "bthci_vendor.broadcom.chip_id",
2049 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2052 { &hf_broadcom_target_id
,
2053 { "Target ID", "bthci_vendor.broadcom.target_id",
2054 FT_UINT8
, BASE_HEX
, VALS(broadcom_target_id_vals
), 0x0,
2057 { &hf_broadcom_build_base
,
2058 { "Build Base", "bthci_vendor.broadcom.build_base",
2059 FT_UINT16
, BASE_DEC_HEX
, NULL
, 0x0,
2062 { &hf_broadcom_build_number
,
2063 { "Build Number", "bthci_vendor.broadcom.build_number",
2064 FT_UINT16
, BASE_DEC_HEX
, NULL
, 0x0,
2067 { &hf_broadcom_data
,
2068 { "Data", "bthci_vendor.broadcom.data",
2069 FT_NONE
, BASE_NONE
, NULL
, 0x0,
2072 { &hf_broadcom_a2dp_hardware_offload_subcode
,
2073 { "Subcode", "bthci_vendor.broadcom.a2dp_hardware_offload.subcode",
2074 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_vals
), 0x0,
2077 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec
,
2078 { "Codec", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec",
2079 FT_UINT32
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_vals
), 0x0,
2082 { &hf_broadcom_a2dp_hardware_offload_start_legacy_max_latency
,
2083 { "Max Latency", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.max_latency",
2084 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2087 { &hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_flag
,
2088 { "SCMS-T Enable", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.scms_t_enable_flag",
2089 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
2092 { &hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value
,
2093 { "SCMS-T Value", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.scms_t_enable_value",
2094 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2097 { &hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved
,
2098 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.scms_t_enable_value_reserved",
2099 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2102 { &hf_broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency
,
2103 { "Sampling Frequency", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.sampling_frequency",
2104 FT_UINT32
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency_vals
), 0x0,
2107 { &hf_broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample
,
2108 { "Bits Per Sample", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.bits_per_sample",
2109 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample_vals
), 0x0,
2112 { &hf_broadcom_a2dp_hardware_offload_start_legacy_channel_mode
,
2113 { "Channel Mode", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.channel_mode",
2114 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_channel_mode_vals
), 0x0,
2117 { &hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate
,
2118 { "Encoded Audio Bitrate", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate",
2119 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2122 { &hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified
,
2123 { "Encoded Audio Bitrate Unspecified/Unused", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate_unspecified",
2124 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
2127 { &hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved
,
2128 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate_reserved",
2129 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
2132 { &hf_broadcom_a2dp_hardware_offload_start_legacy_connection_handle
,
2133 { "Connection Handle", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.connection_handle",
2134 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0,
2137 { &hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_cid
,
2138 { "L2CAP CID", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.l2cap_cid",
2139 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2142 { &hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_mtu_size
,
2143 { "L2CAP MTU Size", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.l2cap_mtu_size",
2144 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2147 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information
,
2148 { "Codec Information", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information",
2149 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2152 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length
,
2153 { "Block Length", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.block_length",
2154 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length_vals
), 0xf0,
2157 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands
,
2158 { "Subbands", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.subbands",
2159 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands_vals
), 0x0c,
2162 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method
,
2163 { "Allocation Method", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.allocation_method",
2164 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method_vals
), 0x03,
2167 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool
,
2168 { "Min Bitpool", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.min_bitpool",
2169 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2172 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool
,
2173 { "Max Bitpool", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.max_bitpool",
2174 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2177 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency
,
2178 { "Sampling Frequency", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.sampling_frequency",
2179 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_sbc_sampling_frequency_vals
), 0xf0,
2182 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode
,
2183 { "Channel Mode", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.channel_mode",
2184 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_sbc_channel_mode_vals
), 0x0f,
2187 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved
,
2188 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.reserved",
2189 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2192 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type
,
2193 { "Object Type", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.aac.object_type",
2194 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_aac_object_type_vals
), 0x0,
2197 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr
,
2198 { "VBR", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.aac.vbr",
2199 FT_BOOLEAN
, 8, NULL
, 0x80,
2202 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved
,
2203 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.aac.reserved",
2204 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2207 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id
,
2208 { "Vendor ID", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.vendor_id",
2209 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
2212 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id
,
2213 { "Codec ID", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.codec_id",
2214 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2217 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index
,
2218 { "Bitrate Index", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.bitrate_index",
2219 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_vals
), 0x0,
2222 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved
,
2223 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.bitrate_index.reserved",
2224 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2227 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
,
2228 { "Channel Mode", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask",
2229 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2232 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo
,
2233 { "Stereo", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.stereo",
2234 FT_BOOLEAN
, 8, NULL
, 0x01,
2237 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual
,
2238 { "Dual", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.dual",
2239 FT_BOOLEAN
, 8, NULL
, 0x02,
2242 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono
,
2243 { "Mono", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.mono",
2244 FT_BOOLEAN
, 8, NULL
, 0x04,
2247 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved
,
2248 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.reserved",
2249 FT_UINT8
, BASE_HEX
, NULL
, UINT32_C(0xF8),
2252 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved
,
2253 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.reserved",
2254 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2257 { &hf_broadcom_a2dp_hardware_offload_start_connection_handle
,
2258 { "Connection Handle", "bthci_vendor.broadcom.a2dp_hardware_offload.start.connection_handle",
2259 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0,
2262 { &hf_broadcom_a2dp_hardware_offload_start_l2cap_cid
,
2263 { "L2CAP CID", "bthci_vendor.broadcom.a2dp_hardware_offload.start.l2cap_cid",
2264 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2267 { &hf_broadcom_a2dp_hardware_offload_start_data_path_direction
,
2268 { "Data Path Direction", "bthci_vendor.broadcom.a2dp_hardware_offload.start.data_path_direction",
2269 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_data_path_direction_vals
), 0x0,
2272 { &hf_broadcom_a2dp_hardware_offload_start_peer_mtu
,
2273 { "Peer MTU", "bthci_vendor.broadcom.a2dp_hardware_offload.start.peer_mtu",
2274 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2277 { &hf_broadcom_a2dp_hardware_offload_start_cp_enable_scmst
,
2278 { "CP Enable SCMS-T", "bthci_vendor.broadcom.a2dp_hardware_offload.start.cp_enable_scmst",
2279 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
2282 { &hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst
,
2283 { "CP Header SCMS-T", "bthci_vendor.broadcom.a2dp_hardware_offload.start.cp_header_scmst",
2284 FT_UINT8
, BASE_HEX_DEC
, NULL
, 0x0,
2287 { &hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst_reserved
,
2288 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start.cp_header_scmst_reserved",
2289 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2292 { &hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters_length
,
2293 { "Vendor Specific Parameters Length", "bthci_vendor.broadcom.a2dp_hardware_offload.start.vendor_specific_parameters_length",
2294 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2297 { &hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters
,
2298 { "Vendor Specific Parameters", "bthci_vendor.broadcom.a2dp_hardware_offload.start.vendor_specific_parameters",
2299 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2302 { &hf_broadcom_a2dp_hardware_offload_stop_connection_handle
,
2303 { "Connection Handle", "bthci_vendor.broadcom.a2dp_hardware_offload.stop.connection_handle",
2304 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0,
2307 { &hf_broadcom_a2dp_hardware_offload_stop_l2cap_cid
,
2308 { "L2CAP CID", "bthci_vendor.broadcom.a2dp_hardware_offload.stop.l2cap_cid",
2309 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2312 { &hf_broadcom_a2dp_hardware_offload_stop_data_path_direction
,
2313 { "Data Path Direction", "bthci_vendor.broadcom.a2dp_hardware_offload.stop.data_path_direction",
2314 FT_UINT8
, BASE_HEX
, VALS(broadcom_a2dp_hardware_offload_data_path_direction_vals
), 0x0,
2319 static int *ett
[] = {
2321 &ett_broadcom_opcode
,
2322 &ett_broadcom_channel_map
,
2323 &ett_broadcom_a2dp_source_offload_capability_mask
,
2324 &ett_broadcom_dynamic_audio_buffer_support_mask
,
2325 &ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information
,
2326 &ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
,
2329 static ei_register_info ei
[] = {
2330 { &ei_broadcom_undecoded
, { "bthci_vendor.broadcom.undecoded", PI_UNDECODED
, PI_NOTE
, "Undecoded", EXPFILL
}},
2331 { &ei_broadcom_unexpected_parameter
, { "bthci_vendor.broadcom.unexpected_parameter", PI_PROTOCOL
, PI_WARN
, "Unexpected parameter", EXPFILL
}},
2332 { &ei_broadcom_unexpected_data
, { "bthci_vendor.broadcom.unexpected_data", PI_PROTOCOL
, PI_WARN
, "Unexpected data", EXPFILL
}},
2335 proto_bthci_vendor_broadcom
= proto_register_protocol("Bluetooth Broadcom HCI",
2336 "HCI BROADCOM", "bthci_vendor.broadcom");
2338 bthci_vendor_broadcom_handle
= register_dissector("bthci_vendor.broadcom", dissect_bthci_vendor_broadcom
, proto_bthci_vendor_broadcom
);
2340 proto_register_field_array(proto_bthci_vendor_broadcom
, hf
, array_length(hf
));
2341 proto_register_subtree_array(ett
, array_length(ett
));
2343 expert_module
= expert_register_protocol(proto_bthci_vendor_broadcom
);
2344 expert_register_field_array(expert_module
, ei
, array_length(ei
));
2348 proto_reg_handoff_bthci_vendor_broadcom(void)
2350 btcommon_ad_handle
= find_dissector_add_dependency("btcommon.eir_ad.ad", proto_bthci_vendor_broadcom
);
2352 dissector_add_for_decode_as("bthci_cmd.vendor", bthci_vendor_broadcom_handle
);
2354 dissector_add_uint("bluetooth.vendor", 0x000F, bthci_vendor_broadcom_handle
);
2358 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2363 * indent-tabs-mode: nil
2366 * vi: set shiftwidth=4 tabstop=8 expandtab:
2367 * :indentSize=4:tabSize=8:noTabs=true: