1 /* packet-bthci_vendor.c
2 * Routines for the Bluetooth HCI Vendors Commands/Events
4 * Copyright 2014, Michal Labedzki for Tieto Corporation
5 * Copyright 2024, Jakub Rotkiewicz for Google LLC
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
16 #include <epan/packet.h>
17 #include <epan/expert.h>
20 #include "packet-bluetooth.h"
21 #include "packet-bthci_cmd.h"
22 #include "packet-bthci_evt.h"
25 static int proto_bthci_vendor_android
;
27 static int hf_android_opcode
;
28 static int hf_android_opcode_ogf
;
29 static int hf_android_opcode_ocf
;
30 static int hf_android_parameter_length
;
31 static int hf_android_number_of_allowed_command_packets
;
32 static int hf_android_event_code
;
33 static int hf_android_le_advertising_filter_subcode
;
34 static int hf_android_le_scan_condition
;
35 static int hf_android_le_filter_index
;
36 static int hf_android_le_number_of_available_filters
;
37 static int hf_android_status
;
38 static int hf_android_bd_addr
;
39 static int hf_android_data
;
40 static int hf_android_max_advertising_instance
;
41 static int hf_android_max_advertising_instance_reserved
;
42 static int hf_android_resolvable_private_address_offloading
;
43 static int hf_android_resolvable_private_address_offloading_reserved
;
44 static int hf_android_total_scan_results
;
45 static int hf_android_max_irk_list
;
46 static int hf_android_filter_support
;
47 static int hf_android_max_filter
;
48 static int hf_android_energy_support
;
49 static int hf_android_version_support
;
50 static int hf_android_total_num_of_advt_tracked
;
51 static int hf_android_extended_scan_support
;
52 static int hf_android_debug_logging_support
;
53 static int hf_android_le_address_generation_offloading_support
;
54 static int hf_android_le_address_generation_offloading_support_reserved
;
55 static int hf_android_a2dp_source_offload_capability_mask
;
56 static int hf_android_a2dp_source_offload_capability_mask_sbc
;
57 static int hf_android_a2dp_source_offload_capability_mask_aac
;
58 static int hf_android_a2dp_source_offload_capability_mask_aptx
;
59 static int hf_android_a2dp_source_offload_capability_mask_aptx_hd
;
60 static int hf_android_a2dp_source_offload_capability_mask_ldac
;
61 static int hf_android_a2dp_source_offload_capability_mask_reserved
;
62 static int hf_android_bluetooth_quality_report_support
;
63 static int hf_android_dynamic_audio_buffer_support_mask
;
64 static int hf_android_dynamic_audio_buffer_support_mask_sbc
;
65 static int hf_android_dynamic_audio_buffer_support_mask_aac
;
66 static int hf_android_dynamic_audio_buffer_support_mask_aptx
;
67 static int hf_android_dynamic_audio_buffer_support_mask_aptx_hd
;
68 static int hf_android_dynamic_audio_buffer_support_mask_ldac
;
69 static int hf_android_dynamic_audio_buffer_support_mask_reserved
;
70 static int hf_android_a2dp_offload_v2_support
;
71 static int hf_android_le_energy_total_rx_time
;
72 static int hf_android_le_energy_total_tx_time
;
73 static int hf_android_le_energy_total_idle_time
;
74 static int hf_android_le_energy_total_energy_used
;
75 static int hf_android_le_batch_scan_subcode
;
76 static int hf_android_le_batch_scan_report_format
;
77 static int hf_android_le_batch_scan_number_of_records
;
78 static int hf_android_le_batch_scan_mode
;
79 static int hf_android_le_batch_scan_enable
;
80 static int hf_android_le_batch_scan_full_max
;
81 static int hf_android_le_batch_scan_truncate_max
;
82 static int hf_android_le_batch_scan_notify_threshold
;
83 static int hf_android_le_batch_scan_window
;
84 static int hf_android_le_batch_scan_interval
;
85 static int hf_android_le_batch_scan_address_type
;
86 static int hf_android_le_batch_scan_discard_rule
;
87 static int hf_android_le_multi_advertising_subcode
;
88 static int hf_android_le_multi_advertising_enable
;
89 static int hf_android_le_multi_advertising_instance_id
;
90 static int hf_android_le_multi_advertising_type
;
91 static int hf_android_le_multi_advertising_min_interval
;
92 static int hf_android_le_multi_advertising_max_interval
;
93 static int hf_android_le_multi_advertising_address_type
;
94 static int hf_android_le_multi_advertising_filter_policy
;
95 static int hf_android_le_multi_advertising_tx_power
;
96 static int hf_android_le_multi_advertising_channel_map
;
97 static int hf_android_le_multi_advertising_channel_map_reserved
;
98 static int hf_android_le_multi_advertising_channel_map_39
;
99 static int hf_android_le_multi_advertising_channel_map_38
;
100 static int hf_android_le_multi_advertising_channel_map_37
;
101 static int hf_android_a2dp_hardware_offload_subcode
;
102 static int hf_android_a2dp_hardware_offload_start_legacy_codec
;
103 static int hf_android_a2dp_hardware_offload_start_legacy_max_latency
;
104 static int hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_flag
;
105 static int hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_value
;
106 static int hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved
;
107 static int hf_android_a2dp_hardware_offload_start_legacy_sampling_frequency
;
108 static int hf_android_a2dp_hardware_offload_start_legacy_bits_per_sample
;
109 static int hf_android_a2dp_hardware_offload_start_legacy_channel_mode
;
110 static int hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate
;
111 static int hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified
;
112 static int hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved
;
113 static int hf_android_a2dp_hardware_offload_start_legacy_connection_handle
;
114 static int hf_android_a2dp_hardware_offload_start_legacy_l2cap_cid
;
115 static int hf_android_a2dp_hardware_offload_start_legacy_l2cap_mtu_size
;
116 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information
;
117 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length
;
118 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands
;
119 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method
;
120 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool
;
121 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool
;
122 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency
;
123 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode
;
124 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved
;
125 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type
;
126 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr
;
127 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved
;
128 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id
;
129 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id
;
130 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index
;
131 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved
;
132 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
;
133 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo
;
134 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual
;
135 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono
;
136 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved
;
137 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved
;
138 static int hf_android_a2dp_hardware_offload_start_legacy_codec_information_reserved
;
139 static int hf_android_a2dp_hardware_offload_start_connection_handle
;
140 static int hf_android_a2dp_hardware_offload_start_l2cap_cid
;
141 static int hf_android_a2dp_hardware_offload_start_data_path_direction
;
142 static int hf_android_a2dp_hardware_offload_start_peer_mtu
;
143 static int hf_android_a2dp_hardware_offload_start_cp_enable_scmst
;
144 static int hf_android_a2dp_hardware_offload_start_cp_header_scmst
;
145 static int hf_android_a2dp_hardware_offload_start_cp_header_scmst_reserved
;
146 static int hf_android_a2dp_hardware_offload_start_vendor_specific_parameters_length
;
147 static int hf_android_a2dp_hardware_offload_start_vendor_specific_parameters
;
148 static int hf_android_a2dp_hardware_offload_stop_connection_handle
;
149 static int hf_android_a2dp_hardware_offload_stop_l2cap_cid
;
150 static int hf_android_a2dp_hardware_offload_stop_data_path_direction
;
153 static int * const hfx_android_le_multi_advertising_channel_map
[] = {
154 &hf_android_le_multi_advertising_channel_map_reserved
,
155 &hf_android_le_multi_advertising_channel_map_39
,
156 &hf_android_le_multi_advertising_channel_map_38
,
157 &hf_android_le_multi_advertising_channel_map_37
,
161 static int * const hfx_android_a2dp_source_offload_capability
[] = {
162 &hf_android_a2dp_source_offload_capability_mask_reserved
,
163 &hf_android_a2dp_source_offload_capability_mask_ldac
,
164 &hf_android_a2dp_source_offload_capability_mask_aptx_hd
,
165 &hf_android_a2dp_source_offload_capability_mask_aptx
,
166 &hf_android_a2dp_source_offload_capability_mask_aac
,
167 &hf_android_a2dp_source_offload_capability_mask_sbc
,
171 static int * const hfx_android_dynamic_audio_buffer_support
[] = {
172 &hf_android_dynamic_audio_buffer_support_mask_reserved
,
173 &hf_android_dynamic_audio_buffer_support_mask_ldac
,
174 &hf_android_dynamic_audio_buffer_support_mask_aptx_hd
,
175 &hf_android_dynamic_audio_buffer_support_mask_aptx
,
176 &hf_android_dynamic_audio_buffer_support_mask_aac
,
177 &hf_android_dynamic_audio_buffer_support_mask_sbc
,
181 static int * const hfx_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode
[] = {
182 &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved
,
183 &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono
,
184 &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual
,
185 &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo
,
189 static int ett_android
;
190 static int ett_android_opcode
;
191 static int ett_android_channel_map
;
192 static int ett_android_a2dp_source_offload_capability_mask
;
193 static int ett_android_dynamic_audio_buffer_support_mask
;
194 static int ett_android_a2dp_hardware_offload_start_legacy_codec_information
;
195 static int ett_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
;
197 static expert_field ei_android_undecoded
;
198 static expert_field ei_android_unexpected_parameter
;
199 static expert_field ei_android_unexpected_data
;
201 static dissector_handle_t bthci_vendor_android_handle
;
202 static dissector_handle_t btcommon_ad_android_handle
;
204 #define ANDROID_OPCODE_VALS(base) \
205 { (base) | 0x0153, "LE Get Vendor Capabilities" }, \
206 { (base) | 0x0154, "LE Multi Advertising" }, \
207 { (base) | 0x0156, "LE Batch Scan" }, \
208 { (base) | 0x0157, "LE Advertising Filter" }, \
209 { (base) | 0x0158, "LE Tracking Advertising" }, \
210 { (base) | 0x0159, "LE Energy Info" }, \
211 { (base) | 0x015D, "A2DP Hardware Offload" }
213 static const value_string android_opcode_ocf_vals
[] = {
214 ANDROID_OPCODE_VALS(0x0),
218 static const value_string android_opcode_vals
[] = {
219 ANDROID_OPCODE_VALS(0x3F << 10),
223 static const value_string android_le_subcode_advertising_filter_vals
[] = {
225 { 0x01, "Feature Select" },
228 { 0x04, "Solicitate UUID" },
229 { 0x05, "Local Name" },
230 { 0x06, "Manufacturer Data" },
231 { 0x07, "Service Data" },
236 static const value_string android_le_scan_condition_vals
[] = {
243 static const value_string android_le_subcode_batch_scan_vals
[] = {
244 { 0x01, "Enable/Disable Customer Feature" },
245 { 0x02, "Set Storage Parameter" },
246 { 0x03, "Set Parameter" },
247 { 0x04, "Read Results" },
251 static const value_string android_batch_scan_mode_vals
[] = {
255 { 0x03, "Pass ACTI" },
259 static const value_string android_batch_scan_discard_rule_vals
[] = {
260 { 0x00, "Old Items" },
261 { 0x01, "Lower RSSI Items" },
265 static const value_string android_disable_enable_vals
[] = {
271 static const value_string android_le_subcode_multi_advertising_vals
[] = {
272 { 0x01, "Set Parameter" },
273 { 0x02, "Write Advertising Data" },
274 { 0x03, "Write Scan Response Data" },
275 { 0x04, "Set Random Address" },
276 { 0x05, "MultiAdvertising Enable/Disable Customer Feature" },
280 static const value_string android_le_filter_policy_vals
[] = {
281 { 0x00, "All Connections" },
282 { 0x01, "Whitelist Connections All" },
283 { 0x02, "All Connections Whitelist" },
284 { 0x03, "Whitelist Connections" },
288 static const value_string android_a2dp_hardware_offload_vals
[] = {
289 { 0x01, "Start A2DP offload (legacy)" },
290 { 0x02, "Stop A2DP offload (legacy)" },
291 { 0x03, "Start A2DP offload" },
292 { 0x04, "Stop A2DP offload" },
296 static const value_string android_a2dp_hardware_offload_start_legacy_codec_vals
[] = {
305 static const value_string android_a2dp_hardware_offload_start_legacy_sampling_frequency_vals
[] = {
306 { 0x00000001, "44100 Hz" },
307 { 0x00000002, "48000 Hz" },
308 { 0x00000004, "88200 Hz" },
309 { 0x00000008, "96000 Hz" },
313 static const value_string android_a2dp_hardware_offload_start_legacy_bits_per_sample_vals
[] = {
314 { 0x01, "16 bits per sample" },
315 { 0x02, "24 bits per sample" },
316 { 0x04, "32 bits per sample" },
320 static const value_string android_a2dp_hardware_offload_start_legacy_channel_mode_vals
[] = {
326 static const value_string android_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length_vals
[] = {
334 static const value_string android_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands_vals
[] = {
340 static const value_string android_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method_vals
[] = {
341 { 0x01, "Loudness" },
346 static const value_string android_a2dp_hardware_offload_start_legacy_sbc_sampling_frequency_vals
[] = {
347 { 0x01, "48000 Hz" },
348 { 0x02, "44100 Hz" },
349 { 0x04, "32000 Hz" },
350 { 0x08, "16000 Hz" },
354 static const value_string android_a2dp_hardware_offload_start_legacy_sbc_channel_mode_vals
[] = {
355 { 0x01, "Joint Stereo" },
357 { 0x04, "Dual Channel" },
362 static const value_string android_a2dp_hardware_offload_data_path_direction_vals
[] = {
363 { 0x00, "Output (AVDTP Source/Merge)" },
364 { 0x01, "Input (AVDTP Sink/Split)" },
368 static const value_string android_a2dp_hardware_offload_start_legacy_aac_object_type_vals
[] = {
369 { 0x01, "RFA (b0)" },
370 { 0x02, "RFA (b1)" },
371 { 0x04, "RFA (b2)" },
372 { 0x08, "RFA (b3)" },
373 { 0x10, "MPEG-4 AAC scalable" },
374 { 0x20, "MPEG-4 AAC LTP" },
375 { 0x40, "MPEG-4 AAC LC" },
376 { 0x80, "MPEG-2 AAC LC" },
380 static const value_string android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_vals
[] = {
384 { 0x7f, "ABR (Adaptive Bit Rate)" },
388 void proto_register_bthci_vendor_android(void);
389 void proto_reg_handoff_bthci_vendor_android(void);
392 dissect_bthci_vendor_android(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
394 proto_item
*main_item
;
395 proto_tree
*main_tree
;
396 proto_item
*opcode_item
;
397 proto_tree
*opcode_tree
;
398 proto_item
*sub_item
;
399 bluetooth_data_t
*bluetooth_data
;
403 const char *description
;
409 uint32_t interface_id
;
411 proto_item
*codec_information_item
;
412 proto_tree
*codec_information_tree
;
414 bluetooth_data
= (bluetooth_data_t
*) data
;
415 if (bluetooth_data
) {
416 interface_id
= bluetooth_data
->interface_id
;
417 adapter_id
= bluetooth_data
->adapter_id
;
419 interface_id
= HCI_INTERFACE_DEFAULT
;
420 adapter_id
= HCI_ADAPTER_DEFAULT
;
423 main_item
= proto_tree_add_item(tree
, proto_bthci_vendor_android
, tvb
, 0, -1, ENC_NA
);
424 main_tree
= proto_item_add_subtree(main_item
, ett_android
);
426 switch (pinfo
->p2p_dir
) {
429 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HCI_CMD_ANDROID");
430 col_set_str(pinfo
->cinfo
, COL_INFO
, "Sent Android ");
432 opcode_item
= proto_tree_add_item(main_tree
, hf_android_opcode
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
433 opcode_tree
= proto_item_add_subtree(opcode_item
, ett_android_opcode
);
434 opcode
= tvb_get_letohs(tvb
, offset
);
435 proto_tree_add_item(opcode_tree
, hf_android_opcode_ogf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
437 proto_tree_add_item(opcode_tree
, hf_android_opcode_ocf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
438 ocf
= opcode
& 0x03ff;
441 description
= val_to_str_const(ocf
, android_opcode_ocf_vals
, "unknown");
442 if (g_strcmp0(description
, "unknown") != 0)
443 col_append_str(pinfo
->cinfo
, COL_INFO
, description
);
445 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Unknown Command 0x%04X (opcode 0x%04X)", ocf
, opcode
);
447 if (have_tap_listener(bluetooth_hci_summary_tap
)) {
448 bluetooth_hci_summary_tap_t
*tap_hci_summary
;
450 tap_hci_summary
= wmem_new(pinfo
->pool
, bluetooth_hci_summary_tap_t
);
451 tap_hci_summary
->interface_id
= interface_id
;
452 tap_hci_summary
->adapter_id
= adapter_id
;
454 tap_hci_summary
->type
= BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE
;
455 tap_hci_summary
->ogf
= opcode
>> 10;
456 tap_hci_summary
->ocf
= ocf
;
457 if (try_val_to_str(ocf
, android_opcode_ocf_vals
))
458 tap_hci_summary
->name
= description
;
460 tap_hci_summary
->name
= NULL
;
461 tap_queue_packet(bluetooth_hci_summary_tap
, pinfo
, tap_hci_summary
);
464 proto_tree_add_item(main_tree
, hf_android_parameter_length
, tvb
, offset
, 1, ENC_NA
);
465 length
= tvb_get_uint8(tvb
, offset
);
469 case 0x0154: /* LE Multi Advertising */
470 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_subcode
, tvb
, offset
, 1, ENC_NA
);
471 subcode
= tvb_get_uint8(tvb
, offset
);
475 case 0x01: /* Set Parameter */
476 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_min_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
479 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_max_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
482 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_type
, tvb
, offset
, 1, ENC_NA
);
485 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_address_type
, tvb
, offset
, 1, ENC_NA
);
488 offset
= dissect_bd_addr(hf_android_bd_addr
, pinfo
, main_tree
, tvb
, offset
, false, interface_id
, adapter_id
, NULL
);
490 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_address_type
, tvb
, offset
, 1, ENC_NA
);
493 offset
= dissect_bd_addr(hf_android_bd_addr
, pinfo
, main_tree
, tvb
, offset
, false, interface_id
, adapter_id
, NULL
);
495 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_android_le_multi_advertising_channel_map
, ett_android_channel_map
, hfx_android_le_multi_advertising_channel_map
, ENC_NA
);
498 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_filter_policy
, tvb
, offset
, 1, ENC_NA
);
501 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
504 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_tx_power
, tvb
, offset
, 1, ENC_NA
);
508 case 0x02: /* Write Advertising Data */
509 case 0x03: /* Write Scan Response Data */
510 call_dissector_with_data(btcommon_ad_android_handle
, tvb_new_subset_length(tvb
, offset
, 31), pinfo
, tree
, bluetooth_data
);
511 save_local_device_name_from_eir_ad(tvb
, offset
, pinfo
, 31, bluetooth_data
);
514 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
518 case 0x04: /* Set Random Address */
519 offset
= dissect_bd_addr(hf_android_bd_addr
, pinfo
, main_tree
, tvb
, offset
, false, interface_id
, adapter_id
, NULL
);
521 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
525 case 0x05: /* MultiAdvertising Enable/Disable Customer Feature */
526 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_enable
, tvb
, offset
, 1, ENC_NA
);
529 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_instance_id
, tvb
, offset
, 1, ENC_NA
);
536 case 0x0156: /* LE Batch Scan */
537 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_subcode
, tvb
, offset
, 1, ENC_NA
);
538 subcode
= tvb_get_uint8(tvb
, offset
);
542 case 0x01: /* Enable/Disable Customer Feature */
543 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_enable
, tvb
, offset
, 1, ENC_NA
);
547 case 0x02: /* Set Storage Parameter */
548 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_full_max
, tvb
, offset
, 1, ENC_NA
);
551 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_truncate_max
, tvb
, offset
, 1, ENC_NA
);
554 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_notify_threshold
, tvb
, offset
, 1, ENC_NA
);
558 case 0x03: /* Set Parameter */
559 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_mode
, tvb
, offset
, 1, ENC_NA
);
562 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_window
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
565 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_interval
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
568 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_address_type
, tvb
, offset
, 1, ENC_NA
);
571 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_discard_rule
, tvb
, offset
, 1, ENC_NA
);
575 case 0x04: /* Read Results */
576 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_mode
, tvb
, offset
, 1, ENC_NA
);
583 case 0x0157: /* LE Advertising Filter */
584 proto_tree_add_item(main_tree
, hf_android_le_advertising_filter_subcode
, tvb
, offset
, 1, ENC_NA
);
585 subcode
= tvb_get_uint8(tvb
, offset
);
588 proto_tree_add_item(main_tree
, hf_android_le_scan_condition
, tvb
, offset
, 1, ENC_NA
);
589 condition
= tvb_get_uint8(tvb
, offset
);
592 proto_tree_add_item(main_tree
, hf_android_le_filter_index
, tvb
, offset
, 1, ENC_NA
);
595 if (condition
== 0x00) { /* Add */
597 case 0x00: /* Enable */
598 case 0x01: /* Feature Select */
599 case 0x02: /* BDADDR */
600 case 0x03: /* UUID */
601 case 0x04: /* Solicitate UUID */
602 case 0x05: /* Local Name */
603 case 0x06: /* Manufacturer Data */
604 case 0x07: /* Service Data */
607 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
- 3, ENC_NA
);
608 expert_add_info(pinfo
, sub_item
, &ei_android_undecoded
);
609 offset
+= length
- 3;
613 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
- 3, ENC_NA
);
614 expert_add_info(pinfo
, sub_item
, &ei_android_unexpected_data
);
615 offset
+= length
- 3;
620 case 0x0153: /* LE Get Vendor Capabilities */
621 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
622 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
, ENC_NA
);
623 expert_add_info(pinfo
, sub_item
, &ei_android_unexpected_parameter
);
626 case 0x0159: /* LE Energy Info */
627 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
628 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
, ENC_NA
);
629 expert_add_info(pinfo
, sub_item
, &ei_android_unexpected_parameter
);
632 case 0x015D: /* A2DP Hardware Offload */
633 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_subcode
, tvb
, offset
, 1, ENC_NA
);
634 subcode
= tvb_get_uint8(tvb
, offset
);
638 case 0x01: { /* Start A2DP offload (legacy) */
639 int codec_id
= tvb_get_uint32(tvb
, offset
, ENC_LITTLE_ENDIAN
);
641 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
644 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_max_latency
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
647 /* Flag is the LSB out of the two, read it first */
648 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_flag
, tvb
, offset
, 1, ENC_NA
);
651 bool scms_t_enabled
= tvb_get_uint8(tvb
, offset
) == 0x01;
652 if (scms_t_enabled
) {
653 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_value
, tvb
, offset
, 1, ENC_NA
);
655 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved
, tvb
, offset
, 1, ENC_NA
);
659 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_sampling_frequency
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
662 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_bits_per_sample
, tvb
, offset
, 1, ENC_NA
);
665 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_channel_mode
, tvb
, offset
, 1, ENC_NA
);
668 uint32_t encoded_audio_bitrate
= tvb_get_uint32(tvb
, offset
, ENC_LITTLE_ENDIAN
);
669 if (encoded_audio_bitrate
== 0x00000000) {
670 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
671 } else if (encoded_audio_bitrate
>= 0x01000000) {
672 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
674 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
678 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
681 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_l2cap_cid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
684 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_l2cap_mtu_size
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
687 codec_information_item
= proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information
, tvb
, offset
, 32, ENC_NA
);
688 codec_information_tree
= proto_item_add_subtree(codec_information_item
, ett_android_a2dp_hardware_offload_start_legacy_codec_information
);
691 case 0x00000001: /* SBC */
692 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length
, tvb
, offset
, 1, ENC_NA
);
693 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands
, tvb
, offset
, 1, ENC_NA
);
694 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method
, tvb
, offset
, 1, ENC_NA
);
697 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool
, tvb
, offset
, 1, ENC_NA
);
700 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool
, tvb
, offset
, 1, ENC_NA
);
703 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency
, tvb
, offset
, 1, ENC_NA
);
704 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode
, tvb
, offset
, 1, ENC_NA
);
707 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved
, tvb
, offset
, 28, ENC_NA
);
710 case 0x00000002: /* AAC */
711 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type
, tvb
, offset
, 1, ENC_NA
);
714 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr
, tvb
, offset
, 1, ENC_NA
);
717 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved
, tvb
, offset
, 30, ENC_NA
);
720 case 0x00000010: /* LDAC */
721 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
724 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
727 uint8_t bitrate_index
= tvb_get_uint8(tvb
, offset
);
728 if (bitrate_index
>= 0x03 && bitrate_index
!= 0x7F) {
729 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved
, tvb
, offset
, 1, ENC_NA
);
731 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index
, tvb
, offset
, 1, ENC_NA
);
735 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
,
736 ett_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
, hfx_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode
, ENC_NA
);
739 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved
, tvb
, offset
, 24, ENC_NA
);
742 default: /* All other codecs */
743 proto_tree_add_item(codec_information_tree
, hf_android_a2dp_hardware_offload_start_legacy_codec_information_reserved
, tvb
, offset
, 32, ENC_NA
);
750 case 0x02: { /* Stop A2DP offload (legacy) */
751 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
752 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
, ENC_NA
);
753 expert_add_info(pinfo
, sub_item
, &ei_android_unexpected_parameter
);
757 case 0x03: { /* Start A2DP offload */
758 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
761 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_l2cap_cid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
764 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_data_path_direction
, tvb
, offset
, 1, ENC_NA
);
767 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_peer_mtu
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
770 bool cp_enable_scmst
= tvb_get_uint8(tvb
, offset
) == 0x01;
771 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_cp_enable_scmst
, tvb
, offset
, 1, ENC_NA
);
774 if (cp_enable_scmst
) {
775 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_cp_header_scmst
, tvb
, offset
, 1, ENC_NA
);
777 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_cp_header_scmst_reserved
, tvb
, offset
, 1, ENC_NA
);
781 uint8_t vendor_specific_parameters_length
= tvb_get_uint8(tvb
, offset
);
782 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_vendor_specific_parameters_length
, tvb
, offset
, 1, ENC_NA
);
785 if (vendor_specific_parameters_length
> 0 && vendor_specific_parameters_length
<= 128) {
786 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_start_vendor_specific_parameters
, tvb
, offset
, vendor_specific_parameters_length
, ENC_NA
);
787 offset
+= vendor_specific_parameters_length
;
791 case 0x04: { /* Stop A2DP offload */
792 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_stop_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
795 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_stop_l2cap_cid
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
798 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_stop_data_path_direction
, tvb
, offset
, 1, ENC_NA
);
804 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
805 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
, ENC_NA
);
806 expert_add_info(pinfo
, sub_item
, &ei_android_unexpected_parameter
);
814 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
, ENC_NA
);
815 expert_add_info(pinfo
, sub_item
, &ei_android_undecoded
);
822 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HCI_EVT_ANDROID");
823 col_set_str(pinfo
->cinfo
, COL_INFO
, "Rcvd Android ");
825 event_code
= tvb_get_uint8(tvb
, offset
);
826 description
= val_to_str_ext(event_code
, &bthci_evt_evt_code_vals_ext
, "Unknown 0x%08x");
827 col_append_str(pinfo
->cinfo
, COL_INFO
, description
);
828 proto_tree_add_item(main_tree
, hf_android_event_code
, tvb
, offset
, 1, ENC_NA
);
831 if (have_tap_listener(bluetooth_hci_summary_tap
)) {
832 bluetooth_hci_summary_tap_t
*tap_hci_summary
;
834 tap_hci_summary
= wmem_new(pinfo
->pool
, bluetooth_hci_summary_tap_t
);
835 tap_hci_summary
->interface_id
= interface_id
;
836 tap_hci_summary
->adapter_id
= adapter_id
;
838 tap_hci_summary
->type
= BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT
;
839 tap_hci_summary
->event
= event_code
;
840 if (try_val_to_str_ext(event_code
, &bthci_evt_evt_code_vals_ext
))
841 tap_hci_summary
->name
= description
;
843 tap_hci_summary
->name
= NULL
;
844 tap_queue_packet(bluetooth_hci_summary_tap
, pinfo
, tap_hci_summary
);
847 proto_tree_add_item(main_tree
, hf_android_parameter_length
, tvb
, offset
, 1, ENC_NA
);
848 length
= tvb_get_uint8(tvb
, offset
);
851 switch (event_code
) {
852 case 0x0e: /* Command Complete */
853 proto_tree_add_item(main_tree
, hf_android_number_of_allowed_command_packets
, tvb
, offset
, 1, ENC_NA
);
856 opcode_item
= proto_tree_add_item(main_tree
, hf_android_opcode
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
857 opcode_tree
= proto_item_add_subtree(opcode_item
, ett_android_opcode
);
858 opcode
= tvb_get_letohs(tvb
, offset
);
859 proto_tree_add_item(opcode_tree
, hf_android_opcode_ogf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
861 proto_tree_add_item(opcode_tree
, hf_android_opcode_ocf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
862 ocf
= opcode
& 0x03ff;
865 description
= val_to_str_const(ocf
, android_opcode_ocf_vals
, "unknown");
866 if (g_strcmp0(description
, "unknown") != 0)
867 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (%s)", description
);
869 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (Unknown Command 0x%04X [opcode 0x%04X])", ocf
, opcode
);
871 if (have_tap_listener(bluetooth_hci_summary_tap
)) {
872 bluetooth_hci_summary_tap_t
*tap_hci_summary
;
874 tap_hci_summary
= wmem_new(pinfo
->pool
, bluetooth_hci_summary_tap_t
);
875 tap_hci_summary
->interface_id
= interface_id
;
876 tap_hci_summary
->adapter_id
= adapter_id
;
878 tap_hci_summary
->type
= BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT_OPCODE
;
879 tap_hci_summary
->ogf
= opcode
>> 10;
880 tap_hci_summary
->ocf
= ocf
;
881 if (try_val_to_str(ocf
, android_opcode_ocf_vals
))
882 tap_hci_summary
->name
= description
;
884 tap_hci_summary
->name
= NULL
;
885 tap_queue_packet(bluetooth_hci_summary_tap
, pinfo
, tap_hci_summary
);
888 proto_tree_add_item(main_tree
, hf_android_status
, tvb
, offset
, 1, ENC_NA
);
889 status
= tvb_get_uint8(tvb
, offset
);
893 case 0x0153: /* LE Get Vendor Capabilities */
894 if (status
!= STATUS_SUCCESS
)
897 uint16_t google_feature_spec_version
= tvb_get_uint16(tvb
, offset
+ 8, ENC_LITTLE_ENDIAN
);
898 if (google_feature_spec_version
< 0x0098) {
899 proto_tree_add_item(main_tree
, hf_android_max_advertising_instance
, tvb
, offset
, 1, ENC_NA
);
901 proto_tree_add_item(main_tree
, hf_android_max_advertising_instance_reserved
, tvb
, offset
, 1, ENC_NA
);
905 if (google_feature_spec_version
< 0x0098) {
906 proto_tree_add_item(main_tree
, hf_android_resolvable_private_address_offloading
, tvb
, offset
, 1, ENC_NA
);
908 proto_tree_add_item(main_tree
, hf_android_resolvable_private_address_offloading_reserved
, tvb
, offset
, 1, ENC_NA
);
912 proto_tree_add_item(main_tree
, hf_android_total_scan_results
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
915 proto_tree_add_item(main_tree
, hf_android_max_irk_list
, tvb
, offset
, 1, ENC_NA
);
918 proto_tree_add_item(main_tree
, hf_android_filter_support
, tvb
, offset
, 1, ENC_NA
);
921 proto_tree_add_item(main_tree
, hf_android_max_filter
, tvb
, offset
, 1, ENC_NA
);
924 proto_tree_add_item(main_tree
, hf_android_energy_support
, tvb
, offset
, 1, ENC_NA
);
927 proto_tree_add_item(main_tree
, hf_android_version_support
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
930 proto_tree_add_item(main_tree
, hf_android_total_num_of_advt_tracked
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
933 proto_tree_add_item(main_tree
, hf_android_extended_scan_support
, tvb
, offset
, 1, ENC_NA
);
936 proto_tree_add_item(main_tree
, hf_android_debug_logging_support
, tvb
, offset
, 1, ENC_NA
);
939 if (google_feature_spec_version
< 0x0098) {
940 proto_tree_add_item(main_tree
, hf_android_le_address_generation_offloading_support
, tvb
, offset
, 1, ENC_NA
);
942 proto_tree_add_item(main_tree
, hf_android_le_address_generation_offloading_support_reserved
, tvb
, offset
, 1, ENC_NA
);
946 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_android_a2dp_source_offload_capability_mask
, ett_android_a2dp_source_offload_capability_mask
, hfx_android_a2dp_source_offload_capability
, ENC_LITTLE_ENDIAN
);
949 proto_tree_add_item(main_tree
, hf_android_bluetooth_quality_report_support
, tvb
, offset
, 1, ENC_NA
);
952 proto_tree_add_bitmask(main_tree
, tvb
, offset
, hf_android_dynamic_audio_buffer_support_mask
, ett_android_dynamic_audio_buffer_support_mask
, hfx_android_dynamic_audio_buffer_support
, ENC_LITTLE_ENDIAN
);
955 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
956 proto_tree_add_item(main_tree
, hf_android_a2dp_offload_v2_support
, tvb
, offset
, 1, ENC_NA
);
961 case 0x0154: /* LE Multi Advertising */
962 proto_tree_add_item(main_tree
, hf_android_le_multi_advertising_subcode
, tvb
, offset
, 1, ENC_NA
);
966 case 0x0156: /* LE Batch Scan */
967 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_subcode
, tvb
, offset
, 1, ENC_NA
);
968 subcode
= tvb_get_uint8(tvb
, offset
);
971 if (subcode
== 0x04 && status
== STATUS_SUCCESS
) { /* Read Results*/
972 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_report_format
, tvb
, offset
, 1, ENC_NA
);
975 proto_tree_add_item(main_tree
, hf_android_le_batch_scan_number_of_records
, tvb
, offset
, 1, ENC_NA
);
981 case 0x0157: /* LE Advertising Filter */
982 proto_tree_add_item(main_tree
, hf_android_le_advertising_filter_subcode
, tvb
, offset
, 1, ENC_NA
);
985 if (status
== STATUS_SUCCESS
) {
986 proto_tree_add_item(main_tree
, hf_android_le_scan_condition
, tvb
, offset
, 1, ENC_NA
);
989 proto_tree_add_item(main_tree
, hf_android_le_number_of_available_filters
, tvb
, offset
, 1, ENC_NA
);
994 case 0x0159: /* LE Energy Info */
995 if (status
== STATUS_SUCCESS
) {
996 proto_tree_add_item(main_tree
, hf_android_le_energy_total_rx_time
, tvb
, offset
, 1, ENC_NA
);
999 proto_tree_add_item(main_tree
, hf_android_le_energy_total_tx_time
, tvb
, offset
, 1, ENC_NA
);
1002 proto_tree_add_item(main_tree
, hf_android_le_energy_total_idle_time
, tvb
, offset
, 1, ENC_NA
);
1005 proto_tree_add_item(main_tree
, hf_android_le_energy_total_energy_used
, tvb
, offset
, 1, ENC_NA
);
1010 case 0x015D: /* A2DP Hardware Offload */
1011 proto_tree_add_item(main_tree
, hf_android_a2dp_hardware_offload_subcode
, tvb
, offset
, 1, ENC_NA
);
1017 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
, ENC_NA
);
1018 expert_add_info(pinfo
, sub_item
, &ei_android_undecoded
);
1026 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, length
, ENC_NA
);
1027 expert_add_info(pinfo
, sub_item
, &ei_android_undecoded
);
1035 case P2P_DIR_UNKNOWN
:
1037 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HCI_ANDROID");
1038 col_set_str(pinfo
->cinfo
, COL_INFO
, "UnknownDirection Android ");
1040 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1041 proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, tvb_captured_length_remaining(tvb
, offset
), ENC_NA
);
1042 offset
+= tvb_captured_length_remaining(tvb
, offset
);
1047 if (tvb_captured_length_remaining(tvb
, offset
) > 0) {
1048 sub_item
= proto_tree_add_item(main_tree
, hf_android_data
, tvb
, offset
, tvb_captured_length_remaining(tvb
, offset
), ENC_NA
);
1049 expert_add_info(pinfo
, sub_item
, &ei_android_unexpected_data
);
1050 offset
+= tvb_captured_length_remaining(tvb
, offset
);
1057 proto_register_bthci_vendor_android(void)
1059 expert_module_t
*expert_module
;
1061 static hf_register_info hf
[] = {
1062 { &hf_android_opcode
,
1063 { "Command Opcode", "bthci_vendor.android.opcode",
1064 FT_UINT16
, BASE_HEX
, VALS(android_opcode_vals
), 0x0,
1065 "HCI Command Opcode", HFILL
}
1067 { &hf_android_opcode_ogf
,
1068 { "Opcode Group Field", "bthci_vendor.android.opcode.ogf",
1069 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_ogf_vals_ext
, 0xfc00,
1072 { &hf_android_opcode_ocf
,
1073 { "Opcode Command Field", "bthci_vendor.android.opcode.ocf",
1074 FT_UINT16
, BASE_HEX
, VALS(android_opcode_ocf_vals
), 0x03ff,
1077 { &hf_android_parameter_length
,
1078 { "Parameter Total Length", "bthci_vendor.android.parameter_length",
1079 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1082 { &hf_android_event_code
,
1083 { "Event Code", "bthci_vendor.android.event_code",
1084 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_evt_evt_code_vals_ext
, 0x0,
1087 { &hf_android_number_of_allowed_command_packets
,
1088 { "Number of Allowed Command Packets", "bthci_vendor.android.number_of_allowed_command_packets",
1089 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1092 { &hf_android_le_advertising_filter_subcode
,
1093 { "Subcode", "bthci_vendor.android.le.advertising_filter.subcode",
1094 FT_UINT8
, BASE_HEX
, VALS(android_le_subcode_advertising_filter_vals
), 0x0,
1097 { &hf_android_le_scan_condition
,
1098 { "Scan Condition", "bthci_vendor.android.le.scan_condition",
1099 FT_UINT8
, BASE_HEX
, VALS(android_le_scan_condition_vals
), 0x0,
1102 { &hf_android_le_filter_index
,
1103 { "Filter Index", "bthci_vendor.android.le.filter_index",
1104 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1107 { &hf_android_le_number_of_available_filters
,
1108 { "Number of Available Filters", "bthci_vendor.android.le.number_of_available_filters",
1109 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1112 { &hf_android_bd_addr
,
1113 { "BD_ADDR", "bthci_vendor.android.bd_addr",
1114 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
1115 "Bluetooth Device Address", HFILL
}
1117 { &hf_android_max_advertising_instance
,
1118 { "Max Advertising Instance", "bthci_vendor.android.max_advertising_instance",
1119 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1122 { &hf_android_max_advertising_instance_reserved
,
1123 { "Reserved", "bthci_vendor.android.max_advertising_instance_reserved",
1124 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1127 { &hf_android_resolvable_private_address_offloading
,
1128 { "Resolvable Private Address Offloading", "bthci_vendor.android.resolvable_private_address_offloading",
1129 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1132 { &hf_android_resolvable_private_address_offloading_reserved
,
1133 { "Reserved", "bthci_vendor.android.resolvable_private_address_offloading_reserved",
1134 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1137 { &hf_android_total_scan_results
,
1138 { "Total Scan Results", "bthci_vendor.android.total_scan_results",
1139 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1142 { &hf_android_max_irk_list
,
1143 { "Max IRK List", "bthci_vendor.android.max_irk_list",
1144 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1147 { &hf_android_filter_support
,
1148 { "Filter Support", "bthci_vendor.android.filter_support",
1149 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1152 { &hf_android_max_filter
,
1153 { "Max Filter", "bthci_vendor.android.max_filter",
1154 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1157 { &hf_android_energy_support
,
1158 { "Energy Support", "bthci_vendor.android.energy_support",
1159 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1162 { &hf_android_version_support
,
1163 { "Version Support", "bthci_vendor.android.version_support",
1164 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1167 { &hf_android_total_num_of_advt_tracked
,
1168 { "Total Number of Advertisers Tracked", "bthci_vendor.android.total_num_of_advt_tracked",
1169 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1172 { &hf_android_extended_scan_support
,
1173 { "Extended Scan Support", "bthci_vendor.android.extended_scan_support",
1174 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1177 { &hf_android_debug_logging_support
,
1178 { "Debug Logging Support", "bthci_vendor.android.debug_logging_support",
1179 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1182 { &hf_android_le_address_generation_offloading_support
,
1183 { "LE Address Generation Offloading Support", "bthci_vendor.android.le_address_generation_offloading_support",
1184 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1187 { &hf_android_le_address_generation_offloading_support_reserved
,
1188 { "Reserved", "bthci_vendor.android.le_address_generation_offloading_support_reserved",
1189 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1192 { &hf_android_a2dp_source_offload_capability_mask
,
1193 { "A2DP Source Offload Capability", "bthci_vendor.android.a2dp_source_offload_capability_mask",
1194 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1197 { &hf_android_a2dp_source_offload_capability_mask_sbc
,
1198 { "SBC", "bthci_vendor.android.a2dp_source_offload_capability_mask.sbc",
1199 FT_BOOLEAN
, 32, NULL
, 0x00000001,
1202 { &hf_android_a2dp_source_offload_capability_mask_aac
,
1203 { "AAC", "bthci_vendor.android.a2dp_source_offload_capability_mask.aac",
1204 FT_BOOLEAN
, 32, NULL
, 0x00000002,
1207 { &hf_android_a2dp_source_offload_capability_mask_aptx
,
1208 { "APTX", "bthci_vendor.android.a2dp_source_offload_capability_mask.aptx",
1209 FT_BOOLEAN
, 32, NULL
, 0x00000004,
1212 { &hf_android_a2dp_source_offload_capability_mask_aptx_hd
,
1213 { "APTX HD", "bthci_vendor.android.a2dp_source_offload_capability_mask.aptx_hd",
1214 FT_BOOLEAN
, 32, NULL
, 0x00000008,
1217 { &hf_android_a2dp_source_offload_capability_mask_ldac
,
1218 { "LDAC", "bthci_vendor.android.a2dp_source_offload_capability_mask.ldac",
1219 FT_BOOLEAN
, 32, NULL
, 0x00000010,
1222 { &hf_android_a2dp_source_offload_capability_mask_reserved
,
1223 { "Reserved", "bthci_vendor.android.a2dp_source_offload_capability_mask.reserved",
1224 FT_UINT32
, BASE_HEX
, NULL
, UINT32_C(0xFFFFFFE0),
1227 { &hf_android_bluetooth_quality_report_support
,
1228 { "Bluetooth Quality Report Support", "bthci_vendor.android.bluetooth_quality_report_support",
1229 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1232 { &hf_android_dynamic_audio_buffer_support_mask
,
1233 { "Dynamic Audio Buffer Support", "bthci_vendor.android.dynamic_audio_buffer_support_mask",
1234 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1237 { &hf_android_dynamic_audio_buffer_support_mask_sbc
,
1238 { "SBC", "bthci_vendor.android.dynamic_audio_buffer_support_mask.sbc",
1239 FT_BOOLEAN
, 32, NULL
, 0x00000001,
1242 { &hf_android_dynamic_audio_buffer_support_mask_aac
,
1243 { "AAC", "bthci_vendor.android.dynamic_audio_buffer_support_mask.aac",
1244 FT_BOOLEAN
, 32, NULL
, 0x00000002,
1247 { &hf_android_dynamic_audio_buffer_support_mask_aptx
,
1248 { "APTX", "bthci_vendor.android.dynamic_audio_buffer_support_mask.aptx",
1249 FT_BOOLEAN
, 32, NULL
, 0x00000004,
1252 { &hf_android_dynamic_audio_buffer_support_mask_aptx_hd
,
1253 { "APTX HD", "bthci_vendor.android.dynamic_audio_buffer_support_mask.aptx_hd",
1254 FT_BOOLEAN
, 32, NULL
, 0x00000008,
1257 { &hf_android_dynamic_audio_buffer_support_mask_ldac
,
1258 { "LDAC", "bthci_vendor.android.dynamic_audio_buffer_support_mask.ldac",
1259 FT_BOOLEAN
, 32, NULL
, 0x00000010,
1262 { &hf_android_dynamic_audio_buffer_support_mask_reserved
,
1263 { "Reserved", "bthci_vendor.android.dynamic_audio_buffer_support_mask.reserved",
1264 FT_UINT32
, BASE_HEX
, NULL
, UINT32_C(0xFFFFFFE0),
1267 { &hf_android_a2dp_offload_v2_support
,
1268 { "A2DP Offload V2 Support", "bthci_vendor.android.a2dp_offload_v2_support",
1269 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1272 { &hf_android_status
,
1273 { "Status", "bthci_vendor.android.status",
1274 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_status_vals_ext
, 0x0,
1277 { &hf_android_le_energy_total_rx_time
,
1278 { "Total RX Time", "bthci_vendor.android.le.total_rx_time",
1279 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1282 { &hf_android_le_energy_total_tx_time
,
1283 { "Total TX Time", "bthci_vendor.android.le.total_tx_time",
1284 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1287 { &hf_android_le_energy_total_idle_time
,
1288 { "Total Idle Time", "bthci_vendor.android.le.total_idle_time",
1289 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1292 { &hf_android_le_energy_total_energy_used
,
1293 { "Total Energy Used Time", "bthci_vendor.android.le.total_energy_used",
1294 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1297 { &hf_android_le_batch_scan_subcode
,
1298 { "Subcode", "bthci_vendor.android.le.batch_scan.subcode",
1299 FT_UINT8
, BASE_HEX
, VALS(android_le_subcode_batch_scan_vals
), 0x0,
1302 { &hf_android_le_batch_scan_report_format
,
1303 { "Report Format", "bthci_vendor.android.le.batch_scan.report_format",
1304 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1307 { &hf_android_le_batch_scan_number_of_records
,
1308 { "Number of Records", "bthci_vendor.android.le.batch_scan.number_of_records",
1309 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1312 { &hf_android_le_batch_scan_mode
,
1313 { "Mode", "bthci_vendor.android.le.batch_scan.mode",
1314 FT_UINT8
, BASE_HEX
, VALS(android_batch_scan_mode_vals
), 0x0,
1317 { &hf_android_le_batch_scan_enable
,
1318 { "Enable", "bthci_vendor.android.le.batch_scan.enable",
1319 FT_UINT8
, BASE_HEX
, VALS(android_disable_enable_vals
), 0x0,
1322 { &hf_android_le_batch_scan_full_max
,
1323 { "Full Max", "bthci_vendor.android.le.batch_scan.full_max",
1324 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1327 { &hf_android_le_batch_scan_truncate_max
,
1328 { "Truncate Max", "bthci_vendor.android.le.batch_scan.truncate_max",
1329 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1332 { &hf_android_le_batch_scan_notify_threshold
,
1333 { "notify_threshold", "bthci_vendor.android.le.batch_scan.notify_threshold",
1334 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1337 { &hf_android_le_batch_scan_window
,
1338 { "Window", "bthci_vendor.android.le.batch_scan.window",
1339 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1342 { &hf_android_le_batch_scan_interval
,
1343 { "Interval", "bthci_vendor.android.le.batch_scan.interval",
1344 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1347 { &hf_android_le_batch_scan_address_type
,
1348 { "Address Type", "bthci_vendor.android.le.batch_scan.address_type",
1349 FT_UINT8
, BASE_HEX
, VALS(bluetooth_address_type_vals
), 0x0,
1352 { &hf_android_le_batch_scan_discard_rule
,
1353 { "Discard Rule", "bthci_vendor.android.le.batch_scan.discard_rule",
1354 FT_UINT8
, BASE_HEX
, VALS(android_batch_scan_discard_rule_vals
), 0x0,
1357 { &hf_android_le_multi_advertising_subcode
,
1358 { "Subcode", "bthci_vendor.android.le.multi_advertising.subcode",
1359 FT_UINT8
, BASE_HEX
, VALS(android_le_subcode_multi_advertising_vals
), 0x0,
1362 { &hf_android_le_multi_advertising_enable
,
1363 { "Enable", "bthci_vendor.android.le.multi_advertising.enable",
1364 FT_UINT8
, BASE_HEX
, VALS(android_disable_enable_vals
), 0x0,
1367 { &hf_android_le_multi_advertising_instance_id
,
1368 { "Instance Id", "bthci_vendor.android.le.multi_advertising.instance_id",
1369 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1372 { &hf_android_le_multi_advertising_min_interval
,
1373 { "Min Interval", "bthci_vendor.android.le.multi_advertising.min_interval",
1374 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1377 { &hf_android_le_multi_advertising_max_interval
,
1378 { "Max Interval", "bthci_vendor.android.le.multi_advertising.max_interval",
1379 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1382 { &hf_android_le_multi_advertising_address_type
,
1383 { "Address Type", "bthci_vendor.android.le.multi_advertising.address_type",
1384 FT_UINT8
, BASE_HEX
, VALS(bluetooth_address_type_vals
), 0x0,
1387 { &hf_android_le_multi_advertising_type
,
1388 { "Type", "bthci_vendor.android.le.multi_advertising.type",
1389 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_eir_data_type_vals_ext
, 0x0,
1392 { &hf_android_le_multi_advertising_channel_map
,
1393 { "Channel Map", "bthci_vendor.android.le.multi_advertising.channel_map",
1394 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1397 { &hf_android_le_multi_advertising_channel_map_reserved
,
1398 { "Reserved", "bthci_vendor.android.le.multi_advertising.channel_map.reserved",
1399 FT_UINT8
, BASE_HEX
, NULL
, 0xF8,
1402 { &hf_android_le_multi_advertising_channel_map_39
,
1403 { "Channel 39", "bthci_vendor.android.le.multi_advertising.channel_map.39",
1404 FT_UINT8
, BASE_HEX
, NULL
, 0x04,
1407 { &hf_android_le_multi_advertising_channel_map_38
,
1408 { "Channel 38", "bthci_vendor.android.le.multi_advertising.channel_map.38",
1409 FT_UINT8
, BASE_HEX
, NULL
, 0x02,
1412 { &hf_android_le_multi_advertising_channel_map_37
,
1413 { "Channel 37", "bthci_vendor.android.le.multi_advertising.channel_map.37",
1414 FT_UINT8
, BASE_HEX
, NULL
, 0x01,
1417 { &hf_android_le_multi_advertising_filter_policy
,
1418 { "Filter Policy", "bthci_vendor.android.le.multi_advertising.filter_policy",
1419 FT_UINT8
, BASE_HEX
, VALS(android_le_filter_policy_vals
), 0x0,
1422 { &hf_android_le_multi_advertising_tx_power
,
1423 { "Tx power", "bthci_vendor.android.le.multi_advertising.tx_power",
1424 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1428 { "Data", "bthci_vendor.android.data",
1429 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1432 { &hf_android_a2dp_hardware_offload_subcode
,
1433 { "Subcode", "bthci_vendor.android.a2dp_hardware_offload.subcode",
1434 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_vals
), 0x0,
1437 { &hf_android_a2dp_hardware_offload_start_legacy_codec
,
1438 { "Codec", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec",
1439 FT_UINT32
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_codec_vals
), 0x0,
1442 { &hf_android_a2dp_hardware_offload_start_legacy_max_latency
,
1443 { "Max Latency", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.max_latency",
1444 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1447 { &hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_flag
,
1448 { "SCMS-T Enable", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.scms_t_enable_flag",
1449 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1452 { &hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_value
,
1453 { "SCMS-T Value", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.scms_t_enable_value",
1454 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1457 { &hf_android_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved
,
1458 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.scms_t_enable_value_reserved",
1459 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1462 { &hf_android_a2dp_hardware_offload_start_legacy_sampling_frequency
,
1463 { "Sampling Frequency", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.sampling_frequency",
1464 FT_UINT32
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_sampling_frequency_vals
), 0x0,
1467 { &hf_android_a2dp_hardware_offload_start_legacy_bits_per_sample
,
1468 { "Bits Per Sample", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.bits_per_sample",
1469 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_bits_per_sample_vals
), 0x0,
1472 { &hf_android_a2dp_hardware_offload_start_legacy_channel_mode
,
1473 { "Channel Mode", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.channel_mode",
1474 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_channel_mode_vals
), 0x0,
1477 { &hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate
,
1478 { "Encoded Audio Bitrate", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate",
1479 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1482 { &hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified
,
1483 { "Encoded Audio Bitrate Unspecified/Unused", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate_unspecified",
1484 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1487 { &hf_android_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved
,
1488 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate_reserved",
1489 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1492 { &hf_android_a2dp_hardware_offload_start_legacy_connection_handle
,
1493 { "Connection Handle", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.connection_handle",
1494 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0,
1497 { &hf_android_a2dp_hardware_offload_start_legacy_l2cap_cid
,
1498 { "L2CAP CID", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.l2cap_cid",
1499 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1502 { &hf_android_a2dp_hardware_offload_start_legacy_l2cap_mtu_size
,
1503 { "L2CAP MTU Size", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.l2cap_mtu_size",
1504 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1507 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information
,
1508 { "Codec Information", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information",
1509 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1512 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length
,
1513 { "Block Length", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.block_length",
1514 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length_vals
), 0xf0,
1517 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands
,
1518 { "Subbands", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.subbands",
1519 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands_vals
), 0x0c,
1522 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method
,
1523 { "Allocation Method", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.allocation_method",
1524 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method_vals
), 0x03,
1527 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool
,
1528 { "Min Bitpool", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.min_bitpool",
1529 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1532 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool
,
1533 { "Max Bitpool", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.max_bitpool",
1534 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1537 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency
,
1538 { "Sampling Frequency", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.sampling_frequency",
1539 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_sbc_sampling_frequency_vals
), 0xf0,
1542 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode
,
1543 { "Channel Mode", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.channel_mode",
1544 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_sbc_channel_mode_vals
), 0x0f,
1547 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved
,
1548 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.sbc.reserved",
1549 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1552 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type
,
1553 { "Object Type", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.aac.object_type",
1554 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_aac_object_type_vals
), 0x0,
1557 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr
,
1558 { "VBR", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.aac.vbr",
1559 FT_BOOLEAN
, 8, NULL
, 0x80,
1562 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved
,
1563 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.aac.reserved",
1564 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1567 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id
,
1568 { "Vendor ID", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.vendor_id",
1569 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1572 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id
,
1573 { "Codec ID", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.codec_id",
1574 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1577 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index
,
1578 { "Bitrate Index", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.bitrate_index",
1579 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_vals
), 0x0,
1582 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved
,
1583 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.bitrate_index.reserved",
1584 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1587 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
,
1588 { "Channel Mode", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask",
1589 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1592 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo
,
1593 { "Stereo", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.stereo",
1594 FT_BOOLEAN
, 8, NULL
, 0x01,
1597 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual
,
1598 { "Dual", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.dual",
1599 FT_BOOLEAN
, 8, NULL
, 0x02,
1602 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono
,
1603 { "Mono", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.mono",
1604 FT_BOOLEAN
, 8, NULL
, 0x04,
1607 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved
,
1608 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.reserved",
1609 FT_UINT8
, BASE_HEX
, NULL
, UINT32_C(0xF8),
1612 { &hf_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved
,
1613 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start_legacy.codec_information.ldac.reserved",
1614 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1617 { &hf_android_a2dp_hardware_offload_start_connection_handle
,
1618 { "Connection Handle", "bthci_vendor.android.a2dp_hardware_offload.start.connection_handle",
1619 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0,
1622 { &hf_android_a2dp_hardware_offload_start_l2cap_cid
,
1623 { "L2CAP CID", "bthci_vendor.android.a2dp_hardware_offload.start.l2cap_cid",
1624 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1627 { &hf_android_a2dp_hardware_offload_start_data_path_direction
,
1628 { "Data Path Direction", "bthci_vendor.android.a2dp_hardware_offload.start.data_path_direction",
1629 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_data_path_direction_vals
), 0x0,
1632 { &hf_android_a2dp_hardware_offload_start_peer_mtu
,
1633 { "Peer MTU", "bthci_vendor.android.a2dp_hardware_offload.start.peer_mtu",
1634 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1637 { &hf_android_a2dp_hardware_offload_start_cp_enable_scmst
,
1638 { "CP Enable SCMS-T", "bthci_vendor.android.a2dp_hardware_offload.start.cp_enable_scmst",
1639 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
1642 { &hf_android_a2dp_hardware_offload_start_cp_header_scmst
,
1643 { "CP Header SCMS-T", "bthci_vendor.android.a2dp_hardware_offload.start.cp_header_scmst",
1644 FT_UINT8
, BASE_HEX_DEC
, NULL
, 0x0,
1647 { &hf_android_a2dp_hardware_offload_start_cp_header_scmst_reserved
,
1648 { "Reserved", "bthci_vendor.android.a2dp_hardware_offload.start.cp_header_scmst_reserved",
1649 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1652 { &hf_android_a2dp_hardware_offload_start_vendor_specific_parameters_length
,
1653 { "Vendor Specific Parameters Length", "bthci_vendor.android.a2dp_hardware_offload.start.vendor_specific_parameters_length",
1654 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1657 { &hf_android_a2dp_hardware_offload_start_vendor_specific_parameters
,
1658 { "Vendor Specific Parameters", "bthci_vendor.android.a2dp_hardware_offload.start.vendor_specific_parameters",
1659 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1662 { &hf_android_a2dp_hardware_offload_stop_connection_handle
,
1663 { "Connection Handle", "bthci_vendor.android.a2dp_hardware_offload.stop.connection_handle",
1664 FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0,
1667 { &hf_android_a2dp_hardware_offload_stop_l2cap_cid
,
1668 { "L2CAP CID", "bthci_vendor.android.a2dp_hardware_offload.stop.l2cap_cid",
1669 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1672 { &hf_android_a2dp_hardware_offload_stop_data_path_direction
,
1673 { "Data Path Direction", "bthci_vendor.android.a2dp_hardware_offload.stop.data_path_direction",
1674 FT_UINT8
, BASE_HEX
, VALS(android_a2dp_hardware_offload_data_path_direction_vals
), 0x0,
1679 static int *ett
[] = {
1681 &ett_android_opcode
,
1682 &ett_android_channel_map
,
1683 &ett_android_a2dp_source_offload_capability_mask
,
1684 &ett_android_dynamic_audio_buffer_support_mask
,
1685 &ett_android_a2dp_hardware_offload_start_legacy_codec_information
,
1686 &ett_android_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask
,
1689 static ei_register_info ei
[] = {
1690 { &ei_android_undecoded
, { "bthci_vendor.android.undecoded", PI_UNDECODED
, PI_NOTE
, "Undecoded", EXPFILL
}},
1691 { &ei_android_unexpected_parameter
, { "bthci_vendor.android.unexpected_parameter", PI_PROTOCOL
, PI_WARN
, "Unexpected parameter", EXPFILL
}},
1692 { &ei_android_unexpected_data
, { "bthci_vendor.android.unexpected_data", PI_PROTOCOL
, PI_WARN
, "Unexpected data", EXPFILL
}},
1695 proto_bthci_vendor_android
= proto_register_protocol("Bluetooth Android HCI",
1696 "HCI ANDROID", "bthci_vendor.android");
1698 bthci_vendor_android_handle
= register_dissector("bthci_vendor.android", dissect_bthci_vendor_android
, proto_bthci_vendor_android
);
1700 proto_register_field_array(proto_bthci_vendor_android
, hf
, array_length(hf
));
1701 proto_register_subtree_array(ett
, array_length(ett
));
1703 expert_module
= expert_register_protocol(proto_bthci_vendor_android
);
1704 expert_register_field_array(expert_module
, ei
, array_length(ei
));
1708 proto_reg_handoff_bthci_vendor_android(void)
1710 btcommon_ad_android_handle
= find_dissector_add_dependency("btcommon.eir_ad.ad", proto_bthci_vendor_android
);
1712 dissector_add_for_decode_as("bthci_cmd.vendor", bthci_vendor_android_handle
);
1714 dissector_add_uint("bluetooth.vendor", bthci_vendor_manufacturer_android
, bthci_vendor_android_handle
);
1718 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1723 * indent-tabs-mode: nil
1726 * vi: set shiftwidth=4 tabstop=8 expandtab:
1727 * :indentSize=4:tabSize=8:noTabs=true: