Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-bthci_cmd.c
blob791756ed23877402eda4fbb8b2eefda69b3c7335
1 /* packet-bthci-cmd.c
2 * Routines for the Bluetooth HCI Command dissection
3 * Copyright 2002, Christoph Scholz <scholz@cs.uni-bonn.de>
4 * From: http://affix.sourceforge.net/archive/ethereal_affix-3.patch
6 * Refactored for wireshark checkin
7 * Ronnie Sahlberg 2006
9 * Updated to HCI specification 2.1 + EDR
10 * Allan M. Madsen 2007
11 * Updated to HCI specification 3.0+HS & 4.0
12 * Allan M. Madsen 2012
13 * Updated to Core Specification 5.2
14 * Thomas Sailer 2021
15 * Updated to HCI specification 5.3
16 * Allan M. Madsen 2022
17 * Updated to HCI specification 5.4
18 * Allan M. Madsen 2023
19 * Updated to HCI specification 6.0
20 * Allan M. Madsen 2024
22 * Wireshark - Network traffic analyzer
23 * By Gerald Combs <gerald@wireshark.org>
24 * Copyright 1998 Gerald Combs
26 * SPDX-License-Identifier: GPL-2.0-or-later
29 #include "config.h"
31 #include <epan/packet.h>
32 #include <epan/addr_resolv.h>
33 #include <epan/expert.h>
34 #include <epan/prefs.h>
35 #include <epan/decode_as.h>
36 #include <epan/tap.h>
37 #include <epan/proto_data.h>
38 #include <epan/tfs.h>
39 #include <epan/unit_strings.h>
41 #include <wsutil/utf8_entities.h>
43 #include "packet-bluetooth.h"
44 #include "packet-bthci_cmd.h"
45 #include "packet-bthci_evt.h"
46 #include "packet-btatt.h"
48 static int proto_bthci_cmd;
50 static int hf_bthci_cmd_opcode;
51 static int hf_bthci_cmd_ogf;
52 static int hf_bthci_cmd_ocf;
53 static int hf_bthci_cmd_ocf_link_control;
54 static int hf_bthci_cmd_ocf_link_policy;
55 static int hf_bthci_cmd_ocf_host_controller_and_baseband;
56 static int hf_bthci_cmd_ocf_informational;
57 static int hf_bthci_cmd_ocf_status;
58 static int hf_bthci_cmd_ocf_testing;
59 static int hf_bthci_cmd_ocf_logo_testing;
60 static int hf_bthci_cmd_ocf_low_energy;
61 static int hf_bthci_cmd_param_length;
62 static int hf_bthci_cmd_lap;
63 static int hf_bthci_cmd_inq_length;
64 static int hf_bthci_cmd_num_responses;
65 static int hf_bthci_cmd_encrypt_mode;
66 static int hf_bthci_cmd_bd_addr;
67 static int hf_bthci_cmd_packet_type;
68 static int hf_bthci_cmd_packet_type_dh5;
69 static int hf_bthci_cmd_packet_type_dm5;
70 static int hf_bthci_cmd_packet_type_3dh5;
71 static int hf_bthci_cmd_packet_type_2dh5;
72 static int hf_bthci_cmd_packet_type_dh3;
73 static int hf_bthci_cmd_packet_type_dm3;
74 static int hf_bthci_cmd_packet_type_3dh3;
75 static int hf_bthci_cmd_packet_type_2dh3;
76 static int hf_bthci_cmd_packet_type_reserved_5_7;
77 static int hf_bthci_cmd_packet_type_dh1;
78 static int hf_bthci_cmd_packet_type_dm1;
79 static int hf_bthci_cmd_packet_type_3dh1;
80 static int hf_bthci_cmd_packet_type_2dh1;
81 static int hf_bthci_cmd_packet_type_reserved_0;
82 static int hf_bthci_cmd_clock_offset;
83 static int hf_bthci_cmd_clock_offset_valid;
84 static int hf_bthci_cmd_allow_role_switch;
85 static int hf_bthci_cmd_page_scan_mode;
86 static int hf_bthci_cmd_page_scan_repetition_mode;
87 static int hf_bthci_cmd_page_scan_period_mode;
88 static int hf_bthci_cmd_max_period_length;
89 static int hf_bthci_cmd_min_period_length;
90 static int hf_bthci_cmd_connection_handle;
91 static int hf_bthci_cmd_reason;
92 static int hf_bthci_cmd_num_link_keys;
93 static int hf_bthci_cmd_link_key;
94 static int hf_bthci_cmd_packet_type_hv1;
95 static int hf_bthci_cmd_packet_type_hv2;
96 static int hf_bthci_cmd_packet_type_hv3;
97 static int hf_bthci_cmd_role;
98 static int hf_bthci_cmd_acr_role;
99 static int hf_bthci_cmd_pin_code_length;
100 static int hf_bthci_cmd_pin_code;
101 static int hf_bthci_cmd_pin_type;
102 static int hf_bthci_cmd_encryption_enable;
103 static int hf_bthci_cmd_key_flag;
104 static int hf_bthci_cmd_max_interval_hold;
105 static int hf_bthci_cmd_min_interval_hold;
106 static int hf_bthci_cmd_max_interval_sniff;
107 static int hf_bthci_cmd_min_interval_sniff;
108 static int hf_bthci_cmd_sniff_attempt;
109 static int hf_bthci_cmd_sniff_timeout;
110 static int hf_bthci_cmd_timeout;
111 static int hf_bthci_cmd_max_interval_beacon;
112 static int hf_bthci_cmd_min_interval_beacon;
113 static int hf_bthci_cmd_flags;
114 static int hf_bthci_cmd_flow_direction;
115 static int hf_bthci_cmd_service_type;
116 static int hf_bthci_cmd_token_rate;
117 static int hf_bthci_cmd_token_bucket_size;
118 static int hf_bthci_cmd_peak_bandwidth;
119 static int hf_bthci_cmd_latency;
120 static int hf_bthci_cmd_delay_variation;
121 static int hf_bthci_cmd_link_policy_setting_switch;
122 static int hf_bthci_cmd_link_policy_setting_hold;
123 static int hf_bthci_cmd_link_policy_setting_sniff;
124 static int hf_bthci_cmd_link_policy_setting_park;
125 static int hf_bthci_cmd_filter_type;
126 static int hf_bthci_cmd_inquiry_result_filter_condition_type;
127 static int hf_bthci_cmd_connection_setup_filter_condition_type;
128 static int hf_bthci_cmd_cod_class_of_device_mask;
129 static int hf_bthci_cmd_cod_minor_device_class_mask;
130 static int hf_bthci_cmd_cod_format_type_mask;
131 static int hf_bthci_cmd_cod_major_service_class_information_mask;
132 static int hf_bthci_cmd_cod_major_service_class_telephony_mask;
133 static int hf_bthci_cmd_cod_major_service_class_audio_mask;
134 static int hf_bthci_cmd_cod_major_service_class_object_transfer_mask;
135 static int hf_bthci_cmd_cod_major_service_class_capturing_mask;
136 static int hf_bthci_cmd_cod_major_service_class_rendering_mask;
137 static int hf_bthci_cmd_cod_major_service_class_networking_mask;
138 static int hf_bthci_cmd_cod_major_service_class_positioning_mask;
139 static int hf_bthci_cmd_cod_major_service_class_reserved_mask;
140 static int hf_bthci_cmd_cod_major_service_class_le_audio_mask;
141 static int hf_bthci_cmd_cod_major_service_class_limited_discoverable_mode_mask;
142 static int hf_bthci_cmd_cod_major_device_class_mask;
143 static int hf_bthci_cmd_auto_acc_flag;
144 static int hf_bthci_cmd_read_all_flag;
145 static int hf_bthci_cmd_delete_all_flag;
146 static int hf_bthci_cmd_authentication_enable;
147 static int hf_bthci_cmd_input_unused;
148 static int hf_bthci_cmd_input_coding;
149 static int hf_bthci_cmd_input_data_format;
150 static int hf_bthci_cmd_input_sample_size;
151 static int hf_bthci_cmd_linear_pcm_bit_pos;
152 static int hf_bthci_cmd_air_coding_format;
153 static int hf_bthci_cmd_num_broadcast_retransmissions;
154 static int hf_bthci_cmd_hold_mode_act_page;
155 static int hf_bthci_cmd_hold_mode_act_inquiry;
156 static int hf_bthci_cmd_hold_mode_act_periodic;
157 static int hf_bthci_cmd_scan_enable;
158 static int hf_bthci_cmd_interval;
159 static int hf_bthci_cmd_window;
160 static int hf_bthci_cmd_device_name;
161 static int hf_bthci_cmd_num_curr_iac;
162 static int hf_bthci_cmd_iac_lap;
163 static int hf_bthci_cmd_evt_mask_00;
164 static int hf_bthci_cmd_evt_mask_01;
165 static int hf_bthci_cmd_evt_mask_02;
166 static int hf_bthci_cmd_evt_mask_03;
167 static int hf_bthci_cmd_evt_mask_04;
168 static int hf_bthci_cmd_evt_mask_05;
169 static int hf_bthci_cmd_evt_mask_06;
170 static int hf_bthci_cmd_evt_mask_07;
171 static int hf_bthci_cmd_evt_mask_10;
172 static int hf_bthci_cmd_evt_mask_11;
173 static int hf_bthci_cmd_evt_mask_12;
174 static int hf_bthci_cmd_evt_mask_13;
175 static int hf_bthci_cmd_evt_mask_14;
176 static int hf_bthci_cmd_evt_mask_17;
177 static int hf_bthci_cmd_evt_mask_20;
178 static int hf_bthci_cmd_evt_mask_21;
179 static int hf_bthci_cmd_evt_mask_23;
180 static int hf_bthci_cmd_evt_mask_24;
181 static int hf_bthci_cmd_evt_mask_25;
182 static int hf_bthci_cmd_evt_mask_26;
183 static int hf_bthci_cmd_evt_mask_27;
184 static int hf_bthci_cmd_evt_mask_30;
185 static int hf_bthci_cmd_evt_mask_31;
186 static int hf_bthci_cmd_evt_mask_32;
187 static int hf_bthci_cmd_evt_mask_33;
188 static int hf_bthci_cmd_evt_mask_34;
189 static int hf_bthci_cmd_evt_mask_35;
190 static int hf_bthci_cmd_evt_mask_36;
191 static int hf_bthci_cmd_evt_mask_37;
192 static int hf_bthci_cmd_evt_mask_40;
193 static int hf_bthci_cmd_evt_mask_41;
194 static int hf_bthci_cmd_evt_mask_42;
195 static int hf_bthci_cmd_evt_mask_53;
196 static int hf_bthci_cmd_evt_mask_54;
197 static int hf_bthci_cmd_evt_mask_55;
198 static int hf_bthci_cmd_evt_mask_56;
199 static int hf_bthci_cmd_evt_mask_57;
200 static int hf_bthci_cmd_evt_mask_60;
201 static int hf_bthci_cmd_evt_mask_61;
202 static int hf_bthci_cmd_evt_mask_62;
203 static int hf_bthci_cmd_evt_mask_63;
204 static int hf_bthci_cmd_evt_mask_64;
205 static int hf_bthci_cmd_evt_mask_65;
206 static int hf_bthci_cmd_evt_mask_67;
207 static int hf_bthci_cmd_evt_mask_70;
208 static int hf_bthci_cmd_evt_mask_72;
209 static int hf_bthci_cmd_evt_mask_73;
210 static int hf_bthci_cmd_sco_flow_control;
211 static int hf_bthci_cmd_num_handles;
212 static int hf_bthci_cmd_num_compl_packets;
213 static int hf_bthci_cmd_flow_contr_enable;
214 static int hf_bthci_cmd_host_data_packet_length_acl;
215 static int hf_bthci_cmd_host_data_packet_length_sco;
216 static int hf_bthci_cmd_host_total_num_acl_data_packets;
217 static int hf_bthci_cmd_host_total_num_sco_data_packets;
218 static int hf_bthci_cmd_loopback_mode;
219 static int hf_bthci_cmd_page_number;
220 static int hf_bthci_cmd_transmit_bandwidth;
221 static int hf_bthci_cmd_receive_bandwidth;
222 static int hf_bthci_cmd_max_latency_ms;
223 static int hf_bthci_cmd_max_latency;
224 static int hf_bthci_cmd_retransmission_effort;
225 static int hf_bthci_cmd_scan_type;
226 static int hf_bthci_cmd_inq_mode;
227 static int hf_bthci_cmd_fec_required;
228 static int hf_bthci_cmd_err_data_reporting;
229 static int hf_bthci_cmd_tx_power;
230 static int hf_bthci_cmd_sco_packet_type;
231 static int hf_bthci_cmd_sco_packet_type_hv1;
232 static int hf_bthci_cmd_sco_packet_type_hv2;
233 static int hf_bthci_cmd_sco_packet_type_hv3;
234 static int hf_bthci_cmd_sco_packet_type_ev3;
235 static int hf_bthci_cmd_sco_packet_type_ev4;
236 static int hf_bthci_cmd_sco_packet_type_ev5;
237 static int hf_bthci_cmd_sco_packet_type_2ev3;
238 static int hf_bthci_cmd_sco_packet_type_3ev3;
239 static int hf_bthci_cmd_sco_packet_type_2ev5;
240 static int hf_bthci_cmd_sco_packet_type_3ev5;
241 static int hf_bthci_cmd_sco_packet_type_reserved;
242 static int hf_bthci_cmd_min_remote_timeout;
243 static int hf_bthci_cmd_min_local_timeout;
244 static int hf_bthci_cmd_flush_packet_type;
245 static int hf_bthci_cmd_afh_ch_assessment_mode;
246 static int hf_bthci_cmd_ch_classification;
247 static int hf_bthci_cmd_which_clock;
248 static int hf_bthci_cmd_io_capability;
249 static int hf_bthci_cmd_oob_data_present;
250 static int hf_bthci_cmd_auth_requirements;
251 static int hf_bthci_cmd_passkey;
252 static int hf_bthci_cmd_randomizer_r;
253 static int hf_bthci_cmd_hash_c;
254 static int hf_bthci_cmd_simple_pairing_mode;
255 static int hf_bthci_cmd_simple_pairing_debug_mode;
256 static int hf_bthci_cmd_notification_type;
257 static int hf_bthci_cmd_physical_link_handle;
258 static int hf_bthci_cmd_dedicated_amp_key_length;
259 static int hf_bthci_cmd_dedicated_amp_key_type;
260 static int hf_bthci_cmd_dedicated_amp_key;
261 static int hf_bthci_cmd_flow_spec;
262 static int hf_bthci_cmd_flow_spec_identifier;
263 static int hf_bthci_cmd_flow_spec_service_type;
264 static int hf_bthci_cmd_flow_spec_sdu_size;
265 static int hf_bthci_cmd_flow_spec_sdu_arrival_time;
266 static int hf_bthci_cmd_flow_spec_access_latency;
267 static int hf_bthci_cmd_flush_to_us;
268 static int hf_bthci_cmd_logical_link_handle;
269 static int hf_bthci_cmd_evt_mask2;
270 static int hf_bthci_cmd_evt_mask2_00;
271 static int hf_bthci_cmd_evt_mask2_01;
272 static int hf_bthci_cmd_evt_mask2_02;
273 static int hf_bthci_cmd_evt_mask2_03;
274 static int hf_bthci_cmd_evt_mask2_04;
275 static int hf_bthci_cmd_evt_mask2_05;
276 static int hf_bthci_cmd_evt_mask2_06;
277 static int hf_bthci_cmd_evt_mask2_07;
278 static int hf_bthci_cmd_evt_mask2_08;
279 static int hf_bthci_cmd_evt_mask2_09;
280 static int hf_bthci_cmd_evt_mask2_10;
281 static int hf_bthci_cmd_evt_mask2_11;
282 static int hf_bthci_cmd_evt_mask2_12;
283 static int hf_bthci_cmd_evt_mask2_13;
284 static int hf_bthci_cmd_evt_mask2_14;
285 static int hf_bthci_cmd_evt_mask2_15;
286 static int hf_bthci_cmd_evt_mask2_16;
287 static int hf_bthci_cmd_evt_mask2_17;
288 static int hf_bthci_cmd_evt_mask2_18;
289 static int hf_bthci_cmd_evt_mask2_19;
290 static int hf_bthci_cmd_evt_mask2_20;
291 static int hf_bthci_cmd_evt_mask2_21;
292 static int hf_bthci_cmd_evt_mask2_22;
293 static int hf_bthci_cmd_evt_mask2_23;
294 static int hf_bthci_cmd_evt_mask2_24;
295 static int hf_bthci_cmd_evt_mask2_25;
296 static int hf_bthci_cmd_evt_mask2_reserved;
297 static int hf_bthci_cmd_location_domain_aware;
298 static int hf_bthci_cmd_location_domain;
299 static int hf_bthci_cmd_location_domain_options;
300 static int hf_bthci_cmd_location_options;
301 static int hf_bthci_cmd_flow_control_mode;
302 static int hf_bthci_cmd_tx_power_level_type;
303 static int hf_bthci_cmd_short_range_mode;
304 static int hf_bthci_cmd_le_supported_host;
305 static int hf_bthci_cmd_le_simultaneous_host;
306 static int hf_bthci_cmd_enable_amp_recv_reports;
307 static int hf_bthci_cmd_amp_recv_report_interval;
308 static int hf_bthci_cmd_length_so_far;
309 static int hf_bthci_cmd_amp_assoc_length;
310 static int hf_bthci_cmd_amp_remaining_assoc_length;
311 static int hf_bthci_cmd_amp_assoc_fragment;
312 static int hf_bthci_cmd_le_event_mask;
313 static int hf_bthci_cmd_le_event_mask_le_reserved;
314 static int hf_bthci_cmd_le_event_mask_le_frame_space_update_complete;
315 static int hf_bthci_cmd_le_event_mask_le_monitored_advertisers_report;
316 static int hf_bthci_cmd_le_event_mask_le_cs_test_end_complete;
317 static int hf_bthci_cmd_le_event_mask_le_cs_subevent_result_continue;
318 static int hf_bthci_cmd_le_event_mask_le_cs_subevent_result;
319 static int hf_bthci_cmd_le_event_mask_le_cs_procedure_enable_complete;
320 static int hf_bthci_cmd_le_event_mask_le_cs_config_complete;
321 static int hf_bthci_cmd_le_event_mask_le_cs_security_enable_complete;
322 static int hf_bthci_cmd_le_event_mask_le_cs_read_remote_fae_table_complete;
323 static int hf_bthci_cmd_le_event_mask_le_cs_read_remote_supported_capabilities_complete;
324 static int hf_bthci_cmd_le_event_mask_le_read_all_remote_features_complete;
325 static int hf_bthci_cmd_le_event_mask_le_cis_established_v2;
326 static int hf_bthci_cmd_le_event_mask_le_enhanced_connection_complete_v2;
327 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_response_report;
328 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_subevent_data_request;
329 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_transfer_received_v2;
330 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_report_v2;
331 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_established_v2;
332 static int hf_bthci_cmd_le_event_mask_le_subrate_changed;
333 static int hf_bthci_cmd_le_event_mask_le_biginfo_advertising_report;
334 static int hf_bthci_cmd_le_event_mask_le_transmit_power_reporting;
335 static int hf_bthci_cmd_le_event_mask_le_path_loss_threshold;
336 static int hf_bthci_cmd_le_event_mask_le_request_peer_sca_complete;
337 static int hf_bthci_cmd_le_event_mask_le_big_sync_lost;
338 static int hf_bthci_cmd_le_event_mask_le_big_sync_established;
339 static int hf_bthci_cmd_le_event_mask_le_terminate_big_complete;
340 static int hf_bthci_cmd_le_event_mask_le_create_big_complete;
341 static int hf_bthci_cmd_le_event_mask_le_cis_request;
342 static int hf_bthci_cmd_le_event_mask_le_cis_established_v1;
343 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_transfer_received_v1;
344 static int hf_bthci_cmd_le_event_mask_le_cte_request_failed;
345 static int hf_bthci_cmd_le_event_mask_le_connection_iq_report;
346 static int hf_bthci_cmd_le_event_mask_le_connectionless_iq_report;
347 static int hf_bthci_cmd_le_event_mask_le_channel_selection_algorithm;
348 static int hf_bthci_cmd_le_event_mask_le_scan_request_received;
349 static int hf_bthci_cmd_le_event_mask_le_extended_advertising_set_terminated;
350 static int hf_bthci_cmd_le_event_mask_le_extended_scan_timeout;
351 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_lost;
352 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_report_v1;
353 static int hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_established_v1;
354 static int hf_bthci_cmd_le_event_mask_le_extended_advertising_report;
355 static int hf_bthci_cmd_le_event_mask_le_phy_update_complete;
356 static int hf_bthci_cmd_le_event_mask_le_direct_advertising_report;
357 static int hf_bthci_cmd_le_event_mask_le_enhanced_connection_complete_v1;
358 static int hf_bthci_cmd_le_event_mask_le_generate_dhkey_complete;
359 static int hf_bthci_cmd_le_event_mask_le_read_local_p256_public_key_complete;
360 static int hf_bthci_cmd_le_event_mask_le_data_length_change;
361 static int hf_bthci_cmd_le_event_mask_le_remote_connection_parameter_request;
362 static int hf_bthci_cmd_le_event_mask_le_long_term_key_request;
363 static int hf_bthci_cmd_le_event_mask_le_read_remote_features_complete;
364 static int hf_bthci_cmd_le_event_mask_le_connection_update_complete;
365 static int hf_bthci_cmd_le_event_mask_le_advertising_report;
366 static int hf_bthci_cmd_le_event_mask_le_connection_complete;
367 static int hf_bthci_cmd_le_advts_interval_min;
368 static int hf_bthci_cmd_le_advts_interval_max;
369 static int hf_bthci_cmd_le_advts_type;
370 static int hf_bthci_cmd_le_own_address_type;
371 static int hf_bthci_cmd_le_direct_address_type;
372 static int hf_bthci_cmd_le_advts_channel_map_1;
373 static int hf_bthci_cmd_le_advts_channel_map_2;
374 static int hf_bthci_cmd_le_advts_channel_map_3;
375 static int hf_bthci_cmd_le_advts_filter_policy;
376 static int hf_bthci_cmd_le_data_length;
377 static int hf_bthci_cmd_le_advts_enable;
378 static int hf_bthci_cmd_le_scan_enable;
379 static int hf_bthci_cmd_le_filter_duplicates;
380 static int hf_bthci_cmd_le_scan_type;
381 static int hf_bthci_cmd_le_scan_interval;
382 static int hf_bthci_cmd_le_scan_window;
383 static int hf_bthci_cmd_le_scan_filter_policy;
384 static int hf_bthci_cmd_scan_filter_policy_reserved;
385 static int hf_bthci_cmd_scan_filter_policy_decision_mode;
386 static int hf_bthci_cmd_scan_filter_policy_extended;
387 static int hf_bthci_cmd_scan_filter_policy_filtered;
388 static int hf_bthci_cmd_le_initiator_filter_policy;
389 static int hf_bthci_cmd_le_peer_address_type;
390 static int hf_bthci_cmd_le_peer_identity_address_type;
391 static int hf_bthci_cmd_le_con_interval_min;
392 static int hf_bthci_cmd_le_con_interval_max;
393 static int hf_bthci_cmd_le_con_latency;
394 static int hf_bthci_cmd_le_supervision_timeout;
395 static int hf_bthci_cmd_le_min_ce_length;
396 static int hf_bthci_cmd_le_max_ce_length;
397 static int hf_bthci_cmd_le_address_type;
398 static int hf_bthci_cmd_le_channel_map;
399 static int hf_bthci_cmd_key;
400 static int hf_bthci_cmd_plaintext_data;
401 static int hf_bthci_cmd_random_number;
402 static int hf_bthci_cmd_encrypted_diversifier;
403 static int hf_bthci_cmd_le_long_term_key;
404 static int hf_bthci_cmd_rx_frequency;
405 static int hf_bthci_cmd_tx_frequency;
406 static int hf_bthci_cmd_test_data_length;
407 static int hf_bthci_cmd_test_packet_payload;
408 static int hf_bthci_cmd_parameter;
409 static int hf_response_in_frame;
410 static int hf_command_response_time_delta;
411 static int hf_pending_in_frame;
412 static int hf_command_pending_time_delta;
413 static int hf_bthci_cmd_le_tx_octets;
414 static int hf_bthci_cmd_le_tx_time;
415 static int hf_bthci_cmd_le_suggested_max_tx_octets;
416 static int hf_bthci_cmd_le_suggested_max_tx_time;
417 static int hf_bthci_cmd_le_remote_p_256_public_key;
418 static int hf_bthci_cmd_le_peer_irk;
419 static int hf_bthci_cmd_le_local_irk;
420 static int hf_bthci_cmd_le_address_resolution_enable;
421 static int hf_bthci_cmd_le_rpa_timeout;
422 static int hf_bthci_cmd_advertising_ext_interval_min;
423 static int hf_bthci_cmd_advertising_ext_interval_max;
424 static int hf_bthci_cmd_advertising_handle;
425 static int hf_bthci_cmd_advertising_properties;
426 static int hf_bthci_cmd_advertising_properties_reserved;
427 static int hf_bthci_cmd_advertising_properties_connectable;
428 static int hf_bthci_cmd_advertising_properties_scannable;
429 static int hf_bthci_cmd_advertising_properties_directed;
430 static int hf_bthci_cmd_advertising_properties_hdc_connectable_directed;
431 static int hf_bthci_cmd_advertising_properties_legacy_adv;
432 static int hf_bthci_cmd_advertising_properties_anonymous_adv;
433 static int hf_bthci_cmd_advertising_properties_incl_txpower;
434 static int hf_bthci_cmd_advertising_properties_use_decision_pdus;
435 static int hf_bthci_cmd_advertising_properties_decision_pdu_incl_adva;
436 static int hf_bthci_cmd_advertising_properties_decision_pdu_incl_adi;
437 static int hf_bthci_cmd_periodic_advertising_properties;
438 static int hf_bthci_cmd_periodic_advertising_properties_reserved;
439 static int hf_bthci_cmd_primary_advertising_phy;
440 static int hf_bthci_cmd_sec_adv_max_skip;
441 static int hf_bthci_cmd_secondary_advertising_phy;
442 static int hf_bthci_cmd_advertising_sid;
443 static int hf_bthci_cmd_scan_req_notif_en;
444 static int hf_bthci_cmd_le_adv_data_operation;
445 static int hf_bthci_cmd_le_adv_data_frag_pref;
446 static int hf_bthci_cmd_le_adv_set;
447 static int hf_bthci_cmd_le_adv_en_sets;
448 static int hf_bthci_cmd_le_adv_duration;
449 static int hf_bthci_cmd_le_adv_max_extended_events;
450 static int hf_bthci_cmd_all_phys;
451 static int hf_bthci_cmd_all_phys_tx_pref;
452 static int hf_bthci_cmd_all_phys_rx_pref;
453 static int hf_bthci_cmd_all_phys_reserved;
454 static int hf_bthci_cmd_tx_phys;
455 static int hf_bthci_cmd_rx_phys;
456 static int hf_bthci_cmd_phys_pref_le_1m;
457 static int hf_bthci_cmd_phys_pref_le_2m;
458 static int hf_bthci_cmd_phys_pref_le_coded;
459 static int hf_bthci_cmd_phys_pref_reserved;
460 static int hf_bthci_cmd_phy_options;
461 static int hf_bthci_cmd_phy_options_coding;
462 static int hf_bthci_cmd_phy_options_reserved;
463 static int hf_bthci_cmd_phy;
464 static int hf_bthci_cmd_modulation_index;
465 static int hf_bthci_cmd_le_scan_phys;
466 static int hf_bthci_cmd_le_scan_phys_reserved;
467 static int hf_bthci_cmd_le_scan_phys_le_coded;
468 static int hf_bthci_cmd_le_scan_phys_le_1m;
469 static int hf_bthci_cmd_le_scan_phy_param;
470 static int hf_bthci_cmd_le_scan_duration;
471 static int hf_bthci_cmd_le_scan_period;
472 static int hf_bthci_cmd_le_phys;
473 static int hf_bthci_cmd_le_phys_reserved;
474 static int hf_bthci_cmd_le_phys_le_coded;
475 static int hf_bthci_cmd_le_phys_le_2m;
476 static int hf_bthci_cmd_le_phys_le_1m;
477 static int hf_bthci_cmd_le_init_phy_param;
478 static int hf_bthci_cmd_le_privacy_mode;
479 static int hf_bthci_cmd_sync_filter_policy;
480 static int hf_bthci_cmd_skip;
481 static int hf_bthci_cmd_rf_tx_path_compensation_value;
482 static int hf_bthci_cmd_rf_rx_path_compensation_value;
483 static int hf_bthci_cmd_sync_handle;
484 static int hf_bthci_cmd_cte_length;
485 static int hf_bthci_cmd_cte_type;
486 static int hf_bthci_cmd_slot_durations;
487 static int hf_bthci_cmd_antenna_switching_pattern_length;
488 static int hf_bthci_cmd_antenna_switching_pattern;
489 static int hf_bthci_cmd_antenna_id;
490 static int hf_bthci_cmd_cte_count;
491 static int hf_bthci_cmd_cte_enable;
492 static int hf_bthci_cmd_iq_sampling_enable;
493 static int hf_bthci_cmd_max_sampled_ctes;
494 static int hf_bthci_cmd_cte_request_interval;
495 static int hf_bthci_cmd_reporting_enable;
496 static int hf_bthci_cmd_service_data_past;
497 static int hf_bthci_cmd_sync_mode;
498 static int hf_bthci_cmd_key_type;
499 static int hf_bthci_cmd_sca_action;
500 static int hf_bthci_cmd_sync_cte_type;
501 static int hf_bthci_cmd_sync_cte_type_no_sync_aoa;
502 static int hf_bthci_cmd_sync_cte_type_no_sync_aod_1us;
503 static int hf_bthci_cmd_sync_cte_type_no_sync_aod_2us;
504 static int hf_bthci_cmd_sync_cte_type_sync_only_with_cte;
505 static int hf_bthci_cmd_sync_cte_type_reserved;
506 static int hf_bthci_cmd_cte_types;
507 static int hf_bthci_cmd_cte_types_reserved;
508 static int hf_bthci_cmd_cte_types_aod_2us;
509 static int hf_bthci_cmd_cte_types_aod_1us;
510 static int hf_bthci_cmd_cte_types_aoa;
511 static int hf_bthci_cmd_cig_id;
512 static int hf_bthci_cmd_sdu_interval_c_to_p;
513 static int hf_bthci_cmd_sdu_interval_p_to_c;
514 static int hf_bthci_cmd_sdu_interval;
515 static int hf_bthci_cmd_peripherals_clock_accuracy;
516 static int hf_bthci_cmd_packing;
517 static int hf_bthci_cmd_framing;
518 static int hf_bthci_cmd_ft_c_to_p;
519 static int hf_bthci_cmd_ft_p_to_c;
520 static int hf_bthci_cmd_iso_interval;
521 static int hf_bthci_cmd_cis_count;
522 static int hf_bthci_cmd_cis_params;
523 static int hf_bthci_cmd_cis_id;
524 static int hf_bthci_cmd_nse;
525 static int hf_bthci_cmd_max_sdu_c_to_p;
526 static int hf_bthci_cmd_max_sdu_p_to_c;
527 static int hf_bthci_cmd_max_sdu;
528 static int hf_bthci_cmd_max_pdu_c_to_p;
529 static int hf_bthci_cmd_max_pdu_p_to_c;
530 static int hf_bthci_cmd_max_pdu;
531 static int hf_bthci_cmd_phy_c_to_p;
532 static int hf_bthci_cmd_phy_p_to_c;
533 static int hf_bthci_cmd_bn_c_to_p;
534 static int hf_bthci_cmd_bn_p_to_c;
535 static int hf_bthci_cmd_bn;
536 static int hf_bthci_cmd_max_transport_latency_c_to_p;
537 static int hf_bthci_cmd_max_transport_latency_p_to_c;
538 static int hf_bthci_cmd_max_transport_latency;
539 static int hf_bthci_cmd_rtn_c_to_p;
540 static int hf_bthci_cmd_rtn_p_to_c;
541 static int hf_bthci_cmd_rtn;
542 static int hf_bthci_cmd_cis_handle;
543 static int hf_bthci_cmd_big_handle;
544 static int hf_bthci_cmd_cis_bis_handle;
545 static int hf_bthci_cmd_num_bis;
546 static int hf_bthci_cmd_irc;
547 static int hf_bthci_cmd_pto;
548 static int hf_bthci_cmd_encryption;
549 static int hf_bthci_cmd_broadcast_code;
550 static int hf_bthci_cmd_mse;
551 static int hf_bthci_cmd_bis_index;
552 static int hf_bthci_cmd_sync_timeout;
553 static int hf_bthci_cmd_data_path_direction;
554 static int hf_bthci_cmd_data_path_id;
555 static int hf_bthci_cmd_coding_format;
556 static int hf_bthci_cmd_controller_delay;
557 static int hf_bthci_cmd_codec_config_length;
558 static int hf_bthci_cmd_codec_config;
559 static int hf_bthci_cmd_payload_type;
560 static int hf_bthci_cmd_feature_bit_number;
561 static int hf_bthci_cmd_feature_bit_number2;
562 static int hf_bthci_cmd_feature_bit_value;
563 static int hf_bthci_cmd_phy_and_coding;
564 static int hf_bthci_cmd_high_threshold;
565 static int hf_bthci_cmd_high_hysteresis;
566 static int hf_bthci_cmd_low_threshold;
567 static int hf_bthci_cmd_low_hysteresis;
568 static int hf_bthci_cmd_min_time_spent;
569 static int hf_bthci_cmd_local_reporting_enable;
570 static int hf_bthci_cmd_remote_reporting_enable;
571 static int hf_bthci_cmd_addr_change_reasons;
572 static int hf_bthci_cmd_addr_change_reasons_adv_data;
573 static int hf_bthci_cmd_addr_change_reasons_scan_rsp_data;
574 static int hf_bthci_cmd_addr_change_reasons_reserved;
575 static int hf_bthci_cmd_subrate_factor_min;
576 static int hf_bthci_cmd_subrate_factor_max;
577 static int hf_bthci_cmd_continuation_number;
578 static int hf_bthci_cmd_primary_adv_phy_options;
579 static int hf_bthci_cmd_secondary_adv_phy_options;
580 static int hf_bthci_cmd_num_subevents;
581 static int hf_bthci_cmd_subevent_interval;
582 static int hf_bthci_cmd_response_slot_delay;
583 static int hf_bthci_cmd_response_slot_spacing;
584 static int hf_bthci_cmd_num_response_slots;
585 static int hf_bthci_cmd_subevent;
586 static int hf_bthci_cmd_subevents;
587 static int hf_bthci_cmd_response_slot_start;
588 static int hf_bthci_cmd_response_slot_count;
589 static int hf_bthci_cmd_subevent_data_length;
590 static int hf_bthci_cmd_request_event;
591 static int hf_bthci_cmd_request_subevent;
592 static int hf_bthci_cmd_response_subevent;
593 static int hf_bthci_cmd_response_slot;
594 static int hf_bthci_cmd_response_data_length;
595 static int hf_bthci_cmd_triggered_clock_capture;
596 static int hf_bthci_cmd_lpo_allowed;
597 static int hf_bthci_cmd_number_of_clock_captures_to_filter;
598 static int hf_bthci_cmd_amp_controller_type;
599 static int hf_bthci_cmd_esco_loopback_mode;
600 static int hf_bthci_cmd_dm1_acl_u_mode;
601 static int hf_bthci_cmd_codec_id;
602 static int hf_bthci_cmd_company_id;
603 static int hf_bthci_cmd_vendor_codec_id;
604 static int hf_bthci_cmd_transmit_coding_format;
605 static int hf_bthci_cmd_receive_coding_format;
606 static int hf_bthci_cmd_input_coding_format;
607 static int hf_bthci_cmd_output_coding_format;
608 static int hf_bthci_cmd_transmit_codec_frame_size;
609 static int hf_bthci_cmd_receive_codec_frame_size;
610 static int hf_bthci_cmd_input_bandwidth;
611 static int hf_bthci_cmd_output_bandwidth;
612 static int hf_bthci_cmd_input_coded_data_size;
613 static int hf_bthci_cmd_output_coded_data_size;
614 static int hf_bthci_cmd_input_pcm_data_format;
615 static int hf_bthci_cmd_output_pcm_data_format;
616 static int hf_bthci_cmd_input_pcm_sample_payload_msb_position;
617 static int hf_bthci_cmd_output_pcm_sample_payload_msb_position;
618 static int hf_bthci_cmd_input_data_path;
619 static int hf_bthci_cmd_output_data_path;
620 static int hf_bthci_cmd_input_transport_unit_size;
621 static int hf_bthci_cmd_output_transport_unit_size;
622 static int hf_bthci_cmd_connectionless_peripheral_broadcast;
623 static int hf_bthci_cmd_lt_addr;
624 static int hf_bthci_cmd_interval_min;
625 static int hf_bthci_cmd_interval_max;
626 static int hf_bthci_cmd_cpb_supervision_to;
627 static int hf_bthci_cmd_connectionless_peripheral_broadcast_receive;
628 static int hf_bthci_cmd_clock_offset_32;
629 static int hf_bthci_cmd_next_cpb_clock;
630 static int hf_bthci_cmd_remote_timing_accuracy;
631 static int hf_bthci_cmd_cpb_skip;
632 static int hf_bthci_cmd_channel_map;
633 static int hf_bthci_cmd_synchronization_scan_to;
634 static int hf_bthci_cmd_c192;
635 static int hf_bthci_cmd_r192;
636 static int hf_bthci_cmd_c256;
637 static int hf_bthci_cmd_r256;
638 static int hf_bthci_mws_channel;
639 static int hf_bthci_mws_rx_center_frequency;
640 static int hf_bthci_mws_tx_center_frequency;
641 static int hf_bthci_mws_rx_channel_bandwidth;
642 static int hf_bthci_mws_tx_channel_bandwidth;
643 static int hf_bthci_mws_channel_type;
644 static int hf_bthci_external_frame_duration;
645 static int hf_bthci_external_frame_sync_assert_offset;
646 static int hf_bthci_external_frame_sync_assert_jitter;
647 static int hf_bthci_external_frame_number_of_periods;
648 static int hf_bthci_external_frame_periods;
649 static int hf_bthci_external_frame_period;
650 static int hf_bthci_external_frame_period_duration;
651 static int hf_bthci_external_frame_period_type;
652 static int hf_bthci_mws_rx_assert_offset;
653 static int hf_bthci_mws_rx_assert_jitter;
654 static int hf_bthci_mws_rx_deassert_offset;
655 static int hf_bthci_mws_rx_deassert_jitter;
656 static int hf_bthci_mws_tx_assert_offset;
657 static int hf_bthci_mws_tx_assert_jitter;
658 static int hf_bthci_mws_tx_deassert_offset;
659 static int hf_bthci_mws_tx_deassert_jitter;
660 static int hf_bthci_mws_pattern_assert_offset;
661 static int hf_bthci_mws_pattern_assert_jitter;
662 static int hf_bthci_mws_inactivity_duration_assert_offset;
663 static int hf_bthci_mws_inactivity_duration_assert_jitter;
664 static int hf_bthci_mws_scan_frequency_assert_offset;
665 static int hf_bthci_mws_scan_frequency_assert_jitter;
666 static int hf_bthci_mws_priority_assert_offset_request;
667 static int hf_bthci_mws_transport_layer;
668 static int hf_bthci_mws_to_baud_rate;
669 static int hf_bthci_mws_from_baud_rate;
670 static int hf_bthci_mws_number_of_frequencies;
671 static int hf_bthci_mws_scan_frequency_table;
672 static int hf_bthci_mws_scan_frequency_table_item;
673 static int hf_bthci_mws_scan_frequency_table_item_low;
674 static int hf_bthci_mws_scan_frequency_table_item_high;
675 static int hf_bthci_mws_pattern_index;
676 static int hf_bthci_mws_pattern_number_of_intervals;
677 static int hf_bthci_mws_patterns;
678 static int hf_bthci_mws_pattern;
679 static int hf_bthci_mws_pattern_duration;
680 static int hf_bthci_mws_pattern_type;
681 static int hf_bthci_cmd_sync_train_to;
682 static int hf_bthci_cmd_service_data;
683 static int hf_bthci_cmd_secure_connection_host_support;
684 static int hf_bthci_cmd_cpb_fragment;
685 static int hf_bthci_cmd_cpb_data_length;
686 static int hf_bthci_cmd_cpb_data;
687 static int hf_bthci_cmd_authenticated_payload_timeout;
688 static int hf_bthci_cmd_extended_inquiry_length;
689 static int hf_bthci_cmd_min_encryption_key_size;
690 static int hf_bthci_cmd_pages_requested;
691 static int hf_bthci_cmd_config_id;
692 static int hf_bthci_cmd_cs_roles;
693 static int hf_bthci_cmd_cs_roles_initiator;
694 static int hf_bthci_cmd_cs_roles_reflector;
695 static int hf_bthci_cmd_cs_roles_reserved;
696 static int hf_bthci_cmd_cs_sync_antenna_selection;
697 static int hf_bthci_cmd_num_config;
698 static int hf_bthci_cmd_max_consecutive_procedures;
699 static int hf_bthci_cmd_num_antennas_supported;
700 static int hf_bthci_cmd_max_antenna_paths_supported;
701 static int hf_bthci_cmd_cs_modes_supported;
702 static int hf_bthci_cmd_cs_modes_supported_3;
703 static int hf_bthci_cmd_cs_modes_supported_reserved;
704 static int hf_bthci_cmd_rtt_capability;
705 static int hf_bthci_cmd_rtt_capability_coarse_precision;
706 static int hf_bthci_cmd_rtt_capability_sounding_precision;
707 static int hf_bthci_cmd_rtt_capability_random_precision;
708 static int hf_bthci_cmd_rtt_capability_reserved;
709 static int hf_bthci_cmd_rtt_aa_only_n;
710 static int hf_bthci_cmd_rtt_sounding_n;
711 static int hf_bthci_cmd_rtt_random_n;
712 static int hf_bthci_cmd_nadm_sounding_capability;
713 static int hf_bthci_cmd_nadm_sounding_capability_supported;
714 static int hf_bthci_cmd_nadm_sounding_capability_reserved;
715 static int hf_bthci_cmd_nadm_random_capability;
716 static int hf_bthci_cmd_nadm_random_capability_supported;
717 static int hf_bthci_cmd_nadm_random_capability_reserved;
718 static int hf_bthci_cmd_cs_sync_phys_supported;
719 static int hf_bthci_cmd_cs_sync_phys_supported_2m;
720 static int hf_bthci_cmd_cs_sync_phys_supported_2m2bt;
721 static int hf_bthci_cmd_cs_sync_phys_supported_reserved;
722 static int hf_bthci_cmd_cs_subfeatures_supported;
723 static int hf_bthci_cmd_cs_subfeatures_companion_signal;
724 static int hf_bthci_cmd_cs_subfeatures_freq_actuation_error;
725 static int hf_bthci_cmd_cs_subfeatures_channel_selection_3c;
726 static int hf_bthci_cmd_cs_subfeatures_pbr_from_rtt;
727 static int hf_bthci_cmd_cs_subfeatures_reserved;
728 static int hf_bthci_cmd_tip1_times_supported;
729 static int hf_bthci_cmd_tip2_times_supported;
730 static int hf_bthci_cmd_tip_times_supported_10us;
731 static int hf_bthci_cmd_tip_times_supported_20us;
732 static int hf_bthci_cmd_tip_times_supported_30us;
733 static int hf_bthci_cmd_tip_times_supported_40us;
734 static int hf_bthci_cmd_tip_times_supported_50us;
735 static int hf_bthci_cmd_tip_times_supported_60us;
736 static int hf_bthci_cmd_tip_times_supported_80us;
737 static int hf_bthci_cmd_tip_times_supported_reserved;
738 static int hf_bthci_cmd_tfcs_times_supported;
739 static int hf_bthci_cmd_tfcs_times_supported_15us;
740 static int hf_bthci_cmd_tfcs_times_supported_20us;
741 static int hf_bthci_cmd_tfcs_times_supported_30us;
742 static int hf_bthci_cmd_tfcs_times_supported_40us;
743 static int hf_bthci_cmd_tfcs_times_supported_50us;
744 static int hf_bthci_cmd_tfcs_times_supported_60us;
745 static int hf_bthci_cmd_tfcs_times_supported_80us;
746 static int hf_bthci_cmd_tfcs_times_supported_100us;
747 static int hf_bthci_cmd_tfcs_times_supported_120us;
748 static int hf_bthci_cmd_tfcs_times_supported_reserved;
749 static int hf_bthci_cmd_tpm_times_supported;
750 static int hf_bthci_cmd_tpm_times_supported_10us;
751 static int hf_bthci_cmd_tpm_times_supported_20us;
752 static int hf_bthci_cmd_tpm_times_supported_reserved;
753 static int hf_bthci_cmd_tsw_time_supported;
754 static int hf_bthci_cmd_tx_snr_capability;
755 static int hf_bthci_cmd_tx_snr_capability_18dB;
756 static int hf_bthci_cmd_tx_snr_capability_21dB;
757 static int hf_bthci_cmd_tx_snr_capability_24dB;
758 static int hf_bthci_cmd_tx_snr_capability_27dB;
759 static int hf_bthci_cmd_tx_snr_capability_30dB;
760 static int hf_bthci_cmd_tx_snr_capability_reserved;
761 static int hf_bthci_cmd_fae_table;
762 static int hf_bthci_cmd_create_context;
763 static int hf_bthci_cmd_main_mode_type;
764 static int hf_bthci_cmd_sub_mode_type;
765 static int hf_bthci_cmd_min_main_mode_steps;
766 static int hf_bthci_cmd_max_main_mode_steps;
767 static int hf_bthci_cmd_main_mode_repetition;
768 static int hf_bthci_cmd_mode0_steps;
769 static int hf_bthci_cmd_cs_role;
770 static int hf_bthci_cmd_rtt_type;
771 static int hf_bthci_cmd_cs_sync_phy;
772 static int hf_bthci_cmd_channel_map_repetition;
773 static int hf_bthci_cmd_channel_selection_type;
774 static int hf_bthci_cmd_ch3c_shape;
775 static int hf_bthci_cmd_ch3c_jump;
776 static int hf_bthci_cmd_companion_signal_enable;
777 static int hf_bthci_cmd_cs_enable;
778 static int hf_bthci_cmd_max_procedure_len;
779 static int hf_bthci_cmd_min_procedure_interval;
780 static int hf_bthci_cmd_max_procedure_interval;
781 static int hf_bthci_cmd_max_procedure_count;
782 static int hf_bthci_cmd_min_subevent_len;
783 static int hf_bthci_cmd_max_subevent_len;
784 static int hf_bthci_cmd_subevent_len;
785 static int hf_bthci_cmd_tone_antenna_selection;
786 static int hf_bthci_cmd_tx_pwr_delta;
787 static int hf_bthci_cmd_preferred_peer_antenna;
788 static int hf_bthci_cmd_preferred_peer_antenna_reserved;
789 static int hf_bthci_cmd_preferred_peer_antenna_first;
790 static int hf_bthci_cmd_preferred_peer_antenna_second;
791 static int hf_bthci_cmd_preferred_peer_antenna_third;
792 static int hf_bthci_cmd_preferred_peer_antenna_fourth;
793 static int hf_bthci_cmd_snr_control_initiator;
794 static int hf_bthci_cmd_snr_control_reflector;
795 static int hf_bthci_cmd_cs_subevent_interval;
796 static int hf_bthci_cmd_max_num_subevents;
797 static int hf_bthci_cmd_tx_power_setting;
798 static int hf_bthci_cmd_t_ip1_time;
799 static int hf_bthci_cmd_t_ip2_time;
800 static int hf_bthci_cmd_t_fcs_time;
801 static int hf_bthci_cmd_t_pm_time;
802 static int hf_bthci_cmd_t_sw_time;
803 static int hf_bthci_cmd_drbg_nonce;
804 static int hf_bthci_cmd_cs_override_config;
805 static int hf_bthci_cmd_override_config_reserved;
806 static int hf_bthci_cmd_override_config_stable_phase_test;
807 static int hf_bthci_cmd_override_config_cs_sync_data;
808 static int hf_bthci_cmd_override_config_ss_marker_value;
809 static int hf_bthci_cmd_override_config_ss_marker_position;
810 static int hf_bthci_cmd_override_config_cs_sync_aa;
811 static int hf_bthci_cmd_override_config_tone_ant_permutation;
812 static int hf_bthci_cmd_override_config_tpm_tone_ext;
813 static int hf_bthci_cmd_override_config_main_mode_steps;
814 static int hf_bthci_cmd_override_config_channel_list;
815 static int hf_bthci_cmd_cs_override_param_length;
816 static int hf_bthci_cmd_cs_override_param_data;
817 static int hf_bthci_cmd_adv_monitoring_enable;
818 static int hf_bthci_cmd_adv_decision_flags;
819 static int hf_bthci_cmd_adv_decision_flags_resolvable_tag;
820 static int hf_bthci_cmd_adv_decision_flags_reserved;
821 static int hf_bthci_cmd_adv_decision_data;
822 static int hf_bthci_cmd_num_tests;
823 static int hf_bthci_cmd_adv_test_flags;
824 static int hf_bthci_cmd_adv_test_flags_start_group;
825 static int hf_bthci_cmd_adv_test_flags_data_contains_field_check_pass;
826 static int hf_bthci_cmd_adv_test_flags_data_contains_field_check_fail;
827 static int hf_bthci_cmd_adv_test_flags_data_not_contain_field;
828 static int hf_bthci_cmd_adv_test_flags_reserved;
829 static int hf_bthci_cmd_adv_test_field;
830 static int hf_bthci_cmd_adv_test_params;
831 static int hf_bthci_cmd_rssi_threshold_low;
832 static int hf_bthci_cmd_rssi_threshold_high;
833 static int hf_bthci_cmd_rssi_threshold_timeout;
834 static int hf_bthci_cmd_frame_space_min;
835 static int hf_bthci_cmd_frame_space_max;
836 static int hf_bthci_cmd_spacing_types;
837 static int hf_bthci_cmd_spacing_types_tifs_acl_cp;
838 static int hf_bthci_cmd_spacing_types_tifs_acl_pc;
839 static int hf_bthci_cmd_spacing_types_tmces;
840 static int hf_bthci_cmd_spacing_types_tifs_cis;
841 static int hf_bthci_cmd_spacing_types_tmss_cis;
842 static int hf_bthci_cmd_spacing_types_reserved;
844 static int * const hfx_bthci_cmd_event_mask_page_2[] = {
845 &hf_bthci_cmd_evt_mask2_reserved,
846 &hf_bthci_cmd_evt_mask2_25,
847 &hf_bthci_cmd_evt_mask2_24,
848 &hf_bthci_cmd_evt_mask2_23,
849 &hf_bthci_cmd_evt_mask2_22,
850 &hf_bthci_cmd_evt_mask2_21,
851 &hf_bthci_cmd_evt_mask2_20,
852 &hf_bthci_cmd_evt_mask2_19,
853 &hf_bthci_cmd_evt_mask2_18,
854 &hf_bthci_cmd_evt_mask2_17,
855 &hf_bthci_cmd_evt_mask2_16,
856 &hf_bthci_cmd_evt_mask2_15,
857 &hf_bthci_cmd_evt_mask2_14,
858 &hf_bthci_cmd_evt_mask2_13,
859 &hf_bthci_cmd_evt_mask2_12,
860 &hf_bthci_cmd_evt_mask2_11,
861 &hf_bthci_cmd_evt_mask2_10,
862 &hf_bthci_cmd_evt_mask2_09,
863 &hf_bthci_cmd_evt_mask2_08,
864 &hf_bthci_cmd_evt_mask2_07,
865 &hf_bthci_cmd_evt_mask2_06,
866 &hf_bthci_cmd_evt_mask2_05,
867 &hf_bthci_cmd_evt_mask2_04,
868 &hf_bthci_cmd_evt_mask2_03,
869 &hf_bthci_cmd_evt_mask2_02,
870 &hf_bthci_cmd_evt_mask2_01,
871 &hf_bthci_cmd_evt_mask2_00,
872 NULL
875 static int * const hfx_bthci_cmd_le_event_mask[] = {
876 &hf_bthci_cmd_le_event_mask_le_reserved,
877 &hf_bthci_cmd_le_event_mask_le_frame_space_update_complete,
878 &hf_bthci_cmd_le_event_mask_le_monitored_advertisers_report,
879 &hf_bthci_cmd_le_event_mask_le_cs_test_end_complete,
880 &hf_bthci_cmd_le_event_mask_le_cs_subevent_result_continue,
881 &hf_bthci_cmd_le_event_mask_le_cs_subevent_result,
882 &hf_bthci_cmd_le_event_mask_le_cs_procedure_enable_complete,
883 &hf_bthci_cmd_le_event_mask_le_cs_config_complete,
884 &hf_bthci_cmd_le_event_mask_le_cs_security_enable_complete,
885 &hf_bthci_cmd_le_event_mask_le_cs_read_remote_fae_table_complete,
886 &hf_bthci_cmd_le_event_mask_le_cs_read_remote_supported_capabilities_complete,
887 &hf_bthci_cmd_le_event_mask_le_read_all_remote_features_complete,
888 &hf_bthci_cmd_le_event_mask_le_cis_established_v2,
889 &hf_bthci_cmd_le_event_mask_le_enhanced_connection_complete_v2,
890 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_response_report,
891 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_subevent_data_request,
892 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_transfer_received_v2,
893 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_report_v2,
894 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_established_v2,
895 &hf_bthci_cmd_le_event_mask_le_subrate_changed,
896 &hf_bthci_cmd_le_event_mask_le_biginfo_advertising_report,
897 &hf_bthci_cmd_le_event_mask_le_transmit_power_reporting,
898 &hf_bthci_cmd_le_event_mask_le_path_loss_threshold,
899 &hf_bthci_cmd_le_event_mask_le_request_peer_sca_complete,
900 &hf_bthci_cmd_le_event_mask_le_big_sync_lost,
901 &hf_bthci_cmd_le_event_mask_le_big_sync_established,
902 &hf_bthci_cmd_le_event_mask_le_terminate_big_complete,
903 &hf_bthci_cmd_le_event_mask_le_create_big_complete,
904 &hf_bthci_cmd_le_event_mask_le_cis_request,
905 &hf_bthci_cmd_le_event_mask_le_cis_established_v1,
906 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_transfer_received_v1,
907 &hf_bthci_cmd_le_event_mask_le_cte_request_failed,
908 &hf_bthci_cmd_le_event_mask_le_connection_iq_report,
909 &hf_bthci_cmd_le_event_mask_le_connectionless_iq_report,
910 &hf_bthci_cmd_le_event_mask_le_channel_selection_algorithm,
911 &hf_bthci_cmd_le_event_mask_le_scan_request_received,
912 &hf_bthci_cmd_le_event_mask_le_extended_advertising_set_terminated,
913 &hf_bthci_cmd_le_event_mask_le_extended_scan_timeout,
914 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_lost,
915 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_report_v1,
916 &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_established_v1,
917 &hf_bthci_cmd_le_event_mask_le_extended_advertising_report,
918 &hf_bthci_cmd_le_event_mask_le_phy_update_complete,
919 &hf_bthci_cmd_le_event_mask_le_direct_advertising_report ,
920 &hf_bthci_cmd_le_event_mask_le_enhanced_connection_complete_v1,
921 &hf_bthci_cmd_le_event_mask_le_generate_dhkey_complete,
922 &hf_bthci_cmd_le_event_mask_le_read_local_p256_public_key_complete,
923 &hf_bthci_cmd_le_event_mask_le_data_length_change,
924 &hf_bthci_cmd_le_event_mask_le_remote_connection_parameter_request,
925 &hf_bthci_cmd_le_event_mask_le_long_term_key_request,
926 &hf_bthci_cmd_le_event_mask_le_read_remote_features_complete,
927 &hf_bthci_cmd_le_event_mask_le_connection_update_complete,
928 &hf_bthci_cmd_le_event_mask_le_advertising_report,
929 &hf_bthci_cmd_le_event_mask_le_connection_complete,
930 NULL
933 static int * const hfx_bthci_cmd_adv_properties[] = {
934 &hf_bthci_cmd_advertising_properties_reserved,
935 &hf_bthci_cmd_advertising_properties_decision_pdu_incl_adi,
936 &hf_bthci_cmd_advertising_properties_decision_pdu_incl_adva,
937 &hf_bthci_cmd_advertising_properties_use_decision_pdus,
938 &hf_bthci_cmd_advertising_properties_incl_txpower,
939 &hf_bthci_cmd_advertising_properties_anonymous_adv,
940 &hf_bthci_cmd_advertising_properties_legacy_adv,
941 &hf_bthci_cmd_advertising_properties_hdc_connectable_directed,
942 &hf_bthci_cmd_advertising_properties_directed,
943 &hf_bthci_cmd_advertising_properties_scannable,
944 &hf_bthci_cmd_advertising_properties_connectable,
945 NULL
948 static int * const hfx_bthci_cmd_periodic_adv_properties[] = {
949 &hf_bthci_cmd_periodic_advertising_properties_reserved,
950 &hf_bthci_cmd_advertising_properties_incl_txpower,
951 NULL
954 static int * const hfx_bthci_cmd_scan_filter_policy[] = {
955 &hf_bthci_cmd_scan_filter_policy_reserved,
956 &hf_bthci_cmd_scan_filter_policy_decision_mode,
957 &hf_bthci_cmd_scan_filter_policy_extended,
958 &hf_bthci_cmd_scan_filter_policy_filtered,
959 NULL
963 static int * const hfx_btcmd_all_phys[] = {
964 &hf_bthci_cmd_all_phys_reserved,
965 &hf_bthci_cmd_all_phys_rx_pref,
966 &hf_bthci_cmd_all_phys_tx_pref,
967 NULL
970 static int * const hfx_btcmd_phys_pref[] = {
971 &hf_bthci_cmd_phys_pref_reserved,
972 &hf_bthci_cmd_phys_pref_le_coded,
973 &hf_bthci_cmd_phys_pref_le_2m,
974 &hf_bthci_cmd_phys_pref_le_1m,
975 NULL
978 static int * const hfx_btcmd_phy_options[] = {
979 &hf_bthci_cmd_phy_options_reserved,
980 &hf_bthci_cmd_phy_options_coding,
981 NULL
984 static int * const hfx_btcmd_le_scan_phys[] = {
985 &hf_bthci_cmd_le_scan_phys_reserved,
986 &hf_bthci_cmd_le_scan_phys_le_coded,
987 &hf_bthci_cmd_le_scan_phys_le_1m,
988 NULL
991 static int * const hfx_btcmd_le_phys[] = {
992 &hf_bthci_cmd_le_phys_reserved,
993 &hf_bthci_cmd_le_phys_le_coded,
994 &hf_bthci_cmd_le_phys_le_2m,
995 &hf_bthci_cmd_le_phys_le_1m,
996 NULL
999 static int * const hfx_btcmd_sync_cte_type[] = {
1000 &hf_bthci_cmd_sync_cte_type_reserved,
1001 &hf_bthci_cmd_sync_cte_type_sync_only_with_cte,
1002 &hf_bthci_cmd_sync_cte_type_no_sync_aod_2us,
1003 &hf_bthci_cmd_sync_cte_type_no_sync_aod_1us,
1004 &hf_bthci_cmd_sync_cte_type_no_sync_aoa,
1005 NULL
1008 static int * const hfx_btcmd_cte_types[] = {
1009 &hf_bthci_cmd_cte_types_reserved,
1010 &hf_bthci_cmd_cte_types_aod_2us,
1011 &hf_bthci_cmd_cte_types_aod_1us,
1012 &hf_bthci_cmd_cte_types_aoa,
1013 NULL
1016 static int * const hfx_btcmd_addr_change_reasons[] = {
1017 &hf_bthci_cmd_addr_change_reasons_reserved,
1018 &hf_bthci_cmd_addr_change_reasons_scan_rsp_data,
1019 &hf_bthci_cmd_addr_change_reasons_adv_data,
1020 NULL
1023 static int * const hfx_bthci_cmd_sco_packet_type[] = {
1024 &hf_bthci_cmd_sco_packet_type_reserved,
1025 &hf_bthci_cmd_sco_packet_type_3ev5,
1026 &hf_bthci_cmd_sco_packet_type_2ev5,
1027 &hf_bthci_cmd_sco_packet_type_3ev3,
1028 &hf_bthci_cmd_sco_packet_type_2ev3,
1029 &hf_bthci_cmd_sco_packet_type_ev5,
1030 &hf_bthci_cmd_sco_packet_type_ev4,
1031 &hf_bthci_cmd_sco_packet_type_ev3,
1032 &hf_bthci_cmd_sco_packet_type_hv3,
1033 &hf_bthci_cmd_sco_packet_type_hv2,
1034 &hf_bthci_cmd_sco_packet_type_hv1,
1035 NULL
1038 static int * const hfx_bthci_cmd_packet_type[] = {
1039 &hf_bthci_cmd_packet_type_dh5,
1040 &hf_bthci_cmd_packet_type_dm5,
1041 &hf_bthci_cmd_packet_type_3dh5,
1042 &hf_bthci_cmd_packet_type_2dh5,
1043 &hf_bthci_cmd_packet_type_dh3,
1044 &hf_bthci_cmd_packet_type_dm3,
1045 &hf_bthci_cmd_packet_type_3dh3,
1046 &hf_bthci_cmd_packet_type_2dh3,
1047 &hf_bthci_cmd_packet_type_reserved_5_7,
1048 &hf_bthci_cmd_packet_type_dh1,
1049 &hf_bthci_cmd_packet_type_dm1,
1050 &hf_bthci_cmd_packet_type_3dh1,
1051 &hf_bthci_cmd_packet_type_2dh1,
1052 &hf_bthci_cmd_packet_type_reserved_0,
1053 NULL
1056 static int * const hfx_bthci_cmd_preferred_peer_antenna[] = {
1057 &hf_bthci_cmd_preferred_peer_antenna_first,
1058 &hf_bthci_cmd_preferred_peer_antenna_second,
1059 &hf_bthci_cmd_preferred_peer_antenna_third,
1060 &hf_bthci_cmd_preferred_peer_antenna_fourth,
1061 &hf_bthci_cmd_preferred_peer_antenna_reserved,
1062 NULL
1065 static int * const hfx_bthci_cmd_cs_roles[] = {
1066 &hf_bthci_cmd_cs_roles_reserved,
1067 &hf_bthci_cmd_cs_roles_reflector,
1068 &hf_bthci_cmd_cs_roles_initiator,
1069 NULL
1072 static int * const hfx_bthci_cmd_cs_modes_supported[] = {
1073 &hf_bthci_cmd_cs_modes_supported_reserved,
1074 &hf_bthci_cmd_cs_modes_supported_3,
1075 NULL
1078 static int * const hfx_bthci_cmd_rtt_capability[] = {
1079 &hf_bthci_cmd_rtt_capability_reserved,
1080 &hf_bthci_cmd_rtt_capability_random_precision,
1081 &hf_bthci_cmd_rtt_capability_sounding_precision,
1082 &hf_bthci_cmd_rtt_capability_coarse_precision,
1083 NULL
1086 static int * const hfx_bthci_cmd_nadm_sounding_capability[] = {
1087 &hf_bthci_cmd_nadm_sounding_capability_reserved,
1088 &hf_bthci_cmd_nadm_sounding_capability_supported,
1089 NULL
1092 static int * const hfx_bthci_cmd_nadm_random_capability[] = {
1093 &hf_bthci_cmd_nadm_random_capability_reserved,
1094 &hf_bthci_cmd_nadm_random_capability_supported,
1095 NULL
1098 static int * const hfx_bthci_cmd_cs_sync_phys_supported[] = {
1099 &hf_bthci_cmd_cs_sync_phys_supported_reserved,
1100 &hf_bthci_cmd_cs_sync_phys_supported_2m2bt,
1101 &hf_bthci_cmd_cs_sync_phys_supported_2m,
1102 NULL
1105 static int * const hfx_bthci_cmd_cs_subfeatures[] = {
1106 &hf_bthci_cmd_cs_subfeatures_reserved,
1107 &hf_bthci_cmd_cs_subfeatures_pbr_from_rtt,
1108 &hf_bthci_cmd_cs_subfeatures_channel_selection_3c,
1109 &hf_bthci_cmd_cs_subfeatures_freq_actuation_error,
1110 &hf_bthci_cmd_cs_subfeatures_companion_signal,
1111 NULL
1114 static int * const hfx_bthci_cmd_tip_times_supported[] = {
1115 &hf_bthci_cmd_tip_times_supported_reserved,
1116 &hf_bthci_cmd_tip_times_supported_80us,
1117 &hf_bthci_cmd_tip_times_supported_60us,
1118 &hf_bthci_cmd_tip_times_supported_50us,
1119 &hf_bthci_cmd_tip_times_supported_40us,
1120 &hf_bthci_cmd_tip_times_supported_30us,
1121 &hf_bthci_cmd_tip_times_supported_20us,
1122 &hf_bthci_cmd_tip_times_supported_10us,
1123 NULL
1126 static int * const hfx_bthci_cmd_tfcs_times_supported[] = {
1127 &hf_bthci_cmd_tfcs_times_supported_reserved,
1128 &hf_bthci_cmd_tfcs_times_supported_120us,
1129 &hf_bthci_cmd_tfcs_times_supported_100us,
1130 &hf_bthci_cmd_tfcs_times_supported_80us,
1131 &hf_bthci_cmd_tfcs_times_supported_60us,
1132 &hf_bthci_cmd_tfcs_times_supported_50us,
1133 &hf_bthci_cmd_tfcs_times_supported_40us,
1134 &hf_bthci_cmd_tfcs_times_supported_30us,
1135 &hf_bthci_cmd_tfcs_times_supported_20us,
1136 &hf_bthci_cmd_tfcs_times_supported_15us,
1137 NULL
1140 static int * const hfx_bthci_cmd_tpm_times_supported[] = {
1141 &hf_bthci_cmd_tpm_times_supported_reserved,
1142 &hf_bthci_cmd_tpm_times_supported_20us,
1143 &hf_bthci_cmd_tpm_times_supported_10us,
1144 NULL
1147 static int * const hfx_bthci_cmd_tx_snr_capability[] = {
1148 &hf_bthci_cmd_tx_snr_capability_reserved,
1149 &hf_bthci_cmd_tx_snr_capability_30dB,
1150 &hf_bthci_cmd_tx_snr_capability_27dB,
1151 &hf_bthci_cmd_tx_snr_capability_24dB,
1152 &hf_bthci_cmd_tx_snr_capability_21dB,
1153 &hf_bthci_cmd_tx_snr_capability_18dB,
1154 NULL
1157 static int * const hfx_bthci_cmd_adv_decision_flags[] = {
1158 &hf_bthci_cmd_adv_decision_flags_reserved,
1159 &hf_bthci_cmd_adv_decision_flags_resolvable_tag,
1160 NULL
1163 static int * const hfx_bthci_cmd_adv_test_flags[] = {
1164 &hf_bthci_cmd_adv_test_flags_reserved,
1165 &hf_bthci_cmd_adv_test_flags_data_not_contain_field,
1166 &hf_bthci_cmd_adv_test_flags_data_contains_field_check_fail,
1167 &hf_bthci_cmd_adv_test_flags_data_contains_field_check_pass,
1168 &hf_bthci_cmd_adv_test_flags_start_group,
1169 NULL
1172 static int * const hfx_bthci_cmd_spacing_types[] = {
1173 &hf_bthci_cmd_spacing_types_reserved,
1174 &hf_bthci_cmd_spacing_types_tmss_cis,
1175 &hf_bthci_cmd_spacing_types_tifs_cis,
1176 &hf_bthci_cmd_spacing_types_tmces,
1177 &hf_bthci_cmd_spacing_types_tifs_acl_pc,
1178 &hf_bthci_cmd_spacing_types_tifs_acl_cp,
1179 NULL
1182 static int * const hfx_bthci_cmd_override_config[] = {
1183 &hf_bthci_cmd_override_config_reserved,
1184 &hf_bthci_cmd_override_config_stable_phase_test,
1185 &hf_bthci_cmd_override_config_cs_sync_data,
1186 &hf_bthci_cmd_override_config_ss_marker_value,
1187 &hf_bthci_cmd_override_config_ss_marker_position,
1188 &hf_bthci_cmd_override_config_cs_sync_aa,
1189 &hf_bthci_cmd_override_config_tone_ant_permutation,
1190 &hf_bthci_cmd_override_config_tpm_tone_ext,
1191 &hf_bthci_cmd_override_config_main_mode_steps,
1192 &hf_bthci_cmd_override_config_channel_list,
1193 NULL
1196 static expert_field ei_command_undecoded;
1197 static expert_field ei_command_unknown_command;
1198 static expert_field ei_command_parameter_unexpected;
1200 static dissector_table_t vendor_dissector_table;
1201 static dissector_table_t hci_vendor_table;
1203 /* Initialize the subtree pointers */
1204 static int ett_bthci_cmd;
1205 static int ett_opcode;
1206 static int ett_cod_mask;
1207 static int ett_flow_spec_subtree;
1208 static int ett_le_channel_map;
1209 static int ett_event_mask_page_2;
1210 static int ett_le_event_mask;
1211 static int ett_adv_properties;
1212 static int ett_adv_sets;
1213 static int ett_phys_flags;
1214 static int ett_phy_param;
1215 static int ett_filter_policy;
1216 static int ett_sync_cte_type;
1217 static int ett_coding_format;
1218 static int ett_packet_type;
1219 static int ett_sco_packet_type;
1220 static int ett_periods;
1221 static int ett_period;
1222 static int ett_table;
1223 static int ett_table_item;
1224 static int ett_patterns;
1225 static int ett_pattern;
1226 static int ett_cis_params;
1227 static int ett_addr_change_reasons;
1228 static int ett_adv_subevents;
1229 static int ett_pref_antenna;
1230 static int ett_cs_roles;
1231 static int ett_cs_modes;
1232 static int ett_cs_capability;
1233 static int ett_cs_times;
1234 static int ett_adv_test_flags;
1235 static int ett_override_config;
1236 static int ett_spacing_types;
1238 static int proto_btcommon;
1239 static int hf_btcommon_eir_ad_entry;
1240 static int hf_btcommon_eir_ad_advertising_data;
1241 static int hf_btcommon_eir_ad_extended_inquiry_response_data;
1242 static int hf_btcommon_eir_ad_unused;
1243 static int hf_btcommon_eir_ad_data;
1244 static int hf_btcommon_eir_ad_length;
1245 static int hf_btcommon_eir_ad_type;
1246 static int hf_btcommon_eir_ad_company_id;
1247 static int hf_btcommon_eir_ad_flags_reserved;
1248 static int hf_btcommon_eir_ad_flags_le_bredr_support_host;
1249 static int hf_btcommon_eir_ad_flags_le_bredr_support_controller;
1250 static int hf_btcommon_eir_ad_flags_bredr_not_support;
1251 static int hf_btcommon_eir_ad_flags_le_general_discoverable_mode;
1252 static int hf_btcommon_eir_ad_flags_le_limited_discoverable_mode;
1253 static int hf_btcommon_eir_ad_uuid_16;
1254 static int hf_btcommon_eir_ad_uuid_32;
1255 static int hf_btcommon_eir_ad_uuid_128;
1256 static int hf_btcommon_eir_ad_custom_uuid_32;
1257 static int hf_btcommon_eir_ad_custom_uuid_128;
1258 static int hf_btcommon_eir_ad_name;
1259 static int hf_btcommon_eir_ad_tx_power;
1260 static int hf_btcommon_eir_ad_ssp_oob_length;
1261 static int hf_btcommon_eir_ad_bd_addr;
1262 static int hf_btcommon_eir_ad_le_bd_addr_reserved;
1263 static int hf_btcommon_eir_ad_le_bd_addr_type;
1264 static int hf_btcommon_eir_ad_le_role;
1265 static int hf_btcommon_eir_ad_service_data;
1266 static int hf_btcommon_eir_ad_did_vendor_id;
1267 static int hf_btcommon_eir_ad_did_vendor_id_bluetooth_sig;
1268 static int hf_btcommon_eir_ad_did_vendor_id_usb_forum;
1269 static int hf_btcommon_eir_ad_did_product_id;
1270 static int hf_btcommon_eir_ad_did_version;
1271 static int hf_btcommon_eir_ad_did_vendor_id_source;
1272 static int hf_btcommon_eir_ad_3ds_association_notification;
1273 static int hf_btcommon_eir_ad_3ds_battery_level_reporting;
1274 static int hf_btcommon_eir_ad_3ds_send_battery_level_report_on_startup;
1275 static int hf_btcommon_eir_ad_3ds_reserved;
1276 static int hf_btcommon_eir_ad_3ds_factory_test_mode;
1277 static int hf_btcommon_eir_ad_3ds_path_loss_threshold;
1278 static int hf_btcommon_eir_ad_3ds_legacy_fixed;
1279 static int hf_btcommon_eir_ad_3ds_legacy_3d_capable_tv;
1280 static int hf_btcommon_eir_ad_3ds_legacy_ignored_1_3;
1281 static int hf_btcommon_eir_ad_3ds_legacy_fixed_4;
1282 static int hf_btcommon_eir_ad_3ds_legacy_ignored_5;
1283 static int hf_btcommon_eir_ad_3ds_legacy_fixed_6;
1284 static int hf_btcommon_eir_ad_3ds_legacy_test_mode;
1285 static int hf_btcommon_eir_ad_3ds_legacy_path_loss_threshold;
1286 static int hf_btcommon_eir_ad_advertising_interval;
1287 static int hf_btcommon_eir_ad_appearance;
1288 static int hf_btcommon_eir_ad_hash_c;
1289 static int hf_btcommon_eir_ad_randomizer_r;
1290 static int hf_btcommon_eir_ad_le_secure_confirmation_value;
1291 static int hf_btcommon_eir_ad_le_secure_random_value;
1292 static int hf_btcommon_eir_ad_oob_flags_data_present;
1293 static int hf_btcommon_eir_ad_oob_flags_le_supported_host;
1294 static int hf_btcommon_eir_ad_oob_flags_le_bredr_support;
1295 static int hf_btcommon_eir_ad_oob_flags_address_type;
1296 static int hf_btcommon_eir_ad_oob_flags_reserved;
1297 static int hf_btcommon_eir_ad_connection_interval_min;
1298 static int hf_btcommon_eir_ad_connection_interval_max;
1299 static int hf_btcommon_eir_ad_uri;
1300 static int hf_btcommon_eir_ad_ips_flags;
1301 static int hf_btcommon_eir_ad_ips_flags_reserved;
1302 static int hf_btcommon_eir_ad_ips_flags_location_name;
1303 static int hf_btcommon_eir_ad_ips_flags_uncertainty;
1304 static int hf_btcommon_eir_ad_ips_flags_floor_number;
1305 static int hf_btcommon_eir_ad_ips_flags_altitude;
1306 static int hf_btcommon_eir_ad_ips_flags_tx_power;
1307 static int hf_btcommon_eir_ad_ips_flags_coordinate_system;
1308 static int hf_btcommon_eir_ad_ips_flags_coordinates;
1309 static int hf_btcommon_eir_ad_ips_uncertainty;
1310 static int hf_btcommon_eir_ad_ips_uncertainty_reserved;
1311 static int hf_btcommon_eir_ad_ips_uncertainty_precision;
1312 static int hf_btcommon_eir_ad_ips_uncertainty_update_time;
1313 static int hf_btcommon_eir_ad_ips_uncertainty_stationary;
1314 static int hf_btcommon_eir_ad_ips_latitude;
1315 static int hf_btcommon_eir_ad_ips_longitude;
1316 static int hf_btcommon_eir_ad_ips_local_north_coordinate;
1317 static int hf_btcommon_eir_ad_ips_local_east_coordinate;
1318 static int hf_btcommon_eir_ad_ips_tx_power_level;
1319 static int hf_btcommon_eir_ad_ips_floor_number;
1320 static int hf_btcommon_eir_ad_ips_altitude;
1321 static int hf_btcommon_eir_ad_tds_organization_id;
1322 static int hf_btcommon_eir_ad_tds_flags;
1323 static int hf_btcommon_eir_ad_tds_flags_reserved;
1324 static int hf_btcommon_eir_ad_tds_flags_transport_state;
1325 static int hf_btcommon_eir_ad_tds_flags_transport_data_incomplete;
1326 static int hf_btcommon_eir_ad_tds_flags_role;
1327 static int hf_btcommon_eir_ad_tds_data_length;
1328 static int hf_btcommon_eir_ad_tds_data;
1329 static int hf_btcommon_eir_ad_le_features;
1330 static int hf_btcommon_eir_ad_le_channel_map;
1331 static int hf_btcommon_eir_ad_instant;
1332 static int hf_btcommon_eir_ad_le_features_encryption;
1333 static int hf_btcommon_eir_ad_le_features_connection_parameters_request_procedure;
1334 static int hf_btcommon_eir_ad_le_features_extended_reject_indication;
1335 static int hf_btcommon_eir_ad_le_features_peripheral_initiated_features_exchange;
1336 static int hf_btcommon_eir_ad_le_features_ping;
1337 static int hf_btcommon_eir_ad_le_features_data_packet_length_extension;
1338 static int hf_btcommon_eir_ad_le_features_ll_privacy;
1339 static int hf_btcommon_eir_ad_le_features_extended_scanner_filter_policies;
1340 static int hf_btcommon_eir_ad_le_features_2m_phy;
1341 static int hf_btcommon_eir_ad_le_features_stable_modulation_index_tx;
1342 static int hf_btcommon_eir_ad_le_features_stable_modulation_index_rx;
1343 static int hf_btcommon_eir_ad_le_features_coded_phy;
1344 static int hf_btcommon_eir_ad_le_features_extended_advertising;
1345 static int hf_btcommon_eir_ad_le_features_periodic_advertising;
1346 static int hf_btcommon_eir_ad_le_features_channel_selection_algorithm_2;
1347 static int hf_btcommon_eir_ad_le_features_power_class_1;
1348 static int hf_btcommon_eir_ad_le_features_minimum_number_of_used_channels_procedure;
1349 static int hf_btcommon_eir_ad_le_features_reserved_1_7;
1350 static int hf_btcommon_eir_ad_le_features_reserved;
1351 static int hf_btcommon_eir_ad_biginfo_big_offset;
1352 static int hf_btcommon_eir_ad_biginfo_big_offset_units;
1353 static int hf_btcommon_eir_ad_biginfo_iso_interval;
1354 static int hf_btcommon_eir_ad_biginfo_num_bis;
1355 static int hf_btcommon_eir_ad_biginfo_nse;
1356 static int hf_btcommon_eir_ad_biginfo_bn;
1357 static int hf_btcommon_eir_ad_biginfo_sub_interval;
1358 static int hf_btcommon_eir_ad_biginfo_pto;
1359 static int hf_btcommon_eir_ad_biginfo_bis_spacing;
1360 static int hf_btcommon_eir_ad_biginfo_irc;
1361 static int hf_btcommon_eir_ad_biginfo_max_pdu;
1362 static int hf_btcommon_eir_ad_biginfo_rfu;
1363 static int hf_btcommon_eir_ad_biginfo_seed_access_address;
1364 static int hf_btcommon_eir_ad_biginfo_sdu_interval;
1365 static int hf_btcommon_eir_ad_biginfo_max_sdu;
1366 static int hf_btcommon_eir_ad_biginfo_base_crc_init;
1367 static int hf_btcommon_eir_ad_biginfo_channel_map;
1368 static int hf_btcommon_eir_ad_biginfo_phy;
1369 static int hf_btcommon_eir_ad_biginfo_bis_payload_count;
1370 static int hf_btcommon_eir_ad_biginfo_framing;
1371 static int hf_btcommon_eir_ad_biginfo_giv;
1372 static int hf_btcommon_eir_ad_biginfo_gskd;
1373 static int hf_btcommon_eir_ad_biginfo_big_control_access_address;
1374 static int hf_btcommon_eir_ad_biginfo_bis_access_address;
1375 static int hf_btcommon_eir_ad_broadcast_code;
1376 static int hf_btcommon_eir_ad_rsi;
1377 static int hf_btcommon_eir_ad_broadcast_name;
1379 static int hf_btcommon_cod_class_of_device;
1380 static int hf_btcommon_cod_format_type;
1381 static int hf_btcommon_cod_major_service_class_information;
1382 static int hf_btcommon_cod_major_service_class_telephony;
1383 static int hf_btcommon_cod_major_service_class_audio;
1384 static int hf_btcommon_cod_major_service_class_object_transfer;
1385 static int hf_btcommon_cod_major_service_class_capturing;
1386 static int hf_btcommon_cod_major_service_class_rendering;
1387 static int hf_btcommon_cod_major_service_class_networking;
1388 static int hf_btcommon_cod_major_service_class_positioning;
1389 static int hf_btcommon_cod_major_service_class_reserved;
1390 static int hf_btcommon_cod_major_service_class_le_audio;
1391 static int hf_btcommon_cod_major_service_class_limited_discoverable_mode;
1392 static int hf_btcommon_cod_major_device_class;
1393 static int hf_btcommon_cod_minor_device_class_computer;
1394 static int hf_btcommon_cod_minor_device_class_phone;
1395 static int hf_btcommon_cod_minor_device_class_lan_net_load_factor;
1396 static int hf_btcommon_cod_minor_device_class_lan_net_type;
1397 static int hf_btcommon_cod_minor_device_class_audio_video;
1398 static int hf_btcommon_cod_minor_device_class_peripheral_class;
1399 static int hf_btcommon_cod_minor_device_class_peripheral_type;
1400 static int hf_btcommon_cod_minor_device_class_imaging_class_printer;
1401 static int hf_btcommon_cod_minor_device_class_imaging_class_scanner;
1402 static int hf_btcommon_cod_minor_device_class_imaging_class_camera;
1403 static int hf_btcommon_cod_minor_device_class_imaging_class_display;
1404 static int hf_btcommon_cod_minor_device_class_imaging_type;
1405 static int hf_btcommon_cod_minor_device_class_wearable;
1406 static int hf_btcommon_cod_minor_device_class_toy;
1407 static int hf_btcommon_cod_minor_device_class_health;
1408 static int hf_btcommon_cod_minor_device_class_unknown;
1409 static int hf_btcommon_le_channel_map_0;
1410 static int hf_btcommon_le_channel_map_1;
1411 static int hf_btcommon_le_channel_map_2;
1412 static int hf_btcommon_le_channel_map_3;
1413 static int hf_btcommon_le_channel_map_4;
1414 static int hf_btcommon_le_channel_map_5;
1415 static int hf_btcommon_le_channel_map_6;
1416 static int hf_btcommon_le_channel_map_7;
1417 static int hf_btcommon_le_channel_map_8;
1418 static int hf_btcommon_le_channel_map_9;
1419 static int hf_btcommon_le_channel_map_10;
1420 static int hf_btcommon_le_channel_map_11;
1421 static int hf_btcommon_le_channel_map_12;
1422 static int hf_btcommon_le_channel_map_13;
1423 static int hf_btcommon_le_channel_map_14;
1424 static int hf_btcommon_le_channel_map_15;
1425 static int hf_btcommon_le_channel_map_16;
1426 static int hf_btcommon_le_channel_map_17;
1427 static int hf_btcommon_le_channel_map_18;
1428 static int hf_btcommon_le_channel_map_19;
1429 static int hf_btcommon_le_channel_map_20;
1430 static int hf_btcommon_le_channel_map_21;
1431 static int hf_btcommon_le_channel_map_22;
1432 static int hf_btcommon_le_channel_map_23;
1433 static int hf_btcommon_le_channel_map_24;
1434 static int hf_btcommon_le_channel_map_25;
1435 static int hf_btcommon_le_channel_map_26;
1436 static int hf_btcommon_le_channel_map_27;
1437 static int hf_btcommon_le_channel_map_28;
1438 static int hf_btcommon_le_channel_map_29;
1439 static int hf_btcommon_le_channel_map_30;
1440 static int hf_btcommon_le_channel_map_31;
1441 static int hf_btcommon_le_channel_map_32;
1442 static int hf_btcommon_le_channel_map_33;
1443 static int hf_btcommon_le_channel_map_34;
1444 static int hf_btcommon_le_channel_map_35;
1445 static int hf_btcommon_le_channel_map_36;
1446 static int hf_btcommon_le_channel_map_37;
1447 static int hf_btcommon_le_channel_map_38;
1448 static int hf_btcommon_le_channel_map_39;
1449 static int hf_btcommon_eir_ad_mesh_msg;
1450 static int hf_btcommon_eir_ad_mesh_pbadv;
1451 static int hf_btcommon_eir_ad_mesh_beacon;
1453 static int * const hfx_btcommon_eir_ad_ips_flags[] = {
1454 &hf_btcommon_eir_ad_ips_flags_reserved,
1455 &hf_btcommon_eir_ad_ips_flags_location_name,
1456 &hf_btcommon_eir_ad_ips_flags_uncertainty,
1457 &hf_btcommon_eir_ad_ips_flags_floor_number,
1458 &hf_btcommon_eir_ad_ips_flags_altitude,
1459 &hf_btcommon_eir_ad_ips_flags_tx_power,
1460 &hf_btcommon_eir_ad_ips_flags_coordinate_system,
1461 &hf_btcommon_eir_ad_ips_flags_coordinates,
1462 NULL
1465 static int * const hfx_btcommon_eir_ad_ips_uncertainty[] = {
1466 &hf_btcommon_eir_ad_ips_uncertainty_reserved,
1467 &hf_btcommon_eir_ad_ips_uncertainty_precision,
1468 &hf_btcommon_eir_ad_ips_uncertainty_update_time,
1469 &hf_btcommon_eir_ad_ips_uncertainty_stationary,
1470 NULL
1473 static int * const hfx_btcommon_eir_ad_tds_flags[] = {
1474 &hf_btcommon_eir_ad_tds_flags_reserved,
1475 &hf_btcommon_eir_ad_tds_flags_transport_state,
1476 &hf_btcommon_eir_ad_tds_flags_transport_data_incomplete,
1477 &hf_btcommon_eir_ad_tds_flags_role,
1478 NULL
1481 static int * const hfx_btcommon_eir_ad_le_features_0[] = {
1482 &hf_btcommon_eir_ad_le_features_encryption,
1483 &hf_btcommon_eir_ad_le_features_connection_parameters_request_procedure,
1484 &hf_btcommon_eir_ad_le_features_extended_reject_indication,
1485 &hf_btcommon_eir_ad_le_features_peripheral_initiated_features_exchange,
1486 &hf_btcommon_eir_ad_le_features_ping,
1487 &hf_btcommon_eir_ad_le_features_data_packet_length_extension,
1488 &hf_btcommon_eir_ad_le_features_ll_privacy,
1489 &hf_btcommon_eir_ad_le_features_extended_scanner_filter_policies,
1490 NULL
1493 static int * const hfx_btcommon_eir_ad_le_features_1[] = {
1494 &hf_btcommon_eir_ad_le_features_2m_phy,
1495 &hf_btcommon_eir_ad_le_features_stable_modulation_index_tx,
1496 &hf_btcommon_eir_ad_le_features_stable_modulation_index_rx,
1497 &hf_btcommon_eir_ad_le_features_coded_phy,
1498 &hf_btcommon_eir_ad_le_features_extended_advertising,
1499 &hf_btcommon_eir_ad_le_features_periodic_advertising,
1500 &hf_btcommon_eir_ad_le_features_channel_selection_algorithm_2,
1501 &hf_btcommon_eir_ad_le_features_power_class_1,
1502 NULL
1505 static int * const hfx_btcommon_eir_ad_le_features_2[] = {
1506 &hf_btcommon_eir_ad_le_features_minimum_number_of_used_channels_procedure,
1507 &hf_btcommon_eir_ad_le_features_reserved_1_7,
1508 NULL
1511 static int * const hfx_btcommon_eir_ad_le_features_reserved[] = {
1512 &hf_btcommon_eir_ad_le_features_reserved,
1513 NULL
1516 static int * const *hfx_btcommon_eir_ad_le_features[] = {
1517 hfx_btcommon_eir_ad_le_features_0,
1518 hfx_btcommon_eir_ad_le_features_1,
1519 hfx_btcommon_eir_ad_le_features_2,
1520 hfx_btcommon_eir_ad_le_features_reserved,
1521 hfx_btcommon_eir_ad_le_features_reserved,
1522 hfx_btcommon_eir_ad_le_features_reserved,
1523 hfx_btcommon_eir_ad_le_features_reserved,
1524 hfx_btcommon_eir_ad_le_features_reserved
1527 static int ett_cod;
1528 static int ett_eir_ad;
1529 static int ett_eir_ad_entry;
1530 static int ett_eir_ad_le_features;
1531 static int ett_eir_ad_biginfo_seedaa;
1533 static expert_field ei_eir_ad_undecoded;
1534 static expert_field ei_eir_ad_unknown;
1535 static expert_field ei_eir_ad_not_used;
1536 static expert_field ei_eir_ad_invalid_length;
1538 static dissector_handle_t btcommon_cod_handle;
1539 static dissector_handle_t btcommon_eir_handle;
1540 static dissector_handle_t btcommon_ad_handle;
1541 static dissector_handle_t btcommon_le_channel_map_handle;
1542 static dissector_handle_t bthci_cmd_handle;
1543 static dissector_handle_t btmesh_handle;
1544 static dissector_handle_t btmesh_pbadv_handle;
1545 static dissector_handle_t btmesh_beacon_handle;
1547 static dissector_table_t bluetooth_eir_ad_manufacturer_company_id;
1548 static dissector_table_t bluetooth_eir_ad_tds_organization_id;
1549 static dissector_table_t bluetooth_eir_ad_service_uuid;
1551 bool bthci_vendor_android = false;
1552 const uint16_t bthci_vendor_manufacturer_android = 0x00e0; // Google LLC
1554 wmem_tree_t *bthci_cmds;
1556 extern value_string_ext ext_usb_vendors_vals;
1557 extern value_string_ext ext_usb_products_vals;
1558 extern value_string_ext did_vendor_id_source_vals_ext;
1560 static const value_string bthci_cmd_ogf_vals[] = {
1561 { 0x01, "Link Control Commands" },
1562 { 0x02, "Link Policy Commands" },
1563 { 0x03, "Host Controller & Baseband Commands" },
1564 { 0x04, "Informational Parameters" },
1565 { 0x05, "Status Parameters" },
1566 { 0x06, "Testing Commands" },
1567 { 0x08, "LE Controller Commands" },
1568 { 0x3E, "Bluetooth Logo Testing Commands" },
1569 { 0x3F, "Vendor-Specific Commands" },
1570 { 0, NULL }
1572 value_string_ext bthci_cmd_ogf_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ogf_vals);
1574 # define LINK_CONTROL_VALS(base) \
1575 /* Bluetooth Core 4.0 */ \
1576 { (base) | 0x001, "Inquiry" }, \
1577 { (base) | 0x002, "Inquiry Cancel" }, \
1578 { (base) | 0x003, "Periodic Inquiry Mode" }, \
1579 { (base) | 0x004, "Exit Periodic Inquiry Mode" }, \
1580 { (base) | 0x005, "Create Connection" }, \
1581 { (base) | 0x006, "Disconnect" }, \
1582 { (base) | 0x007, "Add SCO Connection" }, \
1583 { (base) | 0x008, "Create Connection Cancel" }, \
1584 { (base) | 0x009, "Accept Connection Request" }, \
1585 { (base) | 0x00A, "Reject Connection Request" }, \
1586 { (base) | 0x00B, "Link Key Request Reply" }, \
1587 { (base) | 0x00C, "Link Key Request Negative Reply" }, \
1588 { (base) | 0x00D, "PIN Code Request Reply" }, \
1589 { (base) | 0x00E, "PIN Code Request Negative Reply" }, \
1590 { (base) | 0x00F, "Change Connection Packet Type" }, \
1591 { (base) | 0x011, "Authentication Requested" }, \
1592 { (base) | 0x013, "Set Connection Encryption" }, \
1593 { (base) | 0x015, "Change Connection Link Key" }, \
1594 { (base) | 0x017, "Link Key Selection" }, \
1595 { (base) | 0x019, "Remote Name Request" }, \
1596 { (base) | 0x01A, "Remote Name Request Cancel" }, \
1597 { (base) | 0x01B, "Read Remote Supported Features" }, \
1598 { (base) | 0x01C, "Read Remote Extended Features" }, \
1599 { (base) | 0x01D, "Read Remote Version Information" }, \
1600 { (base) | 0x01F, "Read Clock offset" }, \
1601 { (base) | 0x020, "Read LMP Handle" }, \
1602 { (base) | 0x028, "Setup Synchronous Connection" }, \
1603 { (base) | 0x029, "Accept Synchronous Connection Request" }, \
1604 { (base) | 0x02A, "Reject Synchronous Connection Request" }, \
1605 { (base) | 0x02B, "IO Capability Request Reply" }, \
1606 { (base) | 0x02C, "User Confirmation Request Reply" }, \
1607 { (base) | 0x02D, "User Confirmation Request Negative Reply" }, \
1608 { (base) | 0x02E, "User Passkey Request Reply" }, \
1609 { (base) | 0x02F, "User Passkey Request Negative Reply" }, \
1610 { (base) | 0x030, "Remote OOB Data Request Reply" }, \
1611 { (base) | 0x033, "Remote OOB Data Request Negative Reply" }, \
1612 { (base) | 0x034, "IO Capability Request Negative Reply" }, \
1613 { (base) | 0x035, "Create Physical Link" }, \
1614 { (base) | 0x036, "Accept Physical Link" }, \
1615 { (base) | 0x037, "Disconnect Physical Link" }, \
1616 { (base) | 0x038, "Create Logical Link" }, \
1617 { (base) | 0x039, "Accept Logical Link" }, \
1618 { (base) | 0x03A, "Disconnect Logical Link" }, \
1619 { (base) | 0x03B, "Logical Link Cancel" }, \
1620 { (base) | 0x03C, "Flow Spec Modify" }, \
1621 /* Bluetooth Core Specification Addendum 2 */ \
1622 { (base) | 0x03D, "Enhanced Setup Synchronous Connection" }, \
1623 { (base) | 0x03E, "Enhanced Accept Synchronous Connection Request" }, \
1624 /* Bluetooth Core Specification Addendum 4 */ \
1625 { (base) | 0x03F, "Truncated Page" }, \
1626 { (base) | 0x040, "Truncated Page Cancel" }, \
1627 { (base) | 0x041, "Set Connectionless Peripheral Broadcast" }, \
1628 { (base) | 0x042, "Set Connectionless Peripheral Broadcast Receive" }, \
1629 { (base) | 0x043, "Start Synchronization Train" }, \
1630 { (base) | 0x044, "Receive Synchronization Train" }, \
1631 { (base) | 0x045, "Remote OOB Extended Data Request Reply" } \
1633 static const value_string bthci_cmd_ocf_link_control_vals[] = {
1634 LINK_CONTROL_VALS(0x0), \
1635 { 0, NULL }
1638 value_string_ext bthci_cmd_ocf_link_control_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ocf_link_control_vals);
1640 #define LINK_POLICY_VALS(base) \
1641 /* Bluetooth Core 4.0 */ \
1642 { (base) | 0x001, "Hold Mode" }, \
1643 { (base) | 0x003, "Sniff Mode" }, \
1644 { (base) | 0x004, "Exit Sniff Mode" }, \
1645 { (base) | 0x005, "Park Mode" }, \
1646 { (base) | 0x006, "Exit Park Mode" }, \
1647 { (base) | 0x007, "QoS Setup" }, \
1648 { (base) | 0x009, "Role Discovery" }, \
1649 { (base) | 0x00b, "Switch Role" }, \
1650 { (base) | 0x00c, "Read Link Policy Settings" }, \
1651 { (base) | 0x00d, "Write Link Policy Settings" }, \
1652 { (base) | 0x00e, "Read Default Link Policy Settings" }, \
1653 { (base) | 0x00f, "Write Default Link Policy Settings" }, \
1654 { (base) | 0x010, "Flow Specification" }, \
1655 { (base) | 0x011, "Sniff Subrating" }
1657 static const value_string bthci_cmd_ocf_link_policy_vals[] = {
1658 LINK_POLICY_VALS(0x0),
1659 { 0, NULL }
1662 value_string_ext bthci_cmd_ocf_link_policy_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ocf_link_policy_vals);
1664 #define HOST_CONTROLLER_AND_BASEBAND_VALS(base) \
1665 /* Bluetooth Core 4.0 */ \
1666 { (base) | 0x001, "Set Event Mask" }, \
1667 { (base) | 0x003, "Reset" }, \
1668 { (base) | 0x005, "Set Event Filter" }, \
1669 { (base) | 0x008, "Flush" }, \
1670 { (base) | 0x009, "Read PIN Type" }, \
1671 { (base) | 0x00A, "Write PIN Type" }, \
1672 { (base) | 0x00B, "Create New Unit Key" }, \
1673 { (base) | 0x00D, "Read Stored Link Key" }, \
1674 { (base) | 0x011, "Write Stored Link Key" }, \
1675 { (base) | 0x012, "Delete Stored Link Key" }, \
1676 { (base) | 0x013, "Change Local Name" }, \
1677 { (base) | 0x014, "Read Local Name" }, \
1678 { (base) | 0x015, "Read Connection Accept Timeout" }, \
1679 { (base) | 0x016, "Write Connection Accept Timeout" }, \
1680 { (base) | 0x017, "Read Page Timeout" }, \
1681 { (base) | 0x018, "Write Page Timeout" }, \
1682 { (base) | 0x019, "Read Scan Enable" }, \
1683 { (base) | 0x01A, "Write Scan Enable" }, \
1684 { (base) | 0x01B, "Read Page Scan Activity" }, \
1685 { (base) | 0x01C, "Write Page Scan Activity" }, \
1686 { (base) | 0x01D, "Read Inquiry Scan Activity" }, \
1687 { (base) | 0x01E, "Write Inquiry Scan Activity" }, \
1688 { (base) | 0x01F, "Read Authentication Enable" }, \
1689 { (base) | 0x020, "Write Authentication Enable" }, \
1690 { (base) | 0x021, "Read Encryption Mode" }, \
1691 { (base) | 0x022, "Write Encryption Mode" }, \
1692 { (base) | 0x023, "Read Class of Device" }, \
1693 { (base) | 0x024, "Write Class of Device" }, \
1694 { (base) | 0x025, "Read Voice Setting" }, \
1695 { (base) | 0x026, "Write Voice Setting" }, \
1696 { (base) | 0x027, "Read Automatic Flush Timeout" }, \
1697 { (base) | 0x028, "Write Automatic Flush Timeout" }, \
1698 { (base) | 0x029, "Read Num Broadcast Retransmissions" }, \
1699 { (base) | 0x02A, "Write Num Broadcast Retransmissions" }, \
1700 { (base) | 0x02B, "Read Hold Mode Activity" }, \
1701 { (base) | 0x02C, "Write Hold Mode Activity" }, \
1702 { (base) | 0x02D, "Read Tx Power Level" }, \
1703 { (base) | 0x02E, "Read SCO Flow Control Enable" }, \
1704 { (base) | 0x02F, "Write SCO Flow Control Enable" }, \
1705 { (base) | 0x031, "Set Host Controller To Host Flow Control" }, \
1706 { (base) | 0x033, "Host Buffer Size" }, \
1707 { (base) | 0x035, "Host Number of Completed Packets" }, \
1708 { (base) | 0x036, "Read Link Supervision Timeout" }, \
1709 { (base) | 0x037, "Write Link Supervision Timeout" }, \
1710 { (base) | 0x038, "Read Number of Supported IAC" }, \
1711 { (base) | 0x039, "Read Current IAC LAP" }, \
1712 { (base) | 0x03A, "Write Current IAC LAP" }, \
1713 { (base) | 0x03B, "Read Page Scan Period Mode" }, \
1714 { (base) | 0x03C, "Write Page Scan Period Mode" }, \
1715 { (base) | 0x03D, "Read Page Scan Mode" }, \
1716 { (base) | 0x03E, "Write Page Scan Mode" }, \
1717 { (base) | 0x03F, "Set AFH Host Channel Classification" }, \
1718 { (base) | 0x042, "Read Inquiry Scan Type" }, \
1719 { (base) | 0x043, "Write Inquiry Scan Type" }, \
1720 { (base) | 0x044, "Read Inquiry Mode" }, \
1721 { (base) | 0x045, "Write Inquiry Mode" }, \
1722 { (base) | 0x046, "Read Page Scan Type" }, \
1723 { (base) | 0x047, "Write Page Scan Type" }, \
1724 { (base) | 0x048, "Read AFH Channel Assessment Mode" }, \
1725 { (base) | 0x049, "Write AFH Channel Assessment Mode" }, \
1726 { (base) | 0x051, "Read Extended Inquiry Response" }, \
1727 { (base) | 0x052, "Write Extended Inquiry Response" }, \
1728 { (base) | 0x053, "Refresh Encryption Key" }, \
1729 { (base) | 0x055, "Read Simple Pairing Mode" }, \
1730 { (base) | 0x056, "Write Simple Pairing Mode" }, \
1731 { (base) | 0x057, "Read Local OOB Data" }, \
1732 { (base) | 0x058, "Read Inquiry Response Tx Power Level" }, \
1733 { (base) | 0x059, "Write Inquiry Tx Power Level" }, \
1734 { (base) | 0x05A, "Read Default Erroneous Data Reporting" }, \
1735 { (base) | 0x05B, "Write Default Erroneous Data Reporting" }, \
1736 { (base) | 0x05F, "Enhanced Flush" }, \
1737 { (base) | 0x060, "Send Keypress Notification" }, \
1738 { (base) | 0x061, "Read Logical Link Accept Timeout" }, \
1739 { (base) | 0x062, "Write Logical Link Accept Timeout" }, \
1740 { (base) | 0x063, "Set Event Mask Page 2" }, \
1741 { (base) | 0x064, "Read Location Data" }, \
1742 { (base) | 0x065, "Write Location Data" }, \
1743 { (base) | 0x066, "Read Flow Control Mode" }, \
1744 { (base) | 0x067, "Write Flow Control Mode" }, \
1745 { (base) | 0x068, "Read Enhanced Transmit Power Level" }, \
1746 { (base) | 0x069, "Read Best Effort Flush Timeout" }, \
1747 { (base) | 0x06A, "Write Best Effort Flush Timeout" }, \
1748 { (base) | 0x06B, "Short Range Mode" }, \
1749 { (base) | 0x06C, "Read LE Host Supported" }, \
1750 { (base) | 0x06D, "Write LE Host Supported" }, \
1751 /* Bluetooth Core Specification Addendum 3 */ \
1752 { (base) | 0x06E, "Set MWS Channel Parameters"}, \
1753 { (base) | 0x06F, "Set External Frame Configuration"}, \
1754 { (base) | 0x070, "Set MWS Signaling"}, \
1755 { (base) | 0x071, "Set MWS Transport Layer"}, \
1756 { (base) | 0x072, "Set MWS Scan Frequency Table"}, \
1757 { (base) | 0x073, "Set MWS Pattern Configuration"}, \
1758 /* Bluetooth Core Specification Addendum 4 */ \
1759 { (base) | 0x074, "Set Reserved LT_ADDR" }, \
1760 { (base) | 0x075, "Delete Reserved LT_ADDR" }, \
1761 { (base) | 0x076, "Set Connectionless Peripheral Broadcast Data" }, \
1762 { (base) | 0x077, "Read Synchronization Train Parameters" }, \
1763 { (base) | 0x078, "Write Synchronization Train Parameters" }, \
1764 { (base) | 0x079, "Read Secure Connections Host Support" }, \
1765 { (base) | 0x07A, "Write Secure Connections Host Support" }, \
1766 { (base) | 0x07B, "Read Authenticated Payload Timeout" }, \
1767 { (base) | 0x07C, "Write Authenticated Payload Timeout" }, \
1768 { (base) | 0x07D, "Read Local OOB Extended Data" }, \
1769 { (base) | 0x07E, "Read Extended Page Timeout" }, \
1770 { (base) | 0x07F, "Write Extended Page Timeout" }, \
1771 { (base) | 0x080, "Read Extended Inquiry Length" }, \
1772 { (base) | 0x081, "Write Extended Inquiry Length" }, \
1773 /* Bluetooth Core Specification 5.2 */ \
1774 { (base) | 0x082, "Set Ecosystem Base Interval" }, \
1775 { (base) | 0x083, "Configure Data Path" }, \
1776 /* Bluetooth Core Specification 5.3 */ \
1777 { (base) | 0x084, "Set Min Encryption Key Size" }
1779 static const value_string bthci_cmd_ocf_host_controller_and_baseband_vals[] = {
1780 HOST_CONTROLLER_AND_BASEBAND_VALS(0x0),
1781 { 0, NULL }
1784 value_string_ext bthci_cmd_ocf_host_controller_and_baseband_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ocf_host_controller_and_baseband_vals);
1786 #define INFORMATIONAL_VALS(base) \
1787 /* Bluetooth Core 4.0 */ \
1788 { (base) | 0x001, "Read Local Version Information" }, \
1789 { (base) | 0x002, "Read Local Supported Commands" }, \
1790 { (base) | 0x003, "Read Local Supported Features" }, \
1791 { (base) | 0x004, "Read Local Extended Features" }, \
1792 { (base) | 0x005, "Read Buffer Size" }, \
1793 { (base) | 0x007, "Read Country Code" }, \
1794 { (base) | 0x009, "Read BD ADDR" }, \
1795 { (base) | 0x00A, "Read Data Block Size" }, \
1796 /* Bluetooth Core Specification Addendum 2 */ \
1797 { (base) | 0x00B, "Read Local Supported Codecs" }, \
1798 /* Bluetooth Core 5.1 */ \
1799 { (base) | 0x00C, "Read Local Simple Pairing Options" }
1801 static const value_string bthci_cmd_ocf_informational_vals[] = {
1802 INFORMATIONAL_VALS(0x0),
1803 { 0, NULL }
1806 value_string_ext bthci_cmd_ocf_informational_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ocf_informational_vals);
1809 #define STATUS_VALS(base) \
1810 /* Bluetooth Core 4.0 */ \
1811 { (base) | 0x001, "Read Failed Contact Counter" }, \
1812 { (base) | 0x002, "Reset Failed Contact Counter" }, \
1813 { (base) | 0x003, "Read Link Quality" }, \
1814 { (base) | 0x005, "Read RSSI" }, \
1815 { (base) | 0x006, "Read AFH Channel Map" }, \
1816 { (base) | 0x007, "Read Clock" }, \
1817 { (base) | 0x008, "Read Encryption Key Size" }, \
1818 { (base) | 0x009, "Read Local AMP Info" }, \
1819 { (base) | 0x00A, "Read Local AMP Assoc" }, \
1820 { (base) | 0x00B, "Write Remote AMP Assoc" }, \
1821 /* Bluetooth Core Specification Addendum 3 */ \
1822 { (base) | 0x00C, "Get MWS Transport Layer Configuration" }, \
1823 /* Bluetooth Core Specification Addendum 4 */ \
1824 { (base) | 0x00D, "Set Triggered Clock Capture" }
1826 static const value_string bthci_cmd_ocf_status_vals[] = {
1827 STATUS_VALS(0x0),
1828 { 0, NULL }
1831 value_string_ext bthci_cmd_ocf_status_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ocf_status_vals);
1833 #define TESTING_VALS(base) \
1834 /* Bluetooth Core 4.0 */ \
1835 { (base) | 0x001, "Read Loopback Mode" }, \
1836 { (base) | 0x002, "Write Loopback Mode" }, \
1837 { (base) | 0x003, "Enable Device Under Test Mode" }, \
1838 { (base) | 0x004, "Write Simple Pairing Debug Mode" }, \
1839 { (base) | 0x007, "Enable AMP Receiver Reports" }, \
1840 { (base) | 0x008, "AMP Test End" }, \
1841 { (base) | 0x009, "AMP Test" }, \
1842 { (base) | 0x00A, "Write Secure Connections Test Mode" }
1844 static const value_string bthci_cmd_ocf_testing_vals[] = {
1845 TESTING_VALS(0x0),
1846 { 0, NULL }
1849 value_string_ext bthci_cmd_ocf_testing_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ocf_testing_vals);
1851 #define LOW_ENERGY_VALS(base)\
1852 /* Bluetooth Core 4.0 */ \
1853 { (base) | 0x001, "LE Set Event Mask" }, \
1854 { (base) | 0x002, "LE Read Buffer Size [v1]" }, \
1855 { (base) | 0x003, "LE Read Local Supported Features" }, \
1856 { (base) | 0x005, "LE Set Random Address" }, \
1857 { (base) | 0x006, "LE Set Advertising Parameters" }, \
1858 { (base) | 0x007, "LE Read Advertising Channel Tx Power" }, \
1859 { (base) | 0x008, "LE Set Advertising Data" }, \
1860 { (base) | 0x009, "LE Set Scan Response Data" }, \
1861 { (base) | 0x00A, "LE Set Advertise Enable" }, \
1862 { (base) | 0x00B, "LE Set Scan Parameters" }, \
1863 { (base) | 0x00C, "LE Set Scan Enable" }, \
1864 { (base) | 0x00D, "LE Create Connection" }, \
1865 { (base) | 0x00E, "LE Create Connection Cancel" }, \
1866 { (base) | 0x00F, "LE Read Filter Accept List Size" }, \
1867 { (base) | 0x010, "LE Clear Filter Accept List" }, \
1868 { (base) | 0x011, "LE Add Device To Filter Accept List" }, \
1869 { (base) | 0x012, "LE Remove Device From Filter Accept List" }, \
1870 { (base) | 0x013, "LE Connection Update" }, \
1871 { (base) | 0x014, "LE Set Host Channel Classification" }, \
1872 { (base) | 0x015, "LE Read Channel Map" }, \
1873 { (base) | 0x016, "LE Read Remote Features" }, \
1874 { (base) | 0x017, "LE Encrypt" }, \
1875 { (base) | 0x018, "LE Rand" }, \
1876 { (base) | 0x019, "LE Enable Encryption" }, \
1877 { (base) | 0x01A, "LE Long Term Key Request Reply" }, \
1878 { (base) | 0x01B, "LE Long Term Key Request Negative Reply" }, \
1879 { (base) | 0x01C, "LE Read Supported States" }, \
1880 { (base) | 0x01D, "LE Receiver Test [v1]" }, \
1881 { (base) | 0x01E, "LE Transmitter Test [v1]" }, \
1882 { (base) | 0x01F, "LE Test End" }, \
1883 /* Bluetooth Core 4.1 */ \
1884 { (base) | 0x020, "LE Remote Connection Parameter Request Reply" }, \
1885 { (base) | 0x021, "LE Remote Connection Parameter Request Negative Reply" }, \
1886 /* Bluetooth Core 4.2 */ \
1887 { (base) | 0x022, "LE Set Data Length" }, \
1888 { (base) | 0x023, "LE Read Suggested Default Data Length" }, \
1889 { (base) | 0x024, "LE Write Suggested Default Data Length" }, \
1890 { (base) | 0x025, "LE Read Local P-256 Public Key" }, \
1891 { (base) | 0x026, "LE Generate DHKey [v1]" }, \
1892 { (base) | 0x027, "LE Add Device to Resolving List" }, \
1893 { (base) | 0x028, "LE Remove Device From Resolving List" }, \
1894 { (base) | 0x029, "LE Clear Resolving List" }, \
1895 { (base) | 0x02A, "LE Read Resolving List Size" }, \
1896 { (base) | 0x02B, "LE Read Peer Resolvable Address" }, \
1897 { (base) | 0x02C, "LE Read Local Resolvable Address" }, \
1898 { (base) | 0x02D, "LE Set Address Resolution Enable" }, \
1899 { (base) | 0x02E, "LE Set Resolvable Private Address Timeout" }, \
1900 { (base) | 0x02F, "LE Read Maximum Data Length" }, \
1901 /* Bluetooth Core 5.0 */ \
1902 { (base) | 0x030, "LE Read PHY" }, \
1903 { (base) | 0x031, "LE Set Default PHY" }, \
1904 { (base) | 0x032, "LE Set PHY" }, \
1905 { (base) | 0x033, "LE Receiver Test [v2]" }, \
1906 { (base) | 0x034, "LE Transmitter Test [v2]" }, \
1907 { (base) | 0x035, "LE Set Advertising Set Random Address" }, \
1908 { (base) | 0x036, "LE Set Extended Advertising Parameters [v1]" }, \
1909 { (base) | 0x037, "LE Set Extended Advertising Data" }, \
1910 { (base) | 0x038, "LE Set Extended Scan Response Data" }, \
1911 { (base) | 0x039, "LE Set Extended Advertising Enable" }, \
1912 { (base) | 0x03A, "LE Read Maximum Advertising Data Length" }, \
1913 { (base) | 0x03B, "LE Read Number of Supported Advertising Sets" }, \
1914 { (base) | 0x03C, "LE Remove Advertising Set" }, \
1915 { (base) | 0x03D, "LE Clear Advertising Sets" }, \
1916 { (base) | 0x03E, "LE Set Periodic Advertising Parameters [v1]" }, \
1917 { (base) | 0x03F, "LE Set Periodic Advertising Data" }, \
1918 { (base) | 0x040, "LE Set Periodic Advertising Enable" }, \
1919 { (base) | 0x041, "LE Set Extended Scan Parameters" }, \
1920 { (base) | 0x042, "LE Set Extended Scan Enable" }, \
1921 { (base) | 0x043, "LE Extended Create Connection [v1]" }, \
1922 { (base) | 0x044, "LE Periodic Advertising Create Sync" }, \
1923 { (base) | 0x045, "LE Periodic Advertising Create Sync Cancel" }, \
1924 { (base) | 0x046, "LE Periodic Advertising Terminate Sync" }, \
1925 { (base) | 0x047, "LE Add Device To Periodic Advertiser List" }, \
1926 { (base) | 0x048, "LE Remove Device From Periodic Advertiser List" }, \
1927 { (base) | 0x049, "LE Clear Periodic Advertiser List" }, \
1928 { (base) | 0x04A, "LE Read Periodic Advertiser List Size" }, \
1929 { (base) | 0x04B, "LE Read Transmit Power" }, \
1930 { (base) | 0x04C, "LE Read RF Path Compensation" }, \
1931 { (base) | 0x04D, "LE Write RF Path Compensation" }, \
1932 { (base) | 0x04E, "LE Set Privacy Mode" }, \
1933 /* Bluetooth Core 5.1 */ \
1934 { (base) | 0x04F, "LE Receiver Test [v3]" }, \
1935 { (base) | 0x050, "LE Transmitter Test [v3]" }, \
1936 { (base) | 0x051, "LE Set Connectionless CTE Transmit Parameters" }, \
1937 { (base) | 0x052, "LE Set Connectionless CTE Transmit Enable" }, \
1938 { (base) | 0x053, "LE Set Connectionless IQ Sampling Enable" }, \
1939 { (base) | 0x054, "LE Set Connection CTE Receive Parameters" }, \
1940 { (base) | 0x055, "LE Set Connection CTE Transmit Parameters" }, \
1941 { (base) | 0x056, "LE Connection CTE Request Enable" }, \
1942 { (base) | 0x057, "LE Connection CTE Response Enable" }, \
1943 { (base) | 0x058, "LE Read Antenna Information" }, \
1944 { (base) | 0x059, "LE Set Periodic Advertising Receive Enable" }, \
1945 { (base) | 0x05A, "LE Periodic Advertising Sync Transfer" }, \
1946 { (base) | 0x05B, "LE Periodic Advertising Set Info Transfer" }, \
1947 { (base) | 0x05C, "LE Set Periodic Advertising Sync Transfer Parameters" }, \
1948 { (base) | 0x05D, "LE Set Default Periodic Advertising Sync Transfer Parameters" }, \
1949 { (base) | 0x05E, "LE Generate DHKey [v2]" }, \
1950 { (base) | 0x05F, "LE Modify Sleep Clock Accuracy" }, \
1951 /* Bluetooth Core 5.2 */ \
1952 { (base) | 0x060, "LE Read Buffer Size [v2]" }, \
1953 { (base) | 0x061, "LE Read ISO Tx Sync" }, \
1954 { (base) | 0x062, "LE Set CIG Parameters" }, \
1955 { (base) | 0x063, "LE Set CIG Parameters Test" }, \
1956 { (base) | 0x064, "LE Create CIS" }, \
1957 { (base) | 0x065, "LE Remove CIG" }, \
1958 { (base) | 0x066, "LE Accept CIS Request" }, \
1959 { (base) | 0x067, "LE Reject CIS Request" }, \
1960 { (base) | 0x068, "LE Create BIG" }, \
1961 { (base) | 0x069, "LE Create BIG Test" }, \
1962 { (base) | 0x06A, "LE Terminate BIG" }, \
1963 { (base) | 0x06B, "LE BIG Create Sync" }, \
1964 { (base) | 0x06C, "LE BIG Terminate Sync" }, \
1965 { (base) | 0x06D, "LE Request Peer SCA" }, \
1966 { (base) | 0x06E, "LE Setup ISO Data Path" }, \
1967 { (base) | 0x06F, "LE Remove ISO Data Path" }, \
1968 { (base) | 0x070, "LE ISO Transmit Test" }, \
1969 { (base) | 0x071, "LE ISO Receive Test" }, \
1970 { (base) | 0x072, "LE ISO Read Test Counters" }, \
1971 { (base) | 0x073, "LE ISO Test End" }, \
1972 { (base) | 0x074, "LE Set Host Feature [v1]" }, \
1973 { (base) | 0x075, "LE Read ISO Link Quality" }, \
1974 { (base) | 0x076, "LE Enhanced Read Transmit Power Level" }, \
1975 { (base) | 0x077, "LE Read Remote Transmit Power Level" }, \
1976 { (base) | 0x078, "LE Set Path Loss Reporting Parameters" }, \
1977 { (base) | 0x079, "LE Set Path Loss Reporting Enable" }, \
1978 { (base) | 0x07A, "LE Set Transmit Power Reporting Enable" }, \
1979 { (base) | 0x07B, "LE Transmitter Test [v4]" }, \
1980 /* Bluetooth Core 5.3 */ \
1981 { (base) | 0x07C, "LE Set Data Related Address Changes" }, \
1982 { (base) | 0x07D, "LE Set Default Subrate" }, \
1983 { (base) | 0x07E, "LE Subrate Request" }, \
1984 /* Bluetooth Core 5.4 */ \
1985 { (base) | 0x07F, "LE Set Extended Advertising Parameters [v2]" }, \
1986 { (base) | 0x080, "LE Set Decision Data" }, /* Bluetooth Core 6.0 */ \
1987 { (base) | 0x081, "LE Set Decision Instructions" }, /* Bluetooth Core 6.0 */ \
1988 { (base) | 0x082, "LE Set Periodic Advertising Subevent Data" }, \
1989 { (base) | 0x083, "LE Set Periodic Advertising Response Data" }, \
1990 { (base) | 0x084, "LE Set Periodic Sync Subevent" }, \
1991 { (base) | 0x085, "LE Extended Create Connection [v2]" }, \
1992 { (base) | 0x086, "LE Set Periodic Advertising Parameters [v2]" }, \
1993 /* Bluetooth Core 6.0 */ \
1994 { (base) | 0x087, "LE Read All Local Supported Features" }, \
1995 { (base) | 0x088, "LE Read All Remote Features" }, \
1996 { (base) | 0x089, "LE CS Read Local Supported Capabilities" }, \
1997 { (base) | 0x08a, "LE CS Read Remote Supported Capabilities" }, \
1998 { (base) | 0x08b, "LE CS Write Cached Remote Supported Capabilities" }, \
1999 { (base) | 0x08c, "LE CS Security Enable" }, \
2000 { (base) | 0x08d, "LE CS Set Default Settings" }, \
2001 { (base) | 0x08e, "LE CS Read Remote FAE Table" }, \
2002 { (base) | 0x08f, "LE CS Write Cached Remote FAE Table" }, \
2003 { (base) | 0x090, "LE CS Create Config" }, \
2004 { (base) | 0x091, "LE CS Remove Config" }, \
2005 { (base) | 0x092, "LE CS Set Channel Classification" }, \
2006 { (base) | 0x093, "LE CS Set Procedure Parameters" }, \
2007 { (base) | 0x094, "LE CS Procedure Enable" }, \
2008 { (base) | 0x095, "LE CS Test" }, \
2009 { (base) | 0x096, "LE CS Test End" }, \
2010 { (base) | 0x097, "LE Set Host Feature [v2]" }, \
2011 { (base) | 0x098, "LE Add Device To Monitored Advertisers List" }, \
2012 { (base) | 0x099, "LE Remove Device From Monitored Advertisers List" }, \
2013 { (base) | 0x09A, "LE Clear Monitored Advertisers List" }, \
2014 { (base) | 0x09B, "LE Read Monitored Advertisers List Size" }, \
2015 { (base) | 0x09C, "LE Enable Monitored Advertisers" }, \
2016 { (base) | 0x09D, "LE Frame Space Update" }
2018 static const value_string bthci_cmd_ocf_low_energy_vals[] = {
2019 LOW_ENERGY_VALS(0x0),
2020 { 0, NULL }
2023 value_string_ext bthci_cmd_ocf_low_energy_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_ocf_low_energy_vals);
2026 static const value_string bthci_cmd_opcode_vals[] = {
2027 {0x0, "No Operation"},
2028 LINK_CONTROL_VALS(0x01 << 10),
2029 LINK_POLICY_VALS(0x02 << 10),
2030 HOST_CONTROLLER_AND_BASEBAND_VALS(0x03 << 10),
2031 INFORMATIONAL_VALS(0x04 << 10),
2032 STATUS_VALS(0x05 << 10),
2033 TESTING_VALS(0x06 << 10),
2034 LOW_ENERGY_VALS(0x08 << 10),
2035 { 0, NULL }
2038 value_string_ext bthci_cmd_opcode_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_opcode_vals);
2040 static const value_string bthci_cmd_status_vals[] = {
2041 {0x00, "Success"},
2042 {0x01, "Unknown HCI Command"},
2043 {0x02, "Unknown Connection Identifier"},
2044 {0x03, "Hardware Failure"},
2045 {0x04, "Page Timeout"},
2046 {0x05, "Authentication Failure"},
2047 {0x06, "PIN or Key Missing"},
2048 {0x07, "Memory Capacity Exceeded"},
2049 {0x08, "Connection Timeout"},
2050 {0x09, "Connection Limit Exceeded"},
2051 {0x0A, "Synchronous Connection Limit To A Device Exceeded"},
2052 {0x0B, "ACL Connection Already Exists"},
2053 {0x0C, "Command Disallowed"},
2054 {0x0D, "Connection Rejected due to Limited Resources"},
2055 {0x0E, "Connection Rejected due To Security Reasons"},
2056 {0x0F, "Connection Rejected due to Unacceptable BD_ADDR"},
2057 {0x10, "Connection Accept Timeout Exceeded"},
2058 {0x11, "Unsupported Feature or Parameter Value"},
2059 {0x12, "Invalid HCI Command Parameters"},
2060 {0x13, "Remote User Terminated Connection"},
2061 {0x14, "Remote Device Terminated Connection due to Low Resources"},
2062 {0x15, "Remote Device Terminated Connection due to Power Off"},
2063 {0x16, "Connection Terminated by Local Host"},
2064 {0x17, "Repeated Attempts"},
2065 {0x18, "Pairing Not Allowed"},
2066 {0x19, "Unknown LMP PDU"},
2067 {0x1A, "Unsupported Remote/LMP Feature"},
2068 {0x1B, "SCO Offset Rejected"},
2069 {0x1C, "SCO Interval Rejected"},
2070 {0x1D, "SCO Air Mode Rejected"},
2071 {0x1E, "Invalid LMP/LL Parameters"},
2072 {0x1F, "Unspecified Error"},
2073 {0x20, "Unsupported LMP/LL Parameter Value"},
2074 {0x21, "Role Change Not Allowed"},
2075 {0x22, "LMP/LL Response Timeout"},
2076 {0x23, "LMP Error Transaction Collision/LL Procedure Collision"},
2077 {0x24, "LMP PDU Not Allowed"},
2078 {0x25, "Encryption Mode Not Acceptable"},
2079 {0x26, "Link Key cannot be Changed"},
2080 {0x27, "Requested QoS Not Supported"},
2081 {0x28, "Instant Passed"},
2082 {0x29, "Pairing with Unit Key Not Supported"},
2083 {0x2A, "Different Transaction Collision"},
2084 {0x2C, "QoS Unacceptable Parameter"},
2085 {0x2D, "QoS Rejected"},
2086 {0x2E, "Channel Classification Not Supported"},
2087 {0x2F, "Insufficient Security"},
2088 {0x30, "Parameter Out Of Mandatory Range"},
2089 {0x32, "Role Switch Pending"},
2090 {0x34, "Reserved Slot Violation"},
2091 {0x35, "Role Switch Failed"},
2092 {0x36, "Extended Inquiry Response Too Large"},
2093 {0x37, "Secure Simple Pairing Not Supported By Host"},
2094 {0x38, "Host Busy - Pairing"},
2095 {0x39, "Connection Rejected due to No Suitable Channel Found"},
2096 {0x3A, "Controller Busy"},
2097 {0x3B, "Unacceptable Connection Parameters"},
2098 {0x3C, "Directed Advertising Timeout"},
2099 {0x3D, "Connection Terminated due to MIC Failure"},
2100 {0x3E, "Connection Failed to be Established"},
2101 {0x3F, "MAC Connection Failed"},
2102 {0x40, "Coarse Clock Adjustment Rejected but Will Try to Adjust Using Clock Dragging"},
2103 {0x41, "Type0 Submap Not Defined"},
2104 {0x42, "Unknown Advertising Identifier"},
2105 {0x43, "Limit Reached"},
2106 {0x44, "Operation Cancelled by Host"},
2107 {0x45, "Packet Too Long"},
2108 {0x46, "Too Late"},
2109 {0x47, "Too Early"},
2110 {0x48, "Insufficient Channels"},
2111 {0, NULL }
2113 value_string_ext bthci_cmd_status_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_status_vals);
2115 static const value_string bthci_cmd_cod_major_device_class_vals[] = {
2116 {0x00, "Miscellaneous"},
2117 {0x01, "Computer"},
2118 {0x02, "Phone"},
2119 {0x03, "LAN/Network Access Point"},
2120 {0x04, "Audio/Video"},
2121 {0x05, "Peripheral (HID)"},
2122 {0x06, "Imaging"},
2123 {0x07, "Wearable"},
2124 {0x08, "Toy"},
2125 {0x09, "Health"},
2126 {0x1F, "Uncategorized: device code not specified"},
2127 {0, NULL }
2129 static value_string_ext bthci_cmd_cod_major_device_class_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_major_device_class_vals);
2131 static const value_string bthci_cmd_cod_minor_device_class_computer_vals[] = {
2132 { 0x00, "Uncategorized, code for device not assigned" },
2133 { 0x01, "Desktop workstation" },
2134 { 0x02, "Server-class computer" },
2135 { 0x03, "Laptop" },
2136 { 0x04, "Handheld PC/PDA (clamshell)" },
2137 { 0x05, "Palm-size PC/PDA" },
2138 { 0x06, "Wearable computer (watch size)" },
2139 { 0x07, "Tablet" },
2140 { 0, NULL }
2142 static value_string_ext bthci_cmd_cod_minor_device_class_computer_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_computer_vals);
2144 static const value_string bthci_cmd_cod_minor_device_class_phone_vals[] = {
2145 { 0x00, "Uncategorized, code for device not assigned" },
2146 { 0x01, "Cellular" },
2147 { 0x02, "Cordless" },
2148 { 0x03, "Smartphone" },
2149 { 0x04, "Wired modem or voice gateway" },
2150 { 0x05, "Common ISDN access" },
2151 { 0, NULL }
2153 static value_string_ext bthci_cmd_cod_minor_device_class_phone_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_phone_vals);
2155 static const value_string bthci_cmd_cod_minor_device_class_lan_net_load_factor_vals[] = {
2156 { 0x00, "Fully available" },
2157 { 0x01, "1% to 17% utilized" },
2158 { 0x02, "17% to 33% utilized" },
2159 { 0x03, "33% to 50% utilized" },
2160 { 0x04, "50% to 67% utilized" },
2161 { 0x05, "67% to 83% utilized" },
2162 { 0x06, "83% to 99% utilized" },
2163 { 0x07, "No service available" },
2164 { 0, NULL }
2166 static value_string_ext bthci_cmd_cod_minor_device_class_lan_net_load_factor_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_lan_net_load_factor_vals);
2168 static const value_string bthci_cmd_cod_minor_device_class_lan_net_type_vals[] = {
2169 { 0x00, "Uncategorized (used if no others apply)" },
2170 { 0, NULL }
2172 static value_string_ext bthci_cmd_cod_minor_device_class_lan_net_type_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_lan_net_type_vals);
2174 static const value_string bthci_cmd_cod_minor_device_class_audio_video_vals[] = {
2175 { 0x00, "Uncategorized, code not assigned" },
2176 { 0x01, "Wearable Headset Device" },
2177 { 0x02, "Hands-free Device" },
2178 { 0x04, "Microphone" },
2179 { 0x05, "Loudspeaker" },
2180 { 0x06, "Headphones" },
2181 { 0x07, "Portable Audio" },
2182 { 0x08, "Car audio" },
2183 { 0x09, "Set-top box" },
2184 { 0x0A, "HiFi Audio Device" },
2185 { 0x0B, "VCR" },
2186 { 0x0C, "Video Camera" },
2187 { 0x0D, "Camcorder" },
2188 { 0x0E, "Video Monitor" },
2189 { 0x0F, "Video Display and Loudspeaker" },
2190 { 0x10, "Video Conferencing" },
2191 { 0x12, "Gaming/Toy" },
2192 { 0, NULL }
2194 static value_string_ext bthci_cmd_cod_minor_device_class_audio_video_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_audio_video_vals);
2196 static const value_string bthci_cmd_cod_minor_device_class_peripheral_class_vals[] = {
2197 { 0x00, "Not Keyboard / Not Pointing Device" },
2198 { 0x01, "Keyboard" },
2199 { 0x02, "Pointing device" },
2200 { 0x03, "Combo keyboard/pointing device" },
2201 { 0, NULL }
2203 static value_string_ext bthci_cmd_cod_minor_device_class_peripheral_class_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_peripheral_class_vals);
2205 static const value_string bthci_cmd_cod_minor_device_class_peripheral_type_vals[] = {
2206 { 0x00, "Uncategorized device" },
2207 { 0x01, "Joystick" },
2208 { 0x02, "Gamepad" },
2209 { 0x03, "Remote control" },
2210 { 0x04, "Sensing device" },
2211 { 0x05, "Digitizer tablet" },
2212 { 0x06, "Card Reader" },
2213 { 0x07, "Digital Pen" },
2214 { 0x08, "Handheld scanner for bar-codes" },
2215 { 0x09, "Handheld gestural input device" },
2216 { 0, NULL }
2218 static value_string_ext bthci_cmd_cod_minor_device_class_peripheral_type_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_peripheral_type_vals);
2221 static const value_string bthci_cmd_cod_minor_device_class_imaging_type_vals[] = {
2222 { 0x00, "Uncategorized, default" },
2223 { 0, NULL }
2225 static value_string_ext bthci_cmd_cod_minor_device_class_imaging_type_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_imaging_type_vals);
2227 static const value_string bthci_cmd_cod_minor_device_class_wearable_vals[] = {
2228 { 0x01, "Wristwatch" },
2229 { 0x02, "Pager" },
2230 { 0x03, "Jacket" },
2231 { 0x04, "Helmet" },
2232 { 0x05, "Glasses" },
2233 { 0, NULL }
2235 static value_string_ext bthci_cmd_cod_minor_device_class_wearable_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_wearable_vals);
2237 static const value_string bthci_cmd_cod_minor_device_class_toy_vals[] = {
2238 { 0x01, "Robot" },
2239 { 0x02, "Vehicle" },
2240 { 0x03, "Doll / Action figure" },
2241 { 0x04, "Controller" },
2242 { 0x05, "Game" },
2243 { 0, NULL }
2245 static value_string_ext bthci_cmd_cod_minor_device_class_toy_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_toy_vals);
2247 static const value_string bthci_cmd_cod_minor_device_class_health_vals[] = {
2248 { 0x00, "Undefined" },
2249 { 0x01, "Blood Pressure Monitor" },
2250 { 0x02, "Thermometer" },
2251 { 0x03, "Weighing Scale" },
2252 { 0x04, "Glucose Meter" },
2253 { 0x05, "Pulse Oximeter" },
2254 { 0x06, "Heart/Pulse Rate Monitor" },
2255 { 0x07, "Health Data Display" },
2256 { 0x08, "Step Counter" },
2257 { 0x09, "Body Composition Analyzer" },
2258 { 0x0A, "Peak Flow Monitor" },
2259 { 0x0B, "Medication Monitor" },
2260 { 0x0C, "Knee Prosthesis" },
2261 { 0x0D, "Ankle Prosthesis" },
2262 { 0x0E, "Generic Health Manager" },
2263 { 0x0F, "Personal Mobility Device" },
2264 { 0, NULL }
2266 static value_string_ext bthci_cmd_cod_minor_device_class_health_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_health_vals);
2268 /* https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile */
2269 static const value_string bthci_cmd_eir_data_type_vals[] = {
2270 {0x01, "Flags" },
2271 {0x02, "16-bit Service Class UUIDs (incomplete)" },
2272 {0x03, "16-bit Service Class UUIDs" },
2273 {0x04, "32-bit Service Class UUIDs (incomplete)" },
2274 {0x05, "32-bit Service Class UUIDs" },
2275 {0x06, "128-bit Service Class UUIDs (incomplete)" },
2276 {0x07, "128-bit Service Class UUIDs" },
2277 {0x08, "Device Name (shortened)" },
2278 {0x09, "Device Name" },
2279 {0x0A, "Tx Power Level" },
2280 {0x0B, "OOB Optional Data Length" },
2281 {0x0C, "BD_ADDR" },
2282 {0x0D, "Class Of Device" },
2283 {0x0E, "Simple Pairing Hash C" },
2284 {0x0F, "Simple Pairing Randomizer R" },
2285 {0x10, "Device ID / Security Manager TK Value" },
2286 {0x11, "Security Manager Out of Band Flags" },
2287 {0x12, "Peripheral Connection Interval Range" },
2288 {0x14, "List of 16-bit Service Solicitation UUIDs" },
2289 {0x15, "List of 128-bit Service Solicitation UUIDs" },
2290 {0x16, "Service Data - 16 bit UUID" },
2291 {0x17, "Public Target Address" },
2292 {0x18, "Random Target Address" },
2293 {0x19, "Appearance" },
2294 {0x1A, "Advertising Interval" },
2295 {0x1B, "LE Bluetooth Device Address" },
2296 {0x1C, "LE Role" },
2297 {0x1D, "Simple Pairing Hash C-256" },
2298 {0x1E, "Simple Pairing Randomizer R-256" },
2299 {0x1F, "List of 32-bit Service Solicitation UUIDs" },
2300 {0x20, "Service Data - 32 bit UUID" },
2301 {0x21, "Service Data - 128 bit UUID" },
2302 {0x22, "LE Secure Connections Confirmation Value" },
2303 {0x23, "LE Secure Connections Random Value" },
2304 {0x24, "URI" },
2305 {0x25, "Indoor Positioning" },
2306 {0x26, "Transport Discovery Data" },
2307 {0x27, "LE Supported Features" },
2308 {0x28, "Channel Map Update Indication" },
2309 {0x29, "PB-ADV" },
2310 {0x2A, "Mesh Message" },
2311 {0x2B, "Mesh Beacon" },
2312 {0x2C, "BIGInfo" },
2313 {0x2D, "Broadcast Code" },
2314 {0x2E, "Resolvable Set Identifier" },
2315 {0x2F, "Advertising Interval - long" },
2316 {0x30, "Broadcast_Name" },
2317 {0x3D, "3D Information Data" },
2318 {0xFF, "Manufacturer Specific" },
2319 { 0, NULL }
2321 value_string_ext bthci_cmd_eir_data_type_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_eir_data_type_vals);
2323 /* Updating based on https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml */
2324 static const value_string bthci_cmd_appearance_vals[] = {
2325 { 0, "Unknown" },
2326 { 64, "Generic Phone" },
2327 { 128, "Generic Computer" },
2328 { 192, "Generic Watch" },
2329 { 193, "Watch: Sports Watch" },
2330 { 256, "Generic Clock" },
2331 { 320, "Generic Display" },
2332 { 384, "Generic Remote Control" },
2333 { 448, "Generic Eye-glasses" },
2334 { 512, "Generic Tag" },
2335 { 576, "Generic Keyring" },
2336 { 640, "Generic Media Player" },
2337 { 704, "Generic Barcode Scanner" },
2338 { 768, "Generic Thermometer" },
2339 { 769, "Thermometer: Ear" },
2340 { 832, "Generic Heart rate Sensor" },
2341 { 833, "Heart Rate Sensor: Heart Rate Belt" },
2342 { 896, "Generic Blood Pressure" },
2343 { 897, "Blood Pressure: Arm" },
2344 { 898, "Blood Pressure: Wrist" },
2345 { 960, "Human Interface Device (HID)" },
2346 { 961, "Keyboard" },
2347 { 962, "Mouse" },
2348 { 963, "Joystick" },
2349 { 964, "Gamepad" },
2350 { 965, "Digitizer Tablet" },
2351 { 966, "Card Reader" },
2352 { 967, "Digital Pen" },
2353 { 968, "Barcode Scanner" },
2354 { 1024, "Generic Glucose Meter" },
2355 { 1088, "Generic: Running Walking Sensor" },
2356 { 1089, "Running Walking Sensor: In-Shoe" },
2357 { 1090, "Running Walking Sensor: On-Shoe" },
2358 { 1091, "Running Walking Sensor: On-Hip" },
2359 { 1152, "Generic: Cycling" },
2360 { 1153, "Cycling: Cycling Computer" },
2361 { 1154, "Cycling: Speed Sensor" },
2362 { 1155, "Cycling: Cadence Sensor" },
2363 { 1156, "Cycling: Power Sensor" },
2364 { 1157, "Cycling: Speed and Cadence Sensor" },
2365 { 1216, "Generic Control Device" },
2366 { 1217, "Switch" },
2367 { 1218, "Multi-switch" },
2368 { 1219, "Button" },
2369 { 1220, "Slider" },
2370 { 1221, "Rotary" },
2371 { 1222, "Touch-panel" },
2372 { 1280, "Generic Network Device" },
2373 { 1281, "Access Point" },
2374 { 1344, "Generic Sensor" },
2375 { 1345, "Motion Sensor" },
2376 { 1346, "Air Quality Sensor" },
2377 { 1347, "Temperature Sensor" },
2378 { 1348, "Humidity Sensor" },
2379 { 1349, "Leak Sensor" },
2380 { 1350, "Smoke Sensor" },
2381 { 1351, "Occupancy Sensor" },
2382 { 1352, "Contact Sensor" },
2383 { 1353, "Carbon Monoxide Sensor" },
2384 { 1354, "Carbon Dioxide Sensor" },
2385 { 1355, "Ambient Light Sensor" },
2386 { 1356, "Energy Sensor" },
2387 { 1357, "Color Light Sensor" },
2388 { 1358, "Rain Sensor" },
2389 { 1359, "Fire Sensor" },
2390 { 1360, "Wind Sensor" },
2391 { 1361, "Proximity Sensor" },
2392 { 1362, "Multi-Sensor" },
2393 { 1408, "Generic Light Fixtures" },
2394 { 1409, "Wall Light" },
2395 { 1410, "Ceiling Light" },
2396 { 1411, "Floor Light" },
2397 { 1412, "Cabinet Light" },
2398 { 1413, "Desk Light" },
2399 { 1414, "Troffer Light" },
2400 { 1415, "Pendant Light" },
2401 { 1416, "In-ground Light" },
2402 { 1417, "Flood Light" },
2403 { 1418, "Underwater Light" },
2404 { 1419, "Bollard with Light" },
2405 { 1420, "Pathway Light" },
2406 { 1421, "Garden Light" },
2407 { 1422, "Pole-top Light" },
2408 { 1423, "Spotlight" },
2409 { 1424, "Linear Light" },
2410 { 1425, "Street Light" },
2411 { 1426, "Shelves Light" },
2412 { 1427, "High-bay / Low-bay Light" },
2413 { 1428, "Emergency Exit Light" },
2414 { 1472, "Generic Fan" },
2415 { 1473, "Ceiling Fan" },
2416 { 1474, "Axial Fan" },
2417 { 1475, "Exhaust Fan" },
2418 { 1476, "Pedestal Fan" },
2419 { 1477, "Desk Fan" },
2420 { 1478, "Wall Fan" },
2421 { 1536, "Generic HVAC" },
2422 { 1537, "Thermostat" },
2423 { 1600, "Generic Air Conditioning" },
2424 { 1664, "Generic Humidifier" },
2425 { 1728, "Generic Heating" },
2426 { 1729, "Radiator" },
2427 { 1730, "Boiler" },
2428 { 1731, "Heat Pump" },
2429 { 1732, "Infrared Heater" },
2430 { 1733, "Radiant Panel Heater" },
2431 { 1734, "Fan Heater" },
2432 { 1735, "Air Curtain" },
2433 { 1792, "Generic Access Control" },
2434 { 1793, "Access Door" },
2435 { 1794, "Garage Door" },
2436 { 1795, "Emergency Exit Door" },
2437 { 1796, "Access Lock" },
2438 { 1797, "Elevator" },
2439 { 1798, "Window" },
2440 { 1799, "Entrance Gate" },
2441 { 1856, "Generic Motorized Device" },
2442 { 1857, "Motorized Gate" },
2443 { 1858, "Awning" },
2444 { 1859, "Blinds or Shades" },
2445 { 1860, "Curtains" },
2446 { 1861, "Screen" },
2447 { 1920, "Generic Power Device" },
2448 { 1921, "Power Outlet" },
2449 { 1922, "Power Strip" },
2450 { 1923, "Plug" },
2451 { 1924, "Power Supply" },
2452 { 1925, "LED Driver" },
2453 { 1926, "Fluorescent Lamp Gear" },
2454 { 1927, "HID Lamp Gear" },
2455 { 1984, "Generic Light Source" },
2456 { 1985, "Incandescent Light Bulb" },
2457 { 1986, "LED Bulb" },
2458 { 1987, "HID Lamp" },
2459 { 1988, "Fluorescent Lamp" },
2460 { 1989, "LED Array" },
2461 { 1990, "Multi-Color LED Array" },
2462 { 3136, "Generic: Pulse Oximeter" },
2463 { 3137, "Fingertip" },
2464 { 3138, "Wrist Worn" },
2465 { 3200, "Generic: Weight Scale" },
2466 { 3264, "Generic Personal Mobility Device" },
2467 { 3265, "Powered Wheelchair" },
2468 { 3266, "Mobility Scooter" },
2469 { 3328, "Generic Continuous Glucose Monitor" },
2470 { 5184, "Generic: Outdoor Sports Activity" },
2471 { 5185, "Location Display Device" },
2472 { 5186, "Location and Navigation Display Device" },
2473 { 5187, "Location Pod" },
2474 { 5188, "Location and Navigation Pod" },
2475 { 0, NULL }
2477 value_string_ext bthci_cmd_appearance_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_appearance_vals);
2479 const value_string bthci_cmd_io_capability_vals[] = {
2480 {0x00, "Display Only" },
2481 {0x01, "Display Yes/No" },
2482 {0x02, "Keyboard Only" },
2483 {0x03, "No Input, No Output" },
2484 { 0, NULL }
2487 const value_string bthci_cmd_oob_data_present_vals[] = {
2488 {0x00, "OOB Authentication Data Not Present" },
2489 {0x01, "OOB Authentication Data From Remote Device Present" },
2490 { 0, NULL }
2493 static const value_string bthci_cmd_auth_req_vals[] = {
2494 {0x00, "MITM Protection Not Required - No Bonding. Numeric Comparison, Automatic Accept Allowed, No Secure Connection" },
2495 {0x01, "MITM Protection Required - No Bonding. Use IO Capability To Determine Procedure, No Secure Connection" },
2496 {0x02, "MITM Protection Not Required - Dedicated Bonding. Numeric Comparison, Automatic Accept Allowed, No Secure Connection" },
2497 {0x03, "MITM Protection Required - Dedicated Bonding. Use IO Capability To Determine Procedure, No Secure Connection" },
2498 {0x04, "MITM Protection Not Required - General Bonding. Numeric Comparison, Automatic Accept Allowed, No Secure Connection" },
2499 {0x05, "MITM Protection Required - General Bonding. Use IO Capability To Determine Procedure, No Secure Connection" },
2500 {0x08, "MITM Protection Not Required - No Bonding. Numeric Comparison, Automatic Accept Allowed, Secure Connection" },
2501 {0x09, "MITM Protection Required - No Bonding. Use IO Capability To Determine Procedure, Secure Connection" },
2502 {0x0A, "MITM Protection Not Required - Dedicated Bonding. Numeric Comparison, Automatic Accept Allowed, Secure Connection" },
2503 {0x0B, "MITM Protection Required - Dedicated Bonding. Use IO Capability To Determine Procedure, Secure Connection " },
2504 {0x0C, "MITM Protection Not Required - General Bonding. Numeric Comparison, Automatic Accept Allowed, Secure Connection" },
2505 {0x0D, "MITM Protection Required - General Bonding. Use IO Capability To Determine Procedure, Secure Connection" },
2506 { 0, NULL }
2508 value_string_ext bthci_cmd_auth_req_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_auth_req_vals);
2510 const value_string bthci_cmd_address_types_vals[] = {
2511 { 0x00, "Public Device Address" },
2512 { 0x01, "Random Device Address" },
2513 { 0x02, "Public Identity Address (Corresponds to Resolved Private Address)" },
2514 { 0x03, "Random (Static) Identity Address (Corresponds to Resolved Private Address)" },
2515 { 0, NULL }
2518 static const value_string cmd_base_address_types_vals[] = {
2519 { 0x00, "Public Address" },
2520 { 0x01, "Random Address" },
2521 { 0, NULL }
2524 static const value_string cmd_identity_address_types_vals[] = {
2525 { 0x00, "Public Identity Address" },
2526 { 0x01, "Random (Static) Identity Address" },
2527 { 0, NULL }
2530 static const value_string cmd_role_vals[] = {
2531 {0x00, "Change own Role to Central for this BD_ADDR"},
2532 {0x01, "Change own Role to Peripheral for this BD_ADDR"},
2533 {0, NULL }
2536 static const value_string cmd_acr_role_vals[] = {
2537 {0x00, "Become the Central for this connection. The LM will perform the role switch."},
2538 {0x01, "Remain the Peripheral for this connection. The LM will NOT perform the role switch."},
2539 {0, NULL }
2542 static const value_string cmd_pin_types[] = {
2543 {0x00, "Variable PIN" },
2544 {0x01, "Fixed PIN" },
2545 {0, NULL }
2548 static const value_string cmd_encryption_enable[] = {
2549 {0x00, "Link Level Encryption is OFF"},
2550 {0x01, "Link Level Encryption is ON"},
2551 {0, NULL }
2554 static const value_string cmd_key_flag[] = {
2555 {0x00, "Using Semi-permanent Link Key"},
2556 {0x01, "Using Temporary Link Key"},
2557 {0, NULL }
2560 static const value_string cmd_filter_types[] = {
2561 {0x00, "Clear all Filters" },
2562 {0x01, "Inquiry Result" },
2563 {0x02, "Connection Setup" },
2564 {0, NULL }
2567 static const value_string cmd_inquiry_result_filter_condition_types[] = {
2568 {0x00, "A new device responded" },
2569 {0x01, "A device with the specified Class of Device responded" },
2570 {0x02, "A device with the specified BD_ADDR responded" },
2571 {0, NULL }
2574 static const value_string cmd_flow_directions[] = {
2575 {0x00, "Outgoing Flow" },
2576 {0x01, "Incoming Flow" },
2577 {0, NULL }
2580 static const value_string cmd_service_types[] = {
2581 {0x00, "No Traffic"},
2582 {0x01, "Best Effort"},
2583 {0x02, "Guaranteed"},
2584 {0, NULL }
2587 static const value_string cmd_connection_setup_filter_condition_types[] = {
2588 {0x00, "Allow Connections from all devices" },
2589 {0x01, "Allow Connections from a device with a specific Class of Device" },
2590 {0x02, "Allow Connections from a device with a specific BD_ADDR" },
2591 {0, NULL }
2594 static const value_string cmd_auto_acc_flag_values[] = {
2595 {0x01, "Do NOT Auto accept" },
2596 {0x02, "Do Auto accept, role switch disabled" },
2597 {0x03, "Do Auto accept, role switch enabled" },
2598 {0, NULL }
2601 static const value_string cmd_read_all_flag_values[] = {
2602 {0x00, "Return Link Key for specified BD_ADDR" },
2603 {0x01, "Return all stored Link Keys" },
2604 {0, NULL }
2607 static const value_string cmd_delete_all_flag_values[] = {
2608 {0x00, "Delete only Link Key for specified BD_ADDR" },
2609 {0x01, "Delete all stored Link Keys" },
2610 {0, NULL }
2613 const value_string bthci_cmd_scan_enable_values[] = {
2614 {0x00, "No Scans enabled" },
2615 {0x01, "Inquiry Scan enabled/Page Scan disable" },
2616 {0x02, "Inquiry Scan disabled/Page Scan enabled" },
2617 {0x03, "Inquiry Scan enabled/Page Scan enabled" },
2618 {0, NULL }
2621 const value_string bthci_cmd_authentication_enable_values[] = {
2622 {0x00, "Authentication disabled" },
2623 {0x01, "Authentication enabled for all connection" },
2624 {0, NULL }
2627 static const value_string cmd_input_coding_values[] = {
2628 {0x0, "Linear" },
2629 {0x1, UTF8_MICRO_SIGN "-law" },
2630 {0x2, "A-law" },
2631 {0, NULL }
2633 value_string_ext bthci_cmd_input_coding_vals_ext = VALUE_STRING_EXT_INIT(cmd_input_coding_values);
2635 static const value_string cmd_input_data_format_values[] = {
2636 {0x0, "1's complement" },
2637 {0x1, "2's complement" },
2638 {0x2, "Sign-Magnitude" },
2639 {0x3, "Unsigned" },
2640 {0, NULL }
2642 value_string_ext bthci_cmd_input_data_format_vals_ext = VALUE_STRING_EXT_INIT(cmd_input_data_format_values);
2644 static const value_string cmd_input_sample_size_values[] = {
2645 {0x0, "8 bit (only for Linear PCM)" },
2646 {0x1, "16 bit (only for Linear PCM)" },
2647 {0, NULL }
2649 value_string_ext bthci_cmd_input_sample_size_vals_ext = VALUE_STRING_EXT_INIT(cmd_input_sample_size_values);
2651 static const value_string cmd_air_coding_format_values[] = {
2652 {0x0, "CVSD" },
2653 {0x1, UTF8_MICRO_SIGN "-law" },
2654 {0x2, "A-law" },
2655 {0x3, "Transparent" },
2656 {0, NULL }
2658 value_string_ext bthci_cmd_air_coding_format_vals_ext = VALUE_STRING_EXT_INIT(cmd_air_coding_format_values);
2660 static const value_string cmd_en_disabled[] = {
2661 {0x00, "disabled" },
2662 {0x01, "enabled" },
2663 {0, NULL }
2666 static const value_string cmd_flow_contr_enable[] = {
2667 {0x00, "Flow control off in direction from Host Controller to Host." },
2668 {0x01, "ON - HCI ACL Data Packets / OFF - HCI SCO Data Packets" },
2669 {0x02, "OFF - HCI ACL Data Packets / ON - HCI SCO Data Packets" },
2670 {0x03, "ON - HCI ACL Data Packets / ON - HCI SCO Data Packets" },
2671 {0, NULL }
2674 static const value_string cmd_power_level_types[] = {
2675 {0x00, "Current Tx Power Level" },
2676 {0x01, "Maximum Tx Power Level" },
2677 {0, NULL }
2680 static const value_string cmd_loopback_modes[] = {
2681 {0x00, "No Loopback mode enabled" },
2682 {0x01, "Enable Local Loopback" },
2683 {0x02, "Enable Remote Loopback" },
2684 {0, NULL }
2687 const value_string bthci_cmd_encrypt_mode_vals[] = {
2688 { 0x00, "Encryption Disabled" },
2689 { 0x01, "Encryption only for Point-To-Point Packets" },
2690 { 0x02, "Encryption for Point-To-Point and Broadcast Packets" },
2691 { 0, NULL }
2694 static const value_string cmd_boolean[] = {
2695 {0, "false" },
2696 {1, "true" },
2697 {0, NULL }
2700 const value_string bthci_cmd_page_scan_modes[] = {
2701 {0, "Mandatory Page Scan Mode"},
2702 {1, "Optional Page Scan Mode I"},
2703 {2, "Optional Page Scan Mode II"},
2704 {3, "Optional Page Scan Mode III"},
2705 {0, NULL }
2708 const value_string bthci_cmd_page_scan_repetition_modes[] = {
2709 {0, "R0"},
2710 {1, "R1"},
2711 {2, "R2"},
2712 {0, NULL }
2715 const value_string bthci_cmd_page_scan_period_modes[] = {
2716 {0, "P0"},
2717 {1, "P1"},
2718 {2, "P2"},
2719 {0, NULL }
2722 static const value_string cmd_role_switch_modes[] = {
2723 {0, "Local device will be Central, and will not accept a switch request." },
2724 {1, "Local device may be Central, or may become Peripheral after accepting a switch." },
2725 {0, NULL }
2728 static const value_string cmd_rtx_effort[] = {
2729 {0x00, "No Retransmission" },
2730 {0x01, "At least 1 retransmission, optimize for power consumption" },
2731 {0x02, "At least 1 retransmission, optimize for link quality" },
2732 {0xFF, "Don't Care" },
2733 { 0, NULL }
2736 static const value_string cmd_scan_types[] = {
2737 {0x00, "Standard Scan" },
2738 {0x01, "Interlaced Scan" },
2739 { 0, NULL }
2742 const value_string bthci_cmd_inq_modes[] = {
2743 {0x00, "Standard Results" },
2744 {0x01, "Results With RSSI" },
2745 {0x02, "Results With RSSI or Extended Results" },
2746 { 0, NULL }
2749 static const value_string cmd_flush_pkt_type[] = {
2750 {0x00, "Automatically Flushable Only" },
2751 { 0, NULL }
2754 static const value_string cmd_which_clock[] = {
2755 {0x00, "Local" },
2756 {0x01, "Piconet" },
2757 { 0, NULL }
2760 const value_string bthci_cmd_notification_types[] = {
2761 {0x00, "Passkey Entry Started" },
2762 {0x01, "Passkey Digit Entered" },
2763 {0x02, "Passkey Digit Erased" },
2764 {0x03, "Passkey Cleared" },
2765 {0x04, "Passkey Entry Completed" },
2766 { 0, NULL }
2769 static const value_string bthci_cmd_amp_key_type[] = {
2770 {0x03, "Debug Combination Key" },
2771 {0x04, "Authenticated Combination Key" },
2772 {0x05, "Unauthenticated Combination Key" },
2773 { 0, NULL }
2776 static const value_string cmd_flow_spec_servicetype[] = {
2777 { 0x00, "No traffic" },
2778 { 0x01, "Best effort (Default)" },
2779 { 0x02, "Guaranteed" },
2780 { 0, NULL }
2783 static const value_string cmd_flow_ctrl_mode[] = {
2784 { 0x00, "Packet based" },
2785 { 0x01, "Data Block based" },
2786 { 0, NULL }
2789 static const value_string cmd_le_advertising_types[] = {
2790 { 0x00, "Connectable Undirected Advertising" },
2791 { 0x01, "Connectable Directed Advertising" },
2792 { 0x02, "Scannable Undirected Advertising" },
2793 { 0x03, "Non-Connectable Undirected Advertising" },
2794 { 0, NULL }
2797 static const value_string cmd_le_advertising_filter_policy[] = {
2798 { 0x00, "Allow Scan Req from Any, Allow Connect Req from Any" },
2799 { 0x01, "Allow Scan Req from Filter Accept List Only, Allow Connect Req from Any" },
2800 { 0x02, "Allow Scan Req from Any, Allow Connect Req from Filter Accept List Only" },
2801 { 0x03, "Allow Scan Req from Filter Accept List Only, Allow Connect Req from Filter Accept List Only." },
2802 { 0, NULL }
2805 static const value_string cmd_le_scan_types[] = {
2806 { 0x00, "Passive" },
2807 { 0x01, "Active" },
2808 { 0, NULL }
2811 static const value_string cmd_decision_mode_filter_policy[] = {
2812 { 0x00, "No-decisions Mode" },
2813 { 0x01, "Process All PDUs" },
2814 { 0x03, "Process Only Decision PDUs" },
2815 { 0, NULL }
2818 static const value_string cmd_init_filter_policy[] = {
2819 { 0x00, "Use provided Peer Address. Ignore decision PDUs" },
2820 { 0x01, "Use Filter Accept List. Ignore decision PDUs" },
2821 { 0x02, "Process only decision PDUs. Filter Accept List not used, Ignore provided Peer Address" },
2822 { 0x03, "Use Filter Accept List for all PDUs" },
2823 { 0x04, "Process all decision PDUs. Use Filter Accept List for other PDUs." },
2824 { 0, NULL }
2827 static const value_string cmd_sync_filter_policy[] = {
2828 { 0x00, "Use Peer Address" },
2829 { 0x01, "Use Periodic Advertiser List. Ignore Peer Address" },
2830 { 0, NULL }
2833 static const value_string cmd_privacy_mode[] = {
2834 { 0x00, "Use Network Privacy Mode" },
2835 { 0x01, "Use Device Privacy Mode" },
2836 { 0, NULL }
2839 static const value_string cmd_le_test_pkt_payload[] = {
2840 { 0x00, "Pseudo-Random Sequence 9" },
2841 { 0x01, "Pattern Of Alternating Bits '11110000'" },
2842 { 0x02, "Pattern Of Alternating Bits '10101010'" },
2843 { 0x03, "Pseudo-Random Sequence 15" },
2844 { 0x04, "Pattern Of All '1' bits" },
2845 { 0x05, "Pattern Of All '0' bits" },
2846 { 0x06, "Pattern Of Alternating Bits '00001111'" },
2847 { 0x07, "Pattern Of Alternating Bits '0101'" },
2848 { 0, NULL }
2851 static const value_string cmd_le_address_resolution_enable[] = {
2852 { 0x00, "Address Resolution in controller disabled (default)" },
2853 { 0x01, "Address Resolution in controller enabled" },
2854 { 0, NULL }
2857 static const value_string le_role_vals[] = {
2858 { 0x00, "Only Peripheral Role Supported" },
2859 { 0x01, "Only Central Role Supported" },
2860 { 0x02, "Peripheral and Central Role supported, Peripheral Role preferred for connection establishment" },
2861 { 0x03, "Peripheral and Central Role supported, Central Role preferred for connection establishment" },
2862 { 0, NULL }
2865 static const value_string tds_role_vals[] = {
2866 { 0x00, "Not Specified" },
2867 { 0x01, "Seeker Only" },
2868 { 0x02, "Provider Only" },
2869 { 0x03, "Both Seeker and Provider" },
2870 {0, NULL }
2873 static const value_string tds_transport_state_vals[] = {
2874 { 0x00, "Off" },
2875 { 0x01, "On" },
2876 { 0x02, "Temporarily Unavailable" },
2877 { 0x03, "RFU" },
2878 {0, NULL }
2881 static const value_string cmd_le_adv_data_operation[] = {
2882 { 0x00, "Intermediate fragment of fragmented data" },
2883 { 0x01, "First fragment of fragmented data" },
2884 { 0x02, "Last fragment of fragmented data" },
2885 { 0x03, "Complete scan response data" },
2886 { 0x04, "Unchanged Data, DID update only" },
2887 { 0, NULL }
2890 static const value_string cmd_le_adv_data_frag_pref[] = {
2891 { 0x00, "Controller may fragment all Host data" },
2892 { 0x01, "Controller should not fragment or should minimize fragmentation of Host data" },
2893 { 0, NULL }
2896 static const value_string cmd_le_phy_options_vals[] = {
2897 { 0x00, "Host has no preferred/required coding on LE Coded PHY" },
2898 { 0x01, "Host prefers S=2 coding on LE Coded PHY" },
2899 { 0x02, "Host prefers S=8 coding on LE Coded PHY" },
2900 { 0x03, "Host requires S=2 coding on LE Coded PHY" },
2901 { 0x04, "Host requires S=8 coding on LE Coded PHY" },
2902 { 0, NULL }
2905 static const value_string cmd_le_phy_vals[] = {
2906 { 0x01, "LE 1M" },
2907 { 0x02, "LE 2M" },
2908 { 0x03, "LE Coded" },
2909 { 0, NULL }
2911 value_string_ext bthci_cmd_le_phy_vals_ext = VALUE_STRING_EXT_INIT(cmd_le_phy_vals);
2913 static const value_string cmd_le_modulation_index_vals[] = {
2914 { 0x00, "Assume transmitter will have a standard modulation index" },
2915 { 0x01, "Assume transmitter will have a stable modulation index" },
2916 { 0, NULL }
2919 static const value_string cmd_cte_type_vals[] = {
2920 { 0x00, "AoA Constant Tone Extension" },
2921 { 0x01, "AoD Constant Tone Extension with 1 usec slots" },
2922 { 0x02, "AoD Constant Tone Extension with 2 usec slots" },
2923 { 0xFF, "No Constant Tone Extension" },
2924 { 0, NULL }
2926 value_string_ext bthci_cmd_cte_type_vals_ext = VALUE_STRING_EXT_INIT(cmd_cte_type_vals);
2928 static const value_string cmd_slot_durations_vals[] = {
2929 { 0x01, "Switching and sampling slots are 1 usec each" },
2930 { 0x02, "Switching and sampling slots are 2 usec each" },
2931 { 0, NULL }
2933 value_string_ext bthci_cmd_slot_durations_vals_ext = VALUE_STRING_EXT_INIT(cmd_slot_durations_vals);
2935 static const value_string cmd_sync_mode_vals[] = {
2936 { 0x00, "No synchronize attempt, no LE Periodic Advertising Sync Transfer Received event sent to Host" },
2937 { 0x01, "LE Periodic Advertising Sync Transfer Received event sent to Host. LE Periodic Advertising Report events disabled" },
2938 { 0x02, "LE Periodic Advertising Sync Transfer Received event sent to Host. LE Periodic Advertising Report events enabled" },
2939 { 0, NULL }
2942 static const value_string cmd_key_type_vals[] = {
2943 { 0x00, "Use the generated private key" },
2944 { 0x01, "Use the debug private key" },
2945 { 0, NULL }
2948 static const value_string cmd_sca_action_vals[] = {
2949 { 0x00, "Switch to a more accurate clock" },
2950 { 0x01, "Switch to a less accurate clock" },
2951 { 0, NULL }
2954 static const value_string cmd_clock_accuray_vals[] = {
2955 { 0x00, "251-500 ppm" },
2956 { 0x01, "151-250 ppm" },
2957 { 0x02, "101-150 ppm" },
2958 { 0x03, "76-100 ppm" },
2959 { 0x04, "51-75 ppm" },
2960 { 0x05, "31-50 ppm" },
2961 { 0x06, "21-30 ppm" },
2962 { 0x07, "0-20 ppm" },
2963 { 0, NULL }
2965 value_string_ext bthci_cmd_clock_accuray_vals_ext = VALUE_STRING_EXT_INIT(cmd_clock_accuray_vals);
2967 static const value_string cmd_packing_vals[] = {
2968 { 0x00, "Sequential" },
2969 { 0x01, "Interleaved" },
2970 { 0, NULL }
2973 static const value_string cmd_framing_vals[] = {
2974 { 0x00, "Unframed" },
2975 { 0x01, "Framed, Segmentable Mode" },
2976 { 0x02, "Framed, Unsegmented Mode" },
2977 { 0, NULL }
2979 value_string_ext bthci_cmd_framing_vals_ext = VALUE_STRING_EXT_INIT(cmd_framing_vals);
2981 static const value_string cmd_data_path_direction_vals[] = {
2982 { 0x00, "Input (Host to Controller)" },
2983 { 0x01, "Output (Controller to Host)" },
2984 { 0, NULL }
2987 static const value_string cmd_payload_type_vals[] = {
2988 { 0x00, "Zero Length" },
2989 { 0x01, "Variable Length" },
2990 { 0x02, "Maximum Length" },
2991 { 0, NULL }
2994 static const value_string cmd_host_enabled_feature_bit_vals[] = {
2995 { 32, "Isochronous Channels, Host Support" },
2996 { 38, "Connection Subrating, Host Support" },
2997 { 0, NULL }
3000 static const value_string cmd_phy_and_coding_vals[] = {
3001 { 0x01, "LE 1M" },
3002 { 0x02, "LE 2M" },
3003 { 0x03, "LE Coded, S=8" },
3004 { 0x04, "LE Coded, S=2" },
3005 { 0, NULL }
3007 value_string_ext bthci_cmd_phy_and_coding_vals_ext = VALUE_STRING_EXT_INIT(cmd_phy_and_coding_vals);
3009 static const value_string disable_enable_vals[] = {
3010 { 0x00, "Disable" },
3011 { 0x01, "Enable" },
3012 {0, NULL }
3015 static const value_string lpo_allowed_vals[] = {
3016 { 0x00, "Controller shall not sleep (+20ppm)" },
3017 { 0x01, "Controller may sleep (+250ppm)" },
3018 {0, NULL }
3021 static const value_string pcm_data_format_vals[] = {
3022 { 0x00, "N/A" },
3023 { 0x01, "1's complement" },
3024 { 0x02, "2's complement" },
3025 { 0x03, "Sign-Magnitude" },
3026 { 0x04, "Unsigned" },
3027 {0, NULL }
3030 static const range_string audio_data_path_rvals[] = {
3031 { 0x00, 0x00, "HCI" },
3032 { 0x01, 0xFE, "Vendor Specific" },
3033 { 0xFF, 0xFF, "Audio Test Mode" },
3034 { 0, 0, NULL }
3037 static const value_string mws_channel_type_vals[] = {
3038 { 0x00, "TDD" },
3039 { 0x01, "FDD" },
3040 {0, NULL }
3043 static const value_string external_frame_period_type_vals[] = {
3044 { 0x00, "Downlink" },
3045 { 0x01, "Uplink" },
3046 { 0x02, "Bi-Directional" },
3047 { 0x03, "Guard Period" },
3048 {0, NULL }
3051 static const value_string mws_pattern_type_vals[] = {
3052 { 0x00, "Neither Transmission nor Reception is Allowed" },
3053 { 0x01, "Transmission is Allowed" },
3054 { 0x02, "Reception is Allowed" },
3055 { 0x03, "Both Transmission and Reception are Allowed" },
3056 { 0x04, "Interval Defined by HCI Command" },
3057 {0, NULL }
3060 static const value_string cpb_fragment_vals[] = {
3061 { 0x00, "Continuation" },
3062 { 0x01, "Start" },
3063 { 0x02, "End" },
3064 { 0x03, "No" },
3065 {0, NULL }
3068 static const val64_string cmd_biginfo_le_phy_vals64[] = {
3069 { 0x00, "LE 1M" },
3070 { 0x01, "LE 2M" },
3071 { 0x02, "LE Coded" },
3072 { 0, NULL }
3075 static const true_false_string tfs_offset_units = {
3076 "300 usec",
3077 "30 usec"
3080 static const value_string adv_test_field_special[] = {
3081 { 0x00, "Resolvable Tag" },
3082 { 0x06, "Adv Mode" },
3083 { 0x07, "RSSI" },
3084 { 0x08, "Path Loss" },
3085 { 0x09, "Adv Address" },
3086 {0, NULL }
3089 static const value_string cmd_cs_sync_phy_vals[] = {
3090 { 0x01, "LE 1M" },
3091 { 0x02, "LE 2M" },
3092 { 0x03, "LE 2M 2BT" },
3093 { 0, NULL }
3096 static const value_string cmd_cs_role_vals[] = {
3097 { 0x00, "Initiator" },
3098 { 0x01, "Reflector" },
3099 {0, NULL }
3101 value_string_ext bthci_cmd_cs_role_vals_ext = VALUE_STRING_EXT_INIT(cmd_cs_role_vals);
3103 static const value_string cmd_aci_vals[] = {
3104 { 0x00, "1:1" },
3105 { 0x01, "2:1" },
3106 { 0x02, "3:1" },
3107 { 0x03, "4:1" },
3108 { 0x04, "1:2" },
3109 { 0x05, "1:3" },
3110 { 0x06, "1:4" },
3111 { 0x07, "2:2" },
3112 {0, NULL }
3114 value_string_ext bthci_cmd_aci_vals_ext = VALUE_STRING_EXT_INIT(cmd_aci_vals);
3116 static const value_string cmd_cs_create_context_vals[] = {
3117 { 0x00, "Local Controller Only" },
3118 { 0x01, "Local and Remote Controller" },
3119 {0, NULL }
3122 static const value_string cmd_cs_rtt_type_vals[] = {
3123 { 0x00, "Coarse" },
3124 { 0x01, "32-bit Sounding Sequence" },
3125 { 0x02, "96-bit Sounding Sequence" },
3126 { 0x03, "32-bit Random Sequence" },
3127 { 0x04, "64-bit Random Sequence" },
3128 { 0x05, "96-bit Random Sequence" },
3129 { 0x06, "128-bit Random Sequence" },
3130 {0, NULL }
3132 value_string_ext bthci_cmd_cs_rtt_type_vals_ext = VALUE_STRING_EXT_INIT(cmd_cs_rtt_type_vals);
3134 static const value_string cmd_cs_ch_selection_type_vals[] = {
3135 { 0x00, "#3b" },
3136 { 0x01, "#3c" },
3137 {0, NULL }
3139 value_string_ext bthci_cmd_cs_ch_selection_type_vals_ext = VALUE_STRING_EXT_INIT(cmd_cs_ch_selection_type_vals);
3141 static const value_string cmd_cs_shape_vals[] = {
3142 { 0x00, "Hat" },
3143 { 0x01, "Cross (X)" },
3144 {0, NULL }
3146 value_string_ext bthci_cmd_cs_shape_vals_ext = VALUE_STRING_EXT_INIT(cmd_cs_shape_vals);
3148 static const value_string cmd_snr_control_vals[] = {
3149 { 0x00, "18 dB" },
3150 { 0x01, "21 dB" },
3151 { 0x02, "24 dB" },
3152 { 0x03, "27 dB" },
3153 { 0x04, "30 dB" },
3154 { 0xff, "Not applied" },
3155 {0, NULL }
3158 static const value_string cs_sync_antenna_special[] = {
3159 {0xfe, "Repetitive order, 1 to 4"},
3160 {0xff, "Host has no recommendation"},
3161 {0, NULL}
3164 static void tx_power_setting(char *buf, int8_t value) {
3165 if (value < 126)
3166 snprintf(buf, ITEM_LABEL_LENGTH, "%i dBm", value);
3167 else if (value == 126)
3168 snprintf(buf, ITEM_LABEL_LENGTH, "Set to minimum");
3169 else
3170 snprintf(buf, ITEM_LABEL_LENGTH, "Set to maximum");
3174 void proto_register_bthci_cmd(void);
3175 void proto_reg_handoff_bthci_cmd(void);
3176 void proto_register_btcommon(void);
3177 void proto_reg_handoff_btcommon(void);
3179 static void bthci_cmd_vendor_prompt(packet_info *pinfo _U_, char* result)
3181 snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Vendor as");
3184 static int dissect_coding_format(proto_tree *tree, int hf_x, tvbuff_t *tvb, int offset, int ett_x)
3186 proto_item *sub_item;
3187 proto_tree *sub_tree;
3189 sub_item = proto_tree_add_item(tree, hf_x, tvb, offset, 5, ENC_NA);
3190 sub_tree = proto_item_add_subtree(sub_item, ett_x);
3192 proto_tree_add_item(sub_tree, hf_bthci_cmd_codec_id, tvb, offset, 1, ENC_NA);
3193 offset += 1;
3195 proto_tree_add_item(sub_tree, hf_bthci_cmd_company_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3196 offset += 2;
3198 proto_tree_add_item(sub_tree, hf_bthci_cmd_vendor_codec_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3199 offset += 2;
3201 return offset;
3204 static int
3205 dissect_bthci_cmd_cod_mask(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
3207 proto_item *cod_mask_item;
3208 proto_item *cod_mask_tree;
3210 cod_mask_item = proto_tree_add_item(tree, hf_bthci_cmd_cod_class_of_device_mask, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3211 cod_mask_tree = proto_item_add_subtree(cod_mask_item, ett_cod_mask);
3213 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_minor_device_class_mask, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3214 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_format_type_mask, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3215 offset += 1;
3217 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_information_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3218 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_telephony_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3219 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_audio_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3220 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_object_transfer_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3221 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_capturing_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3222 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_rendering_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3223 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_networking_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3224 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_positioning_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3225 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_reserved_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3226 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_le_audio_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3227 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_service_class_limited_discoverable_mode_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3229 proto_tree_add_item(cod_mask_tree, hf_bthci_cmd_cod_major_device_class_mask, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3230 offset += 2;
3232 return offset;
3235 static int
3236 dissect_bthci_cmd_flow_spec(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, bool tx)
3238 proto_item *ti_flow_spec;
3239 proto_tree *ti_flow_spec_subtree;
3241 ti_flow_spec = proto_tree_add_none_format(tree, hf_bthci_cmd_flow_spec, tvb, offset, 16, tx?"Tx Flow Spec ":"Rx Flow Spec");
3242 ti_flow_spec_subtree = proto_item_add_subtree(ti_flow_spec, ett_flow_spec_subtree);
3244 proto_tree_add_item(ti_flow_spec_subtree, hf_bthci_cmd_flow_spec_identifier, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3245 offset++;
3246 proto_tree_add_item(ti_flow_spec_subtree, hf_bthci_cmd_flow_spec_service_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3247 offset++;
3248 proto_tree_add_item(ti_flow_spec_subtree, hf_bthci_cmd_flow_spec_sdu_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3249 offset+=2;
3250 proto_tree_add_item(ti_flow_spec_subtree, hf_bthci_cmd_flow_spec_sdu_arrival_time, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3251 offset+=4;
3252 proto_tree_add_item(ti_flow_spec_subtree, hf_bthci_cmd_flow_spec_access_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3253 offset+=4;
3254 proto_tree_add_item(ti_flow_spec_subtree, hf_bthci_cmd_flush_to_us, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3255 offset+=4;
3257 return offset;
3260 static int
3261 dissect_antenna_switching_pattern(tvbuff_t *tvb, int offset, proto_tree *tree)
3263 uint8_t length_antenna_pattern;
3265 proto_tree_add_item(tree, hf_bthci_cmd_antenna_switching_pattern_length, tvb, offset, 1, ENC_NA);
3266 length_antenna_pattern = tvb_get_uint8(tvb, offset);
3267 offset += 1;
3269 if (length_antenna_pattern > 0) {
3270 proto_item *sub_item;
3271 proto_tree *sub_tree;
3273 sub_item = proto_tree_add_item(tree, hf_bthci_cmd_antenna_switching_pattern, tvb, offset, length_antenna_pattern, ENC_NA);
3274 sub_tree = proto_item_add_subtree(sub_item, ett_pattern);
3275 proto_item_append_text(sub_item, ": ");
3277 while (length_antenna_pattern > 0) {
3278 proto_tree_add_item(sub_tree, hf_bthci_cmd_antenna_id, tvb, offset, 1, ENC_NA);
3279 proto_item_append_text(sub_item, "%d ", tvb_get_uint8(tvb, offset));
3280 offset++;
3281 length_antenna_pattern--;
3284 return offset;
3287 static int
3288 dissect_link_control_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo,
3289 proto_tree *tree, uint16_t cmd_ocf, bluetooth_data_t *bluetooth_data)
3291 proto_item *item;
3292 uint32_t clock_value;
3294 switch (cmd_ocf) {
3295 case 0x0001: /* Inquiry */
3296 proto_tree_add_item(tree, hf_bthci_cmd_lap, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3297 offset+=3;
3298 item = proto_tree_add_item(tree, hf_bthci_cmd_inq_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3299 proto_item_append_text(item, " (%g sec)", 1.28*tvb_get_uint8(tvb, offset));
3300 offset++;
3301 proto_tree_add_item(tree, hf_bthci_cmd_num_responses, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3302 offset++;
3303 break;
3305 case 0x0003: /* Periodic Inquiry Mode */
3306 item = proto_tree_add_item(tree, hf_bthci_cmd_max_period_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3307 proto_item_append_text(item, " (%g sec)", 1.28*tvb_get_letohs(tvb, offset));
3308 offset+=2;
3309 item = proto_tree_add_item(tree, hf_bthci_cmd_min_period_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3310 proto_item_append_text(item, " (%g sec)", 1.28*tvb_get_letohs(tvb, offset));
3311 offset+=2;
3312 proto_tree_add_item(tree, hf_bthci_cmd_lap, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3313 offset+=3;
3314 item = proto_tree_add_item(tree, hf_bthci_cmd_inq_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3315 proto_item_append_text(item, " (%g sec)", 1.28*tvb_get_uint8(tvb, offset));
3316 offset++;
3317 proto_tree_add_item(tree, hf_bthci_cmd_num_responses, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3318 offset++;
3319 break;
3321 case 0x0005: /* Create Connection */
3323 uint8_t bd_addr[6];
3325 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3327 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_packet_type, ett_packet_type, hfx_bthci_cmd_packet_type, ENC_LITTLE_ENDIAN);
3328 offset += 2;
3330 proto_tree_add_item(tree, hf_bthci_cmd_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3331 offset++;
3333 proto_tree_add_item(tree, hf_bthci_cmd_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3334 offset++;
3336 item = proto_tree_add_item(tree, hf_bthci_cmd_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3337 clock_value = tvb_get_letohs(tvb, 13) & 32767; /* only bit0-14 are valid */
3338 proto_item_append_text(item, " (%g msec)", 1.25*clock_value);
3339 proto_tree_add_item(tree, hf_bthci_cmd_clock_offset_valid , tvb, offset, 2, ENC_LITTLE_ENDIAN);
3340 offset+=2;
3342 proto_tree_add_item(tree, hf_bthci_cmd_allow_role_switch, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3343 offset++;
3345 if (!pinfo->fd->visited) {
3346 uint32_t interface_id;
3347 uint32_t adapter_id;
3348 uint32_t bd_addr_oui;
3349 uint32_t bd_addr_id;
3350 uint32_t frame_number;
3351 wmem_tree_key_t key[6];
3352 device_role_t *device_role;
3354 interface_id = bluetooth_data->interface_id;
3355 adapter_id = bluetooth_data->adapter_id;
3356 frame_number = pinfo->num;
3357 bd_addr_oui = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
3358 bd_addr_id = bd_addr[3] << 16 | bd_addr[4] << 8 | bd_addr[5];
3360 key[0].length = 1;
3361 key[0].key = &interface_id;
3362 key[1].length = 1;
3363 key[1].key = &adapter_id;
3364 key[2].length = 1;
3365 key[2].key = &bd_addr_id;
3366 key[3].length = 1;
3367 key[3].key = &bd_addr_oui;
3368 key[4].length = 1;
3369 key[4].key = &frame_number;
3370 key[5].length = 0;
3371 key[5].key = NULL;
3373 device_role = (device_role_t *) wmem_new(wmem_file_scope(), device_role_t);
3374 device_role->change_in_frame = frame_number;
3375 device_role->role = ROLE_PERIPHERAL;
3377 wmem_tree_insert32_array(bluetooth_data->bdaddr_to_role, key, device_role);
3380 break;
3382 case 0x0006: /* Disconnect */
3383 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3384 offset+=2;
3385 proto_tree_add_item(tree, hf_bthci_cmd_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3386 offset++;
3387 break;
3389 case 0x0007: /* Add SCO Connection */
3390 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3391 offset+=2;
3392 proto_tree_add_item(tree, hf_bthci_cmd_packet_type_hv1, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3393 proto_tree_add_item(tree, hf_bthci_cmd_packet_type_hv2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3394 proto_tree_add_item(tree, hf_bthci_cmd_packet_type_hv3, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3395 offset+=2;
3396 break;
3398 case 0x0008: /* Create Connection Cancel Request */
3399 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3400 break;
3402 case 0x0009: /* Accept Connection Request */ {
3403 uint8_t bd_addr[6];
3405 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3407 proto_tree_add_item(tree, hf_bthci_cmd_acr_role, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3408 offset += 1;
3410 if (!pinfo->fd->visited) {
3411 uint32_t interface_id;
3412 uint32_t adapter_id;
3413 uint32_t bd_addr_oui;
3414 uint32_t bd_addr_id;
3415 uint32_t frame_number;
3416 wmem_tree_key_t key[6];
3417 device_role_t *device_role;
3419 interface_id = bluetooth_data->interface_id;
3420 adapter_id = bluetooth_data->adapter_id;
3421 frame_number = pinfo->num;
3422 bd_addr_oui = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
3423 bd_addr_id = bd_addr[3] << 16 | bd_addr[4] << 8 | bd_addr[5];
3425 key[0].length = 1;
3426 key[0].key = &interface_id;
3427 key[1].length = 1;
3428 key[1].key = &adapter_id;
3429 key[2].length = 1;
3430 key[2].key = &bd_addr_id;
3431 key[3].length = 1;
3432 key[3].key = &bd_addr_oui;
3433 key[4].length = 1;
3434 key[4].key = &frame_number;
3435 key[5].length = 0;
3436 key[5].key = NULL;
3438 device_role = (device_role_t *) wmem_new(wmem_file_scope(), device_role_t);
3439 device_role->change_in_frame = frame_number;
3440 device_role->role = ROLE_CENTRAL;
3442 wmem_tree_insert32_array(bluetooth_data->bdaddr_to_role, key, device_role);
3445 break;
3447 case 0x000a: /* Reject Connection Request */
3448 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3450 proto_tree_add_item(tree, hf_bthci_cmd_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3451 offset++;
3452 break;
3454 case 0x000b: /* Link Key Request Reply */
3455 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3457 proto_tree_add_item(tree, hf_bthci_cmd_link_key, tvb, offset, 16, ENC_NA);
3458 offset+=16;
3459 break;
3461 case 0x000c: /* Link Key Request Negative Reply */
3462 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3463 break;
3465 case 0x000d: /* PIN Code Request Reply */
3466 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3468 proto_tree_add_item(tree, hf_bthci_cmd_pin_code_length ,tvb, offset, 1, ENC_LITTLE_ENDIAN);
3469 offset++;
3470 proto_tree_add_item(tree, hf_bthci_cmd_pin_code ,tvb, offset, 16, ENC_ASCII);
3471 offset+=16;
3472 break;
3474 case 0x000e: /* PIN Code Request Negative Reply */
3475 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3476 break;
3478 case 0x000f: /* Change Connection Packet Type */
3479 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3480 offset+=2;
3482 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_packet_type, ett_packet_type, hfx_bthci_cmd_packet_type, ENC_LITTLE_ENDIAN);
3483 offset += 2;
3485 break;
3487 case 0x0011: /* Authentication Request */
3488 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3489 offset+=2;
3490 break;
3492 case 0x0013: /* Set Connection Encryption */
3493 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3494 offset+=2;
3495 proto_tree_add_item(tree, hf_bthci_cmd_encryption_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3496 offset++;
3497 break;
3499 case 0x0017: /* Link Key Selection */
3500 proto_tree_add_item(tree, hf_bthci_cmd_key_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3501 offset++;
3502 break;
3504 case 0x0019: /* Remote Name Request */
3505 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3507 proto_tree_add_item(tree, hf_bthci_cmd_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3508 offset++;
3510 proto_tree_add_item(tree, hf_bthci_cmd_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3511 offset++;
3513 item = proto_tree_add_item(tree, hf_bthci_cmd_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3514 clock_value = tvb_get_letohs(tvb, offset) & 32767; /* only bit0-14 are valid */
3515 proto_item_append_text(item, " (%g msec)", 1.25*clock_value);
3516 proto_tree_add_item(tree, hf_bthci_cmd_clock_offset_valid , tvb, offset, 2, ENC_LITTLE_ENDIAN);
3517 offset+=2;
3518 break;
3520 case 0x001a: /* Remote Name Request Cancel */
3521 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3522 break;
3524 case 0x001c: /* Read Remote Extended Features */
3525 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3526 offset+=2;
3527 proto_tree_add_item(tree, hf_bthci_cmd_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3528 offset++;
3529 break;
3531 case 0x0028: /* Setup Synchronous Connection */
3532 case 0x0029: /* Accept Synchronous Connection Request */
3533 if (cmd_ocf == 0x0028) {
3534 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3535 offset+=2;
3536 } else {
3537 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3540 proto_tree_add_item(tree, hf_bthci_cmd_transmit_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3541 offset+=4;
3543 proto_tree_add_item(tree, hf_bthci_cmd_receive_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3544 offset+=4;
3546 proto_tree_add_item(tree, hf_bthci_cmd_max_latency_ms, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3547 offset+=2;
3549 proto_tree_add_item(tree, hf_bthci_cmd_input_unused, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3550 proto_tree_add_item(tree, hf_bthci_cmd_input_coding, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3551 proto_tree_add_item(tree, hf_bthci_cmd_input_data_format, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3552 proto_tree_add_item(tree, hf_bthci_cmd_input_sample_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3553 proto_tree_add_item(tree, hf_bthci_cmd_linear_pcm_bit_pos, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3554 proto_tree_add_item(tree, hf_bthci_cmd_air_coding_format, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3555 offset+=2;
3557 proto_tree_add_item(tree, hf_bthci_cmd_retransmission_effort, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3558 offset++;
3560 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_sco_packet_type, ett_sco_packet_type, hfx_bthci_cmd_sco_packet_type, ENC_LITTLE_ENDIAN);
3561 offset += 2;
3563 break;
3564 case 0x002a: /* Reject Synchronous Connection Request */
3565 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3567 proto_tree_add_item(tree, hf_bthci_cmd_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3568 offset++;
3569 break;
3571 case 0x0015: /* Change Connection Link Key */
3572 case 0x001b: /* Read Remote Supported Features */
3573 case 0x001d: /* Read Remote Version Information */
3574 case 0x001f: /* Read Clock Offset*/
3575 case 0x0020: /* Read LMP Handle */
3576 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3577 offset+=2;
3578 break;
3580 case 0x002b: /* IO Capability Response */
3581 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3583 proto_tree_add_item(tree, hf_bthci_cmd_io_capability, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3584 offset++;
3585 proto_tree_add_item(tree, hf_bthci_cmd_oob_data_present, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3586 offset++;
3587 proto_tree_add_item(tree, hf_bthci_cmd_auth_requirements, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3588 offset++;
3589 break;
3591 case 0x0034: /* IO Capability Request Negative Reply */
3592 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3593 proto_tree_add_item(tree, hf_bthci_cmd_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3594 offset++;
3595 break;
3597 case 0x002c: /* User Confirmation Request Reply */
3598 case 0x002d: /* User Confirmation Request Negative Reply */
3599 case 0x002f: /* User Passkey Request Negative Reply */
3600 case 0x0033: /* Remote OOB Data Request Negative Reply */
3601 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3602 break;
3604 case 0x002e: /* User Passkey Request Reply */
3605 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3607 proto_tree_add_item(tree, hf_bthci_cmd_passkey, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3608 offset+=4;
3609 break;
3611 case 0x0030: /* Remote OOB Data Request Reply */
3612 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3614 proto_tree_add_item(tree, hf_bthci_cmd_hash_c, tvb, offset, 16, ENC_NA);
3615 offset+=16;
3616 proto_tree_add_item(tree, hf_bthci_cmd_randomizer_r, tvb, offset, 16, ENC_NA);
3617 offset+=16;
3618 break;
3620 case 0x0035: /* Create Physical Link */
3621 case 0x0036: /* Accept Physical Link */
3622 proto_tree_add_item(tree, hf_bthci_cmd_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3623 offset++;
3624 proto_tree_add_item(tree, hf_bthci_cmd_dedicated_amp_key_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3625 offset++;
3626 proto_tree_add_item(tree, hf_bthci_cmd_dedicated_amp_key_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3627 offset++;
3628 proto_tree_add_item(tree, hf_bthci_cmd_dedicated_amp_key, tvb, offset, -1, ENC_NA);
3629 offset+=tvb_reported_length_remaining(tvb, offset);
3630 break;
3632 case 0x0037: /* Disconnect Physical Link */
3633 proto_tree_add_item(tree, hf_bthci_cmd_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3634 offset++;
3635 proto_tree_add_item(tree, hf_bthci_cmd_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3636 offset++;
3637 break;
3639 case 0x0038: /* Create Logical Link */
3640 case 0x0039: /* Accept Logical Link */
3641 proto_tree_add_item(tree, hf_bthci_cmd_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3642 offset++;
3643 offset = dissect_bthci_cmd_flow_spec(tvb, offset, pinfo, tree, true);
3644 offset = dissect_bthci_cmd_flow_spec(tvb, offset, pinfo, tree, false);
3645 break;
3647 case 0x003a: /* Disconnect Logical Link */
3648 proto_tree_add_item(tree, hf_bthci_cmd_logical_link_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3649 offset+=2;
3650 break;
3652 case 0x003b: /* Logical Link Cancel */
3653 proto_tree_add_item(tree, hf_bthci_cmd_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3654 offset++;
3655 proto_tree_add_item(tree, hf_bthci_cmd_flow_spec_identifier, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3656 offset++;
3657 break;
3659 case 0x003c: /* Flow Spec Modify */
3660 proto_tree_add_item(tree, hf_bthci_cmd_logical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3661 offset++;
3662 offset = dissect_bthci_cmd_flow_spec(tvb, offset, pinfo, tree, true);
3663 offset = dissect_bthci_cmd_flow_spec(tvb, offset, pinfo, tree, false);
3664 break;
3666 case 0x003D: /* Enhanced Setup Synchronous Connection */
3667 case 0x003E: /* Enhanced Accept Synchronous Connection Request */
3668 if (cmd_ocf == 0x003D) {
3669 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3670 offset += 2;
3671 } else {
3672 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3675 proto_tree_add_item(tree, hf_bthci_cmd_transmit_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3676 offset += 4;
3678 proto_tree_add_item(tree, hf_bthci_cmd_receive_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3679 offset += 4;
3681 offset = dissect_coding_format(tree, hf_bthci_cmd_transmit_coding_format, tvb, offset, ett_coding_format);
3683 offset = dissect_coding_format(tree, hf_bthci_cmd_receive_coding_format, tvb, offset, ett_coding_format);
3685 proto_tree_add_item(tree, hf_bthci_cmd_transmit_codec_frame_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3686 offset += 2;
3688 proto_tree_add_item(tree, hf_bthci_cmd_receive_codec_frame_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3689 offset += 2;
3691 proto_tree_add_item(tree, hf_bthci_cmd_input_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3692 offset += 4;
3694 proto_tree_add_item(tree, hf_bthci_cmd_output_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3695 offset += 4;
3697 offset = dissect_coding_format(tree, hf_bthci_cmd_input_coding_format, tvb, offset, ett_coding_format);
3699 offset = dissect_coding_format(tree, hf_bthci_cmd_output_coding_format, tvb, offset, ett_coding_format);
3701 proto_tree_add_item(tree, hf_bthci_cmd_input_coded_data_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3702 offset += 2;
3704 proto_tree_add_item(tree, hf_bthci_cmd_output_coded_data_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3705 offset += 2;
3707 proto_tree_add_item(tree, hf_bthci_cmd_input_pcm_data_format, tvb, offset, 1, ENC_NA);
3708 offset += 1;
3710 proto_tree_add_item(tree, hf_bthci_cmd_output_pcm_data_format, tvb, offset, 1, ENC_NA);
3711 offset += 1;
3713 proto_tree_add_item(tree, hf_bthci_cmd_input_pcm_sample_payload_msb_position, tvb, offset, 1, ENC_NA);
3714 offset += 1;
3716 proto_tree_add_item(tree, hf_bthci_cmd_output_pcm_sample_payload_msb_position, tvb, offset, 1, ENC_NA);
3717 offset += 1;
3719 proto_tree_add_item(tree, hf_bthci_cmd_input_data_path, tvb, offset, 1, ENC_NA);
3720 offset += 1;
3722 proto_tree_add_item(tree, hf_bthci_cmd_output_data_path, tvb, offset, 1, ENC_NA);
3723 offset += 1;
3725 proto_tree_add_item(tree, hf_bthci_cmd_input_transport_unit_size, tvb, offset, 1, ENC_NA);
3726 offset += 1;
3728 proto_tree_add_item(tree, hf_bthci_cmd_output_transport_unit_size, tvb, offset, 1, ENC_NA);
3729 offset += 1;
3731 /* TODO: Improve this range field output: 0x0000-0x0003 reserved, 0x0004-0xFFFE value in ms, 0xFFFF - "Do not care"*/
3732 proto_tree_add_item(tree, hf_bthci_cmd_max_latency_ms, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3733 offset += 2;
3735 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_sco_packet_type, ett_sco_packet_type, hfx_bthci_cmd_sco_packet_type, ENC_LITTLE_ENDIAN);
3736 offset += 2;
3738 proto_tree_add_item(tree, hf_bthci_cmd_retransmission_effort, tvb, offset, 1, ENC_NA);
3739 offset += 1;
3741 break;
3742 case 0x003F: /* Truncated Page */
3743 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3745 proto_tree_add_item(tree, hf_bthci_cmd_page_scan_repetition_mode, tvb, offset, 1, ENC_NA);
3746 offset += 1;
3748 item = proto_tree_add_item(tree, hf_bthci_cmd_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3749 clock_value = tvb_get_letohs(tvb, 13) & 32767; /* only bit0-14 are valid */
3750 proto_item_append_text(item, " (%g msec)", 1.25 * clock_value);
3752 proto_tree_add_item(tree, hf_bthci_cmd_clock_offset_valid , tvb, offset, 2, ENC_LITTLE_ENDIAN);
3753 offset += 2;
3755 break;
3756 case 0x0040: /* Truncated Page Cancel */
3757 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3759 break;
3761 case 0x0002: /* Inquiry Cancel */
3762 case 0x0004: /* Exit Periodic Inquiry Mode */
3763 case 0x0043: /* Start Synchronization Train */
3764 /* NOTE: No parameters */
3765 break;
3767 case 0x0041: /* Set Connectionless Peripheral Broadcast */
3768 proto_tree_add_item(tree, hf_bthci_cmd_connectionless_peripheral_broadcast, tvb, offset, 1, ENC_NA);
3769 offset += 1;
3771 proto_tree_add_item(tree, hf_bthci_cmd_lt_addr, tvb, offset, 1, ENC_NA);
3772 offset += 1;
3774 proto_tree_add_item(tree, hf_bthci_cmd_lpo_allowed, tvb, offset, 1, ENC_NA);
3775 offset += 1;
3777 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_packet_type, ett_packet_type, hfx_bthci_cmd_packet_type, ENC_LITTLE_ENDIAN);
3778 offset += 2;
3780 proto_tree_add_item(tree, hf_bthci_cmd_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3781 offset += 2;
3783 proto_tree_add_item(tree, hf_bthci_cmd_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3784 offset += 2;
3786 proto_tree_add_item(tree, hf_bthci_cmd_cpb_supervision_to, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3787 offset += 2;
3789 break;
3790 case 0x0042: /* Set Connectionless Peripheral Broadcast Receive */
3791 proto_tree_add_item(tree, hf_bthci_cmd_connectionless_peripheral_broadcast_receive, tvb, offset, 1, ENC_NA);
3792 offset += 1;
3794 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3796 proto_tree_add_item(tree, hf_bthci_cmd_lt_addr, tvb, offset, 1, ENC_NA);
3797 offset += 1;
3799 proto_tree_add_item(tree, hf_bthci_cmd_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3800 offset += 2;
3802 proto_tree_add_item(tree, hf_bthci_cmd_clock_offset_32, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3803 offset += 4;
3805 proto_tree_add_item(tree, hf_bthci_cmd_next_cpb_clock, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3806 offset += 4;
3808 proto_tree_add_item(tree, hf_bthci_cmd_cpb_supervision_to, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3809 offset += 2;
3811 proto_tree_add_item(tree, hf_bthci_cmd_remote_timing_accuracy, tvb, offset, 1, ENC_NA);
3812 offset += 1;
3814 proto_tree_add_item(tree, hf_bthci_cmd_cpb_skip, tvb, offset, 1, ENC_NA);
3815 offset += 1;
3817 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_packet_type, ett_packet_type, hfx_bthci_cmd_packet_type, ENC_LITTLE_ENDIAN);
3818 offset += 2;
3820 proto_tree_add_item(tree, hf_bthci_cmd_channel_map, tvb, offset, 10, ENC_NA);
3821 offset += 10;
3823 break;
3824 case 0x0044: /* Receive Synchronization Train */
3825 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3827 proto_tree_add_item(tree, hf_bthci_cmd_synchronization_scan_to, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3828 offset += 2;
3830 proto_tree_add_item(tree, hf_bthci_cmd_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3831 offset += 2;
3833 proto_tree_add_item(tree, hf_bthci_cmd_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3834 offset += 2;
3836 break;
3837 case 0x0045: /* Remote OOB Extended Data Request Reply */
3838 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3840 proto_tree_add_item(tree, hf_bthci_cmd_c192, tvb, offset, 16, ENC_NA);
3841 offset += 16;
3843 proto_tree_add_item(tree, hf_bthci_cmd_r192, tvb, offset, 16, ENC_NA);
3844 offset += 16;
3846 proto_tree_add_item(tree, hf_bthci_cmd_c256, tvb, offset, 16, ENC_NA);
3847 offset += 16;
3849 proto_tree_add_item(tree, hf_bthci_cmd_r256, tvb, offset, 16, ENC_NA);
3850 offset += 16;
3852 break;
3853 default:
3854 proto_tree_add_expert(tree, pinfo, &ei_command_unknown_command, tvb, offset, -1);
3855 offset += tvb_reported_length_remaining(tvb, offset);
3858 return offset;
3861 static int
3862 dissect_link_policy_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, uint16_t cmd_ocf, bluetooth_data_t *bluetooth_data)
3864 switch (cmd_ocf) {
3865 case 0x0001: /* Hold Mode */
3866 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3867 offset+=2;
3868 proto_tree_add_item(tree, hf_bthci_cmd_max_interval_hold, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3869 offset+=2;
3870 proto_tree_add_item(tree, hf_bthci_cmd_min_interval_hold, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3871 offset+=2;
3872 break;
3874 case 0x0003: /* sniff mode */
3875 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3876 offset+=2;
3877 proto_tree_add_item(tree, hf_bthci_cmd_max_interval_sniff, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3878 offset+=2;
3879 proto_tree_add_item(tree, hf_bthci_cmd_min_interval_sniff, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3880 offset+=2;
3881 proto_tree_add_item(tree, hf_bthci_cmd_sniff_attempt, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3882 offset+=2;
3883 proto_tree_add_item(tree, hf_bthci_cmd_sniff_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3884 offset+=2;
3885 break;
3887 case 0x0005: /* Park Mode */
3888 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3889 offset+=2;
3890 proto_tree_add_item(tree, hf_bthci_cmd_max_interval_beacon, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3891 offset+=2;
3892 proto_tree_add_item(tree, hf_bthci_cmd_min_interval_beacon, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3893 offset+=2;
3894 break;
3896 case 0x0007: /* QoS Setup */
3897 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3898 offset+=2;
3899 proto_tree_add_item(tree, hf_bthci_cmd_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3900 offset++;
3901 proto_tree_add_item(tree, hf_bthci_cmd_service_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3902 offset++;
3903 proto_tree_add_item(tree, hf_bthci_cmd_token_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3904 offset+=4;
3905 proto_tree_add_item(tree, hf_bthci_cmd_peak_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3906 offset+=4;
3907 proto_tree_add_item(tree, hf_bthci_cmd_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3908 offset+=4;
3909 proto_tree_add_item(tree, hf_bthci_cmd_delay_variation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3910 offset+=4;
3911 break;
3913 case 0x000b: /* Switch Role */
3914 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3916 proto_tree_add_item(tree, hf_bthci_cmd_role, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3917 offset++;
3918 break;
3920 case 0x0004: /* Exit Sniff Mode */
3921 case 0x0006: /* Exit Park Mode */
3922 case 0x0009: /* Role Discovery */
3923 case 0x000c: /* Read Link Policy Settings */
3924 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3925 offset+=2;
3926 break;
3928 case 0x000d: /* Write Link Policy Settings */
3929 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3930 offset+=2;
3931 /* FALL THROUGH */
3932 case 0x000f: /* Write Default Link Policy Settings */
3933 proto_tree_add_item(tree, hf_bthci_cmd_link_policy_setting_switch, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3934 proto_tree_add_item(tree, hf_bthci_cmd_link_policy_setting_hold , tvb, offset, 2, ENC_LITTLE_ENDIAN);
3935 proto_tree_add_item(tree, hf_bthci_cmd_link_policy_setting_sniff , tvb, offset, 2, ENC_LITTLE_ENDIAN);
3936 proto_tree_add_item(tree, hf_bthci_cmd_link_policy_setting_park , tvb, offset, 2, ENC_LITTLE_ENDIAN);
3937 offset+=2;
3938 break;
3940 case 0x0010: /* Flow Specification */
3941 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3942 offset+=2;
3943 proto_tree_add_item(tree, hf_bthci_cmd_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3944 offset++;
3945 proto_tree_add_item(tree, hf_bthci_cmd_flow_direction, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3946 offset++;
3947 proto_tree_add_item(tree, hf_bthci_cmd_service_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3948 offset++;
3949 proto_tree_add_item(tree, hf_bthci_cmd_token_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3950 offset+=4;
3951 proto_tree_add_item(tree, hf_bthci_cmd_token_bucket_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3952 offset+=4;
3953 proto_tree_add_item(tree, hf_bthci_cmd_peak_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3954 offset+=4;
3955 proto_tree_add_item(tree, hf_bthci_cmd_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3956 offset+=4;
3957 break;
3959 case 0x0011: /* Sniff Subrating */
3960 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3961 offset+=2;
3962 proto_tree_add_item(tree, hf_bthci_cmd_max_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3963 offset+=2;
3964 proto_tree_add_item(tree, hf_bthci_cmd_min_remote_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3965 offset+=2;
3966 proto_tree_add_item(tree, hf_bthci_cmd_min_local_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3967 offset+=2;
3968 break;
3970 case 0x00e: /* Read Default Link Policy Setting */
3971 /* NOTE: No parameters */
3972 break;
3974 default:
3975 proto_tree_add_expert(tree, pinfo, &ei_command_unknown_command, tvb, offset, -1);
3976 offset += tvb_reported_length_remaining(tvb, offset);
3979 return offset;
3982 static int
3983 dissect_host_controller_baseband_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo,
3984 proto_tree *tree, uint16_t cmd_ocf, bluetooth_data_t *bluetooth_data,
3985 bthci_cmd_data_t *bthci_cmd_data)
3987 proto_item *item;
3988 uint8_t filter_type, filter_condition_type, num8;
3989 int i;
3991 switch (cmd_ocf) {
3992 case 0x0001: /* Set Event Mask */
3993 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_00, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3994 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_01, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3995 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_02, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3996 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_03, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3997 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_04, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3998 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_05, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3999 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_06, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4000 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_07, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4001 offset++;
4003 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_10, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4004 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_11, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4005 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_12, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4006 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_13, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4007 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_14, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4008 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_17, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4009 offset++;
4011 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_20, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4012 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_21, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4013 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_23, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4014 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_24, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4015 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_25, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4016 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_26, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4017 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_27, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4018 offset++;
4020 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_30, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4021 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_31, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4022 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_32, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4023 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_33, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4024 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_34, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4025 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_35, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4026 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_36, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4027 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_37, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4028 offset++;
4030 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_40, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4031 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_41, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4032 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_42, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4033 offset++;
4035 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_53, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4036 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_54, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4037 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_55, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4038 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_56, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4039 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_57, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4040 offset++;
4042 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_60, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4043 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_61, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4044 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_62, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4045 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_63, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4046 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_64, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4047 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_65, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4048 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_67, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4049 offset++;
4051 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_70, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4052 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_72, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4053 proto_tree_add_item(tree, hf_bthci_cmd_evt_mask_73, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4054 offset++;
4055 break;
4057 case 0x0005: /* Set Event Filter */
4058 proto_tree_add_item(tree, hf_bthci_cmd_filter_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4059 filter_type = tvb_get_uint8(tvb, 3);
4060 offset++;
4061 switch (filter_type) {
4063 case 0x01: /* Inquiry Result Filter */
4064 proto_tree_add_item(tree, hf_bthci_cmd_inquiry_result_filter_condition_type,
4065 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4066 filter_condition_type = tvb_get_uint8(tvb, offset);
4067 offset++;
4068 switch (filter_condition_type) {
4069 case 0x01:
4070 call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree);
4071 offset += 3;
4073 offset=dissect_bthci_cmd_cod_mask(tvb, offset, pinfo, tree);
4074 break;
4076 case 0x02:
4077 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
4078 break;
4080 default:
4081 break;
4084 break;
4086 case 0x02: /* Connection Setup Filter */
4087 proto_tree_add_item(tree, hf_bthci_cmd_connection_setup_filter_condition_type,
4088 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4089 filter_condition_type = tvb_get_uint8(tvb, offset);
4090 offset++;
4091 switch (filter_condition_type) {
4092 case 0x00:
4093 proto_tree_add_item(tree, hf_bthci_cmd_auto_acc_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4094 offset++;
4095 break;
4097 case 0x01:
4098 call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree);
4099 offset += 3;
4101 offset=dissect_bthci_cmd_cod_mask(tvb, offset, pinfo, tree);
4103 proto_tree_add_item(tree, hf_bthci_cmd_auto_acc_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4104 offset++;
4105 break;
4107 case 0x02:
4108 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
4110 proto_tree_add_item(tree, hf_bthci_cmd_auto_acc_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4111 offset++;
4112 break;
4114 default:
4115 break;
4118 break;
4120 default:
4121 break;
4125 break;
4126 case 0x000a: /* Write PIN Type */
4127 proto_tree_add_item(tree, hf_bthci_cmd_pin_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4128 offset++;
4129 break;
4131 case 0x000d: /* Read Stored Link Key */
4132 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
4134 proto_tree_add_item(tree, hf_bthci_cmd_read_all_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4135 offset++;
4136 break;
4138 case 0x0011: /* Write Stored Link Key */
4139 proto_tree_add_item(tree, hf_bthci_cmd_num_link_keys, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4140 num8 = tvb_get_uint8(tvb, offset);
4141 offset += 1;
4143 for (i = 0; i < num8; i++) {
4144 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
4145 proto_tree_add_item(tree, hf_bthci_cmd_link_key, tvb, offset, 16, ENC_NA);
4146 offset += 16;
4148 break;
4150 case 0x0012: /* Delete Stored Link Key */
4151 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
4153 proto_tree_add_item(tree, hf_bthci_cmd_delete_all_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4154 offset++;
4155 break;
4157 case 0x0013: /* Change Local Name */
4158 proto_tree_add_item(tree, hf_bthci_cmd_device_name, tvb, offset, 248, ENC_UTF_8 | ENC_NA);
4159 if (!pinfo->fd->visited && bthci_cmd_data) {
4160 bthci_cmd_data->data.name = tvb_get_string_enc(wmem_file_scope(), tvb, offset, 248, ENC_UTF_8);
4162 offset += 248;
4163 break;
4165 case 0x0016: /* Write Connection Accept Timeout */
4166 proto_tree_add_item(tree, hf_bthci_cmd_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4167 offset+=2;
4168 break;
4170 case 0x0018: /* Write Page Timeout */
4171 proto_tree_add_item(tree, hf_bthci_cmd_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4172 if (!pinfo->fd->visited && bthci_cmd_data) {
4173 bthci_cmd_data->data.page_timeout = tvb_get_letohs(tvb, offset);
4175 offset+=2;
4176 break;
4178 case 0x001a: /* Write Scan Enable */
4179 proto_tree_add_item(tree, hf_bthci_cmd_scan_enable,
4180 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4181 if (!pinfo->fd->visited && bthci_cmd_data) {
4182 bthci_cmd_data->data.scan = tvb_get_uint8(tvb, offset);
4184 offset++;
4185 break;
4187 case 0x0020: /* Write Authentication Enable */
4188 proto_tree_add_item(tree, hf_bthci_cmd_authentication_enable,
4189 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4190 if (!pinfo->fd->visited && bthci_cmd_data) {
4191 bthci_cmd_data->data.authentication = tvb_get_uint8(tvb, offset);
4193 offset++;
4194 break;
4196 case 0x0022: /* Write Encryption Mode */
4197 proto_tree_add_item(tree, hf_bthci_cmd_encrypt_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4198 if (!pinfo->fd->visited && bthci_cmd_data) {
4199 bthci_cmd_data->data.encryption = tvb_get_uint8(tvb, offset);
4201 offset++;
4202 break;
4204 case 0x0024: /* Write Class of Device */
4205 call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree);
4206 if (!pinfo->fd->visited && bthci_cmd_data) {
4207 bthci_cmd_data->data.class_of_device = tvb_get_uint24(tvb, offset, ENC_LITTLE_ENDIAN);
4209 offset += 3;
4210 break;
4212 case 0x0026: /* Write Voice Setting */
4213 proto_tree_add_item(tree, hf_bthci_cmd_input_unused,
4214 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4215 proto_tree_add_item(tree, hf_bthci_cmd_input_coding,
4216 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4217 proto_tree_add_item(tree, hf_bthci_cmd_input_data_format,
4218 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4219 proto_tree_add_item(tree, hf_bthci_cmd_input_sample_size,
4220 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4221 proto_tree_add_item(tree, hf_bthci_cmd_linear_pcm_bit_pos,
4222 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4223 proto_tree_add_item(tree, hf_bthci_cmd_air_coding_format,
4224 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4225 if (!pinfo->fd->visited && bthci_cmd_data) {
4226 bthci_cmd_data->data.voice_setting = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
4228 offset+=2;
4229 break;
4231 case 0x0028: /* Write Automatic Flush Timeout */
4232 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4233 offset+=2;
4234 proto_tree_add_item(tree, hf_bthci_cmd_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4235 offset+=2;
4236 break;
4238 case 0x002a: /* Write Num of Broadcast Retransmissions */
4239 proto_tree_add_item(tree, hf_bthci_cmd_num_broadcast_retransmissions,
4240 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4241 offset++;
4242 break;
4244 case 0x002c: /* Write Hold Mode Activity */
4245 proto_tree_add_item(tree, hf_bthci_cmd_hold_mode_act_page,
4246 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4247 proto_tree_add_item(tree, hf_bthci_cmd_hold_mode_act_inquiry,
4248 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4249 proto_tree_add_item(tree, hf_bthci_cmd_hold_mode_act_periodic,
4250 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4251 offset++;
4252 break;
4254 case 0x002d: /* Read Transmit Power Level */
4255 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle,
4256 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4257 offset+=2;
4258 proto_tree_add_item(tree, hf_bthci_cmd_tx_power_level_type,
4259 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4260 offset++;
4261 break;
4263 case 0x002f: /* Write SCO Flow Control Enable */
4264 proto_tree_add_item(tree, hf_bthci_cmd_sco_flow_control,
4265 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4266 offset++;
4267 break;
4269 case 0x0031: /* Set Host Controller To Host Flow Control */
4270 proto_tree_add_item(tree, hf_bthci_cmd_flow_contr_enable,
4271 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4272 offset++;
4273 break;
4275 case 0x0033: /* Host Buffer Size */
4276 proto_tree_add_item(tree, hf_bthci_cmd_host_data_packet_length_acl,
4277 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4278 offset+=2;
4279 proto_tree_add_item(tree, hf_bthci_cmd_host_data_packet_length_sco,
4280 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4281 offset++;
4282 proto_tree_add_item(tree, hf_bthci_cmd_host_total_num_acl_data_packets,
4283 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4284 offset+=2;
4285 proto_tree_add_item(tree, hf_bthci_cmd_host_total_num_sco_data_packets,
4286 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4287 offset+=2;
4289 if (!pinfo->fd->visited && bthci_cmd_data) {
4290 bthci_cmd_data->data.mtus.acl_mtu = tvb_get_uint16(tvb, offset - 7, ENC_LITTLE_ENDIAN);
4291 bthci_cmd_data->data.mtus.sco_mtu = tvb_get_uint8(tvb, offset - 5);
4292 bthci_cmd_data->data.mtus.acl_packets = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
4293 bthci_cmd_data->data.mtus.sco_packets = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
4295 break;
4297 case 0x0035: /* Host Number Of Completed Packets */
4298 proto_tree_add_item(tree, hf_bthci_cmd_num_handles,
4299 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4300 num8 = tvb_get_uint8(tvb, offset);
4301 offset++;
4303 for (i=0; i<num8; i++) {
4304 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle,
4305 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4306 offset += 2;
4308 proto_tree_add_item(tree, hf_bthci_cmd_num_compl_packets,
4309 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4310 offset += 2;
4312 break;
4314 case 0x0037: /* Write Link Supervision Timeout */
4315 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle,
4316 tvb, offset, 2, ENC_LITTLE_ENDIAN);
4317 offset+=2;
4318 proto_tree_add_item(tree, hf_bthci_cmd_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4319 offset+=2;
4320 break;
4322 case 0x003a: /* Write Current IAC LAP */
4323 proto_tree_add_item(tree, hf_bthci_cmd_num_curr_iac, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4324 num8 = tvb_get_uint8(tvb, offset);
4325 offset++;
4326 for (i=0; i<num8; i++) {
4327 proto_tree_add_item(tree, hf_bthci_cmd_iac_lap, tvb, offset+(i*3), 3, ENC_LITTLE_ENDIAN);
4329 offset += num8 * 3;
4330 break;
4332 case 0x003c: /* Write Page Scan Period Mode */
4333 proto_tree_add_item(tree, hf_bthci_cmd_page_scan_period_mode,
4334 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4335 offset++;
4336 break;
4338 case 0x003e: /* Write Page Scan Mode */
4339 proto_tree_add_item(tree, hf_bthci_cmd_page_scan_mode,
4340 tvb, 3, 1, ENC_LITTLE_ENDIAN);
4341 break;
4343 case 0x003f: /* Set AFH Host Channel Classification */
4344 proto_tree_add_item(tree, hf_bthci_cmd_ch_classification, tvb, offset, 10, ENC_NA);
4345 offset+=10;
4346 break;
4348 case 0x0008: /* Flush */
4349 case 0x0027: /* Read Automatic Flush Timeout */
4350 case 0x0036: /* Read Link Supervision Timeout */
4351 case 0x0007B: /* Read Authenticated Payload Timeout */
4352 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4353 offset+=2;
4354 break;
4356 case 0x001c: /* Write Page Scan Activity */
4357 case 0x001e: /* Write Inquiry Scan Activity */
4358 item = proto_tree_add_item(tree, hf_bthci_cmd_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4359 proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
4360 offset+=2;
4361 item = proto_tree_add_item(tree, hf_bthci_cmd_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4362 proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
4363 offset+=2;
4364 break;
4367 case 0x0043: /* Write Inquiry Scan Type */
4368 proto_tree_add_item(tree, hf_bthci_cmd_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4369 offset++;
4370 break;
4372 case 0x0045: /* Write Inquiry Mode */
4373 proto_tree_add_item(tree, hf_bthci_cmd_inq_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4374 if (!pinfo->fd->visited && bthci_cmd_data) {
4375 bthci_cmd_data->data.inquiry_mode = tvb_get_uint8(tvb, offset);
4377 offset++;
4378 break;
4380 case 0x0047: /* Write Page Scan Type */
4381 proto_tree_add_item(tree, hf_bthci_cmd_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4382 offset++;
4383 break;
4385 case 0x0049: /* Write AFH Channel Assessment Mode */
4386 proto_tree_add_item(tree, hf_bthci_cmd_afh_ch_assessment_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4387 offset++;
4388 break;
4390 case 0x0052: /* Write Extended Inquiry Response */
4392 bluetooth_eir_ad_data_t *eir_data;
4394 eir_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
4395 eir_data->interface_id = bluetooth_data->interface_id;
4396 eir_data->adapter_id = bluetooth_data->adapter_id;
4397 eir_data->bd_addr = NULL;
4399 proto_tree_add_item(tree, hf_bthci_cmd_fec_required, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4400 offset++;
4402 call_dissector_with_data(btcommon_eir_handle, tvb_new_subset_length(tvb, offset, 240), pinfo, tree, eir_data);
4403 save_local_device_name_from_eir_ad(tvb, offset, pinfo, 240, bluetooth_data);
4404 offset += 240;
4407 break;
4409 case 0x0053: /* Refresh Encryption Key */
4410 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4411 offset+=2;
4412 break;
4414 case 0x0056: /* Write Simple Pairing Mode */
4415 proto_tree_add_item(tree, hf_bthci_cmd_simple_pairing_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4416 if (!pinfo->fd->visited && bthci_cmd_data) {
4417 bthci_cmd_data->data.simple_pairing_mode = tvb_get_uint8(tvb, offset);
4419 offset++;
4420 break;
4422 case 0x0059: /* Write Inquiry Tx Response Power Level */
4423 proto_tree_add_item(tree, hf_bthci_cmd_tx_power, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4424 offset++;
4425 break;
4427 case 0x005b: /* Write Default Erroneous Data Reporting */
4428 proto_tree_add_item(tree, hf_bthci_cmd_err_data_reporting, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4429 offset++;
4430 break;
4432 case 0x005f: /* Enhanced Flush */
4433 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4434 offset+=2;
4435 proto_tree_add_item(tree, hf_bthci_cmd_flush_packet_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4436 offset++;
4437 break;
4439 case 0x0060: /* Send Keypress Notification */
4440 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
4442 proto_tree_add_item(tree, hf_bthci_cmd_notification_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4443 offset++;
4444 break;
4446 case 0x0062: /* Write Logical Link Accept Timeout */
4447 proto_tree_add_item(tree, hf_bthci_cmd_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4448 offset+=2;
4449 break;
4451 case 0x0063: /* Set Event Mask Page 2 */
4452 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_evt_mask2, ett_event_mask_page_2, hfx_bthci_cmd_event_mask_page_2, ENC_LITTLE_ENDIAN);
4453 offset += 8;
4454 break;
4456 case 0x0065: /* Write Location Data */
4457 proto_tree_add_item(tree, hf_bthci_cmd_location_domain_aware, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4458 offset++;
4459 proto_tree_add_item(tree, hf_bthci_cmd_location_domain, tvb, offset, 2, ENC_ASCII | ENC_NA);
4460 offset+=2;
4461 proto_tree_add_item(tree, hf_bthci_cmd_location_domain_options, tvb, offset, 1, ENC_ASCII | ENC_NA);
4462 offset++;
4463 proto_tree_add_item(tree, hf_bthci_cmd_location_options, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4464 offset++;
4465 break;
4467 case 0x0067: /* Write Flow Control Mode */
4468 proto_tree_add_item(tree, hf_bthci_cmd_flow_control_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4469 offset++;
4470 break;
4472 case 0x0068: /* Read Enhanced Tx Power Level */
4473 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4474 offset+=2;
4475 proto_tree_add_item(tree, hf_bthci_cmd_tx_power_level_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4476 offset++;
4477 break;
4479 case 0x0069: /* Read Best Effort Flush Timeout */
4480 proto_tree_add_item(tree, hf_bthci_cmd_logical_link_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4481 offset+=2;
4482 break;
4484 case 0x006a: /* Write Best Effort Flush Timeout */
4485 proto_tree_add_item(tree, hf_bthci_cmd_logical_link_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4486 offset+=2;
4487 proto_tree_add_item(tree, hf_bthci_cmd_flush_to_us, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4488 offset+=4;
4489 break;
4491 case 0x006b: /* Short Range Mode */
4492 proto_tree_add_item(tree, hf_bthci_cmd_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4493 offset++;
4494 proto_tree_add_item(tree, hf_bthci_cmd_short_range_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4495 offset++;
4496 break;
4498 case 0x006d: /* Write LE Host Supported */
4499 proto_tree_add_item(tree, hf_bthci_cmd_le_supported_host, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4500 offset++;
4501 proto_tree_add_item(tree, hf_bthci_cmd_le_simultaneous_host, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4502 offset++;
4503 break;
4505 case 0x003: /* Reset */
4506 case 0x009: /* Read PIN Type */
4507 case 0x00B: /* Create New Unit Key */
4508 case 0x014: /* Read Local Name */
4509 case 0x015: /* Read Connection Accept Timeout */
4510 case 0x017: /* Read Page Timeout */
4511 case 0x019: /* Read Scan Enable */
4512 case 0x01B: /* Read Page Scan Activity */
4513 case 0x01D: /* Read Inquiry Scan Activity */
4514 case 0x01F: /* Read Authentication Enable */
4515 case 0x021: /* Read Encryption Mode */
4516 case 0x023: /* Read Class of Device */
4517 case 0x025: /* Read Voice Setting */
4518 case 0x029: /* Read Num Broadcast Retransmissions */
4519 case 0x02B: /* Read Hold Mode Activity */
4520 case 0x02E: /* Read SCO Flow Control Enable */
4521 case 0x038: /* Read Number of Supported IAC */
4522 case 0x039: /* Read Current IAC LAP */
4523 case 0x03B: /* Read Page Scan Period Mode */
4524 case 0x03D: /* Read Page Scan Mode */
4525 case 0x042: /* Read Inquiry Scan Type */
4526 case 0x044: /* Read Inquiry Mode */
4527 case 0x046: /* Read Page Scan Type */
4528 case 0x048: /* Read AFH Channel Assessment Mode */
4529 case 0x051: /* Read Extended Inquiry Response */
4530 case 0x055: /* Read Simple Pairing Mode */
4531 case 0x057: /* Read Local OOB Data */
4532 case 0x058: /* Read Inquiry Response Tx Power Level */
4533 case 0x05A: /* Read Default Erroneous Data Reporting */
4534 case 0x061: /* Read Logical Link Accept Timeout */
4535 case 0x064: /* Read Location Data */
4536 case 0x066: /* Read Flow Control Mode */
4537 case 0x06C: /* Read LE Host Supported */
4538 case 0x077: /* Read Synchronization Train Parameters */
4539 case 0x079: /* Read Secure Connections Host Support */
4540 case 0x07D: /* Read Local OOB Extended Data */
4541 case 0x07E: /* Read Extended Page Timeout */
4542 case 0x080: /* Read Extended Inquiry Length */
4543 /* NOTE: No parameters */
4544 break;
4546 case 0x06E: /* Set MWS Channel Parameters */
4547 proto_tree_add_item(tree, hf_bthci_mws_channel, tvb, offset, 1, ENC_NA);
4548 offset += 1;
4550 proto_tree_add_item(tree, hf_bthci_mws_rx_center_frequency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4551 offset += 2;
4553 proto_tree_add_item(tree, hf_bthci_mws_tx_center_frequency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4554 offset += 2;
4556 proto_tree_add_item(tree, hf_bthci_mws_rx_channel_bandwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4557 offset += 2;
4559 proto_tree_add_item(tree, hf_bthci_mws_tx_channel_bandwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4560 offset += 2;
4562 proto_tree_add_item(tree, hf_bthci_mws_channel_type, tvb, offset, 1, ENC_NA);
4563 offset += 1;
4565 break;
4566 case 0x06F: /* Set External Frame Configuration */
4568 proto_item *sub_item;
4569 proto_tree *sub_tree;
4570 uint32_t number_of_periods;
4571 int i_item = 1;
4573 proto_tree_add_item(tree, hf_bthci_external_frame_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4574 offset += 2;
4576 proto_tree_add_item(tree, hf_bthci_external_frame_sync_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4577 offset += 2;
4579 proto_tree_add_item(tree, hf_bthci_external_frame_sync_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4580 offset += 2;
4582 proto_tree_add_item_ret_uint(tree, hf_bthci_external_frame_number_of_periods, tvb, offset, 1, ENC_NA, &number_of_periods);
4583 offset += 1;
4585 sub_item = proto_tree_add_item(tree, hf_bthci_external_frame_periods, tvb, offset, -1, ENC_NA);
4586 sub_tree = proto_item_add_subtree(sub_item, ett_periods);
4588 while (number_of_periods--) {
4589 proto_item *entry_item;
4590 proto_tree *entry_tree;
4592 entry_item = proto_tree_add_item(sub_tree, hf_bthci_external_frame_period, tvb, offset, 3, ENC_LITTLE_ENDIAN);
4593 entry_tree = proto_item_add_subtree(entry_item, ett_period);
4594 proto_item_append_text(entry_item, " #%u", i_item);
4596 proto_tree_add_item(entry_tree, hf_bthci_external_frame_period_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4597 offset += 2;
4599 proto_tree_add_item(entry_tree, hf_bthci_external_frame_period_type, tvb, offset, 1, ENC_NA);
4600 offset += 1;
4602 i_item += 1;
4606 break;
4607 case 0x070: /* Set MWS Signaling */
4608 proto_tree_add_item(tree, hf_bthci_mws_rx_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4609 offset += 2;
4611 proto_tree_add_item(tree, hf_bthci_mws_rx_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4612 offset += 2;
4614 proto_tree_add_item(tree, hf_bthci_mws_rx_deassert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4615 offset += 2;
4617 proto_tree_add_item(tree, hf_bthci_mws_rx_deassert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4618 offset += 2;
4621 proto_tree_add_item(tree, hf_bthci_mws_tx_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4622 offset += 2;
4624 proto_tree_add_item(tree, hf_bthci_mws_tx_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4625 offset += 2;
4627 proto_tree_add_item(tree, hf_bthci_mws_tx_deassert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4628 offset += 2;
4630 proto_tree_add_item(tree, hf_bthci_mws_tx_deassert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4631 offset += 2;
4634 proto_tree_add_item(tree, hf_bthci_mws_pattern_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4635 offset += 2;
4637 proto_tree_add_item(tree, hf_bthci_mws_pattern_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4638 offset += 2;
4641 proto_tree_add_item(tree, hf_bthci_mws_inactivity_duration_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4642 offset += 2;
4644 proto_tree_add_item(tree, hf_bthci_mws_inactivity_duration_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4645 offset += 2;
4648 proto_tree_add_item(tree, hf_bthci_mws_scan_frequency_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4649 offset += 2;
4651 proto_tree_add_item(tree, hf_bthci_mws_scan_frequency_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4652 offset += 2;
4655 proto_tree_add_item(tree, hf_bthci_mws_priority_assert_offset_request, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4656 offset += 2;
4658 break;
4659 case 0x071: /* Set MWS Transport Layer */
4660 proto_tree_add_item(tree, hf_bthci_mws_transport_layer, tvb, offset, 1, ENC_NA);
4661 offset += 1;
4663 proto_tree_add_item(tree, hf_bthci_mws_to_baud_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4664 offset += 4;
4666 proto_tree_add_item(tree, hf_bthci_mws_from_baud_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4667 offset += 4;
4669 break;
4670 case 0x072: /* Set MWS Scan Frequency Table */
4672 proto_item *sub_item;
4673 proto_tree *sub_tree;
4674 uint32_t number_of_frequencies;
4675 int i_item = 1;
4677 proto_tree_add_item_ret_uint(tree, hf_bthci_mws_number_of_frequencies, tvb, offset, 1, ENC_NA, &number_of_frequencies);
4678 offset += 1;
4680 sub_item = proto_tree_add_item(tree, hf_bthci_mws_scan_frequency_table, tvb, offset, -1, ENC_NA);
4681 sub_tree = proto_item_add_subtree(sub_item, ett_table);
4683 while (number_of_frequencies--) {
4684 proto_item *entry_item;
4685 proto_tree *entry_tree;
4687 entry_item = proto_tree_add_item(sub_tree, hf_bthci_mws_scan_frequency_table_item, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4688 entry_tree = proto_item_add_subtree(entry_item, ett_table_item);
4689 proto_item_append_text(entry_item, " #%u", i_item);
4691 proto_tree_add_item(entry_tree, hf_bthci_mws_scan_frequency_table_item_low, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4692 offset += 2;
4694 proto_tree_add_item(entry_tree, hf_bthci_mws_scan_frequency_table_item_high, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4695 offset += 2;
4697 i_item += 1;
4701 break;
4702 case 0x073: /* Set MWS Pattern Configuration */
4704 proto_item *sub_item;
4705 proto_tree *sub_tree;
4706 uint32_t number_of_intervals;
4707 int i_item = 1;
4709 proto_tree_add_item(tree, hf_bthci_mws_pattern_index, tvb, offset, 1, ENC_NA);
4710 offset += 1;
4712 proto_tree_add_item_ret_uint(tree, hf_bthci_mws_pattern_number_of_intervals, tvb, offset, 1, ENC_NA, &number_of_intervals);
4713 offset += 1;
4715 sub_item = proto_tree_add_item(tree, hf_bthci_mws_patterns, tvb, offset, -1, ENC_NA);
4716 sub_tree = proto_item_add_subtree(sub_item, ett_patterns);
4718 while (number_of_intervals--) {
4719 proto_item *entry_item;
4720 proto_tree *entry_tree;
4722 entry_item = proto_tree_add_item(sub_tree, hf_bthci_mws_pattern, tvb, offset, 3, ENC_LITTLE_ENDIAN);
4723 entry_tree = proto_item_add_subtree(entry_item, ett_pattern);
4724 proto_item_append_text(entry_item, " #%u", i_item);
4726 proto_tree_add_item(entry_tree, hf_bthci_mws_pattern_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4727 offset += 2;
4729 proto_tree_add_item(entry_tree, hf_bthci_mws_pattern_type, tvb, offset, 1, ENC_NA);
4730 offset += 1;
4732 i_item += 1;
4737 break;
4738 case 0x074: /* Set Reserved LT_ADDR */
4739 case 0x075: /* Delete Reserved LT_ADDR */
4740 proto_tree_add_item(tree, hf_bthci_cmd_lt_addr, tvb, offset, 1, ENC_NA);
4741 offset += 1;
4743 break;
4744 case 0x076: /* Set Connectionless Peripheral Broadcast Data */
4746 uint32_t data_length;
4748 proto_tree_add_item(tree, hf_bthci_cmd_lt_addr, tvb, offset, 1, ENC_NA);
4749 offset += 1;
4751 proto_tree_add_item(tree, hf_bthci_cmd_cpb_fragment, tvb, offset, 1, ENC_NA);
4752 offset += 1;
4754 proto_tree_add_item_ret_uint(tree, hf_bthci_cmd_cpb_data_length, tvb, offset, 1, ENC_NA, &data_length);
4755 offset += 1;
4757 proto_tree_add_item(tree, hf_bthci_cmd_cpb_data, tvb, offset, data_length, ENC_NA);
4758 offset += data_length;
4761 break;
4762 case 0x078: /* Write Synchronization Train Parameters */
4763 proto_tree_add_item(tree, hf_bthci_cmd_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4764 offset += 2;
4766 proto_tree_add_item(tree, hf_bthci_cmd_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4767 offset += 2;
4769 proto_tree_add_item(tree, hf_bthci_cmd_sync_train_to, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4770 offset += 4;
4772 proto_tree_add_item(tree, hf_bthci_cmd_service_data, tvb, offset, 1, ENC_NA);
4773 offset += 1;
4775 break;
4776 case 0x07A: /* Write Secure Connections Host Support */
4777 proto_tree_add_item(tree, hf_bthci_cmd_secure_connection_host_support, tvb, offset, 1, ENC_NA);
4778 offset += 1;
4780 break;
4781 case 0x07C: /* Write Authenticated Payload Timeout */
4782 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4783 offset += 2;
4785 proto_tree_add_item(tree, hf_bthci_cmd_authenticated_payload_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4786 offset += 2;
4788 break;
4789 case 0x07F: /* Write Extended Page Timeout */
4790 proto_tree_add_item(tree, hf_bthci_cmd_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4791 offset += 2;
4793 break;
4794 case 0x081: /* Write Extended Inquiry Length */
4795 proto_tree_add_item(tree, hf_bthci_cmd_extended_inquiry_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4796 offset += 2;
4798 break;
4799 case 0x082: /* Set Ecosystem Base Interval */
4801 uint16_t interval = tvb_get_letohs(tvb, offset);
4802 item = proto_tree_add_item(tree, hf_bthci_cmd_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4803 if (interval) {
4804 proto_item_append_text(item, " (%g msec)", interval * 1.25);
4805 } else {
4806 proto_item_append_text(item, " (Ignore Any Previous Hint)");
4808 offset += 2;
4811 break;
4812 case 0x083: /* Configure Data Path */
4814 uint8_t codec_length;
4815 proto_tree_add_item(tree, hf_bthci_cmd_data_path_direction, tvb, offset, 1, ENC_NA);
4816 offset += 1;
4817 proto_tree_add_item(tree, hf_bthci_cmd_data_path_id, tvb, offset, 1, ENC_NA);
4818 offset += 1;
4819 codec_length = tvb_get_uint8(tvb, offset);
4820 proto_tree_add_item(tree, hf_bthci_cmd_codec_config_length, tvb, offset, 1, ENC_NA);
4821 offset++;
4822 proto_tree_add_item(tree, hf_bthci_cmd_codec_config, tvb, offset, codec_length, ENC_NA);
4823 offset += codec_length;
4826 break;
4827 case 0x084: /* Set Min Encryption Key Size */
4828 proto_tree_add_item(tree, hf_bthci_cmd_min_encryption_key_size, tvb, offset, 1, ENC_NA);
4829 offset += 1;
4831 break;
4832 default:
4833 proto_tree_add_expert(tree, pinfo, &ei_command_unknown_command, tvb, offset, -1);
4834 offset += tvb_reported_length_remaining(tvb, offset);
4837 return offset;
4840 static int
4841 dissect_informational_parameters_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo,
4842 proto_tree *tree, uint16_t cmd_ocf)
4844 switch (cmd_ocf) {
4846 case 0x0004: /* Read Local Extended Features */
4847 proto_tree_add_item(tree, hf_bthci_cmd_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4848 offset++;
4849 break;
4851 case 0x001: /* Read Local Version Information */
4852 case 0x002: /* Read Local Supported Commands */
4853 case 0x003: /* Read Local Supported Features */
4854 case 0x005: /* Read Buffer Size */
4855 case 0x007: /* Read Country Code */
4856 case 0x009: /* Read BD ADDR */
4857 case 0x00A: /* Read Data Block Size */
4858 case 0x00B: /* Read Local Supported Codecs */
4859 case 0x00C: /* Read Local Simple Pairing Options */
4860 /* NOTE: No parameters */
4861 break;
4863 default:
4864 proto_tree_add_expert(tree, pinfo, &ei_command_unknown_command, tvb, offset, -1);
4865 offset += tvb_reported_length_remaining(tvb, offset);
4868 return offset;
4871 static int
4872 dissect_status_parameters_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo,
4873 proto_tree *tree, uint16_t cmd_ocf)
4875 switch (cmd_ocf) {
4877 case 0x0001: /* Read Failed Contact Counter */
4878 case 0x0002: /* Reset Failed Contact Counter */
4879 case 0x0003: /* Get Link Quality */
4880 case 0x0005: /* Read RSSI */
4881 case 0x0006: /* Read AFH Channel Map */
4882 case 0x0008: /* Read Encryption Key Size */
4883 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4884 offset+=2;
4885 break;
4887 case 0x0007: /* Read Clock */
4888 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4889 offset+=2;
4890 proto_tree_add_item(tree, hf_bthci_cmd_which_clock, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4891 offset++;
4892 break;
4894 case 0x0009: /* Read Local AMP Info */
4895 break;
4897 case 0x000a: /* Read Local AMP Assoc */
4898 proto_tree_add_item(tree, hf_bthci_cmd_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4899 offset++;
4900 proto_tree_add_item(tree, hf_bthci_cmd_length_so_far, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4901 offset+=2;
4902 proto_tree_add_item(tree, hf_bthci_cmd_amp_assoc_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4903 offset+=2;
4904 break;
4906 case 0x000b: /* Write Remote AMP Assoc */
4907 proto_tree_add_item(tree, hf_bthci_cmd_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4908 offset++;
4909 proto_tree_add_item(tree, hf_bthci_cmd_length_so_far, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4910 offset+=2;
4911 proto_tree_add_item(tree, hf_bthci_cmd_amp_remaining_assoc_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4912 offset+=2;
4913 proto_tree_add_item(tree, hf_bthci_cmd_amp_assoc_fragment, tvb, offset, -1, ENC_NA);
4914 offset+=tvb_reported_length_remaining(tvb, offset);
4915 break;
4918 case 0x000C: /* Get MWS Transport Layer Configuration */
4919 /* NOTE: No parameters */
4920 break;
4922 case 0x000D: /* Set Triggered Clock Capture */
4923 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4924 offset += 2;
4926 proto_tree_add_item(tree, hf_bthci_cmd_triggered_clock_capture, tvb, offset, 1, ENC_NA);
4927 offset += 1;
4929 proto_tree_add_item(tree, hf_bthci_cmd_which_clock, tvb, offset, 1, ENC_NA);
4930 offset += 1;
4932 proto_tree_add_item(tree, hf_bthci_cmd_lpo_allowed, tvb, offset, 1, ENC_NA);
4933 offset += 1;
4935 proto_tree_add_item(tree, hf_bthci_cmd_number_of_clock_captures_to_filter, tvb, offset, 1, ENC_NA);
4936 offset += 1;
4937 break;
4939 default:
4940 proto_tree_add_expert(tree, pinfo, &ei_command_unknown_command, tvb, offset, -1);
4941 offset += tvb_reported_length_remaining(tvb, offset);
4944 return offset;
4947 static int
4948 dissect_testing_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, uint16_t cmd_ocf)
4950 switch (cmd_ocf) {
4952 case 0x0002: /* Write Loopback Mode */
4953 proto_tree_add_item(tree, hf_bthci_cmd_loopback_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4954 offset++;
4955 break;
4957 case 0x0004: /* Write Simple Pairing Debug Mode */
4958 proto_tree_add_item(tree, hf_bthci_cmd_simple_pairing_debug_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4959 offset++;
4960 break;
4962 case 0x0007: /* Enable AMP Receiver Reports */
4963 proto_tree_add_item(tree, hf_bthci_cmd_enable_amp_recv_reports, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4964 offset++;
4965 proto_tree_add_item(tree, hf_bthci_cmd_amp_recv_report_interval, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4966 offset++;
4967 break;
4969 case 0x001: /* Read Loopback Mode */
4970 case 0x003: /* Enable Device Under Test Mode */
4971 case 0x008: /* AMP Test End */
4972 /* NOTE: No parameters */
4973 break;
4975 case 0x009: /* AMP Test */
4976 proto_tree_add_item(tree, hf_bthci_cmd_amp_controller_type, tvb, offset, 1, ENC_NA);
4977 offset += 1;
4979 break;
4980 case 0x00A: /* Write Secure Connections Test Mode */
4981 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4982 offset += 2;
4984 proto_tree_add_item(tree, hf_bthci_cmd_dm1_acl_u_mode, tvb, offset, 1, ENC_NA);
4985 offset += 1;
4987 proto_tree_add_item(tree, hf_bthci_cmd_esco_loopback_mode, tvb, offset, 1, ENC_NA);
4988 offset += 1;
4990 break;
4991 default:
4992 proto_tree_add_expert(tree, pinfo, &ei_command_unknown_command, tvb, offset, -1);
4993 offset += tvb_reported_length_remaining(tvb, offset);
4996 return offset;
4999 static int
5000 dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, uint16_t cmd_ocf, bluetooth_data_t *bluetooth_data)
5002 proto_item *item;
5003 proto_item *sub_item;
5004 proto_tree *sub_tree;
5006 switch(cmd_ocf) {
5008 case 0x0001: /* LE Set Event Mask */
5009 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_event_mask, ett_le_event_mask, hfx_bthci_cmd_le_event_mask, ENC_LITTLE_ENDIAN);
5010 offset += 8;
5011 break;
5013 case 0x0005: /* LE Set Random Address */
5014 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5015 break;
5017 case 0x0006: /* LE Set Advertising Parameters */
5018 item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5019 proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
5020 offset+=2;
5021 item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5022 proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
5023 offset+=2;
5024 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5025 offset++;
5026 proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5027 offset++;
5028 proto_tree_add_item(tree, hf_bthci_cmd_le_direct_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5029 offset++;
5030 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5031 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_1, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5032 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5033 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_3, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5034 offset++;
5035 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_filter_policy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5036 offset++;
5037 break;
5039 case 0x0008: /* LE Set Advertising Data */
5040 case 0x0009: /* LE Set Scan Response Data */
5042 bluetooth_eir_ad_data_t *ad_data;
5044 ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
5045 ad_data->interface_id = bluetooth_data->interface_id;
5046 ad_data->adapter_id = bluetooth_data->adapter_id;
5047 ad_data->bd_addr = NULL;
5049 proto_tree_add_item(tree, hf_bthci_cmd_le_data_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5050 offset++;
5052 call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, 31), pinfo, tree, ad_data);
5053 save_local_device_name_from_eir_ad(tvb, offset, pinfo, 31, bluetooth_data);
5054 offset += 31;
5057 break;
5059 case 0x000a: /* LE Set Advertise Enable */
5060 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5061 offset++;
5062 break;
5064 case 0x000b: /* LE Set Scan Parameters */
5065 proto_tree_add_item(tree, hf_bthci_cmd_le_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5066 offset++;
5067 proto_tree_add_item(tree, hf_bthci_cmd_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5068 offset+=2;
5069 proto_tree_add_item(tree, hf_bthci_cmd_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5070 offset+=2;
5071 proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5072 offset++;
5073 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_scan_filter_policy, ett_filter_policy, hfx_bthci_cmd_scan_filter_policy, ENC_NA);
5074 offset++;
5075 break;
5077 case 0x000c: /* LE Set Scan Enable */
5078 proto_tree_add_item(tree, hf_bthci_cmd_le_scan_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5079 offset++;
5080 proto_tree_add_item(tree, hf_bthci_cmd_le_filter_duplicates, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5081 offset++;
5082 break;
5084 case 0x000d: /* LE Create Connection */
5085 proto_tree_add_item(tree, hf_bthci_cmd_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5086 offset+=2;
5087 proto_tree_add_item(tree, hf_bthci_cmd_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5088 offset+=2;
5089 proto_tree_add_item(tree, hf_bthci_cmd_le_initiator_filter_policy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5090 offset++;
5091 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5092 offset++;
5093 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5094 proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5095 offset++;
5096 proto_tree_add_item(tree, hf_bthci_cmd_le_con_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5097 offset+=2;
5098 proto_tree_add_item(tree, hf_bthci_cmd_le_con_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5099 offset+=2;
5100 item = proto_tree_add_item(tree, hf_bthci_cmd_le_con_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5101 proto_item_append_text(item, " (number events)");
5102 offset+=2;
5103 proto_tree_add_item(tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5104 offset+=2;
5105 proto_tree_add_item(tree, hf_bthci_cmd_le_min_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5106 offset+=2;
5107 proto_tree_add_item(tree, hf_bthci_cmd_le_max_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5108 offset+=2;
5109 break;
5111 case 0x0011: /* LE Add Device To Filter Accept List */
5112 case 0x0012: /* LE Remove Device From Filter Accept List */
5113 proto_tree_add_item(tree, hf_bthci_cmd_le_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5114 offset++;
5115 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5116 break;
5118 case 0x0013: /* LE Connection Update */
5119 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5120 offset+=2;
5121 proto_tree_add_item(tree, hf_bthci_cmd_le_con_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5122 offset+=2;
5123 proto_tree_add_item(tree, hf_bthci_cmd_le_con_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5124 offset+=2;
5125 item = proto_tree_add_item(tree, hf_bthci_cmd_le_con_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5126 proto_item_append_text(item, " (number events)");
5127 offset+=2;
5128 proto_tree_add_item(tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5129 offset+=2;
5130 proto_tree_add_item(tree, hf_bthci_cmd_le_min_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5131 offset+=2;
5132 proto_tree_add_item(tree, hf_bthci_cmd_le_max_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5133 offset+=2;
5134 break;
5136 case 0x0014: /* LE Set Host Channel Classification */
5137 sub_item = proto_tree_add_item(tree, hf_bthci_cmd_le_channel_map, tvb, offset, 5, ENC_NA);
5138 sub_tree = proto_item_add_subtree(sub_item, ett_le_channel_map);
5140 call_dissector(btcommon_le_channel_map_handle, tvb_new_subset_length(tvb, offset, 5), pinfo, sub_tree);
5141 offset += 5;
5143 break;
5145 case 0x0015: /* LE Read Channel Map */
5146 case 0x0016: /* LE Read Remote Features */
5147 case 0x001b: /* LE Long Term Key Request Negative Reply */
5148 case 0x0030: /* LE Read PHY */
5149 case 0x006D: /* LE Request Peer SCA */
5150 case 0x008A: /* LE CS Read Remote Supported Capabilities */
5151 case 0x008C: /* LE CS Security Enable */
5152 case 0x008E: /* LE CS Read Remote FAE Table */
5153 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5154 offset+=2;
5155 break;
5157 case 0x0017: /* LE Encrypt */
5158 proto_tree_add_item(tree, hf_bthci_cmd_key, tvb, offset, 16, ENC_NA);
5159 offset+=16;
5160 proto_tree_add_item(tree, hf_bthci_cmd_plaintext_data, tvb, offset, 16, ENC_NA);
5161 offset+=16;
5162 break;
5164 case 0x0019: /* LE Enable Encryption */
5165 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5166 offset+=2;
5167 proto_tree_add_item(tree, hf_bthci_cmd_random_number, tvb, offset, 8, ENC_NA);
5168 offset+=8;
5169 proto_tree_add_item(tree, hf_bthci_cmd_encrypted_diversifier, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5170 offset+=2;
5171 proto_tree_add_item(tree, hf_bthci_cmd_le_long_term_key, tvb, offset, 16, ENC_NA);
5172 offset+=16;
5173 break;
5175 case 0x001a: /* LE Long Term Key Request Reply */
5176 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5177 offset+=2;
5178 proto_tree_add_item(tree, hf_bthci_cmd_le_long_term_key, tvb, offset, 16, ENC_NA);
5179 offset+=16;
5180 break;
5182 case 0x001d: /* LE Receiver Test [v1] */
5183 case 0x0033: /* LE Receiver Test [v2] */
5184 case 0x004f: /* LE Receiver Test [v3] */
5185 item = proto_tree_add_item(tree, hf_bthci_cmd_rx_frequency, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5186 proto_item_append_text(item, " (%d MHz)", 2402 + 2*tvb_get_uint8(tvb, offset));
5187 offset++;
5189 if (cmd_ocf >= 0x0033) {
5190 proto_tree_add_item(tree, hf_bthci_cmd_phy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5191 offset++;
5192 proto_tree_add_item(tree, hf_bthci_cmd_modulation_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5193 offset++;
5196 if (cmd_ocf >= 0x004f) {
5197 item = proto_tree_add_item(tree, hf_bthci_cmd_cte_length, tvb, offset, 1, ENC_NA);
5198 proto_item_append_text(item, " (%d usec)", tvb_get_uint8(tvb, offset)*8);
5199 offset++;
5200 proto_tree_add_item(tree, hf_bthci_cmd_cte_type, tvb, offset, 1, ENC_NA);
5201 offset++;
5202 proto_tree_add_item(tree, hf_bthci_cmd_slot_durations, tvb, offset, 1, ENC_NA);
5203 offset++;
5204 offset = dissect_antenna_switching_pattern(tvb, offset, tree);
5206 break;
5208 case 0x001e: /* LE Transmitter Test [v1] */
5209 case 0x0034: /* LE Transmitter Test [v2] */
5210 case 0x0050: /* LE Transmitter Test [v3] */
5211 case 0x007B: /* LE Transmitter Test [v4] */
5212 item = proto_tree_add_item(tree, hf_bthci_cmd_tx_frequency, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5213 proto_item_append_text(item, " (%d MHz)", 2402 + 2*tvb_get_uint8(tvb, offset));
5214 offset++;
5215 proto_tree_add_item(tree, hf_bthci_cmd_test_data_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5216 offset++;
5217 proto_tree_add_item(tree, hf_bthci_cmd_test_packet_payload, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5218 offset++;
5220 if (cmd_ocf >= 0x0034) {
5221 proto_tree_add_item(tree, hf_bthci_cmd_phy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5222 offset++;
5225 if (cmd_ocf >= 0x0050) {
5226 item = proto_tree_add_item(tree, hf_bthci_cmd_cte_length, tvb, offset, 1, ENC_NA);
5227 proto_item_append_text(item, " (%d usec)", tvb_get_uint8(tvb, offset)*8);
5228 offset++;
5229 proto_tree_add_item(tree, hf_bthci_cmd_cte_type, tvb, offset, 1, ENC_NA);
5230 offset++;
5231 offset = dissect_antenna_switching_pattern(tvb, offset, tree);
5234 if (cmd_ocf >= 0x007B) {
5235 proto_tree_add_item(tree, hf_bthci_cmd_tx_power_setting, tvb, offset, 1, ENC_NA);
5236 offset++;
5238 break;
5240 case 0x0020: /*LE Remote Connection Parameter Request Reply */
5241 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5242 offset+=2;
5243 proto_tree_add_item(tree, hf_bthci_cmd_le_con_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5244 offset+=2;
5245 proto_tree_add_item(tree, hf_bthci_cmd_le_con_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5246 offset+=2;
5247 item = proto_tree_add_item(tree, hf_bthci_cmd_le_con_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5248 proto_item_append_text(item, " (number events)");
5249 offset+=2;
5250 proto_tree_add_item(tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5251 offset+=2;
5252 proto_tree_add_item(tree, hf_bthci_cmd_le_min_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5253 offset+=2;
5254 proto_tree_add_item(tree, hf_bthci_cmd_le_max_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5255 offset+=2;
5256 break;
5258 case 0x0021: /* LE Remote Connection Parameter Request Negative Reply */
5259 case 0x0067: /* LE Reject CIS Request */
5260 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5261 offset+=2;
5262 proto_tree_add_item(tree, hf_bthci_cmd_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5263 offset++;
5264 break;
5266 case 0x0022: /* LE Set Data Length */
5267 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5268 offset+=2;
5269 proto_tree_add_item(tree, hf_bthci_cmd_le_tx_octets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5270 offset+=2;
5271 proto_tree_add_item(tree, hf_bthci_cmd_le_tx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5272 offset+=2;
5273 break;
5275 case 0x0024: /* LE Write Suggested Default Data Length */
5276 proto_tree_add_item(tree, hf_bthci_cmd_le_suggested_max_tx_octets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5277 offset+=2;
5278 proto_tree_add_item(tree, hf_bthci_cmd_le_suggested_max_tx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5279 offset+=2;
5280 break;
5282 case 0x0026: /* LE Generate DHKey [v1] */
5283 proto_tree_add_item(tree, hf_bthci_cmd_le_remote_p_256_public_key, tvb, offset, 64, ENC_NA);
5284 offset+=64;
5285 break;
5287 case 0x0027: /* LE Add Device to Resolving List */
5288 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_identity_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5289 offset++;
5290 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5291 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_irk, tvb, offset, 16, ENC_NA);
5292 offset+=16;
5293 proto_tree_add_item(tree, hf_bthci_cmd_le_local_irk, tvb, offset, 16, ENC_NA);
5294 offset+=16;
5295 break;
5297 case 0x0028: /* LE Remove Device From Resolving List */
5298 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_identity_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5299 offset++;
5300 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5301 break;
5303 case 0x002B: /* LE Read Peer Resolvable Address */
5304 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_identity_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5305 offset++;
5306 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5307 break;
5309 case 0x002C: /* LE Read Local Resolvable Address" */
5310 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_identity_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5311 offset++;
5312 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5313 break;
5315 case 0x002D: /* Set Address Resolution Enable */
5316 proto_tree_add_item(tree, hf_bthci_cmd_le_address_resolution_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5317 offset++;
5318 break;
5320 case 0x002E: /* LE Set Resolvable Private Address Timeout */
5321 proto_tree_add_item(tree, hf_bthci_cmd_le_rpa_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5322 offset+=2;
5323 break;
5325 case 0x0031: /* LE Set Default PHY */
5326 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_all_phys, ett_phys_flags, hfx_btcmd_all_phys, ENC_NA);
5327 offset += 1;
5328 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_tx_phys, ett_phys_flags, hfx_btcmd_phys_pref, ENC_NA);
5329 offset+=1;
5330 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_rx_phys, ett_phys_flags, hfx_btcmd_phys_pref, ENC_NA);
5331 offset+=1;
5332 break;
5334 case 0x0032: /* LE Set PHY */
5335 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5336 offset+=2;
5337 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_all_phys, ett_phys_flags, hfx_btcmd_all_phys, ENC_NA);
5338 offset += 1;
5339 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_tx_phys, ett_phys_flags, hfx_btcmd_phys_pref, ENC_NA);
5340 offset+=1;
5341 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_rx_phys, ett_phys_flags, hfx_btcmd_phys_pref, ENC_NA);
5342 offset+=1;
5343 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_phy_options, ett_phys_flags, hfx_btcmd_phy_options, ENC_LITTLE_ENDIAN);
5344 offset+=2;
5345 break;
5347 case 0x0035: /* LE Set Advertising Set Random Address */
5348 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5349 offset+=1;
5350 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5351 break;
5353 case 0x0036: /* LE Set Extended Advertising Parameters [v1] */
5354 case 0x007F: /* LE Set Extended Advertising Parameters [v2] */
5355 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5356 offset+=1;
5357 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_advertising_properties, ett_adv_properties, hfx_bthci_cmd_adv_properties, ENC_LITTLE_ENDIAN);
5358 offset+=2;
5359 proto_tree_add_item(tree, hf_bthci_cmd_advertising_ext_interval_min, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5360 offset+=3;
5361 proto_tree_add_item(tree, hf_bthci_cmd_advertising_ext_interval_max, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5362 offset+=3;
5363 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_1, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5364 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5365 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_3, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5366 offset++;
5367 proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5368 offset++;
5369 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5370 offset++;
5371 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5372 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_filter_policy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5373 offset++;
5374 proto_tree_add_item(tree, hf_bthci_cmd_tx_power, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5375 offset++;
5376 proto_tree_add_item(tree, hf_bthci_cmd_primary_advertising_phy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5377 offset++;
5378 proto_tree_add_item(tree, hf_bthci_cmd_sec_adv_max_skip, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5379 offset++;
5380 proto_tree_add_item(tree, hf_bthci_cmd_secondary_advertising_phy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5381 offset++;
5382 proto_tree_add_item(tree, hf_bthci_cmd_advertising_sid, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5383 offset++;
5384 proto_tree_add_item(tree, hf_bthci_cmd_scan_req_notif_en, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5385 offset++;
5386 if (cmd_ocf == 0x007F) {
5387 proto_tree_add_item(tree, hf_bthci_cmd_primary_adv_phy_options, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5388 offset++;
5389 proto_tree_add_item(tree, hf_bthci_cmd_secondary_adv_phy_options, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5390 offset++;
5392 break;
5394 case 0x0037: /* LE Set Extended Advertising Data */
5395 case 0x0038: /* LE Set Extended Scan Response Data */
5397 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5398 offset+=1;
5399 proto_tree_add_item(tree, hf_bthci_cmd_le_adv_data_operation, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5400 offset+=1;
5401 proto_tree_add_item(tree, hf_bthci_cmd_le_adv_data_frag_pref, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5402 offset+=1;
5404 bluetooth_eir_ad_data_t *ad_data;
5405 ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
5406 ad_data->interface_id = bluetooth_data->interface_id;
5407 ad_data->adapter_id = bluetooth_data->adapter_id;
5408 ad_data->bd_addr = NULL;
5410 uint8_t data_length = tvb_get_uint8(tvb, offset);
5411 proto_tree_add_item(tree, hf_bthci_cmd_le_data_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5412 offset++;
5413 call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, data_length), pinfo, tree, ad_data);
5414 save_local_device_name_from_eir_ad(tvb, offset, pinfo, data_length, bluetooth_data);
5415 offset += data_length;
5417 break;
5419 case 0x0039: /* LE Set Extended Advertising Enable */
5421 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5422 offset++;
5424 uint8_t number_of_sets = tvb_get_uint8(tvb, offset);
5425 proto_tree_add_item(tree, hf_bthci_cmd_le_adv_en_sets, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5426 offset++;
5428 for (int i = 0; i< number_of_sets; i++) {
5429 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_le_adv_set, tvb, offset, 4, "Set, Handle: %u", tvb_get_uint8(tvb, offset));
5430 sub_tree = proto_item_add_subtree(sub_item, ett_adv_sets);
5431 proto_tree_add_item(sub_tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5432 offset+=1;
5433 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_adv_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5434 offset+=2;
5435 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_adv_max_extended_events, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5436 offset+=1;
5439 break;
5441 case 0x003C: /* LE Remove Advertising Set */
5442 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5443 offset+=1;
5444 break;
5446 case 0x003E: /* LE Set Periodic Advertising Parameters [v1] */
5447 case 0x0086: /* LE Set Periodic Advertising Parameters [v2] */
5448 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5449 offset+=1;
5450 item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5451 proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*1.25);
5452 offset+=2;
5453 item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5454 proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*1.25);
5455 offset+=2;
5456 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_periodic_advertising_properties, ett_adv_properties,
5457 hfx_bthci_cmd_periodic_adv_properties, ENC_LITTLE_ENDIAN);
5458 offset+=2;
5459 if (cmd_ocf == 0x0086) {
5460 proto_tree_add_item(tree, hf_bthci_cmd_num_subevents, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5461 offset+=1;
5462 proto_tree_add_item(tree, hf_bthci_cmd_subevent_interval, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5463 offset+=1;
5464 proto_tree_add_item(tree, hf_bthci_cmd_response_slot_delay, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5465 offset+=1;
5466 proto_tree_add_item(tree, hf_bthci_cmd_response_slot_spacing, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5467 offset+=1;
5468 proto_tree_add_item(tree, hf_bthci_cmd_num_response_slots, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5469 offset+=1;
5471 break;
5473 case 0x003F: /* LE Set Periodic Advertising Data */
5475 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5476 offset+=1;
5477 proto_tree_add_item(tree, hf_bthci_cmd_le_adv_data_operation, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5478 offset+=1;
5480 bluetooth_eir_ad_data_t *ad_data;
5481 ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
5482 ad_data->interface_id = bluetooth_data->interface_id;
5483 ad_data->adapter_id = bluetooth_data->adapter_id;
5484 ad_data->bd_addr = NULL;
5486 uint8_t data_length = tvb_get_uint8(tvb, offset);
5487 proto_tree_add_item(tree, hf_bthci_cmd_le_data_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5488 offset++;
5489 call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, data_length), pinfo, tree, ad_data);
5490 save_local_device_name_from_eir_ad(tvb, offset, pinfo, data_length, bluetooth_data);
5491 offset += data_length;
5493 break;
5495 case 0x0040: /* LE Set Periodic Advertising Enable */
5496 proto_tree_add_item(tree, hf_bthci_cmd_le_advts_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5497 offset++;
5498 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5499 offset+=1;
5500 break;
5502 case 0x0041: /* LE Set Extended Scan Parameters */
5504 uint8_t scanning_phys, phy = 0;
5505 proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5506 offset++;
5507 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_scan_filter_policy, ett_filter_policy, hfx_bthci_cmd_scan_filter_policy, ENC_NA);
5508 offset++;
5509 scanning_phys = tvb_get_uint8(tvb, offset);
5510 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_scan_phys, ett_phy_param, hfx_btcmd_le_scan_phys, ENC_NA);
5511 offset += 1;
5512 for (int i = 1; i < 0x08; i <<=1) {
5513 phy++;
5514 if (scanning_phys & i) {
5515 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_le_scan_phy_param, tvb, offset, 5, "Scanning PHY: %s",
5516 val_to_str_const(phy, cmd_le_phy_vals, "Unknown"));
5517 sub_tree = proto_item_add_subtree(sub_item, ett_phy_param);
5518 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5519 offset++;
5520 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5521 offset+=2;
5522 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5523 offset+=2;
5527 break;
5529 case 0x0042: /* LE Set Extended Scan Enable */
5530 proto_tree_add_item(tree, hf_bthci_cmd_le_scan_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5531 offset++;
5532 proto_tree_add_item(tree, hf_bthci_cmd_le_filter_duplicates, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5533 offset++;
5534 item = proto_tree_add_item(tree, hf_bthci_cmd_le_scan_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5535 proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*10.0);
5536 offset+=2;
5537 item = proto_tree_add_item(tree, hf_bthci_cmd_le_scan_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5538 proto_item_append_text(item, " (%g sec)", tvb_get_letohs(tvb, offset)*1.28);
5539 offset+=2;
5540 break;
5542 case 0x0085: /* LE Extended Create Connection [v2] */
5543 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5544 offset+=1;
5545 item = proto_tree_add_item(tree, hf_bthci_cmd_subevent, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5546 if (tvb_get_uint8(tvb, offset) == 0xff) {
5547 proto_item_append_text(item, " (not used)");
5549 offset+=1;
5550 /* FALLTHROUGH */
5552 case 0x0043: /* LE Extended Create Connection [v1] */
5554 uint8_t initiating_phys, phy = 0;
5555 proto_tree_add_item(tree, hf_bthci_cmd_le_initiator_filter_policy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5556 offset++;
5557 proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5558 offset++;
5559 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5560 offset++;
5561 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5562 initiating_phys = tvb_get_uint8(tvb, offset);
5563 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_phys, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
5564 offset += 1;
5565 for (int i = 1; i < 0x08; i <<=1) {
5566 phy++;
5567 if (initiating_phys & i) {
5568 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_le_init_phy_param, tvb, offset, 16, "Initiating PHY: %s",
5569 val_to_str_const(phy, cmd_le_phy_vals, "Unknown"));
5570 sub_tree = proto_item_add_subtree(sub_item, ett_phy_param);
5571 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5572 offset+=2;
5573 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5574 offset+=2;
5575 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_con_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5576 offset+=2;
5577 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_con_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5578 offset+=2;
5579 item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_con_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5580 proto_item_append_text(item, " (number events)");
5581 offset+=2;
5582 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5583 offset+=2;
5584 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_min_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5585 offset+=2;
5586 proto_tree_add_item(sub_tree, hf_bthci_cmd_le_max_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5587 offset+=2;
5591 break;
5593 case 0x0044: /* LE Periodic Advertising Create Sync */
5594 proto_tree_add_item(tree, hf_bthci_cmd_sync_filter_policy, tvb, offset, 1, ENC_NA);
5595 offset++;
5596 proto_tree_add_item(tree, hf_bthci_cmd_advertising_sid, tvb, offset, 1, ENC_NA);
5597 offset++;
5598 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_address_type, tvb, offset, 1, ENC_NA);
5599 offset++;
5600 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5601 proto_tree_add_item(tree, hf_bthci_cmd_skip, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5602 offset+=2;
5603 proto_tree_add_item(tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5604 offset+=2;
5605 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_sync_cte_type, ett_sync_cte_type, hfx_btcmd_sync_cte_type, ENC_NA);
5606 offset++;
5607 break;
5609 case 0x0046: /* LE Periodic Advertising Terminate Sync */
5610 proto_tree_add_item(tree, hf_bthci_cmd_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5611 offset+=2;
5612 break;
5614 case 0x0047: /* LE Add Device To Periodic Advertiser List */
5615 case 0x0048: /* LE Remove Device From Periodic Advertiser List */
5616 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_address_type, tvb, offset, 1, ENC_NA);
5617 offset++;
5618 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5619 proto_tree_add_item(tree, hf_bthci_cmd_advertising_sid, tvb, offset, 1, ENC_NA);
5620 offset++;
5621 break;
5623 case 0x004D: /* LE Write RF Path Compensation */
5624 item = proto_tree_add_item(tree, hf_bthci_cmd_rf_tx_path_compensation_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5625 proto_item_append_text(item, " (%g dB)", tvb_get_letohis(tvb, offset)*0.1);
5626 offset+=2;
5627 item = proto_tree_add_item(tree, hf_bthci_cmd_rf_rx_path_compensation_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5628 proto_item_append_text(item, " (%g dB)", tvb_get_letohis(tvb, offset)*0.1);
5629 offset+=2;
5630 break;
5632 case 0x004E: /* LE Set Privacy Mode */
5633 proto_tree_add_item(tree, hf_bthci_cmd_le_peer_identity_address_type, tvb, offset, 1, ENC_NA);
5634 offset++;
5635 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
5636 proto_tree_add_item(tree, hf_bthci_cmd_le_privacy_mode, tvb, offset, 1, ENC_NA);
5637 offset++;
5638 break;
5640 case 0x0051: /* LE Set Connectionless CTE Transmit Parameters */
5641 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
5642 offset++;
5643 item = proto_tree_add_item(tree, hf_bthci_cmd_cte_length, tvb, offset, 1, ENC_NA);
5644 proto_item_append_text(item, " (%d usec)", tvb_get_uint8(tvb, offset)*8);
5645 offset++;
5646 proto_tree_add_item(tree, hf_bthci_cmd_cte_type, tvb, offset, 1, ENC_NA);
5647 offset++;
5648 proto_tree_add_item(tree, hf_bthci_cmd_cte_count, tvb, offset, 1, ENC_NA);
5649 offset++;
5650 offset = dissect_antenna_switching_pattern(tvb, offset, tree);
5651 break;
5653 case 0x0052: /* LE Set Connectionless CTE Transmit Enable */
5654 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
5655 offset++;
5656 proto_tree_add_item(tree, hf_bthci_cmd_cte_enable, tvb, offset, 1, ENC_NA);
5657 offset++;
5658 break;
5660 case 0x0053: /* LE Set Connectionless IQ Sampling Enable */
5661 proto_tree_add_item(tree, hf_bthci_cmd_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5662 offset+=2;
5663 proto_tree_add_item(tree, hf_bthci_cmd_iq_sampling_enable, tvb, offset, 1, ENC_NA);
5664 offset++;
5665 proto_tree_add_item(tree, hf_bthci_cmd_slot_durations, tvb, offset, 1, ENC_NA);
5666 offset++;
5667 item = proto_tree_add_item(tree, hf_bthci_cmd_max_sampled_ctes, tvb, offset, 1, ENC_NA);
5668 if (tvb_get_uint8(tvb, offset) == 0)
5669 proto_item_append_text(item, " (Sample and report all available CTEs)");
5670 offset++;
5671 offset = dissect_antenna_switching_pattern(tvb, offset, tree);
5672 break;
5674 case 0x0054: /* LE Set Connection CTE Receive Parameters */
5675 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5676 offset+=2;
5677 proto_tree_add_item(tree, hf_bthci_cmd_iq_sampling_enable, tvb, offset, 1, ENC_NA);
5678 offset++;
5679 proto_tree_add_item(tree, hf_bthci_cmd_slot_durations, tvb, offset, 1, ENC_NA);
5680 offset++;
5681 offset = dissect_antenna_switching_pattern(tvb, offset, tree);
5682 break;
5684 case 0x0055: /* LE Set Connection CTE Transmit Parameters */
5685 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5686 offset+=2;
5687 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cte_types, ett_sync_cte_type, hfx_btcmd_cte_types, ENC_NA);
5688 offset++;
5689 offset = dissect_antenna_switching_pattern(tvb, offset, tree);
5690 break;
5692 case 0x0056: /* LE Connection CTE Request Enable */
5693 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5694 offset+=2;
5695 proto_tree_add_item(tree, hf_bthci_cmd_cte_enable, tvb, offset, 1, ENC_NA);
5696 offset++;
5697 item = proto_tree_add_item(tree, hf_bthci_cmd_cte_request_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5698 if (tvb_get_letohs(tvb, offset) == 0)
5699 proto_item_append_text(item, " (Initiate once, at earliest opportunity)");
5700 else
5701 proto_item_append_text(item, " (Connection Events)");
5702 offset+=2;
5703 item = proto_tree_add_item(tree, hf_bthci_cmd_cte_length, tvb, offset, 1, ENC_NA);
5704 proto_item_append_text(item, " (%d usec)", tvb_get_uint8(tvb, offset)*8);
5705 offset++;
5706 proto_tree_add_item(tree, hf_bthci_cmd_cte_type, tvb, offset, 1, ENC_NA);
5707 offset++;
5708 break;
5710 case 0x0057: /* LE Connection CTE Response Enable */
5711 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5712 offset+=2;
5713 proto_tree_add_item(tree, hf_bthci_cmd_cte_enable, tvb, offset, 1, ENC_NA);
5714 offset++;
5715 break;
5717 case 0x0059: /* LE Set Periodic Advertising Receive Enable */
5718 proto_tree_add_item(tree, hf_bthci_cmd_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5719 offset+=2;
5720 proto_tree_add_item(tree, hf_bthci_cmd_reporting_enable, tvb, offset, 1, ENC_NA);
5721 offset++;
5722 break;
5724 case 0x005A: /* LE Periodic Advertising Sync Transfer */
5725 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5726 offset+=2;
5727 proto_tree_add_item(tree, hf_bthci_cmd_service_data_past, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5728 offset+=2;
5729 proto_tree_add_item(tree, hf_bthci_cmd_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5730 offset+=2;
5731 break;
5733 case 0x005B: /* LE Periodic Advertising Set Info Transfer */
5734 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5735 offset+=2;
5736 proto_tree_add_item(tree, hf_bthci_cmd_service_data_past, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5737 offset+=2;
5738 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
5739 offset++;
5740 break;
5742 case 0x005C: /* LE Set Periodic Advertising Sync Transfer Parameters */
5743 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5744 offset+=2;
5745 /* FALL THROUGH */
5747 case 0x005D: /* LE Set Default Periodic Advertising Sync Transfer Parameters */
5748 proto_tree_add_item(tree, hf_bthci_cmd_sync_mode, tvb, offset, 1, ENC_NA);
5749 offset++;
5750 proto_tree_add_item(tree, hf_bthci_cmd_skip, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5751 offset+=2;
5752 proto_tree_add_item(tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5753 offset+=2;
5754 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_sync_cte_type, ett_sync_cte_type, hfx_btcmd_sync_cte_type, ENC_NA);
5755 offset++;
5756 break;
5758 case 0x005E: /* LE Generate DHKey [v2] */
5759 proto_tree_add_item(tree, hf_bthci_cmd_le_remote_p_256_public_key, tvb, offset, 64, ENC_NA);
5760 offset+=64;
5761 proto_tree_add_item(tree, hf_bthci_cmd_key_type, tvb, offset, 1, ENC_NA);
5762 offset++;
5763 break;
5765 case 0x005F: /* LE Modify Sleep Clock Accuracy */
5766 proto_tree_add_item(tree, hf_bthci_cmd_sca_action, tvb, offset, 1, ENC_NA);
5767 offset++;
5768 break;
5770 case 0x0061: /* LE Read ISO Tx Sync */
5771 case 0x0072: /* LE ISO Read Test Counters */
5772 case 0x0073: /* LE ISO Test End */
5773 case 0x0075: /* LE Read ISO Link Quality */
5774 proto_tree_add_item(tree, hf_bthci_cmd_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5775 offset+=2;
5776 break;
5778 case 0x0062: /* LE Set CIG Parameters */
5780 uint8_t cis_count;
5781 proto_tree_add_item(tree, hf_bthci_cmd_cig_id, tvb, offset, 1, ENC_NA);
5782 offset++;
5783 proto_tree_add_item(tree, hf_bthci_cmd_sdu_interval_c_to_p, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5784 offset+=3;
5785 proto_tree_add_item(tree, hf_bthci_cmd_sdu_interval_p_to_c, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5786 offset+=3;
5787 proto_tree_add_item(tree, hf_bthci_cmd_peripherals_clock_accuracy, tvb, offset, 1, ENC_NA);
5788 offset++;
5789 proto_tree_add_item(tree, hf_bthci_cmd_packing, tvb, offset, 1, ENC_NA);
5790 offset++;
5791 proto_tree_add_item(tree, hf_bthci_cmd_framing, tvb, offset, 1, ENC_NA);
5792 offset++;
5793 proto_tree_add_item(tree, hf_bthci_cmd_max_transport_latency_c_to_p, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5794 offset+=2;
5795 proto_tree_add_item(tree, hf_bthci_cmd_max_transport_latency_p_to_c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5796 offset+=2;
5797 proto_tree_add_item(tree, hf_bthci_cmd_cis_count, tvb, offset, 1, ENC_NA);
5798 cis_count = tvb_get_uint8(tvb, offset);
5799 offset++;
5801 for (int i = 0; i < cis_count; i++) {
5802 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_cis_params, tvb, offset, 9, "CIS Parameters, CIS Id: 0x%x", tvb_get_uint8(tvb, offset));
5803 sub_tree = proto_item_add_subtree(sub_item, ett_cis_params);
5804 proto_tree_add_item(sub_tree, hf_bthci_cmd_cis_id, tvb, offset, 1, ENC_NA);
5805 offset++;
5806 proto_tree_add_item(sub_tree, hf_bthci_cmd_max_sdu_c_to_p, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5807 offset+=2;
5808 proto_tree_add_item(sub_tree, hf_bthci_cmd_max_sdu_p_to_c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5809 offset+=2;
5810 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_bthci_cmd_phy_c_to_p, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
5811 offset++;
5812 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_bthci_cmd_phy_p_to_c, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
5813 offset++;
5814 proto_tree_add_item(sub_tree, hf_bthci_cmd_rtn_c_to_p, tvb, offset, 1, ENC_NA);
5815 offset++;
5816 proto_tree_add_item(sub_tree, hf_bthci_cmd_rtn_p_to_c, tvb, offset, 1, ENC_NA);
5817 offset++;
5820 break;
5822 case 0x0063: /* LE Set CIG Parameters Test */
5824 uint8_t cis_count;
5825 proto_tree_add_item(tree, hf_bthci_cmd_cig_id, tvb, offset, 1, ENC_NA);
5826 offset++;
5827 proto_tree_add_item(tree, hf_bthci_cmd_sdu_interval_c_to_p, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5828 offset+=3;
5829 proto_tree_add_item(tree, hf_bthci_cmd_sdu_interval_p_to_c, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5830 offset+=3;
5831 item = proto_tree_add_item(tree, hf_bthci_cmd_ft_c_to_p, tvb, offset, 1, ENC_NA);
5832 proto_item_append_text(item, " ISO Intervals");
5833 offset++;
5834 item = proto_tree_add_item(tree, hf_bthci_cmd_ft_p_to_c, tvb, offset, 1, ENC_NA);
5835 proto_item_append_text(item, " ISO Intervals");
5836 offset++;
5837 proto_tree_add_item(tree, hf_bthci_cmd_iso_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5838 offset+=2;
5839 proto_tree_add_item(tree, hf_bthci_cmd_peripherals_clock_accuracy, tvb, offset, 1, ENC_NA);
5840 offset++;
5841 proto_tree_add_item(tree, hf_bthci_cmd_packing, tvb, offset, 1, ENC_NA);
5842 offset++;
5843 proto_tree_add_item(tree, hf_bthci_cmd_framing, tvb, offset, 1, ENC_NA);
5844 offset++;
5845 proto_tree_add_item(tree, hf_bthci_cmd_cis_count, tvb, offset, 1, ENC_NA);
5846 cis_count = tvb_get_uint8(tvb, offset);
5847 offset++;
5849 for (int i = 0; i < cis_count; i++) {
5850 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_cis_params, tvb, offset, 14, "CIS Parameters, CIS Id: 0x%x", tvb_get_uint8(tvb, offset));
5851 sub_tree = proto_item_add_subtree(sub_item, ett_cis_params);
5852 proto_tree_add_item(sub_tree, hf_bthci_cmd_cis_id, tvb, offset, 1, ENC_NA);
5853 offset++;
5854 proto_tree_add_item(sub_tree, hf_bthci_cmd_nse, tvb, offset, 1, ENC_NA);
5855 offset++;
5856 proto_tree_add_item(sub_tree, hf_bthci_cmd_max_sdu_c_to_p, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5857 offset+=2;
5858 proto_tree_add_item(sub_tree, hf_bthci_cmd_max_sdu_p_to_c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5859 offset+=2;
5860 proto_tree_add_item(sub_tree, hf_bthci_cmd_max_pdu_c_to_p, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5861 offset+=2;
5862 proto_tree_add_item(sub_tree, hf_bthci_cmd_max_pdu_p_to_c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5863 offset+=2;
5864 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_bthci_cmd_phy_c_to_p, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
5865 offset++;
5866 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_bthci_cmd_phy_p_to_c, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
5867 offset++;
5868 item = proto_tree_add_item(sub_tree, hf_bthci_cmd_bn_c_to_p, tvb, offset, 1, ENC_NA);
5869 if (tvb_get_uint8(tvb, offset) == 0)
5870 proto_item_append_text(item, " (No data)");
5871 offset++;
5872 proto_tree_add_item(sub_tree, hf_bthci_cmd_bn_p_to_c, tvb, offset, 1, ENC_NA);
5873 if (tvb_get_uint8(tvb, offset) == 0)
5874 proto_item_append_text(item, " (No data)");
5875 offset++;
5878 break;
5880 case 0x0064: /* LE Create CIS */
5882 uint8_t cis_count;
5883 uint32_t k_shandle, chandle;
5884 proto_tree_add_item(tree, hf_bthci_cmd_cis_count, tvb, offset, 1, ENC_NA);
5885 cis_count = tvb_get_uint8(tvb, offset);
5886 offset++;
5887 for (int i = 0; i < cis_count; i++) {
5888 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_cis_params, tvb, offset, 4, "CIS Handle: 0x%03x, Connection Handle: 0x%03x",
5889 tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
5890 sub_tree = proto_item_add_subtree(sub_item, ett_cis_params);
5891 proto_tree_add_item(sub_tree, hf_bthci_cmd_cis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5892 k_shandle = tvb_get_letohs(tvb, offset) & 0xfff;
5893 offset+=2;
5894 proto_tree_add_item(sub_tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5895 chandle = tvb_get_letohs(tvb, offset) & 0xfff;
5896 offset+=2;
5898 if (!pinfo->fd->visited) {
5899 wmem_tree_key_t key[5];
5900 uint32_t interface_id;
5901 uint32_t adapter_id;
5902 uint32_t frame_number;
5903 stream_connection_handle_pair_t *stream_connection_handle_pair;
5905 interface_id = bluetooth_data->interface_id;
5906 adapter_id = bluetooth_data->adapter_id;
5907 frame_number = pinfo->num;
5909 key[0].length = 1;
5910 key[0].key = &interface_id;
5911 key[1].length = 1;
5912 key[1].key = &adapter_id;
5913 key[2].length = 1;
5914 key[2].key = &k_shandle;
5915 key[3].length = 1;
5916 key[3].key = &frame_number;
5917 key[4].length = 0;
5918 key[4].key = NULL;
5920 stream_connection_handle_pair =
5921 (stream_connection_handle_pair_t *) wmem_new(wmem_file_scope(), stream_connection_handle_pair_t);
5922 stream_connection_handle_pair->chandle = chandle;
5923 stream_connection_handle_pair->change_in_frame = frame_number;
5925 wmem_tree_insert32_array(bluetooth_data->shandle_to_chandle, key, stream_connection_handle_pair);
5929 break;
5931 case 0x0065: /* LE Remove CIG */
5932 proto_tree_add_item(tree, hf_bthci_cmd_cig_id, tvb, offset, 1, ENC_NA);
5933 offset++;
5934 break;
5936 case 0x0066: /* LE Accept CIS Request */
5937 proto_tree_add_item(tree, hf_bthci_cmd_cis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5938 offset+=2;
5939 break;
5941 case 0x0068: /* LE Create BIG */
5942 proto_tree_add_item(tree, hf_bthci_cmd_big_handle, tvb, offset, 1, ENC_NA);
5943 offset++;
5944 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
5945 offset++;
5946 proto_tree_add_item(tree, hf_bthci_cmd_num_bis, tvb, offset, 1, ENC_NA);
5947 offset++;
5948 proto_tree_add_item(tree, hf_bthci_cmd_sdu_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5949 offset+=3;
5950 proto_tree_add_item(tree, hf_bthci_cmd_max_sdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5951 offset+=2;
5952 proto_tree_add_item(tree, hf_bthci_cmd_max_transport_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5953 offset+=2;
5954 proto_tree_add_item(tree, hf_bthci_cmd_rtn, tvb, offset, 1, ENC_NA);
5955 offset++;
5956 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_phy, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
5957 offset++;
5958 proto_tree_add_item(tree, hf_bthci_cmd_packing, tvb, offset, 1, ENC_NA);
5959 offset++;
5960 proto_tree_add_item(tree, hf_bthci_cmd_framing, tvb, offset, 1, ENC_NA);
5961 offset++;
5962 proto_tree_add_item(tree, hf_bthci_cmd_encryption, tvb, offset, 1, ENC_NA);
5963 offset++;
5964 proto_tree_add_item(tree, hf_bthci_cmd_broadcast_code, tvb, offset, 16, ENC_NA);
5965 offset+=16;
5966 break;
5968 case 0x0069: /* LE Create BIG Test */
5969 proto_tree_add_item(tree, hf_bthci_cmd_big_handle, tvb, offset, 1, ENC_NA);
5970 offset++;
5971 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
5972 offset++;
5973 proto_tree_add_item(tree, hf_bthci_cmd_num_bis, tvb, offset, 1, ENC_NA);
5974 offset++;
5975 proto_tree_add_item(tree, hf_bthci_cmd_sdu_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5976 offset+=3;
5977 proto_tree_add_item(tree, hf_bthci_cmd_iso_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5978 offset+=2;
5979 proto_tree_add_item(tree, hf_bthci_cmd_nse, tvb, offset, 1, ENC_NA);
5980 offset++;
5981 proto_tree_add_item(tree, hf_bthci_cmd_max_sdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5982 offset+=2;
5983 proto_tree_add_item(tree, hf_bthci_cmd_max_pdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5984 offset+=2;
5985 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_phy, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
5986 offset++;
5987 proto_tree_add_item(tree, hf_bthci_cmd_packing, tvb, offset, 1, ENC_NA);
5988 offset++;
5989 proto_tree_add_item(tree, hf_bthci_cmd_framing, tvb, offset, 1, ENC_NA);
5990 offset++;
5991 proto_tree_add_item(tree, hf_bthci_cmd_bn, tvb, offset, 1, ENC_NA);
5992 offset++;
5993 proto_tree_add_item(tree, hf_bthci_cmd_irc, tvb, offset, 1, ENC_NA);
5994 offset++;
5995 proto_tree_add_item(tree, hf_bthci_cmd_pto, tvb, offset, 1, ENC_NA);
5996 offset++;
5997 proto_tree_add_item(tree, hf_bthci_cmd_encryption, tvb, offset, 1, ENC_NA);
5998 offset++;
5999 proto_tree_add_item(tree, hf_bthci_cmd_broadcast_code, tvb, offset, 16, ENC_NA);
6000 offset+=16;
6001 break;
6003 case 0x006A: /* LE Terminate BIG */
6004 proto_tree_add_item(tree, hf_bthci_cmd_big_handle, tvb, offset, 1, ENC_NA);
6005 offset++;
6006 proto_tree_add_item(tree, hf_bthci_cmd_reason, tvb, offset, 1, ENC_NA);
6007 offset++;
6008 break;
6010 case 0x006B: /* LE BIG Create Sync */
6012 uint8_t num_bis;
6014 proto_tree_add_item(tree, hf_bthci_cmd_big_handle, tvb, offset, 1, ENC_NA);
6015 offset++;
6016 proto_tree_add_item(tree, hf_bthci_cmd_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6017 offset+=2;
6018 proto_tree_add_item(tree, hf_bthci_cmd_encryption, tvb, offset, 1, ENC_NA);
6019 offset++;
6020 proto_tree_add_item(tree, hf_bthci_cmd_broadcast_code, tvb, offset, 16, ENC_NA);
6021 offset+=16;
6022 proto_tree_add_item(tree, hf_bthci_cmd_mse, tvb, offset, 1, ENC_NA);
6023 offset++;
6024 proto_tree_add_item(tree, hf_bthci_cmd_sync_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6025 offset+=2;
6026 proto_tree_add_item(tree, hf_bthci_cmd_num_bis, tvb, offset, 1, ENC_NA);
6027 num_bis = tvb_get_uint8(tvb, offset);
6028 offset++;
6029 for (int i = 0; i < num_bis; i++) {
6030 proto_tree_add_item(tree, hf_bthci_cmd_bis_index, tvb, offset, 1, ENC_NA);
6031 offset++;
6034 break;
6036 case 0x006C: /* LE BIG Terminate Sync */
6037 proto_tree_add_item(tree, hf_bthci_cmd_big_handle, tvb, offset, 1, ENC_NA);
6038 offset++;
6039 break;
6041 case 0x006E: /* LE Setup ISO Data Path */
6043 uint8_t codec_length;
6044 const char *str = "Disabled";
6046 proto_tree_add_item(tree, hf_bthci_cmd_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6047 offset+=2;
6048 proto_tree_add_item(tree, hf_bthci_cmd_data_path_direction, tvb, offset, 1, ENC_NA);
6049 offset++;
6050 item = proto_tree_add_item(tree, hf_bthci_cmd_data_path_id, tvb, offset, 1, ENC_NA);
6051 if (tvb_get_uint8(tvb, offset) == 0)
6052 str = "HCI";
6053 else if (tvb_get_uint8(tvb, offset) < 0xff)
6054 str = "Logical Channel Number";
6055 proto_item_append_text(item, " (%s)", str);
6056 offset++;
6057 offset = dissect_coding_format(tree, hf_bthci_cmd_coding_format, tvb, offset, ett_coding_format);
6058 proto_tree_add_item(tree, hf_bthci_cmd_controller_delay, tvb, offset, 3, ENC_LITTLE_ENDIAN);
6059 offset+=3;
6060 codec_length = tvb_get_uint8(tvb, offset);
6061 proto_tree_add_item(tree, hf_bthci_cmd_codec_config_length, tvb, offset, 1, ENC_NA);
6062 offset++;
6063 proto_tree_add_item(tree, hf_bthci_cmd_codec_config, tvb, offset, codec_length, ENC_NA);
6064 offset += codec_length;
6066 break;
6068 case 0x006F: /* LE Remove ISO Data Path */
6069 proto_tree_add_item(tree, hf_bthci_cmd_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6070 offset+=2;
6071 proto_tree_add_item(tree, hf_bthci_cmd_data_path_direction, tvb, offset, 1, ENC_NA);
6072 offset++;
6073 break;
6075 case 0x0070: /* LE ISO Transmit Test */
6076 case 0x0071: /* LE ISO Receive Test */
6077 proto_tree_add_item(tree, hf_bthci_cmd_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6078 offset+=2;
6079 proto_tree_add_item(tree, hf_bthci_cmd_payload_type, tvb, offset, 1, ENC_NA);
6080 offset++;
6081 break;
6083 case 0x0074: /* LE Set Host Feature */
6084 proto_tree_add_item(tree, hf_bthci_cmd_feature_bit_number, tvb, offset, 1, ENC_NA);
6085 offset++;
6086 proto_tree_add_item(tree, hf_bthci_cmd_feature_bit_value, tvb, offset, 1, ENC_NA);
6087 offset++;
6088 break;
6090 case 0x0076: /* LE Enhanced Read Transmit Power Level */
6091 case 0x0077: /* LE Read Remote Transmit Power Level */
6092 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6093 offset+=2;
6094 proto_tree_add_item(tree, hf_bthci_cmd_phy_and_coding, tvb, offset, 1, ENC_NA);
6095 offset++;
6096 break;
6098 case 0x0078: /* LE Set Path Loss Reporting Parameters */
6099 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6100 offset+=2;
6101 proto_tree_add_item(tree, hf_bthci_cmd_high_threshold, tvb, offset, 1, ENC_NA);
6102 offset++;
6103 proto_tree_add_item(tree, hf_bthci_cmd_high_hysteresis, tvb, offset, 1, ENC_NA);
6104 offset++;
6105 proto_tree_add_item(tree, hf_bthci_cmd_low_threshold, tvb, offset, 1, ENC_NA);
6106 offset++;
6107 proto_tree_add_item(tree, hf_bthci_cmd_low_hysteresis, tvb, offset, 1, ENC_NA);
6108 offset++;
6109 proto_tree_add_item(tree, hf_bthci_cmd_min_time_spent, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6110 offset+=2;
6111 break;
6113 case 0x0079: /* LE Set Path Loss Reporting Enable */
6114 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6115 offset+=2;
6116 proto_tree_add_item(tree, hf_bthci_cmd_reporting_enable, tvb, offset, 1, ENC_NA);
6117 offset++;
6118 break;
6120 case 0x007A: /* LE Set Transmit Power Reporting Enable */
6121 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6122 offset+=2;
6123 proto_tree_add_item(tree, hf_bthci_cmd_local_reporting_enable, tvb, offset, 1, ENC_NA);
6124 offset++;
6125 proto_tree_add_item(tree, hf_bthci_cmd_remote_reporting_enable, tvb, offset, 1, ENC_NA);
6126 offset++;
6127 break;
6129 case 0x007C: /* LE Set Data Related Changes */
6130 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
6131 offset++;
6132 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_addr_change_reasons, ett_addr_change_reasons, hfx_btcmd_addr_change_reasons, ENC_NA);
6133 offset++;
6134 break;
6136 case 0x007E: /* LE Subrate Request */
6137 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6138 offset+=2;
6139 /* FALLTHROUGH */
6141 case 0x007D: /* LE Set Default Subrate */
6142 proto_tree_add_item(tree, hf_bthci_cmd_subrate_factor_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6143 offset+=2;
6144 proto_tree_add_item(tree, hf_bthci_cmd_subrate_factor_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6145 offset+=2;
6146 item = proto_tree_add_item(tree, hf_bthci_cmd_le_con_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6147 proto_item_append_text(item, " (subrated events)");
6148 offset+=2;
6149 item = proto_tree_add_item(tree, hf_bthci_cmd_continuation_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6150 proto_item_append_text(item, " (underlying events)");
6151 offset+=2;
6152 proto_tree_add_item(tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6153 offset+=2;
6154 break;
6156 case 0x0080: /* LE Set Decision Data */
6157 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
6158 offset++;
6159 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_adv_decision_flags, ett_adv_properties, hfx_bthci_cmd_adv_decision_flags, ENC_NA);
6160 offset += 1;
6161 uint8_t data_length = tvb_get_uint8(tvb, offset);
6162 proto_tree_add_item(tree, hf_bthci_cmd_le_data_length, tvb, offset, 1, ENC_NA);
6163 offset++;
6164 proto_tree_add_item(tree, hf_bthci_cmd_adv_decision_data, tvb, offset, data_length, ENC_NA);
6165 offset+=data_length;
6166 break;
6168 case 0x0081: /* LE Set Decision Instructions */
6170 uint8_t num_tests, test_field;
6171 proto_tree_add_item(tree, hf_bthci_cmd_num_tests, tvb, offset, 1, ENC_NA);
6172 num_tests = tvb_get_uint8(tvb, offset);
6173 offset++;
6174 for (int i = 0; i < num_tests; i++) {
6175 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_adv_test_flags, ett_adv_test_flags, hfx_bthci_cmd_adv_test_flags, ENC_NA);
6176 offset += 1;
6177 test_field = tvb_get_uint8(tvb, offset);
6178 item = proto_tree_add_item(tree, hf_bthci_cmd_adv_test_field, tvb, offset, 1, ENC_NA);
6179 if (test_field > 16) {
6180 if (test_field <= 24)
6181 proto_item_append_text(item, " (Arbitrary Data, exactly %u octets)", test_field - 16);
6182 else if (test_field > 32 && test_field <= 40)
6183 proto_item_append_text(item, " (Arbitrary Data, at least %u octets)", test_field - 32);
6184 else if (test_field > 48 && test_field <= 56)
6185 proto_item_append_text(item, " (Arbitrary Data, at most %u octets)", test_field - 48);
6186 else if (test_field >= 240)
6187 proto_item_append_text(item, " (Vendor specific)");
6189 offset++;
6190 proto_tree_add_item(tree, hf_bthci_cmd_adv_test_params, tvb, offset, 16, ENC_NA);
6191 offset+=16;
6194 break;
6196 case 0x0082: /* LE Set Periodic Advertising Subevent */
6198 uint8_t sub_events, length;
6199 proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_NA);
6200 offset++;
6201 proto_tree_add_item(tree, hf_bthci_cmd_num_subevents, tvb, offset, 1, ENC_NA);
6202 sub_events = tvb_get_uint8(tvb, offset);
6203 offset++;
6204 for (int i = 0; i < sub_events; i++) {
6205 length = 4 + tvb_get_uint8(tvb, offset+3);
6206 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_subevents, tvb, offset, length,
6207 "Sub-event: %u", tvb_get_uint8(tvb, offset));
6208 sub_tree = proto_item_add_subtree(sub_item, ett_adv_subevents);
6210 proto_tree_add_item(sub_tree, hf_bthci_cmd_subevent, tvb, offset, 1, ENC_NA);
6211 offset++;
6212 proto_tree_add_item(sub_tree, hf_bthci_cmd_response_slot_start, tvb, offset, 1, ENC_NA);
6213 offset++;
6214 proto_tree_add_item(sub_tree, hf_bthci_cmd_response_slot_count, tvb, offset, 1, ENC_NA);
6215 offset++;
6216 proto_tree_add_item(sub_tree, hf_bthci_cmd_subevent_data_length, tvb, offset, 1, ENC_NA);
6217 length = tvb_get_uint8(tvb, offset);
6218 offset++;
6220 bluetooth_eir_ad_data_t *ad_data;
6221 ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
6222 ad_data->interface_id = bluetooth_data->interface_id;
6223 ad_data->adapter_id = bluetooth_data->adapter_id;
6224 ad_data->bd_addr = NULL;
6225 call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, length), pinfo, sub_tree, ad_data);
6226 offset += length;
6229 break;
6231 case 0x0083: /* LE Set Periodic Advertising Response Data */
6233 uint8_t length;
6234 proto_tree_add_item(tree, hf_bthci_cmd_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6235 offset+=2;
6236 proto_tree_add_item(tree, hf_bthci_cmd_request_event, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6237 offset+=2;
6238 proto_tree_add_item(tree, hf_bthci_cmd_request_subevent, tvb, offset, 1, ENC_NA);
6239 offset++;
6240 proto_tree_add_item(tree, hf_bthci_cmd_response_subevent, tvb, offset, 1, ENC_NA);
6241 offset++;
6242 proto_tree_add_item(tree, hf_bthci_cmd_response_slot, tvb, offset, 1, ENC_NA);
6243 offset++;
6244 proto_tree_add_item(tree, hf_bthci_cmd_response_data_length, tvb, offset, 1, ENC_NA);
6245 length = tvb_get_uint8(tvb, offset);
6246 offset++;
6248 bluetooth_eir_ad_data_t *ad_data;
6249 ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
6250 ad_data->interface_id = bluetooth_data->interface_id;
6251 ad_data->adapter_id = bluetooth_data->adapter_id;
6252 ad_data->bd_addr = NULL;
6253 call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree, ad_data);
6254 offset += length;
6256 break;
6258 case 0x0084: /* LE Set Periodic Sync Subevent */
6260 uint8_t sub_events;
6261 proto_tree_add_item(tree, hf_bthci_cmd_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6262 offset+=2;
6263 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_advertising_properties, ett_adv_properties, hfx_bthci_cmd_adv_properties, ENC_LITTLE_ENDIAN);
6264 offset+=2;
6265 proto_tree_add_item(tree, hf_bthci_cmd_num_subevents, tvb, offset, 1, ENC_NA);
6266 sub_events = tvb_get_uint8(tvb, offset);
6267 offset++;
6268 sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_subevents, tvb, offset, sub_events, "Sub-events");
6269 sub_tree = proto_item_add_subtree(sub_item, ett_adv_subevents);
6270 for (int i = 0; i < sub_events; i++) {
6271 proto_tree_add_item(sub_tree, hf_bthci_cmd_subevent, tvb, offset, 1, ENC_NA);
6272 offset++;
6275 break;
6277 case 0x0088: /* LE Read All Remote Features */
6278 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6279 offset+=2;
6280 proto_tree_add_item(tree, hf_bthci_cmd_pages_requested, tvb, offset, 1, ENC_NA);
6281 offset += 1;
6282 break;
6284 case 0x008B: /* LE CS Write Cached Remote Supported Capabilities */
6285 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6286 offset+=2;
6287 proto_tree_add_item(tree, hf_bthci_cmd_num_config, tvb, offset, 1, ENC_NA);
6288 offset += 1;
6289 proto_tree_add_item(tree, hf_bthci_cmd_max_consecutive_procedures, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6290 offset += 2;
6291 proto_tree_add_item(tree, hf_bthci_cmd_num_antennas_supported, tvb, offset, 1, ENC_NA);
6292 offset += 1;
6293 proto_tree_add_item(tree, hf_bthci_cmd_max_antenna_paths_supported, tvb, offset, 1, ENC_NA);
6294 offset += 1;
6295 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_roles, ett_cs_roles, hfx_bthci_cmd_cs_roles, ENC_NA);
6296 offset++;
6297 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_modes_supported, ett_cs_modes, hfx_bthci_cmd_cs_modes_supported, ENC_NA);
6298 offset++;
6299 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_rtt_capability, ett_cs_capability, hfx_bthci_cmd_rtt_capability, ENC_NA);
6300 offset++;
6301 proto_tree_add_item(tree, hf_bthci_cmd_rtt_aa_only_n, tvb, offset, 1, ENC_NA);
6302 offset += 1;
6303 proto_tree_add_item(tree, hf_bthci_cmd_rtt_sounding_n, tvb, offset, 1, ENC_NA);
6304 offset += 1;
6305 proto_tree_add_item(tree, hf_bthci_cmd_rtt_random_n, tvb, offset, 1, ENC_NA);
6306 offset += 1;
6307 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_nadm_sounding_capability, ett_cs_capability, hfx_bthci_cmd_nadm_sounding_capability, ENC_NA);
6308 offset += 2;
6309 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_nadm_random_capability, ett_cs_capability, hfx_bthci_cmd_nadm_random_capability, ENC_NA);
6310 offset += 2;
6311 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_sync_phys_supported, ett_cs_capability, hfx_bthci_cmd_cs_sync_phys_supported, ENC_NA);
6312 offset++;
6313 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_subfeatures_supported, ett_cs_capability, hfx_bthci_cmd_cs_subfeatures, ENC_NA);
6314 offset++;
6315 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_tip1_times_supported, ett_cs_times, hfx_bthci_cmd_tip_times_supported, ENC_NA);
6316 offset += 2;
6317 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_tip2_times_supported, ett_cs_times, hfx_bthci_cmd_tip_times_supported, ENC_NA);
6318 offset += 2;
6319 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_tfcs_times_supported, ett_cs_times, hfx_bthci_cmd_tfcs_times_supported, ENC_NA);
6320 offset += 2;
6321 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_tpm_times_supported, ett_cs_times, hfx_bthci_cmd_tpm_times_supported, ENC_NA);
6322 offset += 2;
6323 proto_tree_add_item(tree, hf_bthci_cmd_tsw_time_supported, tvb, offset, 1, ENC_NA);
6324 offset += 1;
6325 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_tx_snr_capability, ett_cs_capability, hfx_bthci_cmd_tx_snr_capability, ENC_NA);
6326 offset += 1;
6327 break;
6329 case 0x008D: /* LE CS Set Default Settings */
6330 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6331 offset+=2;
6332 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_roles, ett_cs_roles, hfx_bthci_cmd_cs_roles, ENC_NA);
6333 offset++;
6334 proto_tree_add_item(tree, hf_bthci_cmd_cs_sync_antenna_selection, tvb, offset, 1, ENC_NA);
6335 offset++;
6336 proto_tree_add_item(tree, hf_bthci_cmd_tx_power, tvb, offset, 1, ENC_NA);
6337 offset++;
6338 break;
6340 case 0x008F: /* LE CS Write Cached Remote FAE Table */
6341 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6342 offset+=2;
6343 proto_tree_add_item(tree, hf_bthci_cmd_fae_table, tvb, offset, 72, ENC_NA);
6344 offset+=72;
6345 break;
6347 case 0x0090: /* LE CS Create Config */
6348 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6349 offset+=2;
6350 proto_tree_add_item(tree, hf_bthci_cmd_config_id, tvb, offset, 1, ENC_NA);
6351 offset++;
6352 proto_tree_add_item(tree, hf_bthci_cmd_create_context, tvb, offset, 1, ENC_NA);
6353 offset++;
6354 proto_tree_add_item(tree, hf_bthci_cmd_main_mode_type, tvb, offset, 1, ENC_NA);
6355 offset++;
6356 proto_tree_add_item(tree, hf_bthci_cmd_sub_mode_type, tvb, offset, 1, ENC_NA);
6357 offset++;
6358 proto_tree_add_item(tree, hf_bthci_cmd_min_main_mode_steps, tvb, offset, 1, ENC_NA);
6359 offset++;
6360 proto_tree_add_item(tree, hf_bthci_cmd_max_main_mode_steps, tvb, offset, 1, ENC_NA);
6361 offset++;
6362 proto_tree_add_item(tree, hf_bthci_cmd_main_mode_repetition, tvb, offset, 1, ENC_NA);
6363 offset++;
6364 proto_tree_add_item(tree, hf_bthci_cmd_mode0_steps, tvb, offset, 1, ENC_NA);
6365 offset++;
6366 proto_tree_add_item(tree, hf_bthci_cmd_cs_role, tvb, offset, 1, ENC_NA);
6367 offset++;
6368 proto_tree_add_item(tree, hf_bthci_cmd_rtt_type, tvb, offset, 1, ENC_NA);
6369 offset++;
6370 proto_tree_add_item(tree, hf_bthci_cmd_cs_sync_phy, tvb, offset, 1, ENC_NA);
6371 offset++;
6372 proto_tree_add_item(tree, hf_bthci_cmd_channel_map, tvb, offset, 10, ENC_NA);
6373 offset += 10;
6374 proto_tree_add_item(tree, hf_bthci_cmd_channel_map_repetition, tvb, offset, 1, ENC_NA);
6375 offset++;
6376 proto_tree_add_item(tree, hf_bthci_cmd_channel_selection_type, tvb, offset, 1, ENC_NA);
6377 offset++;
6378 proto_tree_add_item(tree, hf_bthci_cmd_ch3c_shape, tvb, offset, 1, ENC_NA);
6379 offset++;
6380 proto_tree_add_item(tree, hf_bthci_cmd_ch3c_jump, tvb, offset, 1, ENC_NA);
6381 offset++;
6382 proto_tree_add_item(tree, hf_bthci_cmd_companion_signal_enable, tvb, offset, 1, ENC_NA);
6383 offset++;
6384 break;
6386 case 0x0091: /* LE CS Remove Config */
6387 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6388 offset+=2;
6389 proto_tree_add_item(tree, hf_bthci_cmd_config_id, tvb, offset, 1, ENC_NA);
6390 offset++;
6391 break;
6393 case 0x0092: /* LE CS Channel Classification */
6394 proto_tree_add_item(tree, hf_bthci_cmd_ch_classification, tvb, offset, 10, ENC_NA);
6395 offset+=10;
6396 break;
6398 case 0x0093: /* LE CS Set Procedure Parametes */
6399 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6400 offset+=2;
6401 proto_tree_add_item(tree, hf_bthci_cmd_config_id, tvb, offset, 1, ENC_NA);
6402 offset++;
6403 proto_tree_add_item(tree, hf_bthci_cmd_max_procedure_len, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6404 offset+=2;
6405 proto_tree_add_item(tree, hf_bthci_cmd_min_procedure_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6406 offset+=2;
6407 proto_tree_add_item(tree, hf_bthci_cmd_max_procedure_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6408 offset+=2;
6409 proto_tree_add_item(tree, hf_bthci_cmd_max_procedure_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6410 offset+=2;
6411 proto_tree_add_item(tree, hf_bthci_cmd_min_subevent_len, tvb, offset, 3, ENC_LITTLE_ENDIAN);
6412 offset+=3;
6413 proto_tree_add_item(tree, hf_bthci_cmd_max_subevent_len, tvb, offset, 3, ENC_LITTLE_ENDIAN);
6414 offset+=3;
6415 proto_tree_add_item(tree, hf_bthci_cmd_tone_antenna_selection, tvb, offset, 1, ENC_NA);
6416 offset++;
6417 proto_tree_add_item(tree, hf_bthci_cmd_phy_and_coding, tvb, offset, 1, ENC_NA);
6418 offset++;
6419 proto_tree_add_item(tree, hf_bthci_cmd_tx_pwr_delta, tvb, offset, 1, ENC_NA);
6420 offset++;
6421 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_preferred_peer_antenna, ett_pref_antenna,
6422 hfx_bthci_cmd_preferred_peer_antenna, ENC_NA);
6423 offset++;
6424 proto_tree_add_item(tree, hf_bthci_cmd_snr_control_initiator, tvb, offset, 1, ENC_NA);
6425 offset++;
6426 proto_tree_add_item(tree, hf_bthci_cmd_snr_control_reflector, tvb, offset, 1, ENC_NA);
6427 offset++;
6428 break;
6430 case 0x0094: /* LE CS Procedure Enable */
6431 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6432 offset+=2;
6433 proto_tree_add_item(tree, hf_bthci_cmd_config_id, tvb, offset, 1, ENC_NA);
6434 offset++;
6435 proto_tree_add_item(tree, hf_bthci_cmd_cs_enable, tvb, offset, 1, ENC_NA);
6436 offset++;
6437 break;
6439 case 0x0095: /* LE CS Test */
6441 uint8_t role, rtt_type, length;
6442 proto_tree_add_item(tree, hf_bthci_cmd_main_mode_type, tvb, offset, 1, ENC_NA);
6443 offset++;
6444 proto_tree_add_item(tree, hf_bthci_cmd_sub_mode_type, tvb, offset, 1, ENC_NA);
6445 offset++;
6446 proto_tree_add_item(tree, hf_bthci_cmd_main_mode_repetition, tvb, offset, 1, ENC_NA);
6447 offset++;
6448 proto_tree_add_item(tree, hf_bthci_cmd_mode0_steps, tvb, offset, 1, ENC_NA);
6449 offset++;
6450 proto_tree_add_item(tree, hf_bthci_cmd_cs_role, tvb, offset, 1, ENC_NA);
6451 role = tvb_get_uint8(tvb, offset);
6452 offset++;
6453 proto_tree_add_item(tree, hf_bthci_cmd_rtt_type, tvb, offset, 1, ENC_NA);
6454 rtt_type = tvb_get_uint8(tvb, offset);
6455 offset++;
6456 proto_tree_add_item(tree, hf_bthci_cmd_cs_sync_phy, tvb, offset, 1, ENC_NA);
6457 offset++;
6458 proto_tree_add_item(tree, hf_bthci_cmd_cs_sync_antenna_selection, tvb, offset, 1, ENC_NA);
6459 offset++;
6460 proto_tree_add_item(tree, hf_bthci_cmd_subevent_len, tvb, offset, 3, ENC_LITTLE_ENDIAN);
6461 offset+=3;
6462 proto_tree_add_item(tree, hf_bthci_cmd_cs_subevent_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6463 offset+=2;
6464 proto_tree_add_item(tree, hf_bthci_cmd_max_num_subevents, tvb, offset, 1, ENC_NA);
6465 offset++;
6466 proto_tree_add_item(tree, hf_bthci_cmd_tx_power_setting, tvb, offset, 1, ENC_NA);
6467 offset++;
6468 proto_tree_add_item(tree, hf_bthci_cmd_t_ip1_time, tvb, offset, 1, ENC_NA);
6469 offset++;
6470 proto_tree_add_item(tree, hf_bthci_cmd_t_ip2_time, tvb, offset, 1, ENC_NA);
6471 offset++;
6472 proto_tree_add_item(tree, hf_bthci_cmd_t_fcs_time, tvb, offset, 1, ENC_NA);
6473 offset++;
6474 proto_tree_add_item(tree, hf_bthci_cmd_t_pm_time, tvb, offset, 1, ENC_NA);
6475 offset++;
6476 proto_tree_add_item(tree, hf_bthci_cmd_t_sw_time, tvb, offset, 1, ENC_NA);
6477 offset++;
6478 proto_tree_add_item(tree, hf_bthci_cmd_tone_antenna_selection, tvb, offset, 1, ENC_NA);
6479 offset++;
6480 /* 1 byte reserved for future use */
6481 offset++;
6482 proto_tree_add_item(tree, hf_bthci_cmd_snr_control_initiator, tvb, offset, 1, ENC_NA);
6483 offset++;
6484 proto_tree_add_item(tree, hf_bthci_cmd_snr_control_reflector, tvb, offset, 1, ENC_NA);
6485 offset++;
6486 proto_tree_add_item(tree, hf_bthci_cmd_drbg_nonce, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6487 offset+=2;
6488 proto_tree_add_item(tree, hf_bthci_cmd_channel_map_repetition, tvb, offset, 1, ENC_NA);
6489 offset++;
6490 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_override_config, ett_override_config, hfx_bthci_cmd_override_config, ENC_NA);
6491 offset += 2;
6492 proto_tree_add_item(tree, hf_bthci_cmd_cs_override_param_length, tvb, offset, 1, ENC_NA);
6493 length = tvb_get_uint8(tvb, offset);
6494 offset++;
6495 proto_tree_add_item(tree, hf_bthci_cmd_cs_override_param_data, tvb, offset, length, ENC_NA);
6496 offset+=length;
6497 if (!pinfo->fd->visited) {
6498 /* store CS role and RTT type configuration for later dissection of CS results */
6499 wmem_tree_key_t key[6];
6500 uint32_t interface_id;
6501 uint32_t adapter_id;
6502 uint32_t frame_number;
6503 uint32_t connection_handle = 0xfff;
6504 uint32_t config_id = 0;
6505 cs_configuration_t *cs_configuration;
6507 interface_id = bluetooth_data->interface_id;
6508 adapter_id = bluetooth_data->adapter_id;
6509 frame_number = pinfo->num;
6511 key[0].length = 1;
6512 key[0].key = &interface_id;
6513 key[1].length = 1;
6514 key[1].key = &adapter_id;
6515 key[2].length = 1;
6516 key[2].key = &connection_handle;
6517 key[3].length = 1;
6518 key[3].key = &config_id;
6519 key[4].length = 1;
6520 key[4].key = &frame_number;
6521 key[5].length = 0;
6522 key[5].key = NULL;
6524 cs_configuration = (cs_configuration_t *) wmem_new(wmem_file_scope(), cs_configuration_t);
6525 cs_configuration->cs_role = role;
6526 cs_configuration->rtt_type = rtt_type;
6527 wmem_tree_insert32_array(bluetooth_data->cs_configurations, key, cs_configuration);
6530 break;
6532 case 0x0097: /* LE Set Host Feature [v2] */
6533 proto_tree_add_item(tree, hf_bthci_cmd_feature_bit_number2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6534 offset+=2;
6535 proto_tree_add_item(tree, hf_bthci_cmd_feature_bit_value, tvb, offset, 1, ENC_NA);
6536 offset++;
6537 break;
6539 case 0x0098: /* LE Add Device To Monitored Advertisers List */
6540 proto_tree_add_item(tree, hf_bthci_cmd_le_address_type, tvb, offset, 1, ENC_NA);
6541 offset++;
6542 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
6543 proto_tree_add_item(tree, hf_bthci_cmd_rssi_threshold_low, tvb, offset, 1, ENC_NA);
6544 offset++;
6545 proto_tree_add_item(tree, hf_bthci_cmd_rssi_threshold_high, tvb, offset, 1, ENC_NA);
6546 offset++;
6547 proto_tree_add_item(tree, hf_bthci_cmd_rssi_threshold_timeout, tvb, offset, 1, ENC_NA);
6548 offset++;
6549 break;
6551 case 0x0099: /* LE Remove Device From Monitored Advertisers List */
6552 proto_tree_add_item(tree, hf_bthci_cmd_le_address_type, tvb, offset, 1, ENC_NA);
6553 offset++;
6554 offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
6555 break;
6557 case 0x009C: /* LE Enable Monitored Advertisers */
6558 proto_tree_add_item(tree, hf_bthci_cmd_adv_monitoring_enable, tvb, offset, 1, ENC_NA);
6559 offset++;
6560 break;
6562 case 0x009D: /* LE Frame Space Update */
6563 proto_tree_add_item(tree, hf_bthci_cmd_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6564 offset+=2;
6565 proto_tree_add_item(tree, hf_bthci_cmd_frame_space_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6566 offset+=2;
6567 proto_tree_add_item(tree, hf_bthci_cmd_frame_space_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6568 offset+=2;
6569 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_phys, ett_phy_param, hfx_btcmd_le_phys, ENC_NA);
6570 offset += 1;
6571 proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_spacing_types, ett_spacing_types, hfx_bthci_cmd_spacing_types, ENC_NA);
6572 offset += 2;
6573 break;
6575 case 0x0002: /* LE Read Buffer Size [v1] */
6576 case 0x0003: /* LE Read Local Supported Features */
6577 case 0x0007: /* LE Read Advertising Channel Tx Power */
6578 case 0x000E: /* LE Create Connection Cancel */
6579 case 0x000F: /* LE Read Filter Accept List Size */
6580 case 0x0010: /* LE Clear Filter Accept List */
6581 case 0x0018: /* LE Rand */
6582 case 0x001C: /* LE Read Supported States */
6583 case 0x001F: /* LE Test End */
6584 case 0x0023: /* LE Read Suggested Default Data Length */
6585 case 0x0025: /* LE Read Local P-256 Public Key */
6586 case 0x0029: /* LE Clear Resolving List */
6587 case 0x002A: /* LE Read Resolving List Size */
6588 case 0x002F: /* LE Read Maximum Data Length */
6589 case 0x003A: /* LE Read Maximum Advertising Data Length */
6590 case 0x003B: /* LE Read Number of Supported Advertising Sets */
6591 case 0x003D: /* LE Clear Advertising Sets */
6592 case 0x0045: /* LE Periodic Advertising Create Sync Cancel */
6593 case 0x0049: /* LE Clear Periodic Advertiser List */
6594 case 0x004A: /* LE Read Periodic Advertiser List Size */
6595 case 0x004B: /* LE Read Transmit Power */
6596 case 0x004C: /* LE Read RF Path Compensation */
6597 case 0x0058: /* LE Read Antenna Information */
6598 case 0x0060: /* LE Read Buffer Size [v2] */
6599 case 0x0087: /* LE Read All Local Supported Features */
6600 case 0x0089: /* LE CS Read Local Supported Capabilities */
6601 case 0x0096: /* LE CS Test End */
6602 case 0x009A: /* LE Clear Monitored Advertisers List */
6603 case 0x009B: /* LE Read Monitored Advertisers List Size */
6605 /* NOTE: No parameters */
6606 break;
6608 default:
6609 proto_tree_add_expert(tree, pinfo, &ei_command_unknown_command, tvb, offset, -1);
6610 offset += tvb_reported_length_remaining(tvb, offset);
6613 return offset;
6616 /* Code to actually dissect the packets */
6617 static int
6618 dissect_bthci_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
6620 proto_item *ti_cmd;
6621 proto_tree *bthci_cmd_tree;
6622 uint32_t opcode;
6623 uint16_t ocf;
6624 uint8_t param_length;
6625 uint8_t ogf;
6626 int offset = 0;
6627 proto_item *ti_opcode;
6628 proto_tree *opcode_tree;
6629 int hfx;
6630 bluetooth_data_t *bluetooth_data;
6631 uint32_t interface_id;
6632 uint32_t adapter_id;
6633 uint32_t frame_number;
6634 wmem_tree_key_t key[5];
6635 bthci_cmd_data_t *bthci_cmd_data = NULL;
6636 proto_tree *sub_item;
6637 wmem_tree_t *subtree;
6640 /* Reject the packet if data is NULL */
6641 if (data == NULL)
6642 return 0;
6643 bluetooth_data = (bluetooth_data_t *) data;
6645 interface_id = bluetooth_data->interface_id;
6646 adapter_id = bluetooth_data->adapter_id;
6647 frame_number = pinfo->num;
6649 ti_cmd = proto_tree_add_item(tree, proto_bthci_cmd, tvb, offset, -1, ENC_NA);
6650 bthci_cmd_tree = proto_item_add_subtree(ti_cmd, ett_bthci_cmd);
6652 switch (pinfo->p2p_dir) {
6653 case P2P_DIR_SENT:
6654 col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
6655 break;
6656 case P2P_DIR_RECV:
6657 col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
6658 break;
6659 default:
6660 col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection ");
6661 break;
6664 set_address(&pinfo->src, AT_STRINGZ, 5, "host");
6665 set_address(&pinfo->dst, AT_STRINGZ, 11, "controller");
6666 set_address(&pinfo->net_src, AT_STRINGZ, 5, "host");
6667 set_address(&pinfo->net_dst, AT_STRINGZ, 11, "controller");
6668 set_address(&pinfo->dl_src, AT_STRINGZ, 5, "host");
6669 set_address(&pinfo->dl_dst, AT_STRINGZ, 11, "controller");
6670 if (!pinfo->fd->visited) {
6671 address *addr;
6673 addr = (address *) wmem_memdup(wmem_file_scope(), &pinfo->dl_src, sizeof(address));
6674 addr->data = wmem_memdup(wmem_file_scope(), pinfo->dl_src.data, pinfo->dl_src.len);
6675 p_add_proto_data(wmem_file_scope(), pinfo, proto_bluetooth, BLUETOOTH_DATA_SRC, addr);
6677 addr = (address *) wmem_memdup(wmem_file_scope(), &pinfo->dl_dst, sizeof(address));
6678 addr->data = wmem_memdup(wmem_file_scope(), pinfo->dl_dst.data, pinfo->dl_dst.len);
6679 p_add_proto_data(wmem_file_scope(), pinfo, proto_bluetooth, BLUETOOTH_DATA_DST, addr);
6682 opcode = tvb_get_letohs(tvb, offset);
6683 ocf = opcode & 0x03ff;
6684 ogf = (uint8_t) (opcode >> 10);
6686 if (ogf == HCI_OGF_VENDOR_SPECIFIC)
6687 proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Vendor Command 0x%04x"));
6688 else
6689 proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x"));
6691 if (have_tap_listener(bluetooth_hci_summary_tap)) {
6692 bluetooth_hci_summary_tap_t *tap_hci_summary;
6694 tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
6696 tap_hci_summary->interface_id = bluetooth_data->interface_id;
6697 tap_hci_summary->adapter_id = bluetooth_data->adapter_id;
6699 tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_OPCODE;
6700 tap_hci_summary->ogf = ogf;
6701 tap_hci_summary->ocf = ocf;
6702 if (try_val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext))
6703 tap_hci_summary->name = val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x");
6704 else
6705 tap_hci_summary->name = NULL;
6706 tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
6709 if (!pinfo->fd->visited) {
6710 bthci_cmd_data = (bthci_cmd_data_t *) wmem_new(wmem_file_scope(), bthci_cmd_data_t);
6711 bthci_cmd_data->opcode = opcode;
6712 bthci_cmd_data->command_in_frame = frame_number;
6713 bthci_cmd_data->command_abs_ts = pinfo->abs_ts;
6714 bthci_cmd_data->pending_in_frame = bluetooth_max_disconnect_in_frame;
6715 bthci_cmd_data->pending_abs_ts = pinfo->abs_ts;
6716 bthci_cmd_data->response_in_frame = bluetooth_max_disconnect_in_frame;
6717 bthci_cmd_data->response_abs_ts = pinfo->abs_ts;
6720 col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_CMD");
6722 ti_opcode = proto_tree_add_item(bthci_cmd_tree, hf_bthci_cmd_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6723 opcode_tree = proto_item_add_subtree(ti_opcode, ett_opcode);
6724 proto_tree_add_item(opcode_tree, hf_bthci_cmd_ogf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6726 if (ogf == HCI_OGF_LINK_CONTROL)
6727 hfx = hf_bthci_cmd_ocf_link_control;
6728 else if (ogf == HCI_OGF_LINK_POLICY)
6729 hfx = hf_bthci_cmd_ocf_link_policy;
6730 else if (ogf == HCI_OGF_HOST_CONTROLLER)
6731 hfx = hf_bthci_cmd_ocf_host_controller_and_baseband;
6732 else if (ogf == HCI_OGF_INFORMATIONAL)
6733 hfx = hf_bthci_cmd_ocf_informational;
6734 else if (ogf == HCI_OGF_STATUS)
6735 hfx = hf_bthci_cmd_ocf_status;
6736 else if (ogf == HCI_OGF_TESTING)
6737 hfx = hf_bthci_cmd_ocf_testing;
6738 else if (ogf == HCI_OGF_LOW_ENERGY)
6739 hfx = hf_bthci_cmd_ocf_low_energy;
6740 else if (ogf == HCI_OGF_LOGO_TESTING)
6741 hfx = hf_bthci_cmd_ocf_logo_testing;
6742 else
6743 hfx = hf_bthci_cmd_ocf;
6744 proto_tree_add_item(opcode_tree, hfx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6745 offset+=2;
6747 proto_tree_add_item(bthci_cmd_tree, hf_bthci_cmd_param_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6748 param_length = tvb_get_uint8(tvb, offset);
6749 offset++;
6751 if (ogf == HCI_OGF_VENDOR_SPECIFIC) {
6752 col_append_fstr(pinfo->cinfo, COL_INFO, "Vendor Command 0x%04X (opcode 0x%04X)", ocf, opcode);
6754 if (!dissector_try_payload_with_data(vendor_dissector_table, tvb, pinfo, tree, true, bluetooth_data)) {
6755 if (bluetooth_data) {
6756 hci_vendor_data_t *hci_vendor_data;
6758 key[0].length = 1;
6759 key[0].key = &interface_id;
6760 key[1].length = 1;
6761 key[1].key = &adapter_id;
6762 key[2].length = 0;
6763 key[2].key = NULL;
6765 hci_vendor_data = (hci_vendor_data_t *) wmem_tree_lookup32_array(bluetooth_data->hci_vendors, key);
6766 if (hci_vendor_data) {
6767 int sub_offset = 0;
6769 if (bthci_vendor_android) {
6770 sub_offset = dissector_try_uint_with_data(hci_vendor_table, bthci_vendor_manufacturer_android, tvb, pinfo, tree, true, bluetooth_data);
6771 } else {
6772 sub_offset = dissector_try_uint_with_data(hci_vendor_table, hci_vendor_data->manufacturer, tvb, pinfo, tree, true, bluetooth_data);
6775 if (sub_offset > 0 && sub_offset < tvb_captured_length_remaining(tvb, offset))
6776 proto_tree_add_expert(bthci_cmd_tree, pinfo, &ei_command_parameter_unexpected, tvb, offset + sub_offset, tvb_captured_length_remaining(tvb, sub_offset + offset));
6781 proto_tree_add_item(bthci_cmd_tree, hf_bthci_cmd_parameter, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
6782 } else {
6783 col_append_str(pinfo->cinfo, COL_INFO, val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x"));
6785 if (param_length > 0) {
6786 switch (ogf) {
6787 case HCI_OGF_LINK_CONTROL:
6788 offset = dissect_link_control_cmd(tvb, offset, pinfo, bthci_cmd_tree, ocf, bluetooth_data);
6789 break;
6791 case HCI_OGF_LINK_POLICY:
6792 offset = dissect_link_policy_cmd(tvb, offset, pinfo, bthci_cmd_tree, ocf, bluetooth_data);
6793 break;
6795 case HCI_OGF_HOST_CONTROLLER:
6796 offset = dissect_host_controller_baseband_cmd(tvb, offset, pinfo, bthci_cmd_tree, ocf, bluetooth_data, bthci_cmd_data);
6797 break;
6799 case HCI_OGF_INFORMATIONAL:
6800 offset = dissect_informational_parameters_cmd(tvb, offset, pinfo, bthci_cmd_tree, ocf);
6801 break;
6803 case HCI_OGF_STATUS:
6804 offset = dissect_status_parameters_cmd(tvb, offset, pinfo, bthci_cmd_tree, ocf);
6805 break;
6807 case HCI_OGF_TESTING:
6808 offset = dissect_testing_cmd(tvb, offset, pinfo, bthci_cmd_tree, ocf);
6809 break;
6811 case HCI_OGF_LOW_ENERGY:
6812 offset = dissect_le_cmd(tvb, offset, pinfo, bthci_cmd_tree, ocf, bluetooth_data);
6813 break;
6814 default:
6815 proto_tree_add_expert(bthci_cmd_tree, pinfo, &ei_command_unknown_command, tvb, 3, -1);
6816 offset += tvb_reported_length_remaining(tvb, offset);
6817 break;
6822 if (!pinfo->fd->visited && bthci_cmd_data) {
6823 key[0].length = 1;
6824 key[0].key = &interface_id;
6825 key[1].length = 1;
6826 key[1].key = &adapter_id;
6827 key[2].length = 1;
6828 key[2].key = &opcode;
6829 key[3].length = 1;
6830 key[3].key = &frame_number;
6831 key[4].length = 0;
6832 key[4].key = NULL;
6834 wmem_tree_insert32_array(bthci_cmds, key, bthci_cmd_data);
6837 if (ogf != HCI_OGF_VENDOR_SPECIFIC && tvb_reported_length_remaining(tvb, offset) > 0) {
6838 proto_tree_add_expert(bthci_cmd_tree, pinfo, &ei_command_parameter_unexpected, tvb, offset, -1);
6839 offset += tvb_reported_length_remaining(tvb, offset);
6842 key[0].length = 1;
6843 key[0].key = &interface_id;
6844 key[1].length = 1;
6845 key[1].key = &adapter_id;
6846 key[2].length = 1;
6847 key[2].key = &opcode;
6848 key[3].length = 0;
6849 key[3].key = NULL;
6851 subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bthci_cmds, key);
6852 bthci_cmd_data = (subtree) ? (bthci_cmd_data_t *) wmem_tree_lookup32_le(subtree, pinfo->num) : NULL;
6853 if (bthci_cmd_data && bthci_cmd_data->pending_in_frame < bluetooth_max_disconnect_in_frame) {
6854 nstime_t delta;
6856 sub_item = proto_tree_add_uint(bthci_cmd_tree, hf_pending_in_frame, tvb, 0, 0, bthci_cmd_data->pending_in_frame);
6857 proto_item_set_generated(sub_item);
6859 nstime_delta(&delta, &bthci_cmd_data->pending_abs_ts, &bthci_cmd_data->command_abs_ts);
6860 sub_item = proto_tree_add_double(bthci_cmd_tree, hf_command_pending_time_delta, tvb, 0, 0, nstime_to_msec(&delta));
6861 proto_item_set_generated(sub_item);
6863 if (bthci_cmd_data && bthci_cmd_data->response_in_frame < bluetooth_max_disconnect_in_frame) {
6864 nstime_t delta;
6866 sub_item = proto_tree_add_uint(bthci_cmd_tree, hf_response_in_frame, tvb, 0, 0, bthci_cmd_data->response_in_frame);
6867 proto_item_set_generated(sub_item);
6869 nstime_delta(&delta, &bthci_cmd_data->response_abs_ts, &bthci_cmd_data->command_abs_ts);
6870 sub_item = proto_tree_add_double(bthci_cmd_tree, hf_command_response_time_delta, tvb, 0, 0, nstime_to_msec(&delta));
6871 proto_item_set_generated(sub_item);
6874 return offset;
6878 /* Register the protocol with Wireshark */
6880 /* this format is require because a script is used to build the C function
6881 that calls all the protocol registration.
6883 void
6884 proto_register_bthci_cmd(void)
6886 module_t *module;
6887 expert_module_t *expert_bthci_cmd;
6889 /* Setup list of header fields See Section 1.6.1 for details*/
6890 static hf_register_info hf[] = {
6891 { &hf_bthci_cmd_opcode,
6892 { "Command Opcode", "bthci_cmd.opcode",
6893 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_opcode_vals_ext, 0x0,
6894 "HCI Command Opcode", HFILL }
6896 { &hf_bthci_cmd_ogf,
6897 { "Opcode Group Field", "bthci_cmd.opcode.ogf",
6898 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_ogf_vals_ext, 0xfc00,
6899 NULL, HFILL }
6901 { &hf_bthci_cmd_ocf_link_control,
6902 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6903 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_link_control_vals_ext, 0x03ff,
6904 NULL, HFILL }
6906 { &hf_bthci_cmd_ocf_link_policy,
6907 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6908 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_link_policy_vals_ext, 0x03ff,
6909 NULL, HFILL }
6911 { &hf_bthci_cmd_ocf_host_controller_and_baseband,
6912 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6913 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_host_controller_and_baseband_vals_ext, 0x03ff,
6914 NULL, HFILL }
6916 { &hf_bthci_cmd_ocf_informational,
6917 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6918 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_informational_vals_ext, 0x03ff,
6919 NULL, HFILL }
6921 { &hf_bthci_cmd_ocf_status,
6922 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6923 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_status_vals_ext, 0x03ff,
6924 NULL, HFILL }
6926 { &hf_bthci_cmd_ocf_testing,
6927 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6928 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_testing_vals_ext, 0x03ff,
6929 NULL, HFILL }
6931 { &hf_bthci_cmd_ocf_low_energy,
6932 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6933 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_low_energy_vals_ext, 0x03ff,
6934 NULL, HFILL }
6936 { &hf_bthci_cmd_ocf_logo_testing,
6937 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6938 FT_UINT16, BASE_HEX, NULL, 0x03ff,
6939 NULL, HFILL }
6941 { &hf_bthci_cmd_ocf,
6942 { "Opcode Command Field", "bthci_cmd.opcode.ocf",
6943 FT_UINT16, BASE_HEX, NULL, 0x03ff,
6944 NULL, HFILL }
6946 { &hf_bthci_cmd_param_length,
6947 { "Parameter Total Length", "bthci_cmd.param_length",
6948 FT_UINT8, BASE_DEC, NULL, 0x0,
6949 NULL, HFILL }
6951 { &hf_bthci_cmd_lap,
6952 { "LAP", "bthci_cmd.lap",
6953 FT_UINT24, BASE_HEX, NULL, 0x0,
6954 "LAP for the inquiry access code", HFILL }
6956 { &hf_bthci_cmd_inq_length,
6957 { "Inquiry Length", "bthci_cmd.inq_length",
6958 FT_UINT8, BASE_DEC, NULL, 0x0,
6959 "Inquiry Length (*1.28s)", HFILL }
6961 { &hf_bthci_cmd_num_responses,
6962 { "Num Responses", "bthci_cmd.num_responses",
6963 FT_UINT8, BASE_DEC, NULL, 0x0,
6964 "Number of Responses", HFILL }
6966 { &hf_bthci_cmd_encrypt_mode,
6967 { "Encryption Mode", "bthci_cmd.encrypt_mode",
6968 FT_UINT8, BASE_HEX, VALS(bthci_cmd_encrypt_mode_vals), 0x0,
6969 NULL, HFILL }
6971 { &hf_bthci_cmd_bd_addr,
6972 { "BD_ADDR", "bthci_cmd.bd_addr",
6973 FT_ETHER, BASE_NONE, NULL, 0x0,
6974 "Bluetooth Device Address", HFILL}
6976 { &hf_bthci_cmd_packet_type,
6977 { "Packet Type", "bthci_cmd.packet_type",
6978 FT_UINT16, BASE_HEX, NULL, 0x0,
6979 NULL, HFILL }
6981 { &hf_bthci_cmd_packet_type_reserved_0,
6982 { "Reserved", "bthci_cmd.packet_type.reserved.0",
6983 FT_BOOLEAN, 16, NULL, 0x0001,
6984 NULL, HFILL }
6986 { &hf_bthci_cmd_packet_type_2dh1,
6987 { "2-DH1", "bthci_cmd.packet_type.2dh1",
6988 FT_BOOLEAN, 16, NULL, 0x0002,
6989 NULL, HFILL }
6991 { &hf_bthci_cmd_packet_type_3dh1,
6992 { "3-DH1", "bthci_cmd.packet_type.3dh1",
6993 FT_BOOLEAN, 16, NULL, 0x0004,
6994 NULL, HFILL }
6996 { &hf_bthci_cmd_packet_type_dm1,
6997 { "DM1", "bthci_cmd.packet_type.dm1",
6998 FT_BOOLEAN, 16, NULL, 0x0008,
6999 NULL, HFILL }
7001 { &hf_bthci_cmd_packet_type_dh1,
7002 { "DH1", "bthci_cmd.packet_type.dh1",
7003 FT_BOOLEAN, 16, NULL, 0x0010,
7004 NULL, HFILL }
7006 { &hf_bthci_cmd_packet_type_reserved_5_7,
7007 { "Reserved", "bthci_cmd.packet_type.reserved.5_7",
7008 FT_UINT16, BASE_HEX, NULL, 0x00E0,
7009 NULL, HFILL }
7011 { &hf_bthci_cmd_packet_type_2dh3,
7012 { "2-DH3", "bthci_cmd.packet_type.2dh3",
7013 FT_BOOLEAN, 16, NULL, 0x0100,
7014 NULL, HFILL }
7016 { &hf_bthci_cmd_packet_type_3dh3,
7017 { "3-DH3", "bthci_cmd.packet_type.3dh3",
7018 FT_BOOLEAN, 16, NULL, 0x0200,
7019 NULL, HFILL }
7021 { &hf_bthci_cmd_packet_type_dm3,
7022 { "DM3", "bthci_cmd.packet_type.dm3",
7023 FT_BOOLEAN, 16, NULL, 0x0400,
7024 NULL, HFILL }
7026 { &hf_bthci_cmd_packet_type_dh3,
7027 { "DH3", "bthci_cmd.packet_type.dh3",
7028 FT_BOOLEAN, 16, NULL, 0x0800,
7029 NULL, HFILL }
7031 { &hf_bthci_cmd_packet_type_2dh5,
7032 { "2-DH5", "bthci_cmd.packet_type.2dh5",
7033 FT_BOOLEAN, 16, NULL, 0x1000,
7034 NULL, HFILL }
7036 { &hf_bthci_cmd_packet_type_3dh5,
7037 { "3-DH5", "bthci_cmd.packet_type.3dh5",
7038 FT_BOOLEAN, 16, NULL, 0x2000,
7039 NULL, HFILL }
7041 { &hf_bthci_cmd_packet_type_dm5,
7042 { "DM5", "bthci_cmd.packet_type.dm5",
7043 FT_BOOLEAN, 16, NULL, 0x4000,
7044 NULL, HFILL }
7046 { &hf_bthci_cmd_packet_type_dh5,
7047 { "DH5", "bthci_cmd.packet_type.dh5",
7048 FT_BOOLEAN, 16, NULL, 0x8000,
7049 NULL, HFILL }
7051 { &hf_bthci_cmd_page_scan_mode,
7052 { "Page Scan Mode", "bthci_cmd.page_scan_mode",
7053 FT_UINT8, BASE_HEX, VALS(bthci_cmd_page_scan_modes), 0x0,
7054 NULL, HFILL }
7056 { &hf_bthci_cmd_page_scan_repetition_mode,
7057 { "Page Scan Repetition Mode", "bthci_cmd.page_scan_repetition_mode",
7058 FT_UINT8, BASE_HEX, VALS(bthci_cmd_page_scan_repetition_modes), 0x0,
7059 NULL, HFILL }
7061 { &hf_bthci_cmd_page_scan_period_mode,
7062 { "Page Scan Period Mode", "bthci_cmd.page_scan_period_mode",
7063 FT_UINT8, BASE_HEX, VALS(bthci_cmd_page_scan_period_modes), 0x0,
7064 NULL, HFILL }
7066 { &hf_bthci_cmd_clock_offset,
7067 { "Clock Offset", "bthci_cmd.clock_offset",
7068 FT_UINT16, BASE_HEX, NULL, 0x7FFF,
7069 "Bit 2-16 of the Clock Offset, CLKNPeripheral-CLK", HFILL }
7071 { &hf_bthci_cmd_clock_offset_valid,
7072 { "Clock_Offset_Valid_Flag", "bthci_cmd.clock_offset_valid",
7073 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x8000,
7074 "Indicates if clock offset is valid", HFILL }
7076 { &hf_bthci_cmd_allow_role_switch,
7077 { "Allow Role Switch", "bthci_cmd.allow_role_switch",
7078 FT_UINT8, BASE_HEX, VALS(cmd_role_switch_modes), 0x0,
7079 NULL, HFILL }
7081 { &hf_bthci_cmd_max_period_length,
7082 { "Max Period Length", "bthci_cmd.max_period_length",
7083 FT_UINT16, BASE_DEC, NULL, 0x0,
7084 "Maximum amount of time specified between consecutive inquiries.", HFILL }
7086 { &hf_bthci_cmd_min_period_length,
7087 { "Min Period Length", "bthci_cmd.min_period_length",
7088 FT_UINT16, BASE_DEC, NULL, 0x0,
7089 "Minimum amount of time specified between consecutive inquiries.", HFILL }
7091 { &hf_bthci_cmd_connection_handle,
7092 { "Connection Handle", "bthci_cmd.connection_handle",
7093 FT_UINT16, BASE_HEX, NULL, 0x0,
7094 NULL, HFILL }
7096 { &hf_bthci_cmd_reason,
7097 { "Reason", "bthci_cmd.reason",
7098 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_status_vals_ext, 0x0,
7099 NULL, HFILL }
7101 { &hf_bthci_cmd_num_link_keys,
7102 { "Number of Link Keys", "bthci_cmd.num_link_keys",
7103 FT_UINT8, BASE_DEC, NULL, 0x0,
7104 NULL, HFILL }
7106 { &hf_bthci_cmd_link_key,
7107 { "Link Key", "bthci_cmd.link_key",
7108 FT_BYTES, BASE_NONE, NULL, 0x0,
7109 "Link Key for the associated BD_ADDR", HFILL }
7111 { &hf_bthci_cmd_packet_type_hv1,
7112 { "Packet Type HV1", "bthci_cmd.packet_type_hv1",
7113 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x0020,
7114 NULL, HFILL }
7116 { &hf_bthci_cmd_packet_type_hv2,
7117 { "Packet Type HV2", "bthci_cmd.packet_type_hv2",
7118 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x0040,
7119 NULL, HFILL }
7121 { &hf_bthci_cmd_packet_type_hv3,
7122 { "Packet Type HV3", "bthci_cmd.packet_type_hv3",
7123 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x0080,
7124 NULL, HFILL }
7126 { &hf_bthci_cmd_role,
7127 { "Role", "bthci_cmd.role",
7128 FT_UINT8, BASE_HEX, VALS(cmd_role_vals), 0x0,
7129 NULL, HFILL }
7131 { &hf_bthci_cmd_acr_role,
7132 { "Role", "bthci_cmd.acr.role",
7133 FT_UINT8, BASE_HEX, VALS(cmd_acr_role_vals), 0x0,
7134 NULL, HFILL }
7136 { &hf_bthci_cmd_pin_code_length,
7137 { "PIN Code Length", "bthci_cmd.pin_code_length",
7138 FT_UINT8, BASE_DEC, NULL, 0x0,
7139 NULL, HFILL }
7141 { &hf_bthci_cmd_pin_code,
7142 { "PIN Code", "bthci_cmd.pin_code",
7143 FT_STRING, BASE_NONE, NULL, 0x0,
7144 NULL, HFILL }
7146 { &hf_bthci_cmd_pin_type,
7147 { "PIN Type", "bthci_cmd.pin_type",
7148 FT_UINT8, BASE_HEX, VALS(cmd_pin_types), 0x0,
7149 "PIN Types", HFILL }
7151 { &hf_bthci_cmd_encryption_enable,
7152 { "Encryption Enable", "bthci_cmd.encryption_enable",
7153 FT_UINT8, BASE_HEX, VALS(cmd_encryption_enable), 0x0,
7154 NULL, HFILL }
7156 { &hf_bthci_cmd_key_flag,
7157 { "Key Flag", "bthci_cmd.key_flag",
7158 FT_UINT8, BASE_HEX, VALS(cmd_key_flag), 0x0,
7159 NULL, HFILL }
7161 { &hf_bthci_cmd_max_interval_hold,
7162 { "Hold Mode Max Interval", "bthci_cmd.hold_mode_max_int",
7163 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7164 "Maximal acceptable number of Baseband slots to wait in Hold Mode.", HFILL }
7166 { &hf_bthci_cmd_min_interval_hold,
7167 { "Hold Mode Min Interval", "bthci_cmd.hold_mode_min_int",
7168 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7169 "Minimum acceptable number of Baseband slots to wait in Hold Mode.", HFILL }
7171 { &hf_bthci_cmd_max_interval_sniff,
7172 { "Sniff Max Interval", "bthci_cmd.sniff_max_int",
7173 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7174 "Maximal acceptable number of Baseband slots between each sniff period.", HFILL }
7176 { &hf_bthci_cmd_min_interval_sniff,
7177 { "Sniff Min Interval", "bthci_cmd.sniff_min_int",
7178 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7179 "Minimum acceptable number of Baseband slots between each sniff period.", HFILL }
7181 { &hf_bthci_cmd_sniff_attempt,
7182 { "Sniff Attempt", "bthci_cmd.sniff_attempt",
7183 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
7184 "Number of Baseband receive slots for sniff attempt.", HFILL }
7186 { &hf_bthci_cmd_sniff_timeout,
7187 { "Timeout", "bthci_cmd.sniff_timeout",
7188 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
7189 NULL, HFILL }
7191 { &hf_bthci_cmd_timeout,
7192 { "Timeout", "bthci_cmd.timeout",
7193 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7194 "Number of Baseband slots for timeout.", HFILL }
7196 { &hf_bthci_cmd_max_interval_beacon,
7197 { "Beacon Max Interval", "bthci_cmd.beacon_max_int",
7198 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7199 "Maximal acceptable number of Baseband slots between consecutive beacons.", HFILL }
7201 { &hf_bthci_cmd_min_interval_beacon,
7202 { "Beacon Min Interval", "bthci_cmd.beacon_min_int",
7203 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7204 "Minimum acceptable number of Baseband slots between consecutive beacons.", HFILL }
7206 { &hf_bthci_cmd_flags,
7207 { "Flags", "bthci_cmd.flags",
7208 FT_UINT8, BASE_HEX, NULL, 0x0,
7209 NULL, HFILL }
7211 { &hf_bthci_cmd_flow_direction,
7212 { "Flow Direction", "bthci_cmd.flow_direction",
7213 FT_UINT8, BASE_HEX, VALS(cmd_flow_directions), 0x0,
7214 NULL, HFILL }
7216 { &hf_bthci_cmd_service_type,
7217 { "Service Type", "bthci_cmd.service_type",
7218 FT_UINT8, BASE_HEX, VALS(cmd_service_types), 0x0,
7219 NULL, HFILL }
7221 { &hf_bthci_cmd_token_rate,
7222 { "Available Token Rate", "bthci_cmd.token_rate",
7223 FT_UINT32, BASE_DEC, NULL, 0x0,
7224 "Token Rate, in bytes per second", HFILL }
7226 { &hf_bthci_cmd_token_bucket_size,
7227 { "Available Token Bucket Size", "bthci_cmd.token_bucket_size",
7228 FT_UINT32, BASE_DEC, NULL, 0x0,
7229 "Token Bucket Size in bytes", HFILL }
7231 { &hf_bthci_cmd_peak_bandwidth,
7232 { "Peak Bandwidth", "bthci_cmd.peak_bandwidth",
7233 FT_UINT32, BASE_DEC, NULL, 0x0,
7234 "Peak Bandwidth, in bytes per second", HFILL }
7236 { &hf_bthci_cmd_latency,
7237 { "Latency", "bthci_cmd.latency",
7238 FT_UINT32, BASE_DEC, NULL, 0x0,
7239 "Latency, in microseconds", HFILL }
7241 { &hf_bthci_cmd_delay_variation,
7242 { "Delay Variation", "bthci_cmd.delay_variation",
7243 FT_UINT32, BASE_DEC, NULL, 0x0,
7244 "Delay Variation, in microseconds", HFILL }
7246 { &hf_bthci_cmd_link_policy_setting_switch,
7247 { "Enable Role Switch", "bthci_cmd.link_policy_switch",
7248 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x0001,
7249 NULL, HFILL }
7251 { &hf_bthci_cmd_link_policy_setting_hold,
7252 { "Enable Hold Mode", "bthci_cmd.link_policy_hold",
7253 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x0002,
7254 NULL, HFILL }
7256 { &hf_bthci_cmd_link_policy_setting_sniff,
7257 { "Enable Sniff Mode", "bthci_cmd.link_policy_sniff",
7258 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x0004,
7259 NULL, HFILL }
7261 { &hf_bthci_cmd_link_policy_setting_park,
7262 { "Enable Park Mode", "bthci_cmd.link_policy_park",
7263 FT_UINT16, BASE_DEC, VALS(cmd_boolean), 0x0008,
7264 NULL, HFILL }
7266 { &hf_bthci_cmd_filter_type,
7267 { "Filter Type", "bthci_cmd.filter_type",
7268 FT_UINT8, BASE_HEX, VALS(cmd_filter_types), 0x0,
7269 NULL, HFILL }
7271 { &hf_bthci_cmd_inquiry_result_filter_condition_type,
7272 { "Filter Condition Type", "bthci_cmd.filter_condition_type",
7273 FT_UINT8, BASE_HEX, VALS(cmd_inquiry_result_filter_condition_types), 0x0,
7274 NULL, HFILL }
7276 { &hf_bthci_cmd_connection_setup_filter_condition_type,
7277 { "Filter Condition Type", "bthci_cmd.filter_condition_type",
7278 FT_UINT8, BASE_HEX, VALS(cmd_connection_setup_filter_condition_types), 0x0,
7279 NULL, HFILL }
7281 { &hf_bthci_cmd_cod_class_of_device_mask,
7282 { "Class of Device Mask", "bthci_cmd.class_of_device_mask",
7283 FT_UINT24, BASE_HEX, NULL, 0x0,
7284 "Bit Mask used to determine which bits of the Class of Device parameter are of interest.", HFILL }
7286 { &hf_bthci_cmd_cod_major_device_class_mask,
7287 { "Major Device Class Mask", "bthci_cmd.class_of_device_mask.major_device_class",
7288 FT_UINT16, BASE_HEX, NULL, 0x1F,
7289 NULL, HFILL }
7291 { &hf_bthci_cmd_cod_major_service_class_information_mask,
7292 { "Major Service Classes Mask: Information", "bthci_cmd.class_of_device_mask.major_service_classes.information",
7293 FT_BOOLEAN, 16, NULL, 0x8000,
7294 NULL, HFILL }
7296 { &hf_bthci_cmd_cod_major_service_class_telephony_mask,
7297 { "Major Service Classes Mask: Telephony", "bthci_cmd.class_of_device_mask.major_service_classes.telephony",
7298 FT_BOOLEAN, 16, NULL, 0x4000,
7299 NULL, HFILL }
7301 { &hf_bthci_cmd_cod_major_service_class_audio_mask,
7302 { "Major Service Classes Mask: Audio", "bthci_cmd.class_of_device_mask.major_service_classes.audio",
7303 FT_BOOLEAN, 16, NULL, 0x2000,
7304 NULL, HFILL }
7306 { &hf_bthci_cmd_cod_major_service_class_object_transfer_mask,
7307 { "Major Service Classes Mask: Object Transfer", "bthci_cmd.class_of_device_mask.major_service_classes.object_transfer",
7308 FT_BOOLEAN, 16, NULL, 0x1000,
7309 NULL, HFILL }
7311 { &hf_bthci_cmd_cod_major_service_class_capturing_mask,
7312 { "Major Service Classes Mask: Capturing", "bthci_cmd.class_of_device_mask.major_service_classes.capturing",
7313 FT_BOOLEAN, 16, NULL, 0x0800,
7314 NULL, HFILL }
7316 { &hf_bthci_cmd_cod_major_service_class_rendering_mask,
7317 { "Major Service Classes Mask: Rendering", "bthci_cmd.class_of_device_mask.major_service_classes.rendering",
7318 FT_BOOLEAN, 16, NULL, 0x0400,
7319 NULL, HFILL }
7321 { &hf_bthci_cmd_cod_major_service_class_networking_mask,
7322 { "Major Service Classes Mask: Networking", "bthci_cmd.class_of_device_mask.major_service_classes.networking",
7323 FT_BOOLEAN, 16, NULL, 0x0200,
7324 NULL, HFILL }
7326 { &hf_bthci_cmd_cod_major_service_class_positioning_mask,
7327 { "Major Service Classes Mask: Positioning", "bthci_cmd.class_of_device_mask.major_service_classes.positioning",
7328 FT_BOOLEAN, 16, NULL, 0x0100,
7329 NULL, HFILL }
7331 { &hf_bthci_cmd_cod_major_service_class_reserved_mask,
7332 { "Major Service Classes Mask: Reserved", "bthci_cmd.class_of_device_mask.major_service_classes.reserved",
7333 FT_UINT16, BASE_HEX, NULL, 0x0080,
7334 NULL, HFILL }
7336 { &hf_bthci_cmd_cod_major_service_class_le_audio_mask,
7337 { "Major Service Classes Mask: LE Audio", "bthci_cmd.class_of_device_mask.major_service_classes.le_audio",
7338 FT_UINT16, BASE_HEX, NULL, 0x0040,
7339 NULL, HFILL }
7341 { &hf_bthci_cmd_cod_major_service_class_limited_discoverable_mode_mask,
7342 { "Major Service Classes Mask: Limited Discoverable Mode", "bthci_cmd.class_of_device_mask.major_service_classes.limited_discoverable_mode",
7343 FT_BOOLEAN, 16, NULL, 0x0020,
7344 NULL, HFILL }
7346 { &hf_bthci_cmd_cod_minor_device_class_mask,
7347 { "Minor Device Class Mask", "bthci_cmd.class_of_device_mask.minor_device_class",
7348 FT_UINT8, BASE_HEX, NULL, 0xFC,
7349 NULL, HFILL }
7351 { &hf_bthci_cmd_cod_format_type_mask,
7352 { "Format Type Mask", "bthci_cmd.class_of_device_mask.format_type",
7353 FT_UINT8, BASE_HEX, NULL, 0x03,
7354 NULL, HFILL }
7356 { &hf_bthci_cmd_auto_acc_flag,
7357 { "Auto Accept Flag", "bthci_cmd.auto_accept_flag",
7358 FT_UINT8, BASE_HEX, VALS(cmd_auto_acc_flag_values), 0x0,
7359 "Class of Device of Interest", HFILL }
7361 { &hf_bthci_cmd_read_all_flag,
7362 { "Read All Flag", "bthci_cmd.read_all_flag",
7363 FT_UINT8, BASE_HEX, VALS(cmd_read_all_flag_values), 0x0,
7364 NULL, HFILL }
7366 { &hf_bthci_cmd_delete_all_flag,
7367 { "Delete All Flag", "bthci_cmd.delete_all_flag",
7368 FT_UINT8, BASE_HEX, VALS(cmd_delete_all_flag_values), 0x0,
7369 NULL, HFILL }
7371 { &hf_bthci_cmd_authentication_enable,
7372 { "Authentication Enable", "bthci_cmd.auth_enable",
7373 FT_UINT8, BASE_HEX, VALS(bthci_cmd_authentication_enable_values), 0x0,
7374 NULL, HFILL }
7376 { &hf_bthci_cmd_input_unused,
7377 { "Unused bits", "bthci_cmd.voice.unused",
7378 FT_UINT16, BASE_HEX, NULL, 0xfc00,
7379 NULL, HFILL }
7381 { &hf_bthci_cmd_input_coding,
7382 { "Input Coding", "bthci_cmd.voice.input_coding",
7383 FT_UINT16, BASE_DEC, VALS(cmd_input_coding_values), 0x0300,
7384 NULL, HFILL }
7386 { &hf_bthci_cmd_input_data_format,
7387 { "Input Data Format", "bthci_cmd.voice.input_data_format",
7388 FT_UINT16, BASE_DEC, VALS(cmd_input_data_format_values), 0x00c0,
7389 NULL, HFILL }
7391 { &hf_bthci_cmd_input_sample_size,
7392 { "Input Sample Size", "bthci_cmd.voice.input_sample_size",
7393 FT_UINT16, BASE_DEC, VALS(cmd_input_sample_size_values), 0x0020,
7394 NULL, HFILL }
7396 { &hf_bthci_cmd_linear_pcm_bit_pos,
7397 { "Linear PCM Bit Position", "bthci_cmd.voice.linear_pcm_bit_pos",
7398 FT_UINT16, BASE_DEC, NULL, 0x001c,
7399 "# bit pos. that MSB of sample is away from starting at MSB", HFILL }
7401 { &hf_bthci_cmd_air_coding_format,
7402 { "Air Coding Format", "bthci_cmd.voice.air_coding_format",
7403 FT_UINT16, BASE_DEC, VALS(cmd_air_coding_format_values), 0x0003,
7404 NULL, HFILL }
7406 { &hf_bthci_cmd_num_broadcast_retransmissions,
7407 { "Num Broadcast Retran", "bthci_cmd.num_broad_retran",
7408 FT_UINT8, BASE_DEC, NULL, 0x0,
7409 "Number of Broadcast Retransmissions", HFILL }
7411 { &hf_bthci_cmd_hold_mode_act_page,
7412 { "Suspend Page Scan", "bthci_cmd.hold_mode_page",
7413 FT_UINT8, BASE_DEC, VALS(cmd_boolean), 0x1,
7414 "Device can enter low power state", HFILL }
7416 { &hf_bthci_cmd_hold_mode_act_inquiry,
7417 { "Suspend Inquiry Scan", "bthci_cmd.hold_mode_inquiry",
7418 FT_UINT8, BASE_DEC, VALS(cmd_boolean), 0x2,
7419 "Device can enter low power state", HFILL }
7421 { &hf_bthci_cmd_hold_mode_act_periodic,
7422 { "Suspend Periodic Inquiries", "bthci_cmd.hold_mode_periodic",
7423 FT_UINT8, BASE_DEC, VALS(cmd_boolean), 0x4,
7424 "Device can enter low power state", HFILL }
7426 { &hf_bthci_cmd_scan_enable,
7427 { "Scan Enable", "bthci_cmd.scan_enable",
7428 FT_UINT8, BASE_HEX, VALS(bthci_cmd_scan_enable_values), 0x0,
7429 NULL, HFILL }
7431 { &hf_bthci_cmd_interval,
7432 { "Interval", "bthci_cmd.interval",
7433 FT_UINT16, BASE_DEC, NULL, 0x0,
7434 NULL, HFILL }
7436 { &hf_bthci_cmd_window,
7437 { "Window", "bthci_cmd.window",
7438 FT_UINT16, BASE_DEC, NULL, 0x0,
7439 NULL, HFILL }
7441 { &hf_bthci_cmd_device_name,
7442 { "Device Name", "bthci_cmd.device_name",
7443 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7444 "Userfriendly descriptive name for the device", HFILL }
7446 { &hf_bthci_cmd_num_curr_iac,
7447 { "Number of Current IAC", "bthci_cmd.num_curr_iac",
7448 FT_UINT8, BASE_DEC, NULL, 0x0,
7449 "Number of IACs which are currently in use", HFILL }
7451 { &hf_bthci_cmd_iac_lap,
7452 { "IAC LAP", "bthci_cmd.num_iac_lap",
7453 FT_UINT24, BASE_HEX, NULL, 0x0,
7454 "LAP(s)used to create IAC", HFILL }
7456 { &hf_bthci_cmd_evt_mask_00,
7457 { "Inquiry Complete", "bthci_cmd.evt_mask_00",
7458 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
7459 "Inquiry Complete Bit", HFILL }
7461 { &hf_bthci_cmd_evt_mask_01,
7462 { "Inquiry Result", "bthci_cmd.evt_mask_01",
7463 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
7464 "Inquiry Result Bit", HFILL }
7466 { &hf_bthci_cmd_evt_mask_02,
7467 { "Connect Complete", "bthci_cmd.evt_mask_02",
7468 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
7469 "Connection Complete Bit", HFILL }
7471 { &hf_bthci_cmd_evt_mask_03,
7472 { "Connect Request", "bthci_cmd.evt_mask_03",
7473 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
7474 "Connect Request Bit", HFILL }
7476 { &hf_bthci_cmd_evt_mask_04,
7477 { "Disconnect Complete", "bthci_cmd.evt_mask_04",
7478 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x10,
7479 "Disconnect Complete Bit", HFILL }
7481 { &hf_bthci_cmd_evt_mask_05,
7482 { "Auth Complete", "bthci_cmd.evt_mask_05",
7483 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x20,
7484 "Auth Complete Bit", HFILL }
7486 { &hf_bthci_cmd_evt_mask_06,
7487 { "Remote Name Req Complete", "bthci_cmd.evt_mask_06",
7488 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x40,
7489 "Remote Name Req Complete Bit", HFILL }
7491 { &hf_bthci_cmd_evt_mask_07,
7492 { "Encrypt Change", "bthci_cmd.evt_mask_07",
7493 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x80,
7494 "Encrypt Change Bit", HFILL }
7496 { &hf_bthci_cmd_evt_mask_10,
7497 { "Change Connection Link Key Complete", "bthci_cmd.evt_mask_10",
7498 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
7499 "Change Connection Link Key Complete Bit", HFILL }
7501 { &hf_bthci_cmd_evt_mask_11,
7502 { "Link Key Type Changed Complete", "bthci_cmd.evt_mask_11",
7503 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
7504 "Link Key Type Changed Complete Bit", HFILL }
7506 { &hf_bthci_cmd_evt_mask_12,
7507 { "Read Remote Supported Features", "bthci_cmd.evt_mask_12",
7508 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
7509 "Read Remote Supported Features Bit", HFILL }
7511 { &hf_bthci_cmd_evt_mask_13,
7512 { "Read Remote Ver Info Complete", "bthci_cmd.evt_mask_13",
7513 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
7514 "Read Remote Ver Info Complete Bit", HFILL }
7516 { &hf_bthci_cmd_evt_mask_14,
7517 { "QoS Setup Complete", "bthci_cmd.evt_mask_14",
7518 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x10,
7519 "QoS Setup Complete Bit", HFILL }
7521 { &hf_bthci_cmd_evt_mask_17,
7522 { "Hardware Error", "bthci_cmd.evt_mask_17",
7523 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x80,
7524 "Hardware Error Bit", HFILL }
7526 { &hf_bthci_cmd_evt_mask_20,
7527 { "Flush Occurred", "bthci_cmd.evt_mask_20",
7528 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
7529 "Flush Occurred Bit", HFILL }
7531 { &hf_bthci_cmd_evt_mask_21,
7532 { "Role Change", "bthci_cmd.evt_mask_21",
7533 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
7534 "Role Change Bit", HFILL }
7536 { &hf_bthci_cmd_evt_mask_23,
7537 { "Mode Change", "bthci_cmd.evt_mask_23",
7538 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
7539 "Mode Change Bit", HFILL }
7541 { &hf_bthci_cmd_evt_mask_24,
7542 { "Return Link Keys", "bthci_cmd.evt_mask_24",
7543 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x10,
7544 "Return Link Keys Bit", HFILL }
7546 { &hf_bthci_cmd_evt_mask_25,
7547 { "PIN Code Request", "bthci_cmd.evt_mask_25",
7548 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x20,
7549 "PIN Code Request Bit", HFILL }
7551 { &hf_bthci_cmd_evt_mask_26,
7552 { "Link Key Request", "bthci_cmd.evt_mask_26",
7553 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x40,
7554 "Link Key Request Bit", HFILL }
7556 { &hf_bthci_cmd_evt_mask_27,
7557 { "Link Key Notification", "bthci_cmd.evt_mask_27",
7558 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x80,
7559 "Link Key Notification Bit", HFILL }
7561 { &hf_bthci_cmd_evt_mask_30,
7562 { "Loopback Command", "bthci_cmd.evt_mask_30",
7563 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
7564 "Loopback Command Bit", HFILL }
7566 { &hf_bthci_cmd_evt_mask_31,
7567 { "Data Buffer Overflow", "bthci_cmd.evt_mask_31",
7568 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
7569 "Data Buffer Overflow Bit", HFILL }
7571 { &hf_bthci_cmd_evt_mask_32,
7572 { "Max Slots Change", "bthci_cmd.evt_mask_32",
7573 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
7574 "Max Slots Change Bit", HFILL }
7576 { &hf_bthci_cmd_evt_mask_33,
7577 { "Read Clock Offset Complete", "bthci_cmd.evt_mask_33",
7578 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
7579 "Read Clock Offset Complete Bit", HFILL }
7581 { &hf_bthci_cmd_evt_mask_34,
7582 { "Connection Packet Type Changed", "bthci_cmd.evt_mask_34",
7583 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x10,
7584 "Connection Packet Type Changed Bit", HFILL }
7586 { &hf_bthci_cmd_evt_mask_35,
7587 { "QoS Violation", "bthci_cmd.evt_mask_35",
7588 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x20,
7589 "QoS Violation Bit", HFILL }
7591 { &hf_bthci_cmd_evt_mask_36,
7592 { "Page Scan Mode Change", "bthci_cmd.evt_mask_36",
7593 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x40,
7594 "Page Scan Mode Change Bit", HFILL }
7596 { &hf_bthci_cmd_evt_mask_37,
7597 { "Page Scan Repetition Mode Change", "bthci_cmd.evt_mask_37",
7598 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x80,
7599 "Page Scan Repetition Mode Change Bit", HFILL }
7601 { &hf_bthci_cmd_evt_mask_40,
7602 { "Flow Specification Complete", "bthci_cmd.evt_mask_40",
7603 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
7604 "Flow Specification Complete Bit", HFILL }
7606 { &hf_bthci_cmd_evt_mask_41,
7607 { "Inquiry Result With RSSI", "bthci_cmd.evt_mask_41",
7608 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
7609 "Inquiry Result With RSSI Bit", HFILL }
7611 { &hf_bthci_cmd_evt_mask_42,
7612 { "Read Remote Ext. Features Complete", "bthci_cmd.evt_mask_42",
7613 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
7614 "Read Remote Ext. Features Complete Bit", HFILL }
7616 { &hf_bthci_cmd_evt_mask_53,
7617 { "Synchronous Connection Complete", "bthci_cmd.evt_mask_53",
7618 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
7619 "Synchronous Connection Complete Bit", HFILL }
7621 { &hf_bthci_cmd_evt_mask_54,
7622 { "Synchronous Connection Changed", "bthci_cmd.evt_mask_54",
7623 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x10,
7624 "Synchronous Connection Changed Bit", HFILL }
7626 { &hf_bthci_cmd_evt_mask_55,
7627 { "Sniff Subrate", "bthci_cmd.evt_mask_55",
7628 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x20,
7629 "Sniff Subrate Bit", HFILL }
7631 { &hf_bthci_cmd_evt_mask_56,
7632 { "Extended Inquiry Result", "bthci_cmd.evt_mask_56",
7633 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x40,
7634 "Extended Inquiry Result Bit", HFILL }
7636 { &hf_bthci_cmd_evt_mask_57,
7637 { "Encryption Key Refresh Complete", "bthci_cmd.evt_mask_57",
7638 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x80,
7639 "Encryption Key Refresh Complete Bit", HFILL }
7641 { &hf_bthci_cmd_evt_mask_60,
7642 { "IO Capability Request", "bthci_cmd.evt_mask_60",
7643 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
7644 "IO Capability Request Bit", HFILL }
7646 { &hf_bthci_cmd_evt_mask_61,
7647 { "IO Capability Response", "bthci_cmd.evt_mask_61",
7648 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
7649 "IO Capability Response Bit", HFILL }
7651 { &hf_bthci_cmd_evt_mask_62,
7652 { "User Confirmation Request", "bthci_cmd.evt_mask_62",
7653 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
7654 "User Confirmation Request Bit", HFILL }
7656 { &hf_bthci_cmd_evt_mask_63,
7657 { "User Passkey Request", "bthci_cmd.evt_mask_63",
7658 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
7659 "User Passkey Request Bit", HFILL }
7661 { &hf_bthci_cmd_evt_mask_64,
7662 { "Remote OOB Data Request", "bthci_cmd.evt_mask_64",
7663 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x10,
7664 "Remote OOB Data Request Bit", HFILL }
7666 { &hf_bthci_cmd_evt_mask_65,
7667 { "Simple Pairing Complete", "bthci_cmd.evt_mask_65",
7668 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x20,
7669 "Simple Pairing Complete Bit", HFILL }
7671 { &hf_bthci_cmd_evt_mask_67,
7672 { "Link Supervision Timeout Changed", "bthci_cmd.evt_mask_67",
7673 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x80,
7674 "Link Supervision Timeout Changed Bit", HFILL }
7676 { &hf_bthci_cmd_evt_mask_70,
7677 { "Enhanced Flush Complete", "bthci_cmd.evt_mask_70",
7678 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
7679 "Enhanced Flush Complete Bit", HFILL }
7681 { &hf_bthci_cmd_evt_mask_72,
7682 { "User Passkey Notification", "bthci_cmd.evt_mask_72",
7683 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
7684 "User Passkey Notification Bit", HFILL }
7686 { &hf_bthci_cmd_evt_mask_73,
7687 { "Keypress Notification", "bthci_cmd.evt_mask_73",
7688 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
7689 "Keypress Notification Bit", HFILL }
7691 { &hf_bthci_cmd_sco_flow_control,
7692 { "SCO Flow Control","bthci_cmd.flow_control",
7693 FT_UINT8, BASE_HEX, VALS(cmd_en_disabled), 0x0,
7694 NULL, HFILL }
7696 { &hf_bthci_cmd_num_handles,
7697 { "Number of Connection Handles", "bthci_cmd.num_handles",
7698 FT_UINT8, BASE_DEC, NULL, 0x0,
7699 NULL, HFILL }
7702 { &hf_bthci_cmd_num_compl_packets,
7703 { "Number of Completed Packets", "bthci_cmd.num_compl_packets",
7704 FT_UINT16, BASE_DEC, NULL, 0x0,
7705 "Number of Completed HCI Data Packets", HFILL }
7707 { &hf_bthci_cmd_flow_contr_enable,
7708 { "Flow Control Enable", "bthci_cmd.flow_contr_enable",
7709 FT_UINT8, BASE_HEX, VALS(cmd_flow_contr_enable), 0x0,
7710 NULL, HFILL }
7712 { &hf_bthci_cmd_host_data_packet_length_acl,
7713 {"Host ACL Data Packet Length (bytes)", "bthci_cmd.max_data_length_acl",
7714 FT_UINT16, BASE_DEC, NULL, 0x0,
7715 "Max Host ACL Data Packet length of data portion host is able to accept", HFILL }
7717 { &hf_bthci_cmd_host_data_packet_length_sco,
7718 {"Host SCO Data Packet Length (bytes)", "bthci_cmd.max_data_length_sco",
7719 FT_UINT8, BASE_DEC, NULL, 0x0,
7720 "Max Host SCO Data Packet length of data portion host is able to accept", HFILL }
7722 { &hf_bthci_cmd_host_total_num_acl_data_packets,
7723 {"Host Total Num ACL Data Packets", "bthci_cmd.max_data_num_acl",
7724 FT_UINT16, BASE_DEC, NULL, 0x0,
7725 "Total Number of HCI ACL Data Packets that can be stored in the data buffers of the Host", HFILL }
7727 { &hf_bthci_cmd_host_total_num_sco_data_packets,
7728 {"Host Total Num SCO Data Packets", "bthci_cmd.max_data_num_sco",
7729 FT_UINT16, BASE_DEC, NULL, 0x0,
7730 "Total Number of HCI SCO Data Packets that can be stored in the data buffers of the Host", HFILL }
7732 { &hf_bthci_cmd_loopback_mode,
7733 {"Loopback Mode", "bthci_cmd.loopback_mode",
7734 FT_UINT8, BASE_HEX, VALS(cmd_loopback_modes), 0x0,
7735 NULL, HFILL}
7737 { &hf_bthci_cmd_page_number,
7738 {"Page Number", "bthci_cmd.page_number",
7739 FT_UINT8, BASE_DEC, NULL, 0x0,
7740 NULL, HFILL}
7742 { &hf_bthci_cmd_transmit_bandwidth,
7743 {"Tx Bandwidth (bytes/s)", "bthci_cmd.tx_bandwidth",
7744 FT_UINT32, BASE_DEC, NULL, 0x0,
7745 NULL, HFILL}
7747 { &hf_bthci_cmd_receive_bandwidth,
7748 {"Rx Bandwidth (bytes/s)", "bthci_cmd.rx_bandwidth",
7749 FT_UINT32, BASE_DEC, NULL, 0x0,
7750 NULL, HFILL}
7752 { &hf_bthci_cmd_max_latency_ms,
7753 {"Max. Latency (ms)", "bthci_cmd.max_latency_ms",
7754 FT_UINT16, BASE_DEC, NULL, 0x0,
7755 NULL, HFILL}
7757 { &hf_bthci_cmd_max_latency,
7758 {"Max. Latency", "bthci_cmd.max_latency",
7759 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7760 "Max. Latency in baseband slots", HFILL}
7762 { &hf_bthci_cmd_retransmission_effort,
7763 {"Retransmission Effort", "bthci_cmd.retransmission_effort",
7764 FT_UINT8, BASE_DEC, VALS(cmd_rtx_effort), 0x0,
7765 NULL, HFILL}
7767 { &hf_bthci_cmd_scan_type,
7768 {"Scan Type", "bthci_cmd.inq_scan_type",
7769 FT_UINT8, BASE_DEC, VALS(cmd_scan_types), 0x0,
7770 NULL, HFILL}
7772 { &hf_bthci_cmd_inq_mode,
7773 {"Inquiry Mode", "bthci_cmd.inq_mode",
7774 FT_UINT8, BASE_DEC, VALS(bthci_cmd_inq_modes), 0x0,
7775 NULL, HFILL}
7777 { &hf_bthci_cmd_fec_required,
7778 {"FEC Required", "bthci_cmd.fec_required",
7779 FT_UINT8, BASE_DEC, VALS(cmd_boolean), 0x0,
7780 NULL, HFILL}
7782 { &hf_bthci_cmd_err_data_reporting,
7783 {"Erroneous Data Reporting", "bthci_cmd.err_data_reporting",
7784 FT_UINT8, BASE_DEC, VALS(cmd_en_disabled), 0x0,
7785 NULL, HFILL}
7787 { &hf_bthci_cmd_tx_power,
7788 {"Power Level (dBm)", "bthci_cmd.power_level",
7789 FT_INT8, BASE_DEC, NULL, 0x0,
7790 NULL, HFILL}
7792 { &hf_bthci_cmd_sco_packet_type,
7793 { "Packet Type", "bthci_cmd.sco_packet_type",
7794 FT_UINT16, BASE_HEX, NULL, 0x0,
7795 NULL, HFILL }
7797 { &hf_bthci_cmd_sco_packet_type_hv1,
7798 { "HV1 may be used", "bthci_cmd.sco_packet_type.hv1",
7799 FT_BOOLEAN, 16, NULL, 0x0001,
7800 NULL, HFILL }
7802 { &hf_bthci_cmd_sco_packet_type_hv2,
7803 { "HV2 may be used", "bthci_cmd.sco_packet_type.hv2",
7804 FT_BOOLEAN, 16, NULL, 0x0002,
7805 NULL, HFILL }
7807 { &hf_bthci_cmd_sco_packet_type_hv3,
7808 { "HV3 may be used", "bthci_cmd.sco_packet_type.hv3",
7809 FT_BOOLEAN, 16, NULL, 0x0004,
7810 NULL, HFILL }
7812 { &hf_bthci_cmd_sco_packet_type_ev3,
7813 { "EV3 may be used", "bthci_cmd.sco_packet_type.ev3",
7814 FT_BOOLEAN, 16, NULL, 0x0008,
7815 NULL, HFILL }
7817 { &hf_bthci_cmd_sco_packet_type_ev4,
7818 { "EV4 may be used", "bthci_cmd.sco_packet_type.ev4",
7819 FT_BOOLEAN, 16, NULL, 0x0010,
7820 NULL, HFILL }
7822 { &hf_bthci_cmd_sco_packet_type_ev5,
7823 { "EV5 may be used", "bthci_cmd.sco_packet_type.ev5",
7824 FT_BOOLEAN, 16, NULL, 0x0020,
7825 NULL, HFILL }
7827 { &hf_bthci_cmd_sco_packet_type_2ev3,
7828 { "2-EV3 may NOT be used", "bthci_cmd.sco_packet_type.2ev3",
7829 FT_BOOLEAN, 16, NULL, 0x0040,
7830 NULL, HFILL }
7832 { &hf_bthci_cmd_sco_packet_type_3ev3,
7833 { "3-EV3 may NOT be used", "bthci_cmd.sco_packet_type.3ev3",
7834 FT_BOOLEAN, 16, NULL, 0x0080,
7835 NULL, HFILL }
7837 { &hf_bthci_cmd_sco_packet_type_2ev5,
7838 { "2-EV5 may NOT be used", "bthci_cmd.sco_packet_type.2ev5",
7839 FT_BOOLEAN, 16, NULL, 0x0100,
7840 NULL, HFILL }
7842 { &hf_bthci_cmd_sco_packet_type_3ev5,
7843 { "3-EV5 may NOT be used", "bthci_cmd.sco_packet_type.3ev5",
7844 FT_BOOLEAN, 16, NULL, 0x0200,
7845 NULL, HFILL }
7847 { &hf_bthci_cmd_sco_packet_type_reserved,
7848 { "Reserved", "bthci_cmd.sco_packet_type.reserved",
7849 FT_UINT16, BASE_HEX, NULL, 0xFC00,
7850 NULL, HFILL }
7852 { &hf_bthci_cmd_min_remote_timeout,
7853 {"Min. Remote Timeout", "bthci_cmd.min_remote_timeout",
7854 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7855 "Min. Remote Timeout in baseband slots", HFILL}
7857 { &hf_bthci_cmd_min_local_timeout,
7858 {"Min. Local Timeout", "bthci_cmd.min_local_timeout",
7859 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
7860 "Min. Local Timeout in baseband slots", HFILL}
7862 { &hf_bthci_cmd_flush_packet_type,
7863 {"Packet Type", "bthci_cmd.flush_packet_type",
7864 FT_UINT8, BASE_DEC, VALS(cmd_flush_pkt_type), 0x0,
7865 NULL, HFILL}
7867 { &hf_bthci_cmd_afh_ch_assessment_mode,
7868 {"AFH Channel Assessment Mode", "bthci_cmd.afh_ch_assessment_mode",
7869 FT_UINT8, BASE_DEC, VALS(cmd_en_disabled), 0x0,
7870 NULL, HFILL}
7872 { &hf_bthci_cmd_ch_classification,
7873 { "Channel Classification", "bthci_cmd.ch_classification",
7874 FT_BYTES, BASE_NONE, NULL, 0x0,
7875 NULL, HFILL }
7877 { &hf_bthci_cmd_which_clock,
7878 {"Which Clock", "bthci_cmd.which_clock",
7879 FT_UINT8, BASE_DEC, VALS(cmd_which_clock), 0x0,
7880 NULL, HFILL}
7882 { &hf_bthci_cmd_io_capability,
7883 {"IO Capability", "bthci_cmd.io_capability",
7884 FT_UINT8, BASE_DEC, VALS(bthci_cmd_io_capability_vals), 0x0,
7885 NULL, HFILL}
7887 { &hf_bthci_cmd_oob_data_present,
7888 {"OOB Data Present", "bthci_cmd.oob_data_present",
7889 FT_UINT8, BASE_DEC, VALS(bthci_cmd_oob_data_present_vals), 0x0,
7890 NULL, HFILL}
7892 { &hf_bthci_cmd_auth_requirements,
7893 {"Authentication Requirements", "bthci_cmd.auth_requirements",
7894 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &bthci_cmd_auth_req_vals_ext, 0x0,
7895 NULL, HFILL}
7897 { &hf_bthci_cmd_passkey,
7898 {"Passkey", "bthci_cmd.passkey",
7899 FT_UINT32, BASE_DEC, NULL, 0x0,
7900 NULL, HFILL}
7902 { &hf_bthci_cmd_hash_c,
7903 {"Hash C", "bthci_cmd.hash_c",
7904 FT_BYTES, BASE_NONE, NULL, 0x0,
7905 NULL, HFILL}
7907 { &hf_bthci_cmd_randomizer_r,
7908 {"Randomizer R", "bthci_cmd.randomizer_r",
7909 FT_BYTES, BASE_NONE, NULL, 0x0,
7910 NULL, HFILL}
7912 { &hf_bthci_cmd_simple_pairing_mode,
7913 {"Simple Pairing Mode", "bthci_cmd.simple_pairing_mode",
7914 FT_UINT8, BASE_DEC, VALS(cmd_en_disabled), 0x0,
7915 NULL, HFILL}
7917 { &hf_bthci_cmd_simple_pairing_debug_mode,
7918 {"Simple Pairing Debug Mode", "bthci_cmd.simple_pairing_debug_mode",
7919 FT_UINT8, BASE_DEC, VALS(cmd_en_disabled), 0x0,
7920 NULL, HFILL}
7922 { &hf_bthci_cmd_notification_type,
7923 {"Notification Type", "bthci_cmd.notification_type",
7924 FT_UINT8, BASE_DEC, VALS(bthci_cmd_notification_types), 0x0,
7925 NULL, HFILL}
7927 { &hf_bthci_cmd_physical_link_handle,
7928 {"Physical Link Handle", "bthci_cmd.physical_link_handle",
7929 FT_UINT8, BASE_HEX, NULL, 0x0,
7930 NULL, HFILL}
7932 { &hf_bthci_cmd_dedicated_amp_key_length,
7933 {"Dedicated AMP Key Length", "bthci_cmd.dedicated_amp_key_length",
7934 FT_UINT8, BASE_DEC, NULL, 0x0,
7935 NULL, HFILL}
7937 { &hf_bthci_cmd_dedicated_amp_key_type,
7938 {"Dedicated AMP Key Type", "bthci_cmd.dedicated_amp_key_type",
7939 FT_UINT8, BASE_DEC, VALS(bthci_cmd_amp_key_type), 0x0,
7940 NULL, HFILL}
7942 { &hf_bthci_cmd_dedicated_amp_key,
7943 {"Dedicated AMP Key Type", "bthci_cmd.dedicated_amp_key",
7944 FT_BYTES, BASE_NONE, NULL, 0x0,
7945 NULL, HFILL}
7947 { &hf_bthci_cmd_flow_spec,
7948 { "Flow Spec", "bthci_cmd.flow_spec",
7949 FT_NONE, BASE_NONE, NULL, 0x0,
7950 NULL, HFILL }
7952 { &hf_bthci_cmd_flow_spec_sdu_size,
7953 { "Maximum SDU Size", "bthci_cmd.sdu_size",
7954 FT_UINT16, BASE_DEC, NULL, 0x0,
7955 NULL, HFILL }
7957 { &hf_bthci_cmd_flow_spec_sdu_arrival_time,
7958 { "SDU Inter-arrival Time (us)", "bthci_cmd.sdu_arrival_time",
7959 FT_UINT32, BASE_DEC, NULL, 0x0,
7960 NULL, HFILL }
7962 { &hf_bthci_cmd_flow_spec_identifier,
7963 { "Identifier", "bthci_cmd.ident",
7964 FT_UINT8, BASE_HEX, NULL, 0x0,
7965 NULL, HFILL }
7967 { &hf_bthci_cmd_flow_spec_access_latency,
7968 { "Access Latency (us)", "bthci_cmd.access_latency",
7969 FT_UINT32, BASE_DEC, NULL, 0x0,
7970 NULL, HFILL }
7972 { &hf_bthci_cmd_flow_spec_service_type,
7973 { "Service Type", "bthci_cmd.servicetype",
7974 FT_UINT8, BASE_HEX, VALS(cmd_flow_spec_servicetype), 0x0,
7975 "Level of service required", HFILL }
7977 { &hf_bthci_cmd_flush_to_us,
7978 { "Flush Timeout (us)", "bthci_cmd.flushto",
7979 FT_UINT32, BASE_DEC, NULL, 0x0,
7980 NULL, HFILL }
7982 { &hf_bthci_cmd_logical_link_handle,
7983 { "Logical Link Handle", "bthci_cmd.logical_link_handle",
7984 FT_UINT16, BASE_HEX, NULL, 0x0FFF,
7985 NULL, HFILL }
7988 { &hf_bthci_cmd_evt_mask2,
7989 { "Event Mask Page 2", "bthci_cmd.evt_mask2",
7990 FT_UINT64, BASE_HEX, NULL, 0x0,
7991 NULL, HFILL }
7993 { &hf_bthci_cmd_evt_mask2_00,
7994 { "Physical Link Complete", "bthci_cmd.evt_mask2_00",
7995 FT_BOOLEAN, 64, NULL, UINT64_C(0x01),
7996 NULL, HFILL }
7998 { &hf_bthci_cmd_evt_mask2_01,
7999 { "Channel Selected", "bthci_cmd.evt_mask2_01",
8000 FT_BOOLEAN, 64, NULL, UINT64_C(0x02),
8001 NULL, HFILL }
8003 { &hf_bthci_cmd_evt_mask2_02,
8004 { "Disconnection Physical Link", "bthci_cmd.evt_mask2_02",
8005 FT_BOOLEAN, 64, NULL, UINT64_C(0x04),
8006 NULL, HFILL }
8008 { &hf_bthci_cmd_evt_mask2_03,
8009 { "Physical Link Loss Early Warning", "bthci_cmd.evt_mask2_03",
8010 FT_BOOLEAN, 64, NULL, UINT64_C(0x08),
8011 NULL, HFILL }
8013 { &hf_bthci_cmd_evt_mask2_04,
8014 { "Physical Link Recovery", "bthci_cmd.evt_mask2_04",
8015 FT_BOOLEAN, 64, NULL, UINT64_C(0x10),
8016 NULL, HFILL }
8018 { &hf_bthci_cmd_evt_mask2_05,
8019 { "Logical Link Complete", "bthci_cmd.evt_mask2_05",
8020 FT_BOOLEAN, 64, NULL, UINT64_C(0x20),
8021 NULL, HFILL }
8023 { &hf_bthci_cmd_evt_mask2_06,
8024 { "Disconnection Logical Link Complete", "bthci_cmd.evt_mask2_06",
8025 FT_BOOLEAN, 64, NULL, UINT64_C(0x40),
8026 NULL, HFILL }
8028 { &hf_bthci_cmd_evt_mask2_07,
8029 { "Flow Spec Modify Complete", "bthci_cmd.evt_mask2_07",
8030 FT_BOOLEAN, 64, NULL, UINT64_C(0x80),
8031 NULL, HFILL }
8033 { &hf_bthci_cmd_evt_mask2_08,
8034 { "Number Of Completed Data Blocks", "bthci_cmd.evt_mask2_8",
8035 FT_BOOLEAN, 64, NULL, UINT64_C(0x100),
8036 NULL, HFILL }
8038 { &hf_bthci_cmd_evt_mask2_09,
8039 { "AMP Start Test", "bthci_cmd.evt_mask2_9",
8040 FT_BOOLEAN, 64, NULL, UINT64_C(0x200),
8041 NULL, HFILL }
8043 { &hf_bthci_cmd_evt_mask2_10,
8044 { "AMP Test End", "bthci_cmd.evt_mask2_10",
8045 FT_BOOLEAN, 64, NULL, UINT64_C(0x400),
8046 NULL, HFILL }
8048 { &hf_bthci_cmd_evt_mask2_11,
8049 { "AMP Receiver Report", "bthci_cmd.evt_mask2_11",
8050 FT_BOOLEAN, 64, NULL, UINT64_C(0x800),
8051 NULL, HFILL }
8053 { &hf_bthci_cmd_evt_mask2_12,
8054 { "Short Range Mode Change Complete", "bthci_cmd.evt_mask2_12",
8055 FT_BOOLEAN, 64, NULL, UINT64_C(0x1000),
8056 NULL, HFILL }
8058 { &hf_bthci_cmd_evt_mask2_13,
8059 { "AMP Status Change", "bthci_cmd.evt_mask2_13",
8060 FT_BOOLEAN, 64, NULL, UINT64_C(0x2000),
8061 NULL, HFILL }
8063 { &hf_bthci_cmd_evt_mask2_14,
8064 { "Triggered Clock Capture", "bthci_cmd.evt_mask2_14",
8065 FT_BOOLEAN, 64, NULL, UINT64_C(0x4000),
8066 NULL, HFILL }
8068 { &hf_bthci_cmd_evt_mask2_15,
8069 { "Synchronization Train Complete", "bthci_cmd.evt_mask2_15",
8070 FT_BOOLEAN, 64, NULL, UINT64_C(0x8000),
8071 NULL, HFILL }
8073 { &hf_bthci_cmd_evt_mask2_16,
8074 { "Synchronization Train Received", "bthci_cmd.evt_mask2_16",
8075 FT_BOOLEAN, 64, NULL, UINT64_C(0x10000),
8076 NULL, HFILL }
8078 { &hf_bthci_cmd_evt_mask2_17,
8079 { "Connectionless Peripheral Broadcast Receive", "bthci_cmd.evt_mask2_17",
8080 FT_BOOLEAN, 64, NULL, UINT64_C(0x20000),
8081 NULL, HFILL }
8083 { &hf_bthci_cmd_evt_mask2_18,
8084 { "Connectionless Peripheral Broadcast Timeout", "bthci_cmd.evt_mask2_18",
8085 FT_BOOLEAN, 64, NULL, UINT64_C(0x40000),
8086 NULL, HFILL }
8088 { &hf_bthci_cmd_evt_mask2_19,
8089 { "Truncated Page Complete", "bthci_cmd.evt_mask2_19",
8090 FT_BOOLEAN, 64, NULL, UINT64_C(0x80000),
8091 NULL, HFILL }
8093 { &hf_bthci_cmd_evt_mask2_20,
8094 { "Peripheral Page Response Timeout", "bthci_cmd.evt_mask2_20",
8095 FT_BOOLEAN, 64, NULL, UINT64_C(0x100000),
8096 NULL, HFILL }
8098 { &hf_bthci_cmd_evt_mask2_21,
8099 { "Connectionless Peripheral Broadcast Channel Map Change", "bthci_cmd.evt_mask2_21",
8100 FT_BOOLEAN, 64, NULL, UINT64_C(0x200000),
8101 NULL, HFILL }
8103 { &hf_bthci_cmd_evt_mask2_22,
8104 { "Inquiry Response Notification", "bthci_cmd.evt_mask2_22",
8105 FT_BOOLEAN, 64, NULL, UINT64_C(0x400000),
8106 NULL, HFILL }
8108 { &hf_bthci_cmd_evt_mask2_23,
8109 { "Authenticated Payload Timeout Expired", "bthci_cmd.evt_mask2_23",
8110 FT_BOOLEAN, 64, NULL, UINT64_C(0x800000),
8111 NULL, HFILL }
8113 { &hf_bthci_cmd_evt_mask2_24,
8114 { "SAM Status Change", "bthci_cmd.evt_mask2_24",
8115 FT_BOOLEAN, 64, NULL, UINT64_C(0x1000000),
8116 NULL, HFILL }
8118 { &hf_bthci_cmd_evt_mask2_25,
8119 { "Encryption Change [v2]", "bthci_cmd.evt_mask2_25",
8120 FT_BOOLEAN, 64, NULL, UINT64_C(0x2000000),
8121 NULL, HFILL }
8123 { &hf_bthci_cmd_evt_mask2_reserved,
8124 { "Reserved", "bthci_cmd.evt_mask2_25_reserved",
8125 FT_UINT64, BASE_HEX, NULL, UINT64_C(0xFFFFFFFFFC000000),
8126 NULL, HFILL }
8128 { &hf_bthci_cmd_location_domain_aware,
8129 { "Location Domain Aware", "bthci_cmd.location_domain_aware",
8130 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
8131 NULL, HFILL }
8133 { &hf_bthci_cmd_location_domain,
8134 { "Location Domain", "bthci_cmd.location_domain",
8135 FT_STRING, BASE_NONE, NULL, 0x0,
8136 "ISO 3166-1 Country Code", HFILL }
8138 { &hf_bthci_cmd_location_domain_options,
8139 { "Location Domain Options", "bthci_cmd.location_domain_options",
8140 FT_STRING, BASE_NONE, NULL, 0x0,
8141 NULL, HFILL }
8143 { &hf_bthci_cmd_location_options,
8144 { "Location Options", "bthci_cmd.location_options",
8145 FT_UINT8, BASE_HEX, NULL, 0x0,
8146 NULL, HFILL }
8148 { &hf_bthci_cmd_flow_control_mode,
8149 { "Flow Control Mode", "bthci_cmd.flow_control_mode",
8150 FT_UINT8, BASE_HEX, VALS(cmd_flow_ctrl_mode), 0x0,
8151 NULL, HFILL }
8153 { &hf_bthci_cmd_tx_power_level_type,
8154 { "Tx Power Level Type", "bthci_cmd.tx_power_level_type",
8155 FT_UINT8, BASE_HEX, VALS(cmd_power_level_types), 0x0,
8156 NULL, HFILL }
8158 { &hf_bthci_cmd_short_range_mode,
8159 { "Short Range Mode", "bthci_cmd.short_range_mode",
8160 FT_UINT8, BASE_HEX, VALS(cmd_en_disabled), 0x0,
8161 NULL, HFILL }
8163 { &hf_bthci_cmd_enable_amp_recv_reports,
8164 { "Enable AMP Receiver Reports", "bthci_cmd.enable_amp_recv_reports",
8165 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
8166 NULL, HFILL }
8168 { &hf_bthci_cmd_amp_recv_report_interval,
8169 { "AMP Receiver Report Interval (s)", "bthci_cmd.amp_recv_report_interval",
8170 FT_UINT8, BASE_DEC, 0x0, 0x0,
8171 NULL, HFILL }
8173 { &hf_bthci_cmd_length_so_far,
8174 { "Length So Far", "bthci_cmd.length_so_far",
8175 FT_UINT16, BASE_DEC, 0x0, 0x0,
8176 NULL, HFILL }
8178 { &hf_bthci_cmd_amp_assoc_length,
8179 { "AMP Assoc Length", "bthci_cmd.amp_assoc_length",
8180 FT_UINT16, BASE_DEC, 0x0, 0x0,
8181 NULL, HFILL }
8183 { &hf_bthci_cmd_amp_remaining_assoc_length,
8184 { "AMP Remaining Assoc Length", "bthci_cmd.amp_remaining_assoc_length",
8185 FT_UINT16, BASE_DEC, 0x0, 0x0,
8186 NULL, HFILL }
8188 { &hf_bthci_cmd_amp_assoc_fragment,
8189 { "AMP Assoc Fragment", "bthci_cmd.amp_assoc_fragment",
8190 FT_BYTES, BASE_NONE, 0x0, 0x0,
8191 NULL, HFILL }
8193 { &hf_bthci_cmd_le_supported_host,
8194 { "LE Supported Host", "bthci_cmd.le_supported_host",
8195 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
8196 NULL, HFILL }
8198 { &hf_bthci_cmd_le_simultaneous_host,
8199 { "Simultaneous LE Host", "bthci_cmd.le_simultaneous_host",
8200 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
8201 "Support for both LE and BR/EDR to same device", HFILL }
8203 { &hf_bthci_cmd_le_event_mask,
8204 { "LE Event Mask", "bthci_cmd.le_event_mask",
8205 FT_UINT64, BASE_HEX, NULL, 0x0,
8206 NULL, HFILL }
8208 { &hf_bthci_cmd_le_event_mask_le_connection_complete,
8209 { "LE Connection Complete", "bthci_cmd.le_event_mask.le_connection_complete",
8210 FT_BOOLEAN, 64, NULL, UINT64_C(0x01),
8211 NULL, HFILL }
8213 { &hf_bthci_cmd_le_event_mask_le_advertising_report,
8214 { "LE Advertising Report", "bthci_cmd.le_event_mask.le_advertising_report",
8215 FT_BOOLEAN, 64, NULL, UINT64_C(0x02),
8216 NULL, HFILL }
8218 { &hf_bthci_cmd_le_event_mask_le_connection_update_complete,
8219 { "LE Connection Update Complete", "bthci_cmd.le_event_mask.le_connection_update_complete",
8220 FT_BOOLEAN, 64, NULL, UINT64_C(0x04),
8221 NULL, HFILL }
8223 { &hf_bthci_cmd_le_event_mask_le_read_remote_features_complete,
8224 { "LE Read Remote Features (Page 0) Complete", "bthci_cmd.le_event_mask.le_read_remote_features_complete",
8225 FT_BOOLEAN, 64, NULL, UINT64_C(0x08),
8226 NULL, HFILL }
8228 { &hf_bthci_cmd_le_event_mask_le_long_term_key_request,
8229 { "LE Long Term Key Request", "bthci_cmd.le_event_mask.le_long_term_key_request",
8230 FT_BOOLEAN, 64, NULL, UINT64_C(0x10),
8231 NULL, HFILL }
8233 { &hf_bthci_cmd_le_event_mask_le_remote_connection_parameter_request,
8234 { "LE Remote Connection Parameter Request", "bthci_cmd.le_event_mask.le_remote_connection_parameter_request",
8235 FT_BOOLEAN, 64, NULL, UINT64_C(0x20),
8236 NULL, HFILL }
8238 { &hf_bthci_cmd_le_event_mask_le_data_length_change,
8239 { "LE Data Length Change", "bthci_cmd.le_event_mask.le_data_length_change",
8240 FT_BOOLEAN, 64, NULL, UINT64_C(0x40),
8241 NULL, HFILL }
8243 { &hf_bthci_cmd_le_event_mask_le_read_local_p256_public_key_complete,
8244 { "LE Read Local P-256 Public Key Complete", "bthci_cmd.le_event_mask.le_read_local_p256_public_key_complete",
8245 FT_BOOLEAN, 64, NULL, UINT64_C(0x80),
8246 NULL, HFILL }
8248 { &hf_bthci_cmd_le_event_mask_le_generate_dhkey_complete,
8249 { "LE Generate DHKey Complete", "bthci_cmd.le_event_mask.le_generate_dhkey_complete",
8250 FT_BOOLEAN, 64, NULL, UINT64_C(0x100),
8251 NULL, HFILL }
8253 { &hf_bthci_cmd_le_event_mask_le_enhanced_connection_complete_v1,
8254 { "LE Enhanced Connection Complete [v1]", "bthci_cmd.le_event_mask.le_enhanced_connection_complete_v1",
8255 FT_BOOLEAN, 64, NULL, UINT64_C(0x200),
8256 NULL, HFILL }
8258 { &hf_bthci_cmd_le_event_mask_le_direct_advertising_report,
8259 { "LE Direct Advertising Report", "bthci_cmd.le_event_mask.le_direct_advertising_report",
8260 FT_BOOLEAN, 64, NULL, UINT64_C(0x400),
8261 NULL, HFILL }
8263 { &hf_bthci_cmd_le_event_mask_le_phy_update_complete,
8264 { "LE PHY Update Complete", "bthci_cmd.le_event_mask.le_phy_update_complete",
8265 FT_BOOLEAN, 64, NULL, UINT64_C(0x800),
8266 NULL, HFILL }
8268 { &hf_bthci_cmd_le_event_mask_le_extended_advertising_report,
8269 { "LE Extended Advertising Report", "bthci_cmd.le_event_mask.le_extended_advertising_report",
8270 FT_BOOLEAN, 64, NULL, UINT64_C(0x1000),
8271 NULL, HFILL }
8273 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_established_v1,
8274 { "LE Periodic Advertising Sync Established [v1]", "bthci_cmd.le_event_mask.le_periodic_advertising_sync_established_v1",
8275 FT_BOOLEAN, 64, NULL, UINT64_C(0x2000),
8276 NULL, HFILL }
8278 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_report_v1,
8279 { "LE Periodic Advertising Report [v1]", "bthci_cmd.le_event_mask.le_periodic_advertising_report_v1",
8280 FT_BOOLEAN, 64, NULL, UINT64_C(0x4000),
8281 NULL, HFILL }
8283 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_lost,
8284 { "LE Periodic Advertising Sync Lost", "bthci_cmd.le_event_mask.le_periodic_advertising_sync_lost",
8285 FT_BOOLEAN, 64, NULL, UINT64_C(0x8000),
8286 NULL, HFILL }
8288 { &hf_bthci_cmd_le_event_mask_le_extended_scan_timeout,
8289 { "LE Extended Scan Timeout", "bthci_cmd.le_event_mask.le_extended_scan_timeout",
8290 FT_BOOLEAN, 64, NULL, UINT64_C(0x10000),
8291 NULL, HFILL }
8293 { &hf_bthci_cmd_le_event_mask_le_extended_advertising_set_terminated,
8294 { "LE Extended Advertising Set Terminated", "bthci_cmd.le_event_mask.le_extended_advertising_set_terminated",
8295 FT_BOOLEAN, 64, NULL, UINT64_C(0x20000),
8296 NULL, HFILL }
8298 { &hf_bthci_cmd_le_event_mask_le_scan_request_received,
8299 { "LE Scan Request Received", "bthci_cmd.le_event_mask.le_scan_request_received",
8300 FT_BOOLEAN, 64, NULL, UINT64_C(0x40000),
8301 NULL, HFILL }
8303 { &hf_bthci_cmd_le_event_mask_le_channel_selection_algorithm,
8304 { "LE Channel Selection Algorithm", "bthci_cmd.le_event_mask.le_channel_selection_algorithm",
8305 FT_BOOLEAN, 64, NULL, UINT64_C(0x80000),
8306 NULL, HFILL }
8308 { &hf_bthci_cmd_le_event_mask_le_connectionless_iq_report,
8309 { "LE Connectionless IQ Report", "bthci_cmd.le_event_mask.le_connectionless_iq_report",
8310 FT_BOOLEAN, 64, NULL, UINT64_C(0x100000),
8311 NULL, HFILL }
8313 { &hf_bthci_cmd_le_event_mask_le_connection_iq_report,
8314 { "LE Connection IQ Report", "bthci_cmd.le_event_mask.le_connection_iq_report",
8315 FT_BOOLEAN, 64, NULL, UINT64_C(0x200000),
8316 NULL, HFILL }
8318 { &hf_bthci_cmd_le_event_mask_le_cte_request_failed,
8319 { "LE CTE Request Failed", "bthci_cmd.le_event_mask.le_cte_request_failed",
8320 FT_BOOLEAN, 64, NULL, UINT64_C(0x400000),
8321 NULL, HFILL }
8323 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_transfer_received_v1,
8324 { "LE Periodic Advertising Sync Transfer Received [v1]", "bthci_cmd.le_event_mask.le_periodic_advertising_sync_transfer_received_v1",
8325 FT_BOOLEAN, 64, NULL, UINT64_C(0x800000),
8326 NULL, HFILL }
8328 { &hf_bthci_cmd_le_event_mask_le_cis_established_v1,
8329 { "LE CIS Established [v1]", "bthci_cmd.le_event_mask.le_cis_established_v1",
8330 FT_BOOLEAN, 64, NULL, UINT64_C(0x1000000),
8331 NULL, HFILL }
8333 { &hf_bthci_cmd_le_event_mask_le_cis_request,
8334 { "LE CIS Request", "bthci_cmd.le_event_mask.le_cis_request",
8335 FT_BOOLEAN, 64, NULL, UINT64_C(0x2000000),
8336 NULL, HFILL }
8338 { &hf_bthci_cmd_le_event_mask_le_create_big_complete,
8339 { "LE Create BIG Complete", "bthci_cmd.le_event_mask.le_create_big_complete",
8340 FT_BOOLEAN, 64, NULL, UINT64_C(0x4000000),
8341 NULL, HFILL }
8343 { &hf_bthci_cmd_le_event_mask_le_terminate_big_complete,
8344 { "LE Terminate BIG Complete", "bthci_cmd.le_event_mask.le_terminate_big_complete",
8345 FT_BOOLEAN, 64, NULL, UINT64_C(0x8000000),
8346 NULL, HFILL }
8348 { &hf_bthci_cmd_le_event_mask_le_big_sync_established,
8349 { "LE BIG Sync Established", "bthci_cmd.le_event_mask.le_big_sync_established",
8350 FT_BOOLEAN, 64, NULL, UINT64_C(0x10000000),
8351 NULL, HFILL }
8353 { &hf_bthci_cmd_le_event_mask_le_big_sync_lost,
8354 { "LE BIG Sync Lost", "bthci_cmd.le_event_mask.le_big_sync_lost",
8355 FT_BOOLEAN, 64, NULL, UINT64_C(0x20000000),
8356 NULL, HFILL }
8358 { &hf_bthci_cmd_le_event_mask_le_request_peer_sca_complete,
8359 { "LE Request Peer SCA Complete", "bthci_cmd.le_event_mask.le_request_peer_sca_complete",
8360 FT_BOOLEAN, 64, NULL, UINT64_C(0x40000000),
8361 NULL, HFILL }
8363 { &hf_bthci_cmd_le_event_mask_le_path_loss_threshold,
8364 { "LE Path Loss Threshold", "bthci_cmd.le_event_mask.le_path_loss_threshold",
8365 FT_BOOLEAN, 64, NULL, UINT64_C(0x80000000),
8366 NULL, HFILL }
8368 { &hf_bthci_cmd_le_event_mask_le_transmit_power_reporting,
8369 { "LE Transmit Power Reporting", "bthci_cmd.le_event_mask.le_transmit_power_reporting",
8370 FT_BOOLEAN, 64, NULL, UINT64_C(0x100000000),
8371 NULL, HFILL }
8373 { &hf_bthci_cmd_le_event_mask_le_biginfo_advertising_report,
8374 { "LE BIGInfo Advertising Report", "bthci_cmd.le_event_mask.le_biginfo_advertising_report",
8375 FT_BOOLEAN, 64, NULL, UINT64_C(0x200000000),
8376 NULL, HFILL }
8378 { &hf_bthci_cmd_le_event_mask_le_subrate_changed,
8379 { "LE Subrate Changed", "bthci_cmd.le_event_mask.le_subrate_changed",
8380 FT_BOOLEAN, 64, NULL, UINT64_C(0x400000000),
8381 NULL, HFILL }
8383 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_established_v2,
8384 { "LE Periodic Advertising Sync Established [v2]", "bthci_cmd.le_event_mask.le_periodic_advertising_sync_established_v2",
8385 FT_BOOLEAN, 64, NULL, UINT64_C(0x800000000),
8386 NULL, HFILL }
8388 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_report_v2,
8389 { "LE Periodic Advertising Report [v2]", "bthci_cmd.le_event_mask.le_event_mask_le_periodic_advertising_report_v2",
8390 FT_BOOLEAN, 64, NULL, UINT64_C(0x1000000000),
8391 NULL, HFILL }
8393 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_sync_transfer_received_v2,
8394 { "LE Periodic Advertising Sync Transfer Received [v2]", "bthci_cmd.le_event_mask.le_periodic_advertising_sync_transfer_received_v2",
8395 FT_BOOLEAN, 64, NULL, UINT64_C(0x2000000000),
8396 NULL, HFILL }
8398 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_subevent_data_request,
8399 { "LE Periodic Advertising Subevent Data Request", "bthci_cmd.le_event_mask.le_periodic_advertising_subevent_data_request",
8400 FT_BOOLEAN, 64, NULL, UINT64_C(0x4000000000),
8401 NULL, HFILL }
8403 { &hf_bthci_cmd_le_event_mask_le_periodic_advertising_response_report,
8404 { "LE Periodic Advertising Response Report", "bthci_cmd.le_event_mask.le_periodic_advertising_response_report",
8405 FT_BOOLEAN, 64, NULL, UINT64_C(0x8000000000),
8406 NULL, HFILL }
8408 { &hf_bthci_cmd_le_event_mask_le_enhanced_connection_complete_v2,
8409 { "LE Enhanced Connection Complete [v2]", "bthci_cmd.le_event_mask.le_enhanced_connection_complete_v2",
8410 FT_BOOLEAN, 64, NULL, UINT64_C(0x10000000000),
8411 NULL, HFILL }
8413 { &hf_bthci_cmd_le_event_mask_le_cis_established_v2,
8414 { "LE CIS Established [v2]", "bthci_cmd.le_event_mask.le_cis_established_v2",
8415 FT_BOOLEAN, 64, NULL, UINT64_C(0x20000000000),
8416 NULL, HFILL }
8418 { &hf_bthci_cmd_le_event_mask_le_read_all_remote_features_complete,
8419 { "LE Read All Remote Features Complete", "bthci_cmd.le_event_mask.le_read_all_remote_features_complete",
8420 FT_BOOLEAN, 64, NULL, UINT64_C(0x40000000000),
8421 NULL, HFILL }
8423 { &hf_bthci_cmd_le_event_mask_le_cs_read_remote_supported_capabilities_complete,
8424 { "LE CS Read Remote Supported Capabilities Complete", "bthci_cmd.le_event_mask.le_cs_read_remote_supported_capabilities_complete",
8425 FT_BOOLEAN, 64, NULL, UINT64_C(0x80000000000),
8426 NULL, HFILL }
8428 { &hf_bthci_cmd_le_event_mask_le_cs_read_remote_fae_table_complete,
8429 { "LE CS Read Remote FAE Table Complete", "bthci_cmd.le_event_mask.le_cs_read_remote_fae_table_complete",
8430 FT_BOOLEAN, 64, NULL, UINT64_C(0x100000000000),
8431 NULL, HFILL }
8433 { &hf_bthci_cmd_le_event_mask_le_cs_security_enable_complete,
8434 { "LE CS Security Enable Complete", "bthci_cmd.le_event_mask.le_cs_security_enable_complete",
8435 FT_BOOLEAN, 64, NULL, UINT64_C(0x200000000000),
8436 NULL, HFILL }
8438 { &hf_bthci_cmd_le_event_mask_le_cs_config_complete,
8439 { "LE CS Config Complete", "bthci_cmd.le_event_mask.le_cs_config_complete",
8440 FT_BOOLEAN, 64, NULL, UINT64_C(0x400000000000),
8441 NULL, HFILL }
8443 { &hf_bthci_cmd_le_event_mask_le_cs_procedure_enable_complete,
8444 { "LE CS Procedure Enable Complete", "bthci_cmd.le_event_mask.le_cs_procedure_enable_complete",
8445 FT_BOOLEAN, 64, NULL, UINT64_C(0x800000000000),
8446 NULL, HFILL }
8448 { &hf_bthci_cmd_le_event_mask_le_cs_subevent_result,
8449 { "LE CS Subevent Result", "bthci_cmd.le_event_mask.le_cs_subevent_result",
8450 FT_BOOLEAN, 64, NULL, UINT64_C(0x1000000000000),
8451 NULL, HFILL }
8453 { &hf_bthci_cmd_le_event_mask_le_cs_subevent_result_continue,
8454 { "LE CS Subevent Result Continue", "bthci_cmd.le_event_mask.le_cs_subevent_result_continue",
8455 FT_BOOLEAN, 64, NULL, UINT64_C(0x2000000000000),
8456 NULL, HFILL }
8458 { &hf_bthci_cmd_le_event_mask_le_cs_test_end_complete,
8459 { "LE CS Test End Complete", "bthci_cmd.le_event_mask.le_cs_test_end_complete",
8460 FT_BOOLEAN, 64, NULL, UINT64_C(0x4000000000000),
8461 NULL, HFILL }
8463 { &hf_bthci_cmd_le_event_mask_le_monitored_advertisers_report,
8464 { "LE Monitored Advertisers Report", "bthci_cmd.le_event_mask.le_monitored_advertisers_report",
8465 FT_BOOLEAN, 64, NULL, UINT64_C(0x8000000000000),
8466 NULL, HFILL }
8468 { &hf_bthci_cmd_le_event_mask_le_frame_space_update_complete,
8469 { "LE Frame Space Update Complete", "bthci_cmd.le_event_mask.le_frame_space_update_complete",
8470 FT_BOOLEAN, 64, NULL, UINT64_C(0x10000000000000),
8471 NULL, HFILL }
8473 { &hf_bthci_cmd_le_event_mask_le_reserved,
8474 { "Reserved", "bthci_cmd.le_event_mask.reserved",
8475 FT_UINT64, BASE_HEX, NULL, UINT64_C(0xFFE0000000000000),
8476 NULL, HFILL }
8478 { &hf_bthci_cmd_le_advts_interval_min,
8479 { "Advertising Interval Min", "bthci_cmd.le_advts_interval_min",
8480 FT_UINT16, BASE_DEC, NULL, 0x0,
8481 NULL, HFILL }
8483 { &hf_bthci_cmd_le_advts_interval_max,
8484 { "Advertising Interval Max", "bthci_cmd.le_advts_interval_max",
8485 FT_UINT16, BASE_DEC, NULL, 0x0,
8486 NULL, HFILL }
8488 { &hf_bthci_cmd_le_advts_type,
8489 { "Advertising Type", "bthci_cmd.le_advts_type",
8490 FT_UINT8, BASE_HEX, VALS(cmd_le_advertising_types), 0x0,
8491 NULL, HFILL }
8493 { &hf_bthci_cmd_le_address_type,
8494 { "Address Type", "bthci_cmd.le_address_type",
8495 FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x0,
8496 NULL, HFILL }
8498 { &hf_bthci_cmd_le_own_address_type,
8499 { "Own Address Type", "bthci_cmd.le_own_address_type",
8500 FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x0,
8501 NULL, HFILL }
8503 { &hf_bthci_cmd_le_peer_address_type,
8504 { "Peer Address Type", "bthci_cmd.le_peer_address_type",
8505 FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x0,
8506 NULL, HFILL }
8508 { &hf_bthci_cmd_le_peer_identity_address_type,
8509 { "Peer Identity Address Type", "bthci_cmd.le_peer_identity_address_type",
8510 FT_UINT8, BASE_HEX, VALS(cmd_identity_address_types_vals), 0x0,
8511 NULL, HFILL }
8513 { &hf_bthci_cmd_le_direct_address_type,
8514 { "Direct Address Type", "bthci_cmd.le_direct_address_type",
8515 FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x0,
8516 NULL, HFILL }
8518 { &hf_bthci_cmd_le_advts_channel_map_1,
8519 { "Channel 37", "bthci_cmd.le_advts_ch_map_1",
8520 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
8521 NULL, HFILL }
8523 { &hf_bthci_cmd_le_advts_channel_map_2,
8524 { "Channel 38", "bthci_cmd.le_advts_ch_map_2",
8525 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
8526 NULL, HFILL }
8528 { &hf_bthci_cmd_le_advts_channel_map_3,
8529 { "Channel 39", "bthci_cmd.le_advts_ch_map_3",
8530 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
8531 NULL, HFILL }
8533 { &hf_bthci_cmd_le_advts_filter_policy,
8534 { "Advertising Filter Policy", "bthci_cmd.le_advts_filter_policy",
8535 FT_UINT8, BASE_HEX, VALS(cmd_le_advertising_filter_policy), 0x0,
8536 NULL, HFILL }
8538 { &hf_bthci_cmd_le_data_length,
8539 { "Data Length", "bthci_cmd.le_data_length",
8540 FT_UINT8, BASE_DEC, NULL, 0x0,
8541 NULL, HFILL }
8543 { &hf_bthci_cmd_le_advts_enable,
8544 { "Advertising Enable", "bthci_cmd.le_advts_enable",
8545 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
8546 NULL, HFILL }
8548 { &hf_bthci_cmd_le_scan_enable,
8549 { "Scan Enable", "bthci_cmd.le_scan_enable",
8550 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
8551 NULL, HFILL }
8553 { &hf_bthci_cmd_le_filter_duplicates,
8554 { "Filter Duplicates", "bthci_cmd.le_filter_duplicates",
8555 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
8556 NULL, HFILL }
8558 { &hf_bthci_cmd_le_scan_type,
8559 { "Scan Type", "bthci_cmd.le_scan_type",
8560 FT_UINT8, BASE_HEX, VALS(cmd_le_scan_types), 0x0,
8561 NULL, HFILL }
8563 { &hf_bthci_cmd_le_scan_interval,
8564 { "Scan Interval", "bthci_cmd.le_scan_interval",
8565 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8566 NULL, HFILL }
8568 { &hf_bthci_cmd_le_scan_window,
8569 { "Scan Window", "bthci_cmd.le_scan_window",
8570 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8571 NULL, HFILL }
8573 { &hf_bthci_cmd_le_scan_filter_policy,
8574 { "Scan Filter Policy", "bthci_cmd.le_scan_filter_policy",
8575 FT_UINT8, BASE_HEX, NULL, 0x0,
8576 NULL, HFILL }
8578 { &hf_bthci_cmd_scan_filter_policy_filtered,
8579 { "Filtered (Use Filter Accept List)", "bthci_cmd.scan_filter_policy.filtered",
8580 FT_BOOLEAN, 8, NULL, 0x01,
8581 NULL, HFILL }
8583 { &hf_bthci_cmd_scan_filter_policy_extended,
8584 { "Extended (Allow Unresolvable TargetA Address)", "bthci_cmd.scan_filter_policy.extended",
8585 FT_BOOLEAN, 8, NULL, 0x02,
8586 NULL, HFILL }
8588 { &hf_bthci_cmd_scan_filter_policy_decision_mode,
8589 { "Decision Mode", "bthci_cmd.scan_filter_policy.decision_mode",
8590 FT_UINT8, BASE_HEX, VALS(cmd_decision_mode_filter_policy), 0x0C,
8591 NULL, HFILL }
8593 { &hf_bthci_cmd_scan_filter_policy_reserved,
8594 { "Reserved", "bthci_cmd.scan_filter_policy.reserved",
8595 FT_UINT8, BASE_HEX, NULL, 0xF0,
8596 NULL, HFILL }
8598 { &hf_bthci_cmd_le_initiator_filter_policy,
8599 { "Initiator Filter Policy", "bthci_cmd.le_initiator_filter_policy",
8600 FT_UINT8, BASE_HEX, VALS(cmd_init_filter_policy), 0x0,
8601 NULL, HFILL }
8603 { &hf_bthci_cmd_le_con_interval_min,
8604 { "Connection Interval Min", "bthci_cmd.le_con_interval_min",
8605 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
8606 NULL, HFILL }
8608 { &hf_bthci_cmd_le_con_interval_max,
8609 { "Connection Interval Max", "bthci_cmd.le_con_interval_max",
8610 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
8611 NULL, HFILL }
8613 { &hf_bthci_cmd_le_con_latency,
8614 { "Max Connection Latency", "bthci_cmd.le_con_latency",
8615 FT_UINT16, BASE_DEC, NULL, 0x0,
8616 NULL, HFILL }
8618 { &hf_bthci_cmd_le_supervision_timeout,
8619 { "Supervision Timeout", "bthci_cmd.le_supv_timeout",
8620 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p01_sec), 0x0,
8621 NULL, HFILL }
8623 { &hf_bthci_cmd_le_min_ce_length,
8624 { "Min CE Length", "bthci_cmd.le_min_ce_length",
8625 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8626 "Min. Connection Event Length", HFILL }
8628 { &hf_bthci_cmd_le_max_ce_length,
8629 { "Max CE Length", "bthci_cmd.le_max_ce_length",
8630 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8631 "Max. Connection Event Length", HFILL }
8633 { &hf_bthci_cmd_le_channel_map,
8634 { "Channel Map", "bthci_cmd.le_channel_map",
8635 FT_BYTES, BASE_NONE, NULL, 0x0,
8636 NULL, HFILL }
8638 { &hf_bthci_cmd_key,
8639 { "Key", "bthci_cmd.le_key",
8640 FT_BYTES, BASE_NONE, NULL, 0x0,
8641 "Encryption Key", HFILL }
8643 { &hf_bthci_cmd_plaintext_data,
8644 { "Plaintext", "bthci_cmd.le_plaintext",
8645 FT_BYTES, BASE_NONE, NULL, 0x0,
8646 NULL, HFILL }
8648 { &hf_bthci_cmd_random_number,
8649 { "Random Number", "bthci_cmd.le_random_number",
8650 FT_BYTES, BASE_NONE, NULL, 0x0,
8651 NULL, HFILL }
8653 { &hf_bthci_cmd_encrypted_diversifier,
8654 { "Encrypted Diversifier", "bthci_cmd.le_encrypted_diversifier",
8655 FT_UINT16, BASE_HEX, NULL, 0x0,
8656 NULL, HFILL }
8658 { &hf_bthci_cmd_le_long_term_key,
8659 { "Long Term Key", "bthci_cmd.le_long_term_key",
8660 FT_BYTES, BASE_NONE, NULL, 0x0,
8661 NULL, HFILL }
8663 { &hf_bthci_cmd_rx_frequency,
8664 { "Rx Frequency", "bthci_cmd.rx_frequency",
8665 FT_UINT8, BASE_DEC, NULL, 0x0,
8666 NULL, HFILL }
8668 { &hf_bthci_cmd_tx_frequency,
8669 { "Tx Frequency", "bthci_cmd.tx_frequency",
8670 FT_UINT8, BASE_DEC, NULL, 0x0,
8671 NULL, HFILL }
8673 { &hf_bthci_cmd_test_data_length,
8674 { "Test Data Length", "bthci_cmd.le_test_data_length",
8675 FT_UINT8, BASE_DEC, NULL, 0x0,
8676 NULL, HFILL }
8678 { &hf_bthci_cmd_test_packet_payload,
8679 { "Packet Payload", "bthci_cmd.le_test_payload",
8680 FT_UINT8, BASE_HEX, VALS(cmd_le_test_pkt_payload), 0x0,
8681 NULL, HFILL }
8683 { &hf_bthci_cmd_parameter,
8684 { "Parameter", "bthci_cmd.parameter",
8685 FT_NONE, BASE_NONE, NULL, 0x0,
8686 NULL, HFILL }
8688 { &hf_response_in_frame,
8689 { "Response in frame", "bthci_cmd.response_in_frame",
8690 FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
8691 NULL, HFILL }
8693 { &hf_command_response_time_delta,
8694 { "Command-Response Delta", "bthci_cmd.command_response_delta",
8695 FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x00,
8696 NULL, HFILL }
8698 { &hf_pending_in_frame,
8699 { "Pending in frame", "bthci_cmd.pending_in_frame",
8700 FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
8701 NULL, HFILL }
8703 { &hf_command_pending_time_delta,
8704 { "Command-Pending Delta", "bthci_cmd.command_pending_delta",
8705 FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x00,
8706 NULL, HFILL }
8708 { &hf_bthci_cmd_le_tx_octets,
8709 { "TxOctets", "bthci_cmd.le_tx_octets",
8710 FT_UINT16, BASE_DEC, NULL, 0x0,
8711 NULL, HFILL }
8713 { &hf_bthci_cmd_le_tx_time,
8714 { "TxTime", "bthci_cmd.le_tx_time",
8715 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
8716 NULL, HFILL }
8718 { &hf_bthci_cmd_le_suggested_max_tx_octets,
8719 { "SuggestedMaxTxOctets", "bthci_cmd.le_suggested_max_tx_octets",
8720 FT_UINT16, BASE_DEC, NULL, 0x0,
8721 NULL, HFILL }
8723 { &hf_bthci_cmd_le_suggested_max_tx_time,
8724 { "SuggestedMaxTxTime", "bthci_cmd.le_suggested_max_tx_time",
8725 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
8726 NULL, HFILL }
8728 { &hf_bthci_cmd_le_remote_p_256_public_key,
8729 { "Remote_P-256_Public_Key", "bthci_cmd.le_remote_p_256_public_key",
8730 FT_BYTES, BASE_NONE, NULL, 0x0,
8731 NULL, HFILL }
8733 { &hf_bthci_cmd_le_peer_irk,
8734 { "Peer IRK", "bthci_cmd.le_peer_irk",
8735 FT_BYTES, BASE_NONE, NULL, 0x0,
8736 NULL, HFILL }
8738 { &hf_bthci_cmd_le_local_irk,
8739 { "Local IRK", "bthci_cmd.le_local_irk",
8740 FT_BYTES, BASE_NONE, NULL, 0x0,
8741 NULL, HFILL }
8743 { &hf_bthci_cmd_le_address_resolution_enable,
8744 { "Address Resolution Enable", "bthci_cmd.le_address_resolution_enable",
8745 FT_UINT8, BASE_HEX, VALS(cmd_le_address_resolution_enable), 0x0,
8746 NULL, HFILL }
8748 { &hf_bthci_cmd_le_rpa_timeout,
8749 { "RPA Timeout", "bthci_cmd.le_rpa_timeout",
8750 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_second_seconds), 0x0,
8751 NULL, HFILL }
8753 { &hf_bthci_cmd_advertising_handle,
8754 { "Advertising Handle", "bthci_cmd.advertising_handle",
8755 FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(bluetooth_not_used_0xff_special), 0x0,
8756 NULL, HFILL }
8758 { &hf_bthci_cmd_advertising_ext_interval_min,
8759 { "Advertising Interval Min", "bthci_cmd.le_advts_interval_min",
8760 FT_UINT24, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8761 NULL, HFILL }
8763 { &hf_bthci_cmd_advertising_ext_interval_max,
8764 { "Advertising Interval Max", "bthci_cmd.le_advts_interval_max",
8765 FT_UINT24, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8766 NULL, HFILL }
8768 { &hf_bthci_cmd_advertising_properties,
8769 { "Advertising Event Properties", "bthci_cmd.advertising_properties",
8770 FT_UINT16, BASE_HEX, NULL, 0x0,
8771 NULL, HFILL }
8773 { &hf_bthci_cmd_advertising_properties_decision_pdu_incl_adi,
8774 { "Include ADI in Decision PDUs", "bthci_cmd.adv_properties.decision_pdu_incl_adi",
8775 FT_BOOLEAN, 16, NULL, 0x0200,
8776 NULL, HFILL }
8778 { &hf_bthci_cmd_advertising_properties_decision_pdu_incl_adva,
8779 { "Include AdvA in Decision PDUs", "bthci_cmd.adv_properties.decision_pdu_incl_adva",
8780 FT_BOOLEAN, 16, NULL, 0x0100,
8781 NULL, HFILL }
8783 { &hf_bthci_cmd_advertising_properties_use_decision_pdus,
8784 { "Use Decision PDUs", "bthci_cmd.adv_properties.use_decision_pdus",
8785 FT_BOOLEAN, 16, NULL, 0x0080,
8786 NULL, HFILL }
8788 { &hf_bthci_cmd_advertising_properties_incl_txpower,
8789 { "Include Tx Power", "bthci_cmd.adv_properties.txpower",
8790 FT_BOOLEAN, 16, NULL, 0x0040,
8791 NULL, HFILL }
8793 { &hf_bthci_cmd_advertising_properties_anonymous_adv,
8794 { "Anonymous Advertisement", "bthci_cmd.adv_properties.anonymous_adv",
8795 FT_BOOLEAN, 16, NULL, 0x0020,
8796 NULL, HFILL }
8798 { &hf_bthci_cmd_advertising_properties_legacy_adv,
8799 { "Use Legacy PDUs", "bthci_cmd.adv_properties.legacy_adv",
8800 FT_BOOLEAN, 16, NULL, 0x0010,
8801 NULL, HFILL }
8803 { &hf_bthci_cmd_advertising_properties_hdc_connectable_directed,
8804 { "High Duty Cycle Connectable Directed", "bthci_cmd.adv_properties.hdc_connectable_directed",
8805 FT_BOOLEAN, 16, NULL, 0x0008,
8806 NULL, HFILL }
8808 { &hf_bthci_cmd_advertising_properties_directed,
8809 { "Directed", "bthci_cmd.adv_properties.directed",
8810 FT_BOOLEAN, 16, NULL, 0x0004,
8811 NULL, HFILL }
8813 { &hf_bthci_cmd_advertising_properties_scannable,
8814 { "Scannable", "bthci_cmd.adv_properties.scannable",
8815 FT_BOOLEAN, 16, NULL, 0x0002,
8816 NULL, HFILL }
8818 { &hf_bthci_cmd_advertising_properties_connectable,
8819 { "Connectable", "bthci_cmd.adv_properties.connectable",
8820 FT_BOOLEAN, 16, NULL, 0x0001,
8821 NULL, HFILL }
8823 { &hf_bthci_cmd_advertising_properties_reserved,
8824 { "Reserved", "bthci_cmd.adv_properties.reserved",
8825 FT_UINT16, BASE_HEX, NULL, 0xFC00,
8826 NULL, HFILL }
8828 { &hf_bthci_cmd_periodic_advertising_properties,
8829 { "Periodic Advertising Properties", "bthci_cmd.periodic_adv_properties",
8830 FT_UINT16, BASE_HEX, NULL, 0x0,
8831 NULL, HFILL }
8833 { &hf_bthci_cmd_periodic_advertising_properties_reserved,
8834 { "Reserved", "bthci_cmd.periodic_adv_properties.reserved",
8835 FT_UINT16, BASE_HEX, NULL, 0xFFBF,
8836 NULL, HFILL }
8838 { &hf_bthci_cmd_primary_advertising_phy,
8839 { "Primary Advertising PHY", "bthci_cmd.primary_advertising_phy",
8840 FT_UINT8, BASE_HEX, VALS(cmd_le_phy_vals), 0x0,
8841 NULL, HFILL }
8843 { &hf_bthci_cmd_sec_adv_max_skip,
8844 { "Secondary Advertising Max Skip", "bthci_cmd.secondary_advertising_max_skip",
8845 FT_UINT8, BASE_DEC, NULL, 0x0,
8846 NULL, HFILL }
8848 { &hf_bthci_cmd_secondary_advertising_phy,
8849 { "Secondary Advertising PHY", "bthci_cmd.secondary_advertising_phy",
8850 FT_UINT8, BASE_HEX, VALS(cmd_le_phy_vals), 0x0,
8851 NULL, HFILL }
8853 { &hf_bthci_cmd_advertising_sid,
8854 { "Advertising SID", "bthci_cmd.advertising_sid",
8855 FT_UINT8, BASE_HEX, NULL, 0x0,
8856 NULL, HFILL }
8858 { &hf_bthci_cmd_scan_req_notif_en,
8859 { "Scan Request Notification Enable", "bthci_cmd.scan_request_notification_enable",
8860 FT_UINT8, BASE_HEX, NULL, 0x0,
8861 NULL, HFILL }
8863 { &hf_bthci_cmd_le_adv_data_operation,
8864 { "Data Operation", "bthci_cmd.adv_data_operation",
8865 FT_UINT8, BASE_HEX, VALS(cmd_le_adv_data_operation), 0x0,
8866 NULL, HFILL }
8868 { &hf_bthci_cmd_le_adv_data_frag_pref,
8869 { "Fragment Preference", "bthci_cmd.adv_fragment_preference",
8870 FT_UINT8, BASE_HEX, VALS(cmd_le_adv_data_frag_pref), 0x0,
8871 NULL, HFILL }
8873 { &hf_bthci_cmd_le_adv_set,
8874 { "Advertising Set", "bthci_cmd.le_adv_set",
8875 FT_NONE, BASE_NONE, NULL, 0x0,
8876 NULL, HFILL }
8878 { &hf_bthci_cmd_le_adv_en_sets,
8879 { "Number of Sets", "bthci_cmd.adv_num_sets",
8880 FT_UINT8, BASE_DEC, NULL, 0x0,
8881 NULL, HFILL }
8883 { &hf_bthci_cmd_le_adv_duration,
8884 { "Duration", "bthci_cmd.adv_duration",
8885 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p01_sec), 0x0,
8886 NULL, HFILL }
8888 { &hf_bthci_cmd_le_adv_max_extended_events,
8889 { "Max Extended Events", "bthci_cmd.max_extended_advertising_events",
8890 FT_UINT8, BASE_DEC, NULL, 0x0,
8891 NULL, HFILL }
8893 {&hf_bthci_cmd_all_phys,
8894 {"All PHYs", "bthci_cmd.all_phys",
8895 FT_UINT8, BASE_HEX, NULL, 0x0,
8896 NULL, HFILL}
8898 { &hf_bthci_cmd_all_phys_tx_pref,
8899 { "The Host has no Tx PHY preference", "bthci_cmd.all_phys.tx_preference",
8900 FT_BOOLEAN, 8, NULL, 0x1,
8901 NULL, HFILL }
8903 { &hf_bthci_cmd_all_phys_rx_pref,
8904 { "The Host has no Rx PHY preference", "bthci_cmd.all_phys.rx_preference",
8905 FT_BOOLEAN, 8, NULL, 0x2,
8906 NULL, HFILL }
8908 { &hf_bthci_cmd_all_phys_reserved,
8909 { "Reserved", "bthci_cmd.all_phys.reserved",
8910 FT_UINT8, BASE_HEX, NULL, 0xFC,
8911 NULL, HFILL }
8913 {&hf_bthci_cmd_tx_phys,
8914 {"Tx PHYs", "bthci_cmd.tx_phys",
8915 FT_UINT8, BASE_HEX, NULL, 0x0,
8916 NULL, HFILL}
8918 {&hf_bthci_cmd_rx_phys,
8919 {"Rx PHYs", "bthci_cmd.rx_phys",
8920 FT_UINT8, BASE_HEX, NULL, 0x0,
8921 NULL, HFILL}
8923 { &hf_bthci_cmd_phys_pref_le_1m,
8924 { "The Host prefers LE 1M", "bthci_cmd.phys_pref.le_1m",
8925 FT_BOOLEAN, 8, NULL, 0x1,
8926 NULL, HFILL }
8928 { &hf_bthci_cmd_phys_pref_le_2m,
8929 { "The Host prefers LE 2M", "bthci_cmd.phys_pref.le_2m",
8930 FT_BOOLEAN, 8, NULL, 0x2,
8931 NULL, HFILL }
8933 { &hf_bthci_cmd_phys_pref_le_coded,
8934 { "The Host prefers LE Coded", "bthci_cmd.phys_pref.le_coded",
8935 FT_BOOLEAN, 8, NULL, 0x4,
8936 NULL, HFILL }
8938 { &hf_bthci_cmd_phys_pref_reserved,
8939 { "Reserved", "bthci_cmd.phys_pref.reserved",
8940 FT_UINT8, BASE_HEX, NULL, 0xF8,
8941 NULL, HFILL }
8943 { &hf_bthci_cmd_phy_options,
8944 { "PHY Options", "bthci_cmd.phy_options",
8945 FT_UINT16, BASE_HEX, NULL, 0x0,
8946 NULL, HFILL }
8948 { &hf_bthci_cmd_phy_options_coding,
8949 { "Coding", "bthci_cmd.phy_options.coding",
8950 FT_UINT16, BASE_HEX, VALS(cmd_le_phy_options_vals), 0x3,
8951 NULL, HFILL }
8953 { &hf_bthci_cmd_phy_options_reserved,
8954 { "Reserved", "bthci_cmd.phy_options.reserved",
8955 FT_UINT16, BASE_HEX, NULL, 0xFFFC,
8956 NULL, HFILL }
8958 { &hf_bthci_cmd_phy,
8959 { "PHY", "bthci_cmd.phy",
8960 FT_UINT8, BASE_HEX, VALS(cmd_le_phy_vals), 0x0,
8961 NULL, HFILL }
8963 { &hf_bthci_cmd_modulation_index,
8964 { "Modulation Index", "bthci_cmd.modulation_index",
8965 FT_UINT8, BASE_HEX, VALS(cmd_le_modulation_index_vals), 0x0,
8966 NULL, HFILL }
8968 { &hf_bthci_cmd_le_scan_phys,
8969 { "Scanning PHYs", "bthci_cmd.le_scan_phys",
8970 FT_UINT8, BASE_HEX, NULL, 0x0,
8971 NULL, HFILL }
8973 { &hf_bthci_cmd_le_scan_phys_le_1m,
8974 { "LE 1M", "bthci_cmd.le_scan_phys.le_1m",
8975 FT_BOOLEAN, 8, NULL, 0x1,
8976 NULL, HFILL }
8978 { &hf_bthci_cmd_le_scan_phys_le_coded,
8979 { "LE Coded", "bthci_cmd.le_scan_phys.le_coded",
8980 FT_BOOLEAN, 8, NULL, 0x4,
8981 NULL, HFILL }
8983 { &hf_bthci_cmd_le_scan_phys_reserved,
8984 { "Reserved", "bthci_cmd.le_scan_phys.reserved",
8985 FT_UINT8, BASE_HEX, NULL, 0xFA,
8986 NULL, HFILL }
8988 { &hf_bthci_cmd_le_scan_phy_param,
8989 { "Scanning PHY", "bthci_cmd.le_scan_phy_param",
8990 FT_NONE, BASE_NONE, NULL, 0x0,
8991 NULL, HFILL }
8993 { &hf_bthci_cmd_le_scan_duration,
8994 { "Duration", "bthci_cmd.scan_duration",
8995 FT_UINT16, BASE_DEC, NULL, 0x0,
8996 NULL, HFILL }
8998 { &hf_bthci_cmd_le_scan_period,
8999 { "Period", "bthci_cmd.scan_period",
9000 FT_UINT16, BASE_DEC, NULL, 0x0,
9001 NULL, HFILL }
9003 { &hf_bthci_cmd_le_phys,
9004 { "PHYs", "bthci_cmd.le_phys",
9005 FT_UINT8, BASE_HEX, NULL, 0x0,
9006 NULL, HFILL }
9008 { &hf_bthci_cmd_le_phys_le_1m,
9009 { "LE 1M", "bthci_cmd.le_phys.le_1m",
9010 FT_BOOLEAN, 8, NULL, 0x1,
9011 NULL, HFILL }
9013 { &hf_bthci_cmd_le_phys_le_2m,
9014 { "LE 2M", "bthci_cmd.le_phys.le_2m",
9015 FT_BOOLEAN, 8, NULL, 0x2,
9016 NULL, HFILL }
9018 { &hf_bthci_cmd_le_phys_le_coded,
9019 { "LE Coded", "bthci_cmd.le_phys.le_coded",
9020 FT_BOOLEAN, 8, NULL, 0x4,
9021 NULL, HFILL }
9023 { &hf_bthci_cmd_le_phys_reserved,
9024 { "Reserved", "bthci_cmd.le_phys.reserved",
9025 FT_UINT8, BASE_HEX, NULL, 0xF8,
9026 NULL, HFILL }
9028 { &hf_bthci_cmd_le_init_phy_param,
9029 { "Initiating PHY", "bthci_cmd.le_init_phy_param",
9030 FT_NONE, BASE_NONE, NULL, 0x0,
9031 NULL, HFILL }
9033 { &hf_bthci_cmd_le_privacy_mode,
9034 { "Privacy Mode", "bthci_cmd.le_privacy_mode",
9035 FT_UINT8, BASE_HEX, VALS(cmd_privacy_mode), 0x0,
9036 NULL, HFILL }
9038 { &hf_bthci_cmd_sync_filter_policy,
9039 { "Filter Policy", "bthci_cmd.le_sync_filter_policy",
9040 FT_UINT8, BASE_HEX, VALS(cmd_sync_filter_policy), 0x0,
9041 NULL, HFILL }
9043 { &hf_bthci_cmd_skip,
9044 { "Skip", "bthci_cmd.skip",
9045 FT_UINT16, BASE_DEC, NULL, 0x0,
9046 NULL, HFILL }
9048 { &hf_bthci_cmd_sync_handle,
9049 { "Sync Handle", "bthci_cmd.sync_handle",
9050 FT_UINT16, BASE_HEX, NULL, 0x0,
9051 NULL, HFILL }
9053 { &hf_bthci_cmd_rf_tx_path_compensation_value,
9054 { "RF Tx Path Compensation Value", "bthci_cmd.rf_tx_path_compensation_value",
9055 FT_INT16, BASE_DEC, NULL, 0x0,
9056 NULL, HFILL }
9058 { &hf_bthci_cmd_rf_rx_path_compensation_value,
9059 { "RF Rx Path Compensation Value", "bthci_cmd.rf_rx_path_compensation_value",
9060 FT_INT16, BASE_DEC, NULL, 0x0,
9061 NULL, HFILL }
9063 { &hf_bthci_cmd_cte_length,
9064 { "CTE Length", "bthci_cmd.cte_length",
9065 FT_UINT8, BASE_DEC, NULL, 0x0,
9066 NULL, HFILL }
9068 { &hf_bthci_cmd_cte_type,
9069 { "CTE Type", "bthci_cmd.cte_type",
9070 FT_UINT8, BASE_HEX, VALS(cmd_cte_type_vals), 0x0,
9071 NULL, HFILL }
9073 { &hf_bthci_cmd_slot_durations,
9074 { "Slot Durations", "bthci_cmd.slot_durations",
9075 FT_UINT8, BASE_HEX, VALS(cmd_slot_durations_vals), 0x0,
9076 NULL, HFILL }
9078 { &hf_bthci_cmd_antenna_switching_pattern_length,
9079 { "Antenna Switching Pattern Length", "bthci_cmd.antenna_switching_pattern_length",
9080 FT_UINT8, BASE_DEC, NULL, 0x0,
9081 NULL, HFILL }
9083 { &hf_bthci_cmd_antenna_switching_pattern,
9084 { "Antenna Switching Pattern", "bthci_cmd.antenna_switching_pattern",
9085 FT_NONE, BASE_NONE, NULL, 0x0,
9086 NULL, HFILL }
9088 { &hf_bthci_cmd_antenna_id,
9089 { "Antenna Id", "bthci_cmd.antenna_id",
9090 FT_UINT8, BASE_DEC, NULL, 0x0,
9091 NULL, HFILL }
9093 { &hf_bthci_cmd_cte_count,
9094 { "CTE Count", "bthci_cmd.cte_count",
9095 FT_UINT8, BASE_DEC, NULL, 0x0,
9096 NULL, HFILL }
9098 { &hf_bthci_cmd_cte_enable,
9099 { "CTE Enable", "bthci_cmd.cte_enable",
9100 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
9101 NULL, HFILL }
9103 { &hf_bthci_cmd_iq_sampling_enable,
9104 { "IQ Sampling Enable", "bthci_cmd.iq_sampling_enable",
9105 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
9106 NULL, HFILL }
9108 { &hf_bthci_cmd_max_sampled_ctes,
9109 { "Max Sampled CTEs", "bthci_cmd.max_sampled_ctes",
9110 FT_UINT8, BASE_DEC, NULL, 0x0,
9111 NULL, HFILL }
9113 { &hf_bthci_cmd_cte_request_interval,
9114 { "CTE Request Interval", "bthci_cmd.cte_request_interval",
9115 FT_UINT16, BASE_DEC, NULL, 0x0,
9116 NULL, HFILL }
9118 { &hf_bthci_cmd_reporting_enable,
9119 { "Reporting Enable", "bthci_cmd.reporting_enable",
9120 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
9121 NULL, HFILL }
9123 { &hf_bthci_cmd_sync_cte_type,
9124 { "Sync CTE Type", "bthci_cmd.sync_cte_type",
9125 FT_UINT8, BASE_HEX, NULL, 0x0,
9126 NULL, HFILL }
9128 { &hf_bthci_cmd_sync_cte_type_no_sync_aoa,
9129 { "No sync to packets with AoA CTE", "bthci_cmd.sync_cte_type.no_sync_aoa",
9130 FT_BOOLEAN, 8, NULL, 0x01,
9131 NULL, HFILL }
9133 { &hf_bthci_cmd_sync_cte_type_no_sync_aod_1us,
9134 { "No sync to packets with AoD 1 usec CTE", "bthci_cmd.sync_cte_type.no_sync_aod_1us",
9135 FT_BOOLEAN, 8, NULL, 0x02,
9136 NULL, HFILL }
9138 { &hf_bthci_cmd_sync_cte_type_no_sync_aod_2us,
9139 { "No sync to packets with AoD 2 usec CTE", "bthci_cmd.sync_cte_type.no_sync_aod_2us",
9140 FT_BOOLEAN, 8, NULL, 0x04,
9141 NULL, HFILL }
9143 { &hf_bthci_cmd_sync_cte_type_sync_only_with_cte,
9144 { "Sync only to packets with CTE", "bthci_cmd.sync_cte_type.sync_only_with_cte",
9145 FT_BOOLEAN, 8, NULL, 0x10,
9146 NULL, HFILL }
9148 { &hf_bthci_cmd_sync_cte_type_reserved,
9149 { "Reserved", "bthci_cmd.sync_cte_type.reserved",
9150 FT_UINT8, BASE_HEX, NULL, 0xE8,
9151 NULL, HFILL }
9153 { &hf_bthci_cmd_cte_types,
9154 { "Allowed CTE Types", "bthci_cmd.cte_types",
9155 FT_UINT8, BASE_HEX, NULL, 0x0,
9156 NULL, HFILL }
9158 { &hf_bthci_cmd_cte_types_aoa,
9159 { "AoA", "bthci_cmd.cte_types.aoa",
9160 FT_BOOLEAN, 8, NULL, 0x01,
9161 NULL, HFILL }
9163 { &hf_bthci_cmd_cte_types_aod_1us,
9164 { "AoD 1 usec slots", "bthci_cmd.cte_types.aod_1us",
9165 FT_BOOLEAN, 8, NULL, 0x02,
9166 NULL, HFILL }
9168 { &hf_bthci_cmd_cte_types_aod_2us,
9169 { "AoD 2 usec slots", "bthci_cmd.cte_types.aod_2us",
9170 FT_BOOLEAN, 8, NULL, 0x04,
9171 NULL, HFILL }
9173 { &hf_bthci_cmd_cte_types_reserved,
9174 { "Reserved", "bthci_cmd.cte_types.reserved",
9175 FT_UINT8, BASE_HEX, NULL, 0xF8,
9176 NULL, HFILL }
9178 { &hf_bthci_cmd_service_data_past,
9179 { "Service Data", "bthci_cmd.service_data_past",
9180 FT_UINT16, BASE_HEX, NULL, 0x0,
9181 NULL, HFILL }
9183 { &hf_bthci_cmd_sync_mode,
9184 { "Mode", "bthci_cmd.sync_mode",
9185 FT_UINT8, BASE_HEX, VALS(cmd_sync_mode_vals), 0x0,
9186 NULL, HFILL }
9188 { &hf_bthci_cmd_key_type,
9189 { "Key Type", "bthci_cmd.key_type",
9190 FT_UINT8, BASE_HEX, VALS(cmd_key_type_vals), 0x0,
9191 NULL, HFILL }
9193 { &hf_bthci_cmd_sca_action,
9194 { "Action", "bthci_cmd.sca_action",
9195 FT_UINT8, BASE_HEX, VALS(cmd_sca_action_vals), 0x0,
9196 NULL, HFILL }
9198 { &hf_bthci_cmd_cig_id,
9199 { "CIG Id", "bthci_cmd.cig_id",
9200 FT_UINT8, BASE_HEX, NULL, 0x0,
9201 NULL, HFILL }
9203 { &hf_bthci_cmd_sdu_interval_c_to_p,
9204 { "SDU Interval Central to Peripheral", "bthci_cmd.sdu_interval_c_to_p",
9205 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
9206 NULL, HFILL }
9208 { &hf_bthci_cmd_sdu_interval_p_to_c,
9209 { "SDU Interval Peripheral to Central", "bthci_cmd.sdu_interval_p_to_c",
9210 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
9211 NULL, HFILL }
9213 { &hf_bthci_cmd_sdu_interval,
9214 { "SDU Interval", "bthci_cmd.sdu_interval",
9215 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
9216 NULL, HFILL }
9218 { &hf_bthci_cmd_peripherals_clock_accuracy,
9219 { "Peripherals Clock Accuracy", "bthci_cmd.peripherals_clock_accuracy",
9220 FT_UINT8, BASE_HEX, VALS(cmd_clock_accuray_vals), 0x0,
9221 NULL, HFILL }
9223 { &hf_bthci_cmd_packing,
9224 { "Packing", "bthci_cmd.packing",
9225 FT_UINT8, BASE_HEX, VALS(cmd_packing_vals), 0x0,
9226 NULL, HFILL }
9228 { &hf_bthci_cmd_framing,
9229 { "Framing", "bthci_cmd.framing",
9230 FT_UINT8, BASE_HEX, VALS(cmd_framing_vals), 0x0,
9231 NULL, HFILL }
9233 { &hf_bthci_cmd_ft_c_to_p,
9234 { "Flush Timeout Central to Peripheral", "bthci_cmd.ft_c_to_p",
9235 FT_UINT8, BASE_DEC, NULL, 0x0,
9236 NULL, HFILL }
9238 { &hf_bthci_cmd_ft_p_to_c,
9239 { "Flush Timeout Peripheral to Central", "bthci_cmd.ft_p_to_c",
9240 FT_UINT8, BASE_DEC, NULL, 0x0,
9241 NULL, HFILL }
9243 { &hf_bthci_cmd_iso_interval,
9244 { "ISO Interval", "bthci_cmd.iso_interval",
9245 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
9246 NULL, HFILL }
9248 { &hf_bthci_cmd_cis_count,
9249 { "CIS Count", "bthci_cmd.cis_count",
9250 FT_UINT8, BASE_DEC, NULL, 0x0,
9251 NULL, HFILL }
9253 { &hf_bthci_cmd_cis_params,
9254 { "CIS Parameters", "bthci_cmd.cis_params",
9255 FT_NONE, BASE_NONE, NULL, 0x0,
9256 NULL, HFILL }
9258 { &hf_bthci_cmd_cis_id,
9259 { "CIS Id", "bthci_cmd.cis_id",
9260 FT_UINT8, BASE_HEX, NULL, 0x0,
9261 NULL, HFILL }
9263 { &hf_bthci_cmd_nse,
9264 { "Number of Sub-Events", "bthci_cmd.nse",
9265 FT_UINT8, BASE_DEC, NULL, 0x0,
9266 NULL, HFILL }
9268 { &hf_bthci_cmd_max_sdu_c_to_p,
9269 { "Max SDU Central to Peripheral", "bthci_cmd.max_sdu_c_to_p",
9270 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9271 NULL, HFILL }
9273 { &hf_bthci_cmd_max_sdu_p_to_c,
9274 { "Max SDU Peripheral to Central", "bthci_cmd.max_sdu_p_to_c",
9275 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9276 NULL, HFILL }
9278 { &hf_bthci_cmd_max_sdu,
9279 { "Max SDU", "bthci_cmd.max_sdu",
9280 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9281 NULL, HFILL }
9283 { &hf_bthci_cmd_max_pdu_c_to_p,
9284 { "Max PDU Central to Peripheral", "bthci_cmd.max_pdu_c_to_p",
9285 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9286 NULL, HFILL }
9288 { &hf_bthci_cmd_max_pdu_p_to_c,
9289 { "Max PDU Peripheral to Central", "bthci_cmd.max_pdu_p_to_c",
9290 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9291 NULL, HFILL }
9293 { &hf_bthci_cmd_max_pdu,
9294 { "Max PDU", "bthci_cmd.max_pdu",
9295 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9296 NULL, HFILL }
9298 { &hf_bthci_cmd_phy_c_to_p,
9299 { "PHY Central to Peripheral", "bthci_cmd.phy_c_to_p",
9300 FT_UINT8, BASE_HEX, NULL, 0x0,
9301 NULL, HFILL }
9303 { &hf_bthci_cmd_phy_p_to_c,
9304 { "PHY Peripheral to Central", "bthci_cmd.phy_p_to_c",
9305 FT_UINT8, BASE_HEX, NULL, 0x0,
9306 NULL, HFILL }
9308 { &hf_bthci_cmd_bn_c_to_p,
9309 { "Burst Number Central to Peripheral", "bthci_cmd.bn_c_to_p",
9310 FT_UINT8, BASE_DEC, NULL, 0x0,
9311 NULL, HFILL }
9313 { &hf_bthci_cmd_bn_p_to_c,
9314 { "Burst Number Peripheral to Central", "bthci_cmd.bn_p_to_c",
9315 FT_UINT8, BASE_DEC, NULL, 0x0,
9316 NULL, HFILL }
9318 { &hf_bthci_cmd_bn,
9319 { "Burst Number", "bthci_cmd.bn",
9320 FT_UINT8, BASE_DEC, NULL, 0x0,
9321 NULL, HFILL }
9323 { &hf_bthci_cmd_max_transport_latency_c_to_p,
9324 { "Max Transport Latency Central to Peripheral", "bthci_cmd.max_transport_latency_c_to_p",
9325 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
9326 NULL, HFILL }
9328 { &hf_bthci_cmd_max_transport_latency_p_to_c,
9329 { "Max Transport Latency Peripheral to Central", "bthci_cmd.max_transport_latency_p_to_c",
9330 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
9331 NULL, HFILL }
9333 { &hf_bthci_cmd_max_transport_latency,
9334 { "Max Transport Latency", "bthci_cmd.max_transport_latency",
9335 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
9336 NULL, HFILL }
9338 { &hf_bthci_cmd_rtn_c_to_p,
9339 { "Max Retransmissions Central to Peripheral", "bthci_cmd.rtn_c_to_p",
9340 FT_UINT8, BASE_DEC, NULL, 0x0,
9341 NULL, HFILL }
9343 { &hf_bthci_cmd_rtn_p_to_c,
9344 { "Max Retransmissions Peripheral to Central", "bthci_cmd.rtn_p_to_c",
9345 FT_UINT8, BASE_DEC, NULL, 0x0,
9346 NULL, HFILL }
9348 { &hf_bthci_cmd_rtn,
9349 { "Max Retransmissions", "bthci_cmd.rtn",
9350 FT_UINT8, BASE_DEC, NULL, 0x0,
9351 NULL, HFILL }
9353 { &hf_bthci_cmd_cis_handle,
9354 { "CIS Handle", "bthci_cmd.cis_handle",
9355 FT_UINT16, BASE_HEX, NULL, 0x0,
9356 NULL, HFILL }
9358 { &hf_bthci_cmd_big_handle,
9359 { "BIG Handle", "bthci_cmd.big_handle",
9360 FT_UINT16, BASE_HEX, NULL, 0x0,
9361 NULL, HFILL }
9363 { &hf_bthci_cmd_cis_bis_handle,
9364 { "CIS/BIS Handle", "bthci_cmd.cis_bis_handle",
9365 FT_UINT16, BASE_HEX, NULL, 0x0,
9366 NULL, HFILL }
9368 { &hf_bthci_cmd_num_bis,
9369 { "Number of BISes", "bthci_cmd.num_bis",
9370 FT_UINT8, BASE_DEC, NULL, 0x0,
9371 NULL, HFILL }
9373 { &hf_bthci_cmd_irc,
9374 { "Scheduled Payload Retransmissions", "bthci_cmd.irc",
9375 FT_UINT8, BASE_DEC, NULL, 0x0,
9376 NULL, HFILL }
9378 { &hf_bthci_cmd_pto,
9379 { "Pre-Transmission Offset", "bthci_cmd.pto",
9380 FT_UINT8, BASE_DEC, NULL, 0x0,
9381 NULL, HFILL }
9383 { &hf_bthci_cmd_encryption,
9384 { "Encryption", "bthci_cmd.encryption",
9385 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
9386 NULL, HFILL }
9388 { &hf_bthci_cmd_broadcast_code,
9389 { "Broadcast Code", "bthci_cmd.broadcast_code",
9390 FT_NONE, BASE_NONE, NULL, 0x0,
9391 NULL, HFILL }
9393 { &hf_bthci_cmd_mse,
9394 { "Max Sub-Events", "bthci_cmd.mse",
9395 FT_UINT8, BASE_DEC, NULL, 0x0,
9396 NULL, HFILL }
9398 { &hf_bthci_cmd_bis_index,
9399 { "BIS Index", "bthci_cmd.bis_index",
9400 FT_UINT8, BASE_DEC, NULL, 0x0,
9401 NULL, HFILL }
9403 { &hf_bthci_cmd_sync_timeout,
9404 { "Sync Timeout", "bthci_cmd.sync_timeout",
9405 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p01_sec), 0x0,
9406 NULL, HFILL }
9408 { &hf_bthci_cmd_data_path_direction,
9409 { "Data Path Direction", "bthci_cmd.data_path_direction",
9410 FT_UINT8, BASE_HEX, VALS(cmd_data_path_direction_vals), 0x0,
9411 NULL, HFILL }
9413 { &hf_bthci_cmd_data_path_id,
9414 { "Data Path Id", "bthci_cmd.data_path_id",
9415 FT_UINT8, BASE_HEX, NULL, 0x0,
9416 NULL, HFILL }
9418 { &hf_bthci_cmd_coding_format,
9419 { "Coding Format", "bthci_cmd.coding_format",
9420 FT_NONE, BASE_NONE, NULL, 0x0,
9421 NULL, HFILL }
9423 { &hf_bthci_cmd_controller_delay,
9424 { "Controller Delay", "bthci_cmd.controller_delay",
9425 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
9426 NULL, HFILL }
9428 { &hf_bthci_cmd_codec_config_length,
9429 { "Codec Configuration Length", "bthci_cmd.codec_config_length",
9430 FT_UINT8, BASE_DEC, NULL, 0x0,
9431 NULL, HFILL }
9433 { &hf_bthci_cmd_codec_config,
9434 { "Codec Configuration", "bthci_cmd.codec_config",
9435 FT_NONE, BASE_NONE, NULL, 0x0,
9436 NULL, HFILL }
9438 { &hf_bthci_cmd_payload_type,
9439 { "Payload Type", "bthci_cmd.payload_type",
9440 FT_UINT8, BASE_HEX, VALS(cmd_payload_type_vals), 0x0,
9441 NULL, HFILL }
9443 { &hf_bthci_cmd_feature_bit_number,
9444 { "Feature Bit Number", "bthci_cmd.feature_bit_number",
9445 FT_UINT8, BASE_DEC, VALS(cmd_host_enabled_feature_bit_vals), 0x0,
9446 NULL, HFILL }
9448 { &hf_bthci_cmd_feature_bit_number2,
9449 { "Feature Bit Number", "bthci_cmd.feature_bit_number",
9450 FT_UINT16, BASE_DEC, VALS(cmd_host_enabled_feature_bit_vals), 0x0,
9451 NULL, HFILL }
9453 { &hf_bthci_cmd_feature_bit_value,
9454 { "Feature Bit Value", "bthci_cmd.feature_bit_value",
9455 FT_UINT8, BASE_HEX, VALS(cmd_en_disabled), 0x0,
9456 NULL, HFILL }
9458 { &hf_bthci_cmd_phy_and_coding,
9459 { "PHY", "bthci_cmd.phy_and_coding",
9460 FT_UINT8, BASE_HEX, VALS(cmd_phy_and_coding_vals), 0x0,
9461 NULL, HFILL }
9463 { &hf_bthci_cmd_high_threshold,
9464 { "High Threshold", "bthci_cmd.high_threshold",
9465 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0x0,
9466 NULL, HFILL }
9468 { &hf_bthci_cmd_high_hysteresis,
9469 { "High Hysteresis", "bthci_cmd.high_hysteresis",
9470 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0x0,
9471 NULL, HFILL }
9473 { &hf_bthci_cmd_low_threshold,
9474 { "Low Threshold", "bthci_cmd.low_threshold",
9475 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0x0,
9476 NULL, HFILL }
9478 { &hf_bthci_cmd_low_hysteresis,
9479 { "Low Hysteresis", "bthci_cmd.low_hysteresis",
9480 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0x0,
9481 NULL, HFILL }
9483 { &hf_bthci_cmd_min_time_spent,
9484 { "Minimum Observation Time", "bthci_cmd.min_time_spent",
9485 FT_UINT16, BASE_DEC, NULL, 0x0,
9486 NULL, HFILL }
9488 { &hf_bthci_cmd_local_reporting_enable,
9489 { "Local Reporting Enable", "bthci_cmd.local_reporting_enable",
9490 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
9491 NULL, HFILL }
9493 { &hf_bthci_cmd_remote_reporting_enable,
9494 { "Remote Reporting Enable", "bthci_cmd.remote_reporting_enable",
9495 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
9496 NULL, HFILL }
9498 { &hf_bthci_cmd_addr_change_reasons,
9499 { "Address Change Reasons", "bthci_cmd.addr_change_reasons",
9500 FT_UINT8, BASE_HEX, NULL, 0x0,
9501 NULL, HFILL }
9503 { &hf_bthci_cmd_addr_change_reasons_adv_data,
9504 { "Advertising Data Changed", "bthci_cmd.addr_change_reasons.adv_data",
9505 FT_BOOLEAN, 8, NULL, 0x01,
9506 NULL, HFILL }
9508 { &hf_bthci_cmd_addr_change_reasons_scan_rsp_data,
9509 { "Scan Response Data Changed", "bthci_cmd.addr_change_reasons.scan_rsp_data",
9510 FT_BOOLEAN, 8, NULL, 0x02,
9511 NULL, HFILL }
9513 { &hf_bthci_cmd_addr_change_reasons_reserved,
9514 { "Reserved", "bthci_cmd.addr_change_reasons.reserved",
9515 FT_UINT8, BASE_HEX, NULL, 0xFC,
9516 NULL, HFILL }
9518 { &hf_bthci_cmd_subrate_factor_min,
9519 { "Minimum Subrate Factor", "bthci_cmd.subrate_min",
9520 FT_UINT16, BASE_DEC, NULL, 0x0,
9521 NULL, HFILL }
9523 { &hf_bthci_cmd_subrate_factor_max,
9524 { "Maximum Subrate Factor", "bthci_cmd.subrate_max",
9525 FT_UINT16, BASE_DEC, NULL, 0x0,
9526 NULL, HFILL }
9528 { &hf_bthci_cmd_continuation_number,
9529 { "Continuation Number", "bthci_cmd.continuation_number",
9530 FT_UINT16, BASE_DEC, NULL, 0x0,
9531 NULL, HFILL }
9533 { &hf_bthci_cmd_primary_adv_phy_options,
9534 { "Primary Adv PHY Options", "bthci_cmd.primary_adv_phy_options",
9535 FT_UINT8, BASE_HEX, VALS(cmd_le_phy_options_vals), 0x0,
9536 NULL, HFILL }
9538 { &hf_bthci_cmd_secondary_adv_phy_options,
9539 { "Primary Adv PHY Options", "bthci_cmd.secondary_adv_phy_options",
9540 FT_UINT8, BASE_HEX, VALS(cmd_le_phy_options_vals), 0x0,
9541 NULL, HFILL }
9543 { &hf_bthci_cmd_num_subevents,
9544 { "Number of Sub-events", "bthci_cmd.num_subevents",
9545 FT_UINT8, BASE_DEC, NULL, 0x0,
9546 NULL, HFILL }
9548 { &hf_bthci_cmd_subevent_interval,
9549 { "Sub-event Interval", "bthci_cmd.subevent_interval",
9550 FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
9551 NULL, HFILL }
9553 { &hf_bthci_cmd_response_slot_delay,
9554 { "Response Slot Delay", "bthci_cmd.resp_slot_delay",
9555 FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
9556 NULL, HFILL }
9558 { &hf_bthci_cmd_response_slot_spacing,
9559 { "Response Slot Spacing", "bthci_cmd.resp_slot_spacing",
9560 FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
9561 NULL, HFILL }
9563 { &hf_bthci_cmd_num_response_slots,
9564 { "Response Slots", "bthci_cmd.num_resp_slots",
9565 FT_UINT8, BASE_DEC, NULL, 0x0,
9566 NULL, HFILL }
9568 { &hf_bthci_cmd_subevent,
9569 { "Sub-event", "bthci_cmd.subevent",
9570 FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_used_0xff_special), 0x0,
9571 NULL, HFILL }
9573 { &hf_bthci_cmd_subevents,
9574 { "Sub-events", "bthci_cmd.subevents",
9575 FT_NONE, BASE_NONE, NULL, 0x0,
9576 NULL, HFILL }
9578 { &hf_bthci_cmd_response_slot_start,
9579 { "Response Slot Start", "bthci_cmd.resp_slot_start",
9580 FT_UINT8, BASE_DEC, NULL, 0x0,
9581 NULL, HFILL }
9583 { &hf_bthci_cmd_response_slot_count,
9584 { "Response Slot Count", "bthci_cmd.resp_slot_count",
9585 FT_UINT8, BASE_DEC, NULL, 0x0,
9586 NULL, HFILL }
9588 { &hf_bthci_cmd_subevent_data_length,
9589 { "Sub-event Data Length", "bthci_cmd.subevent_data_length",
9590 FT_UINT8, BASE_DEC, NULL, 0x0,
9591 NULL, HFILL }
9593 { &hf_bthci_cmd_request_event,
9594 { "Request Event", "bthci_cmd.request_event",
9595 FT_UINT16, BASE_DEC, NULL, 0x0,
9596 NULL, HFILL }
9598 { &hf_bthci_cmd_request_subevent,
9599 { "Request Sub-event", "bthci_cmd.request_subevent",
9600 FT_UINT8, BASE_DEC, NULL, 0x0,
9601 NULL, HFILL }
9603 { &hf_bthci_cmd_response_subevent,
9604 { "Response Sub-event", "bthci_cmd.response_subevent",
9605 FT_UINT8, BASE_DEC, NULL, 0x0,
9606 NULL, HFILL }
9608 { &hf_bthci_cmd_response_slot,
9609 { "Response Slot", "bthci_cmd.response_slot",
9610 FT_UINT8, BASE_DEC, NULL, 0x0,
9611 NULL, HFILL }
9613 { &hf_bthci_cmd_response_data_length,
9614 { "Response Data Length", "bthci_cmd.response_data_length",
9615 FT_UINT8, BASE_DEC, NULL, 0x0,
9616 NULL, HFILL }
9618 { &hf_bthci_cmd_pages_requested,
9619 { "Pages Requested", "bthci_cmd.pages_requested",
9620 FT_UINT8, BASE_DEC, NULL, 0x0,
9621 NULL, HFILL }
9623 { &hf_bthci_cmd_config_id,
9624 { "Config Id", "bthci_cmd.config_id",
9625 FT_UINT8, BASE_DEC, NULL, 0x0,
9626 NULL, HFILL }
9628 { &hf_bthci_cmd_cs_roles,
9629 { "Roles", "bthci_cmd.cs_roles",
9630 FT_UINT8, BASE_HEX, NULL, 0x0,
9631 NULL, HFILL }
9633 { &hf_bthci_cmd_cs_roles_initiator,
9634 { "Initiator", "bthci_cmd.cs_roles.initiator",
9635 FT_BOOLEAN, 8, NULL, 0x01,
9636 NULL, HFILL }
9638 { &hf_bthci_cmd_cs_roles_reflector,
9639 { "Reflector", "bthci_cmd.cs_roles.reflector",
9640 FT_BOOLEAN, 8, NULL, 0x02,
9641 NULL, HFILL }
9643 { &hf_bthci_cmd_cs_roles_reserved,
9644 { "Reserved", "bthci_cmd.cs_roles.reserved",
9645 FT_UINT8, BASE_HEX, NULL, 0xfc,
9646 NULL, HFILL }
9648 { &hf_bthci_cmd_cs_sync_antenna_selection,
9649 { "CS Sync Antenna Selection", "bthci_cmd.cs_sync_antenna_selection",
9650 FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(cs_sync_antenna_special), 0x0,
9651 NULL, HFILL }
9653 { &hf_bthci_cmd_num_config,
9654 { "Number of Configurations", "bthci_cmd.num_config",
9655 FT_UINT8, BASE_DEC, NULL, 0x0,
9656 NULL, HFILL }
9658 { &hf_bthci_cmd_max_consecutive_procedures,
9659 { "Max Consecutive Procedures", "bthci_cmd.max_consecutive_procedures",
9660 FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_procedure_count_special), 0x0,
9661 NULL, HFILL }
9663 { &hf_bthci_cmd_num_antennas_supported,
9664 { "Number of Antennas Supported", "bthci_cmd.num_antennas_supported",
9665 FT_UINT8, BASE_DEC, NULL, 0x0,
9666 NULL, HFILL }
9668 { &hf_bthci_cmd_max_antenna_paths_supported,
9669 { "Max Antenna Paths Supported", "bthci_cmd.max_antenna_paths_supported",
9670 FT_UINT8, BASE_DEC, NULL, 0x0,
9671 NULL, HFILL }
9673 { &hf_bthci_cmd_cs_modes_supported,
9674 { "Modes Supported", "bthci_cmd.cs_modes_supported",
9675 FT_UINT8, BASE_HEX, NULL, 0x0,
9676 NULL, HFILL }
9678 { &hf_bthci_cmd_cs_modes_supported_3,
9679 { "Mode-3", "bthci_cmd.cs_modes_supported.3",
9680 FT_BOOLEAN, 8, NULL, 0x01,
9681 NULL, HFILL }
9683 { &hf_bthci_cmd_cs_modes_supported_reserved,
9684 { "Reserved", "bthci_cmd.cs_modes_supported.reserved",
9685 FT_BOOLEAN, 8, NULL, 0xfe,
9686 NULL, HFILL }
9688 { &hf_bthci_cmd_rtt_capability,
9689 { "RTT Capability", "bthci_cmd.rtt_capability",
9690 FT_UINT8, BASE_HEX, NULL, 0x0,
9691 NULL, HFILL }
9693 { &hf_bthci_cmd_rtt_capability_coarse_precision,
9694 { "10ns Coarse Precision", "bthci_cmd.rtt_capability.coarse_precision",
9695 FT_BOOLEAN, 8, NULL, 0x01,
9696 NULL, HFILL }
9698 { &hf_bthci_cmd_rtt_capability_sounding_precision,
9699 { "10ns Sounding Precision", "bthci_cmd.rtt_capability.sounding_precision",
9700 FT_BOOLEAN, 8, NULL, 0x02,
9701 NULL, HFILL }
9703 { &hf_bthci_cmd_rtt_capability_random_precision,
9704 { "10ns Random Precision", "bthci_cmd.rtt_capability.random_precision",
9705 FT_BOOLEAN, 8, NULL, 0x04,
9706 NULL, HFILL }
9708 { &hf_bthci_cmd_rtt_capability_reserved,
9709 { "Reserved", "bthci_cmd.rtt_capability.reserved",
9710 FT_UINT8, BASE_HEX, NULL, 0xf8,
9711 NULL, HFILL }
9713 { &hf_bthci_cmd_rtt_aa_only_n,
9714 { "RTT Coarse, CS Sync exchanges needed", "bthci_cmd.rtt_aa_only_n",
9715 FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_supported_0x00_special), 0x0,
9716 NULL, HFILL }
9718 { &hf_bthci_cmd_rtt_sounding_n,
9719 { "RTT Sounding, CS Sync exchanges needed", "bthci_cmd.rtt_sounding_n",
9720 FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_supported_0x00_special), 0x0,
9721 NULL, HFILL }
9723 { &hf_bthci_cmd_rtt_random_n,
9724 { "RTT Random Payload, CS Sync exchanges needed", "bthci_cmd.rtt_random_n",
9725 FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_supported_0x00_special), 0x0,
9726 NULL, HFILL }
9728 { &hf_bthci_cmd_nadm_sounding_capability,
9729 { "Optional NADM Sounding Capability", "bthci_cmd.optional_nadm_sounding_capability",
9730 FT_UINT16, BASE_HEX, NULL, 0x0,
9731 NULL, HFILL }
9733 { &hf_bthci_cmd_nadm_sounding_capability_supported,
9734 { "Phase-based NADM Metric", "bthci_cmd.optional_nadm_sounding_capability.supported",
9735 FT_BOOLEAN, 16, NULL, 0x01,
9736 NULL, HFILL }
9738 { &hf_bthci_cmd_nadm_sounding_capability_reserved,
9739 { "Reserved", "bthci_cmd.optional_nadm_sounding_capability.reserved",
9740 FT_UINT16, BASE_HEX, NULL, 0xfe,
9741 NULL, HFILL }
9743 { &hf_bthci_cmd_nadm_random_capability,
9744 { "Optional NADM Random Capability", "bthci_cmd.optional_nadm_random_capability",
9745 FT_UINT16, BASE_HEX, NULL, 0x0,
9746 NULL, HFILL }
9748 { &hf_bthci_cmd_nadm_random_capability_supported,
9749 { "Phase-based NADM Metric", "bthci_cmd.optional_nadm_random_capability.supported",
9750 FT_BOOLEAN, 16, NULL, 0x01,
9751 NULL, HFILL }
9753 { &hf_bthci_cmd_nadm_random_capability_reserved,
9754 { "Reserved", "bthci_cmd.optional_nadm_random_capability.reserved",
9755 FT_UINT16, BASE_HEX, NULL, 0xfe,
9756 NULL, HFILL }
9758 { &hf_bthci_cmd_cs_sync_phys_supported,
9759 { "Optional CS_SYNC PHYs", "bthci_cmd.cs_sync_phys_supported",
9760 FT_UINT8, BASE_HEX, NULL, 0x0,
9761 NULL, HFILL }
9763 { &hf_bthci_cmd_cs_sync_phys_supported_2m,
9764 { "LE 2M", "bthci_cmd.cs_sync_phys_supported.2m",
9765 FT_BOOLEAN, 8, NULL, 0x02,
9766 NULL, HFILL }
9768 { &hf_bthci_cmd_cs_sync_phys_supported_2m2bt,
9769 { "LE 2M 2BT", "bthci_cmd.cs_sync_phys_supported.2m2bt",
9770 FT_BOOLEAN, 8, NULL, 0x04,
9771 NULL, HFILL }
9773 { &hf_bthci_cmd_cs_sync_phys_supported_reserved,
9774 { "Reserved", "bthci_cmd.cs_sync_phys_supported.reserved",
9775 FT_UINT8, BASE_HEX, NULL, 0xf9,
9776 NULL, HFILL }
9778 { &hf_bthci_cmd_cs_subfeatures_supported,
9779 { "Subfeatures Supported", "bthci_cmd.optional_cs_subfeatures",
9780 FT_UINT16, BASE_HEX, NULL, 0x0,
9781 NULL, HFILL }
9783 { &hf_bthci_cmd_cs_subfeatures_companion_signal,
9784 { "Companion Signal", "bthci_cmd.optional_cs_subfeatures.companion_signal",
9785 FT_BOOLEAN, 16, NULL, 0x01,
9786 NULL, HFILL }
9788 { &hf_bthci_cmd_cs_subfeatures_freq_actuation_error,
9789 { "Zero Freq. Actuation Error Relative to Mode-0 Tx in Reflector", "bthci_cmd.optional_cs_subfeatures.freq_actuation_error",
9790 FT_BOOLEAN, 16, NULL, 0x02,
9791 NULL, HFILL }
9793 { &hf_bthci_cmd_cs_subfeatures_channel_selection_3c,
9794 { "Channel Selection Algorithm #3c", "bthci_cmd.optional_cs_subfeatures.channel_selection_3c",
9795 FT_BOOLEAN, 16, NULL, 0x04,
9796 NULL, HFILL }
9798 { &hf_bthci_cmd_cs_subfeatures_pbr_from_rtt,
9799 { "Phase-based Ranging from RTT sounding sequence", "bthci_cmd.optional_cs_subfeatures.pbr_from_rtt",
9800 FT_BOOLEAN, 16, NULL, 0x08,
9801 NULL, HFILL }
9803 { &hf_bthci_cmd_cs_subfeatures_reserved,
9804 { "Reserved", "bthci_cmd.optional_cs_subfeatures.reserved",
9805 FT_UINT16, BASE_HEX, NULL, 0xfff0,
9806 NULL, HFILL }
9808 { &hf_bthci_cmd_tip1_times_supported,
9809 { "T_IP1 Times Supported", "bthci_cmd.tip1_times_supported",
9810 FT_UINT16, BASE_HEX, NULL, 0x0,
9811 NULL, HFILL }
9813 { &hf_bthci_cmd_tip2_times_supported,
9814 { "T_IP2 Times Supported", "bthci_cmd.tip2_times_supported",
9815 FT_UINT16, BASE_HEX, NULL, 0x0,
9816 NULL, HFILL }
9818 { &hf_bthci_cmd_tip_times_supported_10us,
9819 { "10 microseconds", "bthci_cmd.tip_times_supported_10us",
9820 FT_BOOLEAN, 16, NULL, 0x0001,
9821 NULL, HFILL }
9823 { &hf_bthci_cmd_tip_times_supported_20us,
9824 { "20 microseconds", "bthci_cmd.tip_times_supported_20us",
9825 FT_BOOLEAN, 16, NULL, 0x0002,
9826 NULL, HFILL }
9828 { &hf_bthci_cmd_tip_times_supported_30us,
9829 { "30 microseconds", "bthci_cmd.tip_times_supported_30us",
9830 FT_BOOLEAN, 16, NULL, 0x0004,
9831 NULL, HFILL }
9833 { &hf_bthci_cmd_tip_times_supported_40us,
9834 { "40 microseconds", "bthci_cmd.tip_times_supported_40us",
9835 FT_BOOLEAN, 16, NULL, 0x0008,
9836 NULL, HFILL }
9838 { &hf_bthci_cmd_tip_times_supported_50us,
9839 { "50 microseconds", "bthci_cmd.tip_times_supported_50us",
9840 FT_BOOLEAN, 16, NULL, 0x0010,
9841 NULL, HFILL }
9843 { &hf_bthci_cmd_tip_times_supported_60us,
9844 { "60 microseconds", "bthci_cmd.tip_times_supported_60us",
9845 FT_BOOLEAN, 16, NULL, 0x0020,
9846 NULL, HFILL }
9848 { &hf_bthci_cmd_tip_times_supported_80us,
9849 { "80 microseconds", "bthci_cmd.tip_times_supported_80us",
9850 FT_BOOLEAN, 16, NULL, 0x0040,
9851 NULL, HFILL }
9853 { &hf_bthci_cmd_tip_times_supported_reserved,
9854 { "Reserved", "bthci_cmd.tip_times_supported_reserved",
9855 FT_UINT16, BASE_HEX, NULL, 0xff80,
9856 NULL, HFILL }
9858 { &hf_bthci_cmd_tfcs_times_supported,
9859 { "T_FCS Times Supported", "bthci_cmd.tfcs_times_supported",
9860 FT_UINT16, BASE_HEX, NULL, 0x0,
9861 NULL, HFILL }
9863 { &hf_bthci_cmd_tfcs_times_supported_15us,
9864 { "15 microseconds", "bthci_cmd.tfcs_times_supported_15us",
9865 FT_BOOLEAN, 16, NULL, 0x0001,
9866 NULL, HFILL }
9868 { &hf_bthci_cmd_tfcs_times_supported_20us,
9869 { "20 microseconds", "bthci_cmd.tfcs_times_supported_20us",
9870 FT_BOOLEAN, 16, NULL, 0x0002,
9871 NULL, HFILL }
9873 { &hf_bthci_cmd_tfcs_times_supported_30us,
9874 { "30 microseconds", "bthci_cmd.tfcs_times_supported_30us",
9875 FT_BOOLEAN, 16, NULL, 0x0004,
9876 NULL, HFILL }
9878 { &hf_bthci_cmd_tfcs_times_supported_40us,
9879 { "40 microseconds", "bthci_cmd.tfcs_times_supported_40us",
9880 FT_BOOLEAN, 16, NULL, 0x0008,
9881 NULL, HFILL }
9883 { &hf_bthci_cmd_tfcs_times_supported_50us,
9884 { "50 microseconds", "bthci_cmd.tfcs_times_supported_50us",
9885 FT_BOOLEAN, 16, NULL, 0x0010,
9886 NULL, HFILL }
9888 { &hf_bthci_cmd_tfcs_times_supported_60us,
9889 { "60 microseconds", "bthci_cmd.tfcs_times_supported_60us",
9890 FT_BOOLEAN, 16, NULL, 0x0020,
9891 NULL, HFILL }
9893 { &hf_bthci_cmd_tfcs_times_supported_80us,
9894 { "80 microseconds", "bthci_cmd.tfcs_times_supported_80us",
9895 FT_BOOLEAN, 16, NULL, 0x0040,
9896 NULL, HFILL }
9898 { &hf_bthci_cmd_tfcs_times_supported_100us,
9899 { "100 microseconds", "bthci_cmd.tfcs_times_supported_100us",
9900 FT_BOOLEAN, 16, NULL, 0x0080,
9901 NULL, HFILL }
9903 { &hf_bthci_cmd_tfcs_times_supported_120us,
9904 { "120 microseconds", "bthci_cmd.tfcs_times_supported_120us",
9905 FT_BOOLEAN, 16, NULL, 0x0100,
9906 NULL, HFILL }
9908 { &hf_bthci_cmd_tfcs_times_supported_reserved,
9909 { "Reserved", "bthci_cmd.tfcs_times_supported_reserved",
9910 FT_UINT16, BASE_HEX, NULL, 0xfe00,
9911 NULL, HFILL }
9913 { &hf_bthci_cmd_tpm_times_supported,
9914 { "T_PM Times Supported", "bthci_cmd.tpm_times_supported",
9915 FT_UINT16, BASE_HEX, NULL, 0x0,
9916 NULL, HFILL }
9918 { &hf_bthci_cmd_tpm_times_supported_10us,
9919 { "10 microseconds", "bthci_cmd.tpm_times_supported_10us",
9920 FT_BOOLEAN, 16, NULL, 0x0001,
9921 NULL, HFILL }
9923 { &hf_bthci_cmd_tpm_times_supported_20us,
9924 { "20 microseconds", "bthci_cmd.tpm_times_supported_20us",
9925 FT_BOOLEAN, 16, NULL, 0x0002,
9926 NULL, HFILL }
9928 { &hf_bthci_cmd_tpm_times_supported_reserved,
9929 { "Reserved", "bthci_cmd.tpm_times_supported_reserved",
9930 FT_UINT16, BASE_HEX, NULL, 0xfffc,
9931 NULL, HFILL }
9933 { &hf_bthci_cmd_tsw_time_supported,
9934 { "T_SW Time Supported", "bthci_cmd.tsw_time_supported",
9935 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
9936 NULL, HFILL }
9938 { &hf_bthci_cmd_tx_snr_capability,
9939 { "Tx SNR Capability", "bthci_cmd.tx_snr_capability",
9940 FT_UINT8, BASE_HEX, NULL, 0x0,
9941 NULL, HFILL }
9943 { &hf_bthci_cmd_tx_snr_capability_18dB,
9944 { "18 dB", "bthci_cmd.tx_snr_capability_18dB",
9945 FT_BOOLEAN, 8, NULL, 0x01,
9946 NULL, HFILL }
9948 { &hf_bthci_cmd_tx_snr_capability_21dB,
9949 { "21 dB", "bthci_cmd.tx_snr_capability_21dB",
9950 FT_BOOLEAN, 8, NULL, 0x02,
9951 NULL, HFILL }
9953 { &hf_bthci_cmd_tx_snr_capability_24dB,
9954 { "24 dB", "bthci_cmd.tx_snr_capability_24dB",
9955 FT_BOOLEAN, 8, NULL, 0x04,
9956 NULL, HFILL }
9958 { &hf_bthci_cmd_tx_snr_capability_27dB,
9959 { "27 dB", "bthci_cmd.tx_snr_capability_27dB",
9960 FT_BOOLEAN, 8, NULL, 0x08,
9961 NULL, HFILL }
9963 { &hf_bthci_cmd_tx_snr_capability_30dB,
9964 { "30 dB", "bthci_cmd.tx_snr_capability_30dB",
9965 FT_BOOLEAN, 8, NULL, 0x10,
9966 NULL, HFILL }
9968 { &hf_bthci_cmd_tx_snr_capability_reserved,
9969 { "Reserved", "bthci_cmd.tx_snr_capability_reserved",
9970 FT_UINT8, BASE_HEX, NULL, 0xe0,
9971 NULL, HFILL }
9973 { &hf_bthci_cmd_fae_table,
9974 { "FAE Table", "bthci_cmd.fae_table",
9975 FT_BYTES, BASE_NONE, NULL, 0x0,
9976 NULL, HFILL }
9978 { &hf_bthci_cmd_create_context,
9979 { "Create Context", "bthci_cmd.create_context",
9980 FT_UINT8, BASE_HEX, VALS(cmd_cs_create_context_vals), 0x0,
9981 NULL, HFILL }
9983 { &hf_bthci_cmd_main_mode_type,
9984 { "Main Mode Type", "bthci_cmd.main_mode_type",
9985 FT_UINT8, BASE_DEC, NULL, 0x0,
9986 NULL, HFILL }
9988 { &hf_bthci_cmd_sub_mode_type,
9989 { "Sub Mode Type", "bthci_cmd.sub_mode_type",
9990 FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_used_0xff_special), 0x0,
9991 NULL, HFILL }
9993 { &hf_bthci_cmd_min_main_mode_steps,
9994 { "Min Main Mode Steps", "bthci_cmd.min_main_mode_steps",
9995 FT_UINT8, BASE_DEC, NULL, 0x0,
9996 NULL, HFILL }
9998 { &hf_bthci_cmd_max_main_mode_steps,
9999 { "Max Main Mode Steps", "bthci_cmd.max_main_mode_steps",
10000 FT_UINT8, BASE_DEC, NULL, 0x0,
10001 NULL, HFILL }
10003 { &hf_bthci_cmd_main_mode_repetition,
10004 { "Main Mode Repetitions", "bthci_cmd.main_mode_repetition",
10005 FT_UINT8, BASE_DEC, NULL, 0x0,
10006 NULL, HFILL }
10008 { &hf_bthci_cmd_mode0_steps,
10009 { "Mode-0 Steps", "bthci_cmd.mode0_steps",
10010 FT_UINT8, BASE_DEC, NULL, 0x0,
10011 NULL, HFILL }
10013 { &hf_bthci_cmd_cs_role,
10014 { "Role", "bthci_cmd.cs_role",
10015 FT_UINT8, BASE_HEX, VALS(cmd_cs_role_vals), 0x0,
10016 NULL, HFILL }
10018 { &hf_bthci_cmd_rtt_type,
10019 { "RTT Type", "bthci_cmd.rtt_type",
10020 FT_UINT8, BASE_HEX, VALS(cmd_cs_rtt_type_vals), 0x0,
10021 NULL, HFILL }
10023 { &hf_bthci_cmd_cs_sync_phy,
10024 { "CS Sync PHY", "bthci_cmd.cs_sync_phy",
10025 FT_UINT8, BASE_HEX, VALS(cmd_cs_sync_phy_vals), 0x0,
10026 NULL, HFILL }
10028 { &hf_bthci_cmd_channel_map_repetition,
10029 { "Channel Map Repetitions", "bthci_cmd.channel_map_repetition",
10030 FT_UINT8, BASE_DEC, NULL, 0x0,
10031 NULL, HFILL }
10033 { &hf_bthci_cmd_channel_selection_type,
10034 { "Channel Selection Type", "bthci_cmd.channel_selection_type",
10035 FT_UINT8, BASE_HEX, VALS(cmd_cs_ch_selection_type_vals), 0x0,
10036 NULL, HFILL }
10038 { &hf_bthci_cmd_ch3c_shape,
10039 { "Ch3c Shape", "bthci_cmd.ch3c_shape",
10040 FT_UINT8, BASE_HEX, VALS(cmd_cs_shape_vals), 0x0,
10041 NULL, HFILL }
10043 { &hf_bthci_cmd_ch3c_jump,
10044 { "Ch3c Jump", "bthci_cmd.ch3c_jump",
10045 FT_UINT8, BASE_DEC, NULL, 0x0,
10046 NULL, HFILL }
10048 { &hf_bthci_cmd_companion_signal_enable,
10049 { "Companion Signal Enable", "bthci_cmd.companion_signal_enable",
10050 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
10051 NULL, HFILL }
10053 { &hf_bthci_cmd_cs_enable,
10054 { "CS Enable", "bthci_cmd.cs_enable",
10055 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
10056 NULL, HFILL }
10058 { &hf_bthci_cmd_max_procedure_len,
10059 { "Max Procedure Length", "bthci_cmd.max_procedure_len",
10060 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
10061 NULL, HFILL }
10063 { &hf_bthci_cmd_min_procedure_interval,
10064 { "Min Procedure Interval", "bthci_cmd.min_procedure_interval",
10065 FT_UINT16, BASE_DEC, NULL, 0x0,
10066 NULL, HFILL }
10068 { &hf_bthci_cmd_max_procedure_interval,
10069 { "Max Procedure Interval", "bthci_cmd.max_procedure_interval",
10070 FT_UINT16, BASE_DEC, NULL, 0x0,
10071 NULL, HFILL }
10073 { &hf_bthci_cmd_max_procedure_count,
10074 { "Max Procedure Count", "bthci_cmd.max_procedure_count",
10075 FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_procedure_count_special), 0x0,
10076 NULL, HFILL }
10078 { &hf_bthci_cmd_min_subevent_len,
10079 { "Min Subevent Length", "bthci_cmd.min_subevent_len",
10080 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10081 NULL, HFILL }
10083 { &hf_bthci_cmd_max_subevent_len,
10084 { "Max Subevent Length", "bthci_cmd.max_subevent_len",
10085 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10086 NULL, HFILL }
10088 { &hf_bthci_cmd_subevent_len,
10089 { "Subevent Length", "bthci_cmd.subevent_len",
10090 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10091 NULL, HFILL }
10093 { &hf_bthci_cmd_tone_antenna_selection,
10094 { "Antenna Config Selection Index", "bthci_cmd.tone_antenna_selection",
10095 FT_UINT8, BASE_HEX, VALS(cmd_aci_vals), 0x0,
10096 NULL, HFILL }
10098 { &hf_bthci_cmd_tx_pwr_delta,
10099 {"Tx Power Delta (dB)", "bthci_cmd.tx_pwr_delta",
10100 FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0x0,
10101 NULL, HFILL}
10103 { &hf_bthci_cmd_preferred_peer_antenna,
10104 { "Preferred Peer Antenna", "bthci_cmd.preferred_peer_antenna",
10105 FT_UINT8, BASE_HEX, NULL, 0x0,
10106 NULL, HFILL }
10108 { &hf_bthci_cmd_preferred_peer_antenna_first,
10109 { "1st Ordered Element", "bthci_cmd.preferred_peer_antenna.first",
10110 FT_BOOLEAN, 8, NULL, 0x01,
10111 NULL, HFILL }
10113 { &hf_bthci_cmd_preferred_peer_antenna_second,
10114 { "2nd Ordered Element", "bthci_cmd.preferred_peer_antenna.second",
10115 FT_BOOLEAN, 8, NULL, 0x02,
10116 NULL, HFILL }
10118 { &hf_bthci_cmd_preferred_peer_antenna_third,
10119 { "3rd Ordered Element", "bthci_cmd.preferred_peer_antenna.third",
10120 FT_BOOLEAN, 8, NULL, 0x04,
10121 NULL, HFILL }
10123 { &hf_bthci_cmd_preferred_peer_antenna_fourth,
10124 { "4th Ordered Element", "bthci_cmd.preferred_peer_antenna.fourth",
10125 FT_BOOLEAN, 8, NULL, 0x08,
10126 NULL, HFILL }
10128 { &hf_bthci_cmd_preferred_peer_antenna_reserved,
10129 { "Reserved", "bthci_cmd.preferred_peer_antenna.reserved",
10130 FT_UINT8, BASE_HEX, NULL, 0xF0,
10131 NULL, HFILL }
10133 { &hf_bthci_cmd_snr_control_initiator,
10134 { "SNR Adjustment, Initiator", "bthci_cmd.snr_control_initiator",
10135 FT_UINT8, BASE_HEX, VALS(cmd_snr_control_vals), 0x0,
10136 NULL, HFILL }
10138 { &hf_bthci_cmd_snr_control_reflector,
10139 { "SNR Adjustment, Reflector", "bthci_cmd.snr_control_reflector",
10140 FT_UINT8, BASE_HEX, VALS(cmd_snr_control_vals), 0x0,
10141 NULL, HFILL }
10143 { &hf_bthci_cmd_cs_subevent_interval,
10144 { "Subevent Interval", "bthci_cmd.cs_subevent_interval",
10145 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
10146 NULL, HFILL }
10148 { &hf_bthci_cmd_max_num_subevents,
10149 { "Max Num Subevents", "bthci_cmd.max_num_subevents",
10150 FT_UINT8, BASE_DEC, NULL, 0x0,
10151 NULL, HFILL }
10153 { &hf_bthci_cmd_tx_power_setting,
10154 { "Tx Power Level", "bthci_cmd.tx_power_setting",
10155 FT_INT8, BASE_CUSTOM, CF_FUNC(tx_power_setting), 0x0,
10156 NULL, HFILL }
10158 { &hf_bthci_cmd_t_ip1_time,
10159 { "T_IP1 Time", "bthci_cmd.t_ip1_time",
10160 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10161 NULL, HFILL }
10163 { &hf_bthci_cmd_t_ip2_time,
10164 { "T_IP2 Time", "bthci_cmd.t_ip2_time",
10165 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10166 NULL, HFILL }
10168 { &hf_bthci_cmd_t_fcs_time,
10169 { "T_FCS Time", "bthci_cmd.t_fcs_time",
10170 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10171 NULL, HFILL }
10173 { &hf_bthci_cmd_t_pm_time,
10174 { "T_PM Time", "bthci_cmd.t_pm_time",
10175 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10176 NULL, HFILL }
10178 { &hf_bthci_cmd_t_sw_time,
10179 { "T_SW Time", "bthci_cmd.t_sw_time",
10180 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10181 NULL, HFILL }
10183 { &hf_bthci_cmd_drbg_nonce,
10184 { "DRBG Nonce", "bthci_cmd.drbg_nonce",
10185 FT_UINT16, BASE_HEX, NULL, 0x0,
10186 NULL, HFILL }
10188 { &hf_bthci_cmd_cs_override_config,
10189 { "Override Config", "bthci_cmd.cs_override_config",
10190 FT_UINT16, BASE_HEX, NULL, 0x0,
10191 NULL, HFILL }
10193 { &hf_bthci_cmd_override_config_reserved,
10194 { "Reserved", "bthci_cmd.override_config.reserved",
10195 FT_UINT16, BASE_HEX, NULL, 0xFA02,
10196 NULL, HFILL }
10198 { &hf_bthci_cmd_override_config_channel_list,
10199 { "Channel List", "bthci_cmd.override_config.channel_list",
10200 FT_BOOLEAN, 16, NULL, 0x0001,
10201 NULL, HFILL }
10203 { &hf_bthci_cmd_override_config_main_mode_steps,
10204 { "Main Mode Steps", "bthci_cmd.override_config.main_mode_steps",
10205 FT_BOOLEAN, 16, NULL, 0x0004,
10206 NULL, HFILL }
10208 { &hf_bthci_cmd_override_config_tpm_tone_ext,
10209 { "T_PM Tone Extension", "bthci_cmd.override_config.tpm_tone_ext",
10210 FT_BOOLEAN, 16, NULL, 0x0008,
10211 NULL, HFILL }
10213 { &hf_bthci_cmd_override_config_tone_ant_permutation,
10214 { "Tone Antenna Permutation", "bthci_cmd.override_config.tone_ant_permutation",
10215 FT_BOOLEAN, 16, NULL, 0x0010,
10216 NULL, HFILL }
10218 { &hf_bthci_cmd_override_config_cs_sync_aa,
10219 { "CS Sync Access Address", "bthci_cmd.override_config.cs_sync_aa",
10220 FT_BOOLEAN, 16, NULL, 0x0020,
10221 NULL, HFILL }
10223 { &hf_bthci_cmd_override_config_ss_marker_position,
10224 { "SS Marker Position", "bthci_cmd.override_config.ss_marker_position",
10225 FT_BOOLEAN, 16, NULL, 0x0040,
10226 NULL, HFILL }
10228 { &hf_bthci_cmd_override_config_ss_marker_value,
10229 { "SS Marker Value", "bthci_cmd.override_config.ss_marker_value",
10230 FT_BOOLEAN, 16, NULL, 0x0080,
10231 NULL, HFILL }
10233 { &hf_bthci_cmd_override_config_cs_sync_data,
10234 { "CS Sync Data", "bthci_cmd.override_config.cs_sync_data",
10235 FT_BOOLEAN, 16, NULL, 0x0100,
10236 NULL, HFILL }
10238 { &hf_bthci_cmd_override_config_stable_phase_test,
10239 { "Stable Phase Test", "bthci_cmd.override_config.stable_phase_test",
10240 FT_BOOLEAN, 16, NULL, 0x0400,
10241 NULL, HFILL }
10243 { &hf_bthci_cmd_cs_override_param_length,
10244 { "Override Parameter Length", "bthci_cmd.cs_override_param_length",
10245 FT_UINT8, BASE_DEC, NULL, 0x0,
10246 NULL, HFILL }
10248 { &hf_bthci_cmd_cs_override_param_data,
10249 { "Override Parameter Data", "bthci_cmd.cs_override_param_data",
10250 FT_BYTES, BASE_NONE, NULL, 0x0,
10251 NULL, HFILL }
10253 { &hf_bthci_cmd_adv_monitoring_enable,
10254 { "Advertiser Monitoring Enable", "bthci_cmd.adv_monitoring_enable",
10255 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
10256 NULL, HFILL }
10258 { &hf_bthci_cmd_adv_decision_data,
10259 { "Decision Data", "bthci_cmd.decision_data",
10260 FT_BYTES, BASE_NONE, NULL, 0x0,
10261 NULL, HFILL }
10263 { &hf_bthci_cmd_adv_decision_flags,
10264 { "Decision Flags", "bthci_cmd.adv_decision_flags",
10265 FT_UINT8, BASE_HEX, NULL, 0x0,
10266 NULL, HFILL }
10268 { &hf_bthci_cmd_adv_decision_flags_resolvable_tag,
10269 { "Resolvable Tag Present", "bthci_cmd.adv_decision_flags.resolvable_tag",
10270 FT_BOOLEAN, 8, NULL, 0x01,
10271 NULL, HFILL }
10273 { &hf_bthci_cmd_adv_decision_flags_reserved,
10274 { "Reserved", "bthci_cmd.adv_decision_flags.reserved",
10275 FT_UINT8, BASE_HEX, NULL, 0xFE,
10276 NULL, HFILL }
10278 { &hf_bthci_cmd_num_tests,
10279 { "Number of Tests", "bthci_cmd.num_tests",
10280 FT_UINT8, BASE_DEC, NULL, 0x0,
10281 NULL, HFILL }
10283 { &hf_bthci_cmd_adv_test_flags,
10284 { "Test Flags", "bthci_cmd.adv_test_flags",
10285 FT_UINT8, BASE_HEX, NULL, 0x0,
10286 NULL, HFILL }
10288 { &hf_bthci_cmd_adv_test_flags_start_group,
10289 { "Start of New Test Group", "bthci_cmd.adv_test_flags.start_group",
10290 FT_BOOLEAN, 8, NULL, 0x01,
10291 NULL, HFILL }
10293 { &hf_bthci_cmd_adv_test_flags_data_contains_field_check_pass,
10294 { "Pass If Contains Field & Match", "bthci_cmd.adv_test_flags.data_contains_field_check_pass",
10295 FT_BOOLEAN, 8, NULL, 0x02,
10296 NULL, HFILL }
10298 { &hf_bthci_cmd_adv_test_flags_data_contains_field_check_fail,
10299 { "Pass If Contains Field & No Match", "bthci_cmd.adv_test_flags.data_contains_field_check_fail",
10300 FT_BOOLEAN, 8, NULL, 0x04,
10301 NULL, HFILL }
10303 { &hf_bthci_cmd_adv_test_flags_data_not_contain_field,
10304 { "Pass If Does Not Contain Field", "bthci_cmd.adv_test_flags.data_not_contain_field",
10305 FT_BOOLEAN, 8, NULL, 0x08,
10306 NULL, HFILL }
10308 { &hf_bthci_cmd_adv_test_flags_reserved,
10309 { "Reserved", "bthci_cmd.adv_test_flags.reserved",
10310 FT_UINT8, BASE_HEX, NULL, 0xF0,
10311 NULL, HFILL }
10313 { &hf_bthci_cmd_adv_test_field,
10314 { "Test Field", "bthci_cmd.adv_test_field",
10315 FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(adv_test_field_special), 0x0,
10316 NULL, HFILL }
10318 { &hf_bthci_cmd_adv_test_params,
10319 { "Test Parameters", "bthci_cmd.adv_test_params",
10320 FT_BYTES, BASE_NONE, NULL, 0x0,
10321 NULL, HFILL }
10323 { &hf_bthci_cmd_rssi_threshold_low,
10324 { "RSSI Threshold Low", "bthci_cmd.rssi_threshold_low",
10325 FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
10326 NULL, HFILL }
10328 { &hf_bthci_cmd_rssi_threshold_high,
10329 { "RSSI Threshold High", "bthci_cmd.rssi_threshold_high",
10330 FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
10331 NULL, HFILL }
10333 { &hf_bthci_cmd_rssi_threshold_timeout,
10334 { "Timeout", "bthci_cmd.rssi_threshold_timeout",
10335 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
10336 NULL, HFILL }
10338 { &hf_bthci_cmd_frame_space_min,
10339 { "Minimum Frame Space", "bthci_cmd.frame_space_min",
10340 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10341 NULL, HFILL }
10343 { &hf_bthci_cmd_frame_space_max,
10344 { "Maximum Frame Space", "bthci_cmd.frame_space_max",
10345 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10346 NULL, HFILL }
10348 { &hf_bthci_cmd_spacing_types,
10349 { "Spacing Types", "bthci_cmd.spacing_types",
10350 FT_UINT16, BASE_HEX, NULL, 0x0,
10351 NULL, HFILL }
10353 { &hf_bthci_cmd_spacing_types_tifs_acl_cp,
10354 { "T_IFS_ACL_CP", "bthci_cmd.spacing_types.tifs_acl_cp",
10355 FT_BOOLEAN, 16, NULL, 0x0001,
10356 NULL, HFILL }
10358 { &hf_bthci_cmd_spacing_types_tifs_acl_pc,
10359 { "T_IFS_ACL_PC", "bthci_cmd.spacing_types.tifs_acl_pc",
10360 FT_BOOLEAN, 16, NULL, 0x0002,
10361 NULL, HFILL }
10363 { &hf_bthci_cmd_spacing_types_tmces,
10364 { "T_MCES", "bthci_cmd.spacing_types.tmces",
10365 FT_BOOLEAN, 16, NULL, 0x0004,
10366 NULL, HFILL }
10368 { &hf_bthci_cmd_spacing_types_tifs_cis,
10369 { "T_IFS_CIS", "bthci_cmd.spacing_types.tifs_cis",
10370 FT_BOOLEAN, 16, NULL, 0x0008,
10371 NULL, HFILL }
10373 { &hf_bthci_cmd_spacing_types_tmss_cis,
10374 { "T_MSS_CIS", "bthci_cmd.spacing_types.tmss_cis",
10375 FT_BOOLEAN, 16, NULL, 0x0010,
10376 NULL, HFILL }
10378 { &hf_bthci_cmd_spacing_types_reserved,
10379 { "Reserved", "bthci_cmd.spacing_types.reserved",
10380 FT_UINT16, BASE_HEX, NULL, 0xFFE0,
10381 NULL, HFILL }
10383 { &hf_bthci_cmd_triggered_clock_capture,
10384 { "Triggered Clock Capture", "bthci_cmd.triggered_clock_capture",
10385 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
10386 NULL, HFILL }
10388 { &hf_bthci_cmd_lpo_allowed,
10389 { "LPO Allowed", "bthci_cmd.lpo_allowed",
10390 FT_UINT8, BASE_HEX, VALS(lpo_allowed_vals), 0x0,
10391 NULL, HFILL }
10393 { &hf_bthci_cmd_number_of_clock_captures_to_filter,
10394 { "Number of Clock Captures to Filter", "bthci_cmd.number_of_clock_captures_to_filter",
10395 FT_UINT8, BASE_DEC, NULL, 0x0,
10396 NULL, HFILL }
10398 { &hf_bthci_cmd_amp_controller_type,
10399 { "Controller Type", "bthci_cmd.controller_type",
10400 FT_UINT8, BASE_HEX, VALS(bthci_evt_controller_types), 0x0,
10401 NULL, HFILL }
10403 { &hf_bthci_cmd_dm1_acl_u_mode,
10404 {"DM1 ACL-U Mode", "bthci_cmd.dm1_acl_u_mode",
10405 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
10406 NULL, HFILL}
10408 { &hf_bthci_cmd_esco_loopback_mode,
10409 {"eSCO Loopback Mode", "bthci_cmd.esco_loopback_mode",
10410 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
10411 NULL, HFILL}
10413 { &hf_bthci_cmd_transmit_coding_format,
10414 { "Transmit Coding Format", "bthci_cmd.transmit_coding_format",
10415 FT_NONE, BASE_NONE, NULL, 0x0,
10416 NULL, HFILL }
10418 { &hf_bthci_cmd_receive_coding_format,
10419 { "Receive Coding Format", "bthci_cmd.receive_coding_format",
10420 FT_NONE, BASE_NONE, NULL, 0x0,
10421 NULL, HFILL }
10423 { &hf_bthci_cmd_input_coding_format,
10424 { "Input Coding Format", "bthci_cmd.input_coding_format",
10425 FT_NONE, BASE_NONE, NULL, 0x0,
10426 NULL, HFILL }
10428 { &hf_bthci_cmd_output_coding_format,
10429 { "Output Coding Format", "bthci_cmd.output_coding_format",
10430 FT_NONE, BASE_NONE, NULL, 0x0,
10431 NULL, HFILL }
10433 { &hf_bthci_cmd_codec_id,
10434 { "Codec", "bthci_cmd.codec_id",
10435 FT_UINT8, BASE_HEX, VALS(bthci_evt_codec_id_vals), 0x0,
10436 NULL, HFILL }
10438 { &hf_bthci_cmd_company_id,
10439 { "Company ID", "bthci_cmd.company_id",
10440 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_company_id_vals_ext, 0x0,
10441 NULL, HFILL }
10443 { &hf_bthci_cmd_vendor_codec_id,
10444 { "Vendor Codec ID", "bthci_cmd.vendor_codec_id",
10445 FT_UINT16, BASE_HEX, NULL, 0x0,
10446 NULL, HFILL }
10448 { &hf_bthci_cmd_transmit_codec_frame_size,
10449 { "Transmit Codec Frame Size", "bthci_cmd.transmit_codec_frame_size",
10450 FT_UINT16, BASE_DEC, NULL, 0x0,
10451 NULL, HFILL }
10453 { &hf_bthci_cmd_receive_codec_frame_size,
10454 { "Receive Codec Frame Size", "bthci_cmd.receive_codec_frame_size",
10455 FT_UINT16, BASE_DEC, NULL, 0x0,
10456 NULL, HFILL }
10458 { &hf_bthci_cmd_input_bandwidth,
10459 { "Input Bandwidth", "bthci_cmd.input_bandwidth",
10460 FT_UINT32, BASE_DEC, NULL, 0x0,
10461 NULL, HFILL }
10463 { &hf_bthci_cmd_output_bandwidth,
10464 { "Output Bandwidth", "bthci_cmd.output_bandwidth",
10465 FT_UINT32, BASE_DEC, NULL, 0x0,
10466 NULL, HFILL }
10468 { &hf_bthci_cmd_input_coded_data_size,
10469 { "Input Coded Data Size", "bthci_cmd.input_coded_data_size",
10470 FT_UINT16, BASE_DEC, NULL, 0x0,
10471 NULL, HFILL }
10473 { &hf_bthci_cmd_output_coded_data_size,
10474 { "Output Coded Data Size", "bthci_cmd.output_coded_data_size",
10475 FT_UINT16, BASE_DEC, NULL, 0x0,
10476 NULL, HFILL }
10478 { &hf_bthci_cmd_input_pcm_data_format,
10479 { "Input PCM Data Format", "bthci_cmd.input_pcm_data_format",
10480 FT_UINT8, BASE_HEX, VALS(pcm_data_format_vals), 0x0,
10481 NULL, HFILL }
10483 { &hf_bthci_cmd_output_pcm_data_format,
10484 { "Output PCM Data Format", "bthci_cmd.output_pcm_data_format",
10485 FT_UINT8, BASE_HEX, VALS(pcm_data_format_vals), 0x0,
10486 NULL, HFILL }
10488 { &hf_bthci_cmd_input_pcm_sample_payload_msb_position,
10489 { "Input PCM Sample Payload MSB Position", "bthci_cmd.input_pcm_sample_payload_msb_position",
10490 FT_UINT8, BASE_DEC, NULL, 0x0,
10491 NULL, HFILL }
10493 { &hf_bthci_cmd_output_pcm_sample_payload_msb_position,
10494 { "Output PCM Sample Payload MSB Position", "bthci_cmd.output_pcm_sample_payload_msb_position",
10495 FT_UINT8, BASE_DEC, NULL, 0x0,
10496 NULL, HFILL }
10498 { &hf_bthci_cmd_input_data_path,
10499 { "Input Data Path", "bthci_cmd.input_data_path",
10500 FT_UINT8, BASE_RANGE_STRING, RVALS(audio_data_path_rvals), 0x0,
10501 NULL, HFILL }
10503 { &hf_bthci_cmd_output_data_path,
10504 { "Output Data Path", "bthci_cmd.output_data_path",
10505 FT_UINT8, BASE_RANGE_STRING, RVALS(audio_data_path_rvals), 0x0,
10506 NULL, HFILL }
10508 { &hf_bthci_cmd_input_transport_unit_size,
10509 { "Input Transport Unit Size", "bthci_cmd.input_transport_unit_size",
10510 FT_UINT8, BASE_DEC, NULL, 0x0,
10511 NULL, HFILL }
10513 { &hf_bthci_cmd_output_transport_unit_size,
10514 { "Output Transport Unit Size", "bthci_cmd.output_transport_unit_size",
10515 FT_UINT8, BASE_DEC, NULL, 0x0,
10516 NULL, HFILL }
10518 { &hf_bthci_cmd_connectionless_peripheral_broadcast,
10519 { "Connectionless Peripheral Broadcast", "bthci_cmd.connectionless_peripheral_broadcast",
10520 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
10521 NULL, HFILL }
10523 { &hf_bthci_cmd_lt_addr,
10524 { "LT_ADDR", "bthci_cmd.lt_addr",
10525 FT_UINT8, BASE_HEX, NULL, 0x0,
10526 NULL, HFILL }
10528 { &hf_bthci_cmd_interval_min,
10529 { "Min Interval", "bthci_cmd.interval.min",
10530 FT_UINT16, BASE_DEC, NULL, 0x0,
10531 NULL, HFILL }
10533 { &hf_bthci_cmd_interval_max,
10534 { "Max Interval", "bthci_cmd.interval.max",
10535 FT_UINT16, BASE_DEC, NULL, 0x0,
10536 NULL, HFILL }
10538 { &hf_bthci_cmd_cpb_supervision_to,
10539 { "Supervision To", "bthci_cmd.cpb_supervision_to",
10540 FT_UINT16, BASE_DEC, NULL, 0x0,
10541 NULL, HFILL }
10543 { &hf_bthci_cmd_connectionless_peripheral_broadcast_receive,
10544 { "Connectionless Peripheral Broadcast Receive", "bthci_cmd.connectionless_peripheral_broadcast_receive",
10545 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
10546 NULL, HFILL }
10548 { &hf_bthci_cmd_clock_offset_32,
10549 { "Clock Offset", "bthci_cmd.clock_offset_32",
10550 FT_UINT32, BASE_HEX, NULL, 0x0FFFFFFF,
10551 "Bits 0-27 of the Clock Offset between CLKNreceiver-CLKNtransmitter", HFILL }
10553 { &hf_bthci_cmd_next_cpb_clock,
10554 { "Next CPB Clock", "bthci_cmd.next_cpb_clock",
10555 FT_UINT32, BASE_HEX, NULL, 0x0FFFFFFF,
10556 "Bits 0-27 of the Clock Offset between CLKperipheral-CLK", HFILL }
10558 { &hf_bthci_cmd_remote_timing_accuracy,
10559 { "Remote Timing Accuracy", "bthci_cmd.remote_timing_accuracy",
10560 FT_UINT8, BASE_DEC, NULL, 0x0,
10561 NULL, HFILL }
10563 { &hf_bthci_cmd_cpb_skip,
10564 { "CPB Skip", "bthci_cmd.cpb_skip",
10565 FT_UINT8, BASE_DEC, NULL, 0x0,
10566 NULL, HFILL }
10568 /* TODO: More detailed dissection */
10569 { &hf_bthci_cmd_channel_map,
10570 {"Channel Map", "bthci_cmd.channel_map",
10571 FT_BYTES, BASE_NONE, NULL, 0x0,
10572 NULL, HFILL}
10574 { &hf_bthci_cmd_synchronization_scan_to,
10575 { "Synchronization Scan To", "bthci_cmd.synchronization_scan_to",
10576 FT_UINT16, BASE_DEC, NULL, 0x0,
10577 NULL, HFILL }
10579 { &hf_bthci_cmd_c192,
10580 { "C 192", "bthci_cmd.c192",
10581 FT_BYTES, BASE_NONE, NULL, 0x0,
10582 NULL, HFILL }
10584 { &hf_bthci_cmd_r192,
10585 { "R 192", "bthci_cmd.r192",
10586 FT_BYTES, BASE_NONE, NULL, 0x0,
10587 NULL, HFILL }
10589 { &hf_bthci_cmd_c256,
10590 { "C 256", "bthci_cmd.c256",
10591 FT_BYTES, BASE_NONE, NULL, 0x0,
10592 NULL, HFILL }
10594 { &hf_bthci_cmd_r256,
10595 { "R 256", "bthci_cmd.r256",
10596 FT_BYTES, BASE_NONE, NULL, 0x0,
10597 NULL, HFILL }
10599 { &hf_bthci_mws_channel,
10600 { "MWS Channel", "bthci_cmd.mws_channel",
10601 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
10602 NULL, HFILL }
10604 /* TODO: Add units */
10605 { &hf_bthci_mws_rx_center_frequency,
10606 { "MWS RX Center Frequency", "bthci_cmd.mws_rx_center_frequency",
10607 FT_UINT16, BASE_DEC, NULL, 0x0,
10608 NULL, HFILL }
10610 { &hf_bthci_mws_tx_center_frequency,
10611 { "MWS TX Center Frequency", "bthci_cmd.mws_tx_center_frequency",
10612 FT_UINT16, BASE_DEC, NULL, 0x0,
10613 NULL, HFILL }
10615 /* TODO: Add units */
10616 { &hf_bthci_mws_rx_channel_bandwidth,
10617 { "MWS RX Channel Bandwidth", "bthci_cmd.mws_rx_channel_bandwidth",
10618 FT_UINT16, BASE_DEC, NULL, 0x0,
10619 NULL, HFILL }
10621 { &hf_bthci_mws_tx_channel_bandwidth,
10622 { "MWS TX Channel Bandwidth", "bthci_cmd.mws_tx_channel_bandwidth",
10623 FT_UINT16, BASE_DEC, NULL, 0x0,
10624 NULL, HFILL }
10626 { &hf_bthci_mws_channel_type,
10627 { "MWS Channel Type", "bthci_cmd.mws_channel_type",
10628 FT_UINT8, BASE_HEX, VALS(mws_channel_type_vals), 0x0,
10629 NULL, HFILL }
10631 { &hf_bthci_external_frame_duration,
10632 { "Frame Duration", "bthci_cmd.external_frame.duration",
10633 FT_UINT16, BASE_DEC, NULL, 0x0,
10634 NULL, HFILL }
10636 { &hf_bthci_external_frame_sync_assert_offset,
10637 { "Frame Duration", "bthci_cmd.external_frame.sync_assert.offset",
10638 FT_INT16, BASE_DEC, NULL, 0x0,
10639 NULL, HFILL }
10641 { &hf_bthci_external_frame_sync_assert_jitter,
10642 { "Frame Sync Assert Jitter", "bthci_cmd.external_frame.sync_assert.jitter",
10643 FT_UINT16, BASE_DEC, NULL, 0x0,
10644 NULL, HFILL }
10646 { &hf_bthci_external_frame_number_of_periods,
10647 { "Number of Periods", "bthci_cmd.external_frame.number_of_periods",
10648 FT_UINT8, BASE_DEC, NULL, 0x0,
10649 NULL, HFILL }
10651 { &hf_bthci_external_frame_periods,
10652 { "Periods", "bthci_cmd.external_frame.periods",
10653 FT_NONE, BASE_NONE, NULL, 0x0,
10654 NULL, HFILL }
10656 { &hf_bthci_external_frame_period,
10657 { "Period", "bthci_cmd.external_frame.period",
10658 FT_UINT24, BASE_HEX, NULL, 0x0,
10659 NULL, HFILL }
10661 { &hf_bthci_external_frame_period_duration,
10662 { "Duration", "bthci_cmd.external_frame.period.duration",
10663 FT_UINT16, BASE_DEC, NULL, 0x0,
10664 NULL, HFILL }
10666 { &hf_bthci_external_frame_period_type,
10667 { "Type", "bthci_cmd.external_frame.period.type",
10668 FT_UINT8, BASE_HEX, VALS(external_frame_period_type_vals), 0x0,
10669 NULL, HFILL }
10671 { &hf_bthci_mws_rx_assert_offset,
10672 { "RX Assert Offset", "bthci_cmd.mws.rx_assert.offset",
10673 FT_INT16, BASE_DEC, NULL, 0x0,
10674 NULL, HFILL }
10676 { &hf_bthci_mws_rx_assert_jitter,
10677 { "RX Assert Jitter", "bthci_cmd.mws.rx_assert.jitter",
10678 FT_INT16, BASE_DEC, NULL, 0x0,
10679 NULL, HFILL }
10681 { &hf_bthci_mws_rx_deassert_offset,
10682 { "RX Deassert Offset", "bthci_cmd.mws.rx_deassert.offset",
10683 FT_INT16, BASE_DEC, NULL, 0x0,
10684 NULL, HFILL }
10686 { &hf_bthci_mws_rx_deassert_jitter,
10687 { "RX Deassert Jitter", "bthci_cmd.mws.rx_deassert.jitter",
10688 FT_UINT16, BASE_DEC, NULL, 0x0,
10689 NULL, HFILL }
10691 { &hf_bthci_mws_tx_assert_offset,
10692 { "TX Assert Offset", "bthci_cmd.mws.tx_assert.offset",
10693 FT_INT16, BASE_DEC, NULL, 0x0,
10694 NULL, HFILL }
10696 { &hf_bthci_mws_tx_assert_jitter,
10697 { "TX Assert Jitter", "bthci_cmd.mws.tx_assert.jitter",
10698 FT_UINT16, BASE_DEC, NULL, 0x0,
10699 NULL, HFILL }
10701 { &hf_bthci_mws_tx_deassert_offset,
10702 { "TX Deassert Offset", "bthci_cmd.mws.tx_deassert.offset",
10703 FT_INT16, BASE_DEC, NULL, 0x0,
10704 NULL, HFILL }
10706 { &hf_bthci_mws_tx_deassert_jitter,
10707 { "TX Deassert Jitter", "bthci_cmd.mws.tx_deassert.jitter",
10708 FT_UINT16, BASE_DEC, NULL, 0x0,
10709 NULL, HFILL }
10711 { &hf_bthci_mws_pattern_assert_offset,
10712 { "Pattern Assert Offset", "bthci_cmd.mws.pattern_assert.offset",
10713 FT_INT16, BASE_DEC, NULL, 0x0,
10714 NULL, HFILL }
10716 { &hf_bthci_mws_pattern_assert_jitter,
10717 { "Pattern Assert Jitter", "bthci_cmd.mws.pattern_assert.jitter",
10718 FT_UINT16, BASE_DEC, NULL, 0x0,
10719 NULL, HFILL }
10721 { &hf_bthci_mws_inactivity_duration_assert_offset,
10722 { "Inactivity Duration Assert Offset", "bthci_cmd.mws.inactivity_duration_assert.offset",
10723 FT_INT16, BASE_DEC, NULL, 0x0,
10724 NULL, HFILL }
10726 { &hf_bthci_mws_inactivity_duration_assert_jitter,
10727 { "Inactivity Duration Assert Jitter", "bthci_cmd.mws.inactivity_duration_assert.jitter",
10728 FT_UINT16, BASE_DEC, NULL, 0x0,
10729 NULL, HFILL }
10731 { &hf_bthci_mws_scan_frequency_assert_offset,
10732 { "Scan Frequency Assert Offset", "bthci_cmd.mws.scan_frequency_assert.offset",
10733 FT_INT16, BASE_DEC, NULL, 0x0,
10734 NULL, HFILL }
10736 { &hf_bthci_mws_scan_frequency_assert_jitter,
10737 { "Scan Frequency Assert Jitter", "bthci_cmd.mws.scan_frequency_assert.jitter",
10738 FT_UINT16, BASE_DEC, NULL, 0x0,
10739 NULL, HFILL }
10741 { &hf_bthci_mws_priority_assert_offset_request,
10742 { "Priority Assert Offset Request", "bthci_cmd.mws.priority_assert_offset_request",
10743 FT_UINT16, BASE_DEC, NULL, 0x0,
10744 NULL, HFILL }
10746 { &hf_bthci_mws_transport_layer,
10747 { "Transport Layer", "bthci_cmd.mws.transport_layer",
10748 FT_UINT8, BASE_HEX, VALS(bthci_evt_mws_transport_layer_vals), 0x0,
10749 NULL, HFILL }
10751 { &hf_bthci_mws_to_baud_rate,
10752 { "To Baud Rate", "bthci_cmd.mws.to_baud_rate",
10753 FT_UINT32, BASE_DEC, NULL, 0x0,
10754 NULL, HFILL }
10756 { &hf_bthci_mws_from_baud_rate,
10757 { "From Baud Rate", "bthci_cmd.mws.from_baud_rate",
10758 FT_UINT32, BASE_DEC, NULL, 0x0,
10759 NULL, HFILL }
10761 { &hf_bthci_mws_number_of_frequencies,
10762 { "Number of Frequencies", "bthci_cmd.mws.number_of_frequencies",
10763 FT_UINT8, BASE_DEC, NULL, 0x0,
10764 NULL, HFILL }
10766 { &hf_bthci_mws_scan_frequency_table,
10767 { "Scan Frequency Table", "bthci_cmd.mws.scan_frequency_table",
10768 FT_NONE, BASE_NONE, NULL, 0x0,
10769 NULL, HFILL }
10771 { &hf_bthci_mws_scan_frequency_table_item,
10772 { "Item", "bthci_cmd.mws.scan_frequency_table.item",
10773 FT_UINT32, BASE_HEX, NULL, 0x0,
10774 NULL, HFILL }
10776 { &hf_bthci_mws_scan_frequency_table_item_low,
10777 { "Low Frequency", "bthci_cmd.mws.scan_frequency_table.item.low",
10778 FT_UINT16, BASE_DEC, NULL, 0x0,
10779 NULL, HFILL }
10781 { &hf_bthci_mws_scan_frequency_table_item_high,
10782 { "High Frequency", "bthci_cmd.mws.scan_frequency_table.item.high",
10783 FT_UINT16, BASE_DEC, NULL, 0x0,
10784 NULL, HFILL }
10786 { &hf_bthci_mws_pattern_index,
10787 { "Index", "bthci_cmd.mws_pattern.index",
10788 FT_UINT8, BASE_DEC, NULL, 0x0,
10789 NULL, HFILL }
10791 { &hf_bthci_mws_pattern_number_of_intervals,
10792 { "Number of Intervals", "bthci_cmd.mws_pattern.number_of_intervals",
10793 FT_UINT8, BASE_DEC, NULL, 0x0,
10794 NULL, HFILL }
10796 { &hf_bthci_mws_patterns,
10797 { "Patterns", "bthci_cmd.mws_pattern.patterns",
10798 FT_NONE, BASE_NONE, NULL, 0x0,
10799 NULL, HFILL }
10801 { &hf_bthci_mws_pattern,
10802 { "Pattern", "bthci_cmd.mws_pattern.pattern",
10803 FT_UINT24, BASE_HEX, NULL, 0x0,
10804 NULL, HFILL }
10806 { &hf_bthci_mws_pattern_duration,
10807 { "Duration", "bthci_cmd.mws_pattern.pattern.duration",
10808 FT_UINT16, BASE_DEC, NULL, 0x0,
10809 NULL, HFILL }
10811 { &hf_bthci_mws_pattern_type,
10812 { "Type", "bthci_cmd.mws_pattern.pattern.type",
10813 FT_UINT8, BASE_HEX, VALS(mws_pattern_type_vals), 0x0,
10814 NULL, HFILL }
10816 { &hf_bthci_cmd_sync_train_to,
10817 { "Synchronization Train To", "bthci_cmd.sync_train_to",
10818 FT_UINT32, BASE_DEC, NULL, 0x0,
10819 NULL, HFILL }
10821 { &hf_bthci_cmd_service_data,
10822 { "Service Data", "bthci_cmd.service_data",
10823 FT_UINT8, BASE_HEX, NULL, 0x0,
10824 NULL, HFILL }
10826 { &hf_bthci_cmd_secure_connection_host_support,
10827 { "Secure Connection Host Support", "bthci_cmd.secure_connection_host_support",
10828 FT_UINT8, BASE_HEX, VALS(disable_enable_vals), 0x0,
10829 NULL, HFILL }
10831 { &hf_bthci_cmd_cpb_fragment,
10832 { "CPB Fragment", "bthci_cmd.cpb.fragment",
10833 FT_UINT8, BASE_HEX, VALS(cpb_fragment_vals), 0x0,
10834 NULL, HFILL }
10836 { &hf_bthci_cmd_cpb_data_length,
10837 { "CPB Data Length", "bthci_cmd.cpb.data_length",
10838 FT_UINT8, BASE_DEC, NULL, 0x0,
10839 NULL, HFILL }
10841 { &hf_bthci_cmd_cpb_data,
10842 { "CPB Data", "bthci_cmd.cpb.data",
10843 FT_BYTES, BASE_NONE, NULL, 0x0,
10844 NULL, HFILL }
10846 { &hf_bthci_cmd_authenticated_payload_timeout,
10847 { "Authenticated Payload Timeout", "bthci_cmd.authenticated_payload_timeout",
10848 FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p01_sec), 0x0,
10849 NULL, HFILL }
10851 { &hf_bthci_cmd_extended_inquiry_length,
10852 { "Extended Inquiry Length", "bthci_cmd.extended_inquiry_length",
10853 FT_UINT16, BASE_DEC, NULL, 0x0,
10854 NULL, HFILL }
10856 { &hf_bthci_cmd_min_encryption_key_size,
10857 { "Minimum Encryption Key Size", "bthci_cmd.min_encryption_key_size",
10858 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10859 NULL, HFILL }
10863 static ei_register_info ei[] = {
10864 { &ei_command_unknown_command, { "bthci_cmd.expert.command.unknown_command", PI_PROTOCOL, PI_WARN, "Unknown command", EXPFILL }},
10865 { &ei_command_parameter_unexpected, { "bthci_cmd.expert.parameter.unexpected", PI_PROTOCOL, PI_WARN, "Unexpected command parameter", EXPFILL }},
10866 { &ei_command_undecoded, { "bthci_cmd.expert.command.undecoded", PI_UNDECODED, PI_NOTE, "Command undecoded", EXPFILL }}
10869 static int *ett[] = {
10870 &ett_bthci_cmd,
10871 &ett_opcode,
10872 &ett_cod,
10873 &ett_cod_mask,
10874 &ett_flow_spec_subtree,
10875 &ett_le_channel_map,
10876 &ett_event_mask_page_2,
10877 &ett_le_event_mask,
10878 &ett_adv_properties,
10879 &ett_adv_sets,
10880 &ett_phys_flags,
10881 &ett_phy_param,
10882 &ett_filter_policy,
10883 &ett_sync_cte_type,
10884 &ett_coding_format,
10885 &ett_packet_type,
10886 &ett_sco_packet_type,
10887 &ett_periods,
10888 &ett_period,
10889 &ett_table,
10890 &ett_table_item,
10891 &ett_patterns,
10892 &ett_pattern,
10893 &ett_cis_params,
10894 &ett_addr_change_reasons,
10895 &ett_adv_subevents,
10896 &ett_pref_antenna,
10897 &ett_cs_roles,
10898 &ett_cs_modes,
10899 &ett_cs_capability,
10900 &ett_cs_times,
10901 &ett_adv_test_flags,
10902 &ett_override_config,
10903 &ett_spacing_types
10906 proto_bthci_cmd = proto_register_protocol("Bluetooth HCI Command", "HCI_CMD", "bthci_cmd");
10907 bthci_cmd_handle = register_dissector("bthci_cmd", dissect_bthci_cmd, proto_bthci_cmd);
10909 /* Required function calls to register the header fields and subtrees used */
10910 proto_register_field_array(proto_bthci_cmd, hf, array_length(hf));
10911 proto_register_subtree_array(ett, array_length(ett));
10913 expert_bthci_cmd = expert_register_protocol(proto_bthci_cmd);
10914 expert_register_field_array(expert_bthci_cmd, ei, array_length(ei));
10916 bthci_cmds = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
10918 module = prefs_register_protocol_subtree("Bluetooth", proto_bthci_cmd, NULL);
10919 prefs_register_static_text_preference(module, "hci_cmd.version",
10920 "Bluetooth HCI version: 4.0 (Core)",
10921 "Version of protocol supported by this dissector.");
10922 prefs_register_bool_preference(module, "bthci_vendor_android",
10923 "Android HCI Vendor Commands/Events",
10924 "Whether HCI Vendor Commands/Events should be dissected as Android specific",
10925 &bthci_vendor_android);
10927 vendor_dissector_table = register_decode_as_next_proto(proto_bthci_cmd, "bthci_cmd.vendor",
10928 "BT HCI Command Vendor", bthci_cmd_vendor_prompt);
10932 /* If this dissector uses sub-dissector registration add a registration routine.
10933 This format is required because a script is used to find these routines and
10934 create the code that calls these routines.
10936 void
10937 proto_reg_handoff_bthci_cmd(void)
10939 hci_vendor_table = find_dissector_table("bluetooth.vendor");
10941 dissector_add_uint("hci_h4.type", HCI_H4_TYPE_CMD, bthci_cmd_handle);
10942 dissector_add_uint("hci_h1.type", BTHCI_CHANNEL_COMMAND, bthci_cmd_handle);
10945 #define PROTO_DATA_BLUETOOTH_EIR_AD_MANUFACTURER_COMPANY_ID 0
10946 #define PROTO_DATA_BLUETOOTH_EIR_AD_TDS_ORGANIZATION_ID 1
10948 static void bluetooth_eir_ad_manufacturer_company_id_prompt(packet_info *pinfo, char* result)
10950 uint16_t *value_data;
10952 value_data = (uint16_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_MANUFACTURER_COMPANY_ID);
10953 if (value_data)
10954 snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "EIR/AD Manufacturer Company ID 0x%02x as", (unsigned) *value_data);
10955 else
10956 snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Unknown EIR/AD Manufacturer");
10959 static void *bluetooth_eir_ad_manufacturer_company_id_value(packet_info *pinfo)
10961 uint16_t *value_data;
10963 value_data = (uint16_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_MANUFACTURER_COMPANY_ID);
10965 if (value_data)
10966 return GUINT_TO_POINTER((unsigned long)*value_data);
10968 return NULL;
10971 static void bluetooth_eir_ad_tds_organization_id_prompt(packet_info *pinfo, char* result)
10973 uint8_t *value_data;
10975 value_data = (uint8_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_TDS_ORGANIZATION_ID);
10976 if (value_data)
10977 snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "TDS Organization ID 0x%02x as", (unsigned) *value_data);
10978 else
10979 snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Unknown TDS Organization ID");
10982 static void *bluetooth_eir_ad_tds_organization_id_value(packet_info *pinfo)
10984 uint8_t *value_data;
10986 value_data = (uint8_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_TDS_ORGANIZATION_ID);
10988 if (value_data)
10989 return GUINT_TO_POINTER((unsigned long)*value_data);
10991 return NULL;
10994 static int
10995 dissect_eir_ad_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bluetooth_eir_ad_data_t *bluetooth_eir_ad_data)
10997 proto_item *entry_item;
10998 proto_tree *entry_tree;
10999 proto_item *sub_item;
11000 proto_tree *sub_tree;
11001 int offset = 0;
11002 int offset_start;
11003 uint8_t length;
11004 uint8_t sub_length;
11005 uint8_t type;
11006 uint8_t flags;
11007 int data_size;
11008 int64_t end_offset;
11009 bool has_bd_addr = false;
11010 uint8_t bd_addr[6];
11011 uint8_t *name = NULL;
11012 bluetooth_uuid_t uuid;
11013 uint32_t interval, num_bis;
11015 DISSECTOR_ASSERT(bluetooth_eir_ad_data);
11017 data_size = tvb_reported_length(tvb);
11019 while (offset < data_size) {
11020 length = tvb_get_uint8(tvb, offset);
11021 if (length <= 0) break;
11023 type = tvb_get_uint8(tvb, offset + 1);
11025 entry_item = proto_tree_add_none_format(tree, hf_btcommon_eir_ad_entry, tvb, offset, length + 1, "%s",
11026 val_to_str_const(type, bthci_cmd_eir_data_type_vals, "Unknown"));
11027 entry_tree = proto_item_add_subtree(entry_item, ett_eir_ad_entry);
11029 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_length, tvb, offset, 1, ENC_NA);
11030 offset += 1;
11032 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_type, tvb, offset, 1, ENC_NA);
11033 offset += 1;
11034 length -= 1;
11036 offset_start = offset;
11038 switch (type) {
11039 case 0x01: /* Flags */
11040 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_flags_reserved, tvb, offset, 1, ENC_NA);
11041 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_flags_le_bredr_support_host, tvb, offset, 1, ENC_NA);
11042 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_flags_le_bredr_support_controller, tvb, offset, 1, ENC_NA);
11043 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_flags_bredr_not_support, tvb, offset, 1, ENC_NA);
11044 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_flags_le_general_discoverable_mode, tvb, offset, 1, ENC_NA);
11045 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_flags_le_limited_discoverable_mode, tvb, offset, 1, ENC_NA);
11046 offset += 1;
11048 break;
11049 case 0x02: /* 16-bit Service Class UUIDs (incomplete) */
11050 case 0x03: /* 16-bit Service Class UUIDs */
11051 case 0x14: /* List of 16-bit Service Solicitation UUIDs */
11052 end_offset = offset + length;
11053 while (offset < end_offset) {
11054 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_uuid_16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11055 offset += 2;
11058 break;
11059 case 0x04: /* 32-bit Service Class UUIDs (incomplete) */
11060 case 0x05: /* 32-bit Service Class UUIDs */
11061 case 0x1F: /* List of 32-bit Service Solicitation UUIDs */
11062 end_offset = offset + length;
11063 while (offset < end_offset) {
11064 uuid = get_bluetooth_uuid(tvb, offset, 4);
11065 if (uuid.bt_uuid) {
11066 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_uuid_32, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11067 proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(uuid.bt_uuid, &bluetooth_uuid_vals_ext, "Unknown"));
11068 } else {
11069 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_custom_uuid_32, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11070 proto_item_append_text(sub_item, " (%s)", print_bluetooth_uuid(pinfo->pool, &uuid));
11073 offset += 4;
11076 break;
11077 case 0x06: /* 128-bit Service Class UUIDs (incomplete) */
11078 case 0x07: /* 128-bit Service Class UUIDs */
11079 case 0x15: /* List of 128-bit Service Solicitation UUIDs */
11080 end_offset = offset + length;
11081 while (offset < end_offset) {
11082 uuid = get_bluetooth_uuid(tvb, offset, 16);
11083 if (uuid.bt_uuid) {
11084 sub_item = proto_tree_add_bytes_format_value(entry_tree, hf_btcommon_eir_ad_uuid_128, tvb, offset, 16, uuid.data, "%s", print_numeric_bluetooth_uuid(pinfo->pool, &uuid));
11085 proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(uuid.bt_uuid, &bluetooth_uuid_vals_ext, "Unknown"));
11087 else {
11088 sub_item = proto_tree_add_bytes_format_value(entry_tree, hf_btcommon_eir_ad_custom_uuid_128, tvb, offset, 16, uuid.data, "%s", print_numeric_bluetooth_uuid(pinfo->pool, &uuid));
11089 proto_item_append_text(sub_item, " (%s)", print_bluetooth_uuid(pinfo->pool, &uuid));
11092 offset += 16;
11095 break;
11097 case 0x08: /* Device Name (shortened) */
11098 case 0x09: /* Device Name */
11099 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_name, tvb, offset, length, ENC_UTF_8 | ENC_NA);
11100 proto_item_append_text(entry_item, ": %s", tvb_format_text(pinfo->pool, tvb, offset, length));
11101 if (!name || type == 0x09)
11102 name = tvb_get_string_enc(pinfo->pool, tvb, offset, length, ENC_UTF_8);
11103 offset += length;
11105 break;
11106 case 0x10: /* Device ID / Security Manager TK Value */
11107 if (length == 16) { /* little heuristic for recognize Security Manager TK Value */
11108 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_data, tvb, offset, 16, ENC_NA);
11109 expert_add_info(pinfo, sub_item, &ei_eir_ad_undecoded);
11111 else if (length == 8) { /* DID */
11112 uint16_t vendor_id_source;
11113 uint16_t vendor_id;
11114 uint16_t product_id;
11115 const char *str_val;
11117 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_did_vendor_id_source, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11118 vendor_id_source = tvb_get_letohs(tvb, offset);
11119 offset += 2;
11121 if (vendor_id_source == DID_VENDOR_ID_SOURCE_BLUETOOTH_SIG) {
11122 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_did_vendor_id_bluetooth_sig, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11124 else if (vendor_id_source == DID_VENDOR_ID_SOURCE_USB_FORUM) {
11125 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_did_vendor_id_usb_forum, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11127 else {
11128 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_did_vendor_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11130 vendor_id = tvb_get_letohs(tvb, offset);
11131 offset += 2;
11133 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_did_product_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11134 product_id = tvb_get_letohs(tvb, offset);
11135 offset += 2;
11137 if (vendor_id_source == DID_VENDOR_ID_SOURCE_USB_FORUM) {
11138 str_val = val_to_str_ext_const(vendor_id << 16 | product_id, &ext_usb_products_vals, "Unknown");
11139 proto_item_append_text(sub_item, " (%s)", str_val);
11142 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_did_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11143 offset += 2;
11145 else {
11146 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_data, tvb, offset, length, ENC_NA);
11147 expert_add_info(pinfo, sub_item, &ei_command_unknown_command);
11150 break;
11151 case 0x0A: /* Tx Power Level */
11152 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_tx_power, tvb, offset, 1, ENC_NA);
11153 offset += 1;
11155 break;
11156 case 0x0B: /* OOB Optional Data Length */
11157 /* From CSS v3.pdf */
11158 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_ssp_oob_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11159 offset += 2;
11161 break;
11162 case 0x0C: /* BD_ADDR */
11163 /* From CSS v3.pdf */
11164 offset = dissect_bd_addr(hf_btcommon_eir_ad_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_eir_ad_data->interface_id, bluetooth_eir_ad_data->adapter_id, bd_addr);
11165 has_bd_addr = true;
11166 break;
11168 case 0x0D: /* Class Of Device */
11169 call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, entry_tree);
11170 offset += 3;
11172 break;
11173 case 0x0E: /* Simple Pairing Hash C */
11174 case 0x1D: /* Simple Pairing Hash C-256 */
11175 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_hash_c, tvb, offset, 16, ENC_NA);
11176 offset += 16;
11178 break;
11179 case 0x0F: /* Simple Pairing Randomizer R */
11180 case 0x1E: /* Simple Pairing Randomizer R-256 */
11181 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_randomizer_r, tvb, offset, 16, ENC_NA);
11182 offset += 16;
11184 break;
11185 case 0x11: /* Security Manager Out of Band Flags */
11186 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_oob_flags_reserved, tvb, offset, 1, ENC_NA);
11187 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_oob_flags_address_type, tvb, offset, 1, ENC_NA);
11188 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_oob_flags_le_bredr_support, tvb, offset, 1, ENC_NA);
11189 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_oob_flags_le_supported_host, tvb, offset, 1, ENC_NA);
11190 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_oob_flags_data_present, tvb, offset, 1, ENC_NA);
11191 offset += 1;
11193 break;
11194 case 0x12: /* Peripheral Connection Interval Range */
11195 sub_item = proto_tree_add_item(tree, hf_btcommon_eir_ad_connection_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11196 proto_item_append_text(sub_item, " (%g msec)", tvb_get_letohs(tvb, offset) * 1.25);
11197 offset += 2;
11199 sub_item = proto_tree_add_item(tree, hf_btcommon_eir_ad_connection_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11200 proto_item_append_text(sub_item, " (%g msec)", tvb_get_letohs(tvb, offset) * 1.25);
11201 offset += 2;
11203 proto_item_append_text(entry_item, ": %g - %g msec", tvb_get_letohs(tvb, offset - 4) * 1.25, tvb_get_letohs(tvb, offset - 2) * 1.25);
11205 break;
11206 case 0x16: /* Service Data - 16 bit UUID */
11207 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_uuid_16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11208 offset += 2;
11210 if (length - 2 > 0) {
11211 uuid = get_bluetooth_uuid(tvb, offset-2, 2);
11212 if (!dissector_try_string_with_data(bluetooth_eir_ad_service_uuid, print_numeric_bluetooth_uuid(pinfo->pool, &uuid),
11213 tvb_new_subset_length(tvb, offset, length - 2), pinfo, entry_tree, true, bluetooth_eir_ad_data)) {
11214 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_service_data, tvb, offset, length - 2, ENC_NA);
11216 offset += length - 2;
11218 break;
11219 case 0x20: /* Service Data - 32 bit UUID */
11220 uuid = get_bluetooth_uuid(tvb, offset, 4);
11221 if (!dissector_try_string_with_data(bluetooth_eir_ad_service_uuid, print_numeric_bluetooth_uuid(pinfo->pool, &uuid),
11222 tvb_new_subset_length(tvb, offset + 4, length - 4), pinfo, entry_tree, true, bluetooth_eir_ad_data)) {
11223 if (uuid.bt_uuid) {
11224 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_uuid_32, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11225 proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(uuid.bt_uuid, &bluetooth_uuid_vals_ext, "Unknown"));
11227 else {
11228 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_custom_uuid_32, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11229 proto_item_append_text(sub_item, " (%s)", print_bluetooth_uuid(pinfo->pool, &uuid));
11232 offset += 4;
11234 if (length - 4 > 0) {
11235 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_service_data, tvb, offset, length - 4, ENC_NA);
11236 offset += length - 4;
11238 break;
11239 case 0x21: /* Service Data - 128 bit UUID */
11240 uuid = get_bluetooth_uuid(tvb, offset, 16);
11241 if (!dissector_try_string_with_data(bluetooth_eir_ad_service_uuid, print_numeric_bluetooth_uuid(pinfo->pool, &uuid),
11242 tvb_new_subset_length(tvb, offset + 16, length - 16), pinfo, entry_tree, true, bluetooth_eir_ad_data)) {
11243 if (uuid.bt_uuid) {
11244 sub_item = proto_tree_add_bytes_format_value(entry_tree, hf_btcommon_eir_ad_uuid_128, tvb, offset, 16, uuid.data, "%s", print_numeric_bluetooth_uuid(pinfo->pool, &uuid));
11245 proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(uuid.bt_uuid, &bluetooth_uuid_vals_ext, "Unknown"));
11247 else {
11248 sub_item = proto_tree_add_bytes_format_value(entry_tree, hf_btcommon_eir_ad_custom_uuid_128, tvb, offset, 16, uuid.data, "%s", print_numeric_bluetooth_uuid(pinfo->pool, &uuid));
11249 proto_item_append_text(sub_item, " (%s)", print_bluetooth_uuid(pinfo->pool, &uuid));
11252 offset += 16;
11254 if (length - 16 > 0) {
11255 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_service_data, tvb, offset, length - 16, ENC_NA);
11256 offset += length - 16;
11258 break;
11259 case 0x17: /* Public Target Address */
11260 case 0x18: /* Random Target Address */
11261 end_offset = offset + length;
11262 while (offset < end_offset) {
11263 offset = dissect_bd_addr(hf_btcommon_eir_ad_bd_addr, pinfo, entry_tree, tvb, offset, false, bluetooth_eir_ad_data->interface_id, bluetooth_eir_ad_data->adapter_id, NULL);
11266 break;
11267 case 0x19: /* Appearance */
11268 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_appearance, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11269 proto_item_append_text(entry_item, ": %s", val_to_str_const(tvb_get_letohs(tvb, offset), bthci_cmd_appearance_vals, "Unknown"));
11270 offset += 2;
11272 break;
11273 case 0x1A: /* Advertising Interval */
11274 /* From CSS v3.pdf */
11275 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_advertising_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11276 proto_item_append_text(sub_item, " (%g msec)", tvb_get_letohs(tvb, offset) * 0.625);
11277 offset += 2;
11279 break;
11280 case 0x1B: /* LE Bluetooth Device Address */
11281 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_le_bd_addr_reserved, tvb, offset, 1, ENC_NA);
11282 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_le_bd_addr_type, tvb, offset, 1, ENC_NA);
11283 offset += 1;
11285 offset = dissect_bd_addr(hf_btcommon_eir_ad_bd_addr, pinfo, entry_tree, tvb, offset, false, bluetooth_eir_ad_data->interface_id, bluetooth_eir_ad_data->adapter_id, NULL);
11287 break;
11288 case 0x1C: /* LE Role */
11289 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_le_role, tvb, offset, 1, ENC_NA);
11290 offset += 1;
11292 break;
11293 case 0x22: /* LE Secure Connections Confirmation Value" */
11294 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_le_secure_confirmation_value, tvb, offset, 16, ENC_NA);
11295 offset += 16;
11297 break;
11298 case 0x23: /* LE Secure Connections Random Value" */
11299 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_le_secure_random_value, tvb, offset, 16, ENC_NA);
11300 offset += 16;
11302 break;
11303 case 0x24: /* URI */
11304 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_uri, tvb, offset, length, ENC_UTF_8 | ENC_NA);
11305 offset += length;
11307 break;
11308 case 0x25: /* Indoor Positioning */
11309 if (length == 0)
11310 break;
11312 sub_item = proto_tree_add_bitmask(entry_tree, tvb, offset, hf_btcommon_eir_ad_ips_flags, ett_eir_ad_entry, hfx_btcommon_eir_ad_ips_flags, ENC_LITTLE_ENDIAN);
11313 flags = tvb_get_uint8(tvb, offset);
11314 offset += 1;
11316 if (flags & 0x01) {
11317 proto_tree_add_item(tree, hf_btcommon_eir_ad_ips_latitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11318 offset += 4;
11320 proto_tree_add_item(tree, hf_btcommon_eir_ad_ips_longitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11321 offset += 4;
11323 proto_tree_add_item(tree, hf_btcommon_eir_ad_ips_local_north_coordinate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11324 offset += 2;
11326 proto_tree_add_item(tree, hf_btcommon_eir_ad_ips_local_east_coordinate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11327 offset += 2;
11330 if (flags & 0x04) {
11331 proto_tree_add_item(tree, hf_btcommon_eir_ad_ips_tx_power_level, tvb, offset, 1, ENC_NA);
11332 offset += 1;
11335 if (flags & 0x08) {
11336 proto_tree_add_item(tree, hf_btcommon_eir_ad_ips_altitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11337 offset += 2;
11340 if (flags & 0x10) {
11341 proto_tree_add_item(tree, hf_btcommon_eir_ad_ips_floor_number, tvb, offset, 1, ENC_NA);
11342 offset += 1;
11345 if (flags & 0x20) {
11346 proto_tree_add_bitmask(tree, tvb, offset, hf_btcommon_eir_ad_ips_uncertainty, ett_eir_ad_entry, hfx_btcommon_eir_ad_ips_uncertainty, ENC_NA);
11347 offset += 1;
11350 if (flags & 0xC0) {
11351 expert_add_info(pinfo, sub_item, &ei_eir_ad_not_used);
11354 break;
11355 case 0x26: /* Transport Discovery Data */
11356 end_offset = offset + length;
11357 while (offset < end_offset) {
11358 uint8_t organization_id;
11360 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_tds_organization_id, tvb, offset, 1, ENC_NA);
11361 organization_id = tvb_get_uint8(tvb, offset);
11362 offset += 1;
11364 if (p_get_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_TDS_ORGANIZATION_ID) == NULL) {
11365 uint8_t *value_data;
11367 value_data = wmem_new(wmem_file_scope(), uint8_t);
11368 *value_data = organization_id;
11370 p_add_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_TDS_ORGANIZATION_ID, value_data);
11373 proto_tree_add_bitmask(entry_tree, tvb, offset, hf_btcommon_eir_ad_tds_flags, ett_eir_ad_entry, hfx_btcommon_eir_ad_tds_flags, ENC_NA);
11374 offset += 1;
11376 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_tds_data_length, tvb, offset, 1, ENC_NA);
11377 sub_length = tvb_get_uint8(tvb, offset);
11378 offset += 1;
11380 if (length > 3 && sub_length > length - 3) {
11381 expert_add_info(pinfo, sub_item, &ei_eir_ad_invalid_length);
11384 if (sub_length > 0) {
11385 tvbuff_t *new_tvb;
11387 new_tvb = tvb_new_subset_length(tvb, offset, sub_length);
11389 if (!dissector_try_uint_with_data(bluetooth_eir_ad_tds_organization_id, organization_id, new_tvb, pinfo, tree, true, bluetooth_eir_ad_data)) {
11390 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_tds_data, tvb, offset, sub_length, ENC_NA);
11391 expert_add_info(pinfo, sub_item, &ei_eir_ad_undecoded);
11394 offset += length;
11397 length -= (3 + sub_length);
11400 break;
11401 case 0x27: {/* LE Supported Features */
11402 for (uint8_t i=0; (tvb_captured_length_remaining(tvb, offset) > 0) && (i < 8); i++) {
11403 proto_tree_add_bitmask(entry_tree, tvb, offset, hf_btcommon_eir_ad_le_features, ett_eir_ad_le_features, hfx_btcommon_eir_ad_le_features[i], ENC_NA);
11404 offset += 1;
11407 sub_length = tvb_captured_length_remaining(tvb, offset);
11408 if (sub_length > 0) {
11409 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_data, tvb, offset, sub_length, ENC_NA);
11410 expert_add_info(pinfo, sub_item, &ei_eir_ad_unknown);
11411 offset += sub_length;
11414 break;
11415 case 0x28: /* Channel Map Update Indication */
11416 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_le_channel_map, tvb, offset, 5, ENC_NA);
11417 sub_tree = proto_item_add_subtree(sub_item, ett_le_channel_map);
11419 call_dissector(btcommon_le_channel_map_handle, tvb_new_subset_length(tvb, offset, 5), pinfo, sub_tree);
11420 offset += 5;
11422 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_instant, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11423 offset += 2;
11425 break;
11426 case 0x3D: /* 3D Information Data */
11427 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_factory_test_mode, tvb, offset, 1, ENC_NA);
11428 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_reserved, tvb, offset, 1, ENC_NA);
11429 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_send_battery_level_report_on_startup, tvb, offset, 1, ENC_NA);
11430 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_battery_level_reporting, tvb, offset, 1, ENC_NA);
11431 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_association_notification, tvb, offset, 1, ENC_NA);
11432 offset += 1;
11434 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_path_loss_threshold, tvb, offset, 1, ENC_NA);
11435 offset += 1;
11437 break;
11438 case 0x29: /* PB-ADV */
11439 if (btmesh_pbadv_handle) {
11440 call_dissector(btmesh_pbadv_handle, tvb_new_subset_length(tvb, offset, length), pinfo, proto_tree_get_root(tree));
11441 } else {
11442 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_mesh_pbadv, tvb, offset, length, ENC_NA);
11444 offset += length;
11446 break;
11447 case 0x2a: /* Mesh Message */
11448 if (btmesh_handle) {
11449 call_dissector(btmesh_handle, tvb_new_subset_length(tvb, offset, length), pinfo, proto_tree_get_root(tree));
11450 } else {
11451 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_mesh_msg, tvb, offset, length, ENC_NA);
11453 offset += length;
11455 break;
11456 case 0x2b: /* Mesh Beacon */
11457 if (btmesh_beacon_handle) {
11458 call_dissector(btmesh_beacon_handle, tvb_new_subset_length(tvb, offset, length), pinfo, proto_tree_get_root(tree));
11459 } else {
11460 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_mesh_beacon, tvb, offset, length, ENC_NA);
11462 offset += length;
11464 break;
11465 case 0x2c: /* BIGInfo */
11466 sub_item = proto_tree_add_item_ret_uint(entry_tree, hf_btcommon_eir_ad_biginfo_big_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &interval);
11467 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_big_offset_units, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11468 proto_item_append_text(sub_item, " (%u usec)", interval * ((tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN) & 0x00004000) != 0 ? 300 : 30));
11469 sub_item = proto_tree_add_item_ret_uint(entry_tree, hf_btcommon_eir_ad_biginfo_iso_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN, &interval);
11470 proto_item_append_text(sub_item, " (%g msec)", interval * 1.25);
11471 proto_tree_add_item_ret_uint(entry_tree, hf_btcommon_eir_ad_biginfo_num_bis, tvb, offset, 4, ENC_LITTLE_ENDIAN, &num_bis);
11472 offset += 4;
11473 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_nse, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11474 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_bn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11475 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_sub_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11476 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_pto, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11477 offset += 4;
11478 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_bis_spacing, tvb, offset, 3, ENC_LITTLE_ENDIAN);
11479 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_irc, tvb, offset, 3, ENC_LITTLE_ENDIAN);
11480 offset += 3;
11481 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_max_pdu, tvb, offset, 1, ENC_NA);
11482 offset += 1;
11483 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_rfu, tvb, offset, 1, ENC_NA);
11484 offset += 1;
11485 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_seed_access_address, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11486 sub_tree = proto_item_add_subtree(sub_item, ett_eir_ad_biginfo_seedaa);
11487 for (uint32_t bis = 0; bis <= num_bis; ++bis) {
11488 uint32_t aa = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN);
11489 uint8_t d = (35 * bis + 42) & 0x7f;
11490 uint32_t dw = (0xfc000000 * (d & 1)) | ((d & 0x02) << 24) | ((d & 0x40) << 18) | ((d & 0x02) << 22) | ((d & 0x30) << 16) | ((d & 0x0c) << 15);
11491 aa ^= dw;
11492 proto_tree_add_uint(sub_tree, bis ? hf_btcommon_eir_ad_biginfo_bis_access_address : hf_btcommon_eir_ad_biginfo_big_control_access_address, tvb, 0, 0, aa);
11494 offset += 4;
11495 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_sdu_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11496 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_max_sdu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11497 offset += 4;
11498 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_base_crc_init, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11499 offset += 2;
11500 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_channel_map, tvb, offset, 5, ENC_LITTLE_ENDIAN);
11501 sub_tree = proto_item_add_subtree(sub_item, ett_le_channel_map);
11502 call_dissector(btcommon_le_channel_map_handle, tvb_new_subset_length(tvb, offset, 5), pinfo, sub_tree);
11503 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_phy, tvb, offset, 5, ENC_LITTLE_ENDIAN);
11504 offset += 5;
11505 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_bis_payload_count, tvb, offset, 5, ENC_LITTLE_ENDIAN);
11506 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_framing, tvb, offset, 5, ENC_LITTLE_ENDIAN);
11507 offset += 5;
11508 if (length >= 57) {
11509 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_giv, tvb, offset, 8, ENC_NA);
11510 offset += 8;
11511 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_biginfo_gskd, tvb, offset, 16, ENC_NA);
11512 offset += 16;
11515 break;
11516 case 0x2d: /* Broadcast Code */
11517 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_broadcast_code, tvb, offset, length, ENC_UTF_8 | ENC_NA);
11518 proto_item_append_text(entry_item, ": %s", tvb_format_text(pinfo->pool, tvb, offset, length));
11519 offset += length;
11521 break;
11522 case 0x2e: /* Resolvable Set Identifier */
11523 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_rsi, tvb, offset, length, ENC_NA);
11524 offset += length;
11526 break;
11527 case 0x30: /* Broadcast Name */
11528 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_broadcast_name, tvb, offset, length, ENC_UTF_8 | ENC_NA);
11529 offset += length;
11531 break;
11532 case 0xFF: /* Manufacturer Specific */ {
11533 uint16_t company_id;
11535 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_company_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11536 company_id = tvb_get_letohs(tvb, offset);
11537 offset += 2;
11538 length -= 2;
11540 if (p_get_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_MANUFACTURER_COMPANY_ID) == NULL) {
11541 uint16_t *value_data;
11543 value_data = wmem_new(wmem_file_scope(), uint16_t);
11544 *value_data = company_id;
11546 p_add_proto_data(pinfo->pool, pinfo, proto_btcommon, PROTO_DATA_BLUETOOTH_EIR_AD_MANUFACTURER_COMPANY_ID, value_data);
11549 if (company_id == 0x000F && tvb_get_uint8(tvb, offset) == 0) { /* 3DS profile Legacy Devices */
11550 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_fixed, tvb, offset, 1, ENC_NA);
11551 offset += 1;
11553 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_test_mode, tvb, offset, 1, ENC_NA);
11554 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_fixed_6, tvb, offset, 1, ENC_NA);
11555 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_ignored_5, tvb, offset, 1, ENC_NA);
11556 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_fixed_4, tvb, offset, 1, ENC_NA);
11557 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_ignored_1_3, tvb, offset, 1, ENC_NA);
11558 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_3d_capable_tv, tvb, offset, 1, ENC_NA);
11559 offset += 1;
11561 proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_3ds_legacy_path_loss_threshold, tvb, offset, 1, ENC_NA);
11562 offset += 1;
11563 } else {
11564 tvbuff_t *new_tvb;
11566 new_tvb = tvb_new_subset_length(tvb, offset, length);
11568 if (!dissector_try_uint_with_data(bluetooth_eir_ad_manufacturer_company_id, company_id, new_tvb, pinfo, entry_tree, true, bluetooth_eir_ad_data)) {
11569 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_data, tvb, offset, length, ENC_NA);
11570 expert_add_info(pinfo, sub_item, &ei_eir_ad_undecoded);
11573 offset += length;
11576 break;
11577 default:
11578 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_data, tvb, offset, length, ENC_NA);
11579 expert_add_info(pinfo, sub_item, &ei_eir_ad_unknown);
11580 offset += length;
11583 if (offset - offset_start > 0 && offset - offset_start < length) {
11584 sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_data, tvb, offset, length - (offset - offset_start), ENC_NA);
11585 expert_add_info(pinfo, sub_item, &ei_eir_ad_unknown);
11586 offset += length - (offset - offset_start);
11590 if (tvb_reported_length_remaining(tvb, offset) > 0) {
11591 proto_tree_add_item(tree, hf_btcommon_eir_ad_unused, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
11592 offset = tvb_reported_length(tvb);
11595 if (bluetooth_eir_ad_data && bluetooth_eir_ad_data->bd_addr && name && have_tap_listener(bluetooth_device_tap)) {
11596 bluetooth_device_tap_t *tap_device;
11598 tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
11599 tap_device->interface_id = bluetooth_eir_ad_data->interface_id;
11600 tap_device->adapter_id = bluetooth_eir_ad_data->adapter_id;
11601 memcpy(tap_device->bd_addr, bluetooth_eir_ad_data->bd_addr, 6);
11602 tap_device->has_bd_addr = true;
11603 tap_device->is_local = false;
11604 tap_device->type = BLUETOOTH_DEVICE_NAME;
11605 tap_device->data.name = name;
11606 tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
11609 if (has_bd_addr && name && have_tap_listener(bluetooth_device_tap)) {
11610 bluetooth_device_tap_t *tap_device;
11612 tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
11613 if (bluetooth_eir_ad_data) {
11614 tap_device->interface_id = bluetooth_eir_ad_data->interface_id;
11615 tap_device->adapter_id = bluetooth_eir_ad_data->adapter_id;
11616 } else {
11617 tap_device->interface_id = HCI_INTERFACE_DEFAULT;
11618 tap_device->adapter_id = HCI_ADAPTER_DEFAULT;
11620 memcpy(tap_device->bd_addr, bd_addr, 6);
11621 tap_device->has_bd_addr = true;
11622 tap_device->is_local = false;
11623 tap_device->type = BLUETOOTH_DEVICE_NAME;
11624 tap_device->data.name = name;
11625 tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
11628 return offset + data_size;
11631 static int
11632 dissect_btcommon_cod(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
11634 proto_item *cod_item;
11635 proto_item *cod_tree;
11636 uint16_t major_service_classes;
11637 uint8_t major_device_class;
11638 uint8_t minor_device_class;
11639 const char *minor_device_class_name;
11640 int offset = 0;
11642 cod_item = proto_tree_add_item(tree, hf_btcommon_cod_class_of_device, tvb, offset, 3, ENC_LITTLE_ENDIAN);
11643 cod_tree = proto_item_add_subtree(cod_item, ett_cod);
11645 major_device_class = tvb_get_uint8(tvb, offset + 1) & 0x1F;
11646 minor_device_class = tvb_get_uint8(tvb, offset) >> 2;
11648 switch(major_device_class) {
11649 case 0x01: /* Computer */
11650 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_computer, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11651 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_computer_vals_ext, "Unknown");
11652 break;
11653 case 0x02: /* Phone */
11654 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_phone, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11655 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_phone_vals_ext, "Unknown");
11656 break;
11657 case 0x03: /* LAN/Network Access Point */
11658 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_lan_net_load_factor, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11659 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_lan_net_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11660 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_lan_net_load_factor_vals_ext, "Unknown");
11661 break;
11662 case 0x04: /* Audio/Video */
11663 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_audio_video, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11664 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_audio_video_vals_ext, "Unknown");
11665 break;
11666 case 0x05: /* Peripheral */
11667 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_peripheral_class, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11668 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_peripheral_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11669 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_peripheral_class_vals_ext, "Unknown");
11670 break;
11671 case 0x06: /* Imaging */
11672 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_imaging_class_printer, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11673 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_imaging_class_scanner, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11674 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_imaging_class_camera, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11675 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_imaging_class_display, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11677 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_imaging_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11678 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext, "Unknown");
11679 break;
11680 case 0x07: /* Wearable */
11681 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_wearable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11682 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_wearable_vals_ext, "Unknown");
11683 break;
11684 case 0x08: /* Toy */
11685 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_toy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11686 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_toy_vals_ext, "Unknown");
11687 break;
11688 case 0x09: /* Health */
11689 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_health, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11690 minor_device_class_name = val_to_str_ext_const(minor_device_class, &bthci_cmd_cod_minor_device_class_health_vals_ext, "Unknown");
11691 break;
11692 default:
11693 minor_device_class_name = "Unknown";
11694 proto_tree_add_item(cod_tree, hf_btcommon_cod_minor_device_class_unknown, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11697 proto_tree_add_item(cod_tree, hf_btcommon_cod_format_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11698 offset += 1;
11700 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_information, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11701 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_telephony, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11702 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_audio, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11703 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_object_transfer, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11704 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_capturing, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11705 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_rendering, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11706 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_networking, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11707 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_positioning, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11708 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_reserved, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11709 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_le_audio, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11710 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_service_class_limited_discoverable_mode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11711 major_service_classes = tvb_get_letohs(tvb, offset) >> 5;
11713 proto_tree_add_item(cod_tree, hf_btcommon_cod_major_device_class, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11714 offset += 2;
11716 proto_item_append_text(cod_item, " (%s:%s - services:",
11717 val_to_str_ext_const(major_device_class, &bthci_cmd_cod_major_device_class_vals_ext, "Unknown"),
11718 minor_device_class_name);
11720 if (major_service_classes & 0x001) proto_item_append_text(cod_item, " LimitedDiscoverableMode");
11721 if (major_service_classes & 0x008) proto_item_append_text(cod_item, " Positioning");
11722 if (major_service_classes & 0x010) proto_item_append_text(cod_item, " Networking");
11724 if (major_service_classes & 0x020) proto_item_append_text(cod_item, " Rendering");
11725 if (major_service_classes & 0x040) proto_item_append_text(cod_item, " Capturing");
11726 if (major_service_classes & 0x080) proto_item_append_text(cod_item, " ObjectTransfer");
11727 if (major_service_classes & 0x100) proto_item_append_text(cod_item, " Audio");
11728 if (major_service_classes & 0x200) proto_item_append_text(cod_item, " Telephony");
11729 if (major_service_classes & 0x400) proto_item_append_text(cod_item, " Information");
11731 proto_item_append_text(cod_item, ")");
11733 return offset;
11736 static int
11737 dissect_btcommon_ad(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
11739 proto_item *main_item;
11740 proto_tree *main_tree;
11742 main_item = proto_tree_add_item(tree, hf_btcommon_eir_ad_advertising_data, tvb, 0, -1, ENC_NA);
11743 main_tree = proto_item_add_subtree(main_item, ett_eir_ad);
11745 return dissect_eir_ad_data(tvb, pinfo, main_tree, (bluetooth_eir_ad_data_t *) data);
11748 static int
11749 dissect_btcommon_eir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
11751 proto_item *main_item;
11752 proto_tree *main_tree;
11754 main_item = proto_tree_add_item(tree, hf_btcommon_eir_ad_extended_inquiry_response_data, tvb, 0, -1, ENC_NA);
11755 main_tree = proto_item_add_subtree(main_item, ett_eir_ad);
11757 return dissect_eir_ad_data(tvb, pinfo, main_tree, (bluetooth_eir_ad_data_t *) data);
11760 static int
11761 dissect_btcommon_le_channel_map(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11763 int offset = 0;
11764 int *reserved_bits_offset = (int *)data;
11766 proto_tree_add_item(tree, hf_btcommon_le_channel_map_0, tvb, offset, 1, ENC_NA);
11767 proto_tree_add_item(tree, hf_btcommon_le_channel_map_1, tvb, offset, 1, ENC_NA);
11768 proto_tree_add_item(tree, hf_btcommon_le_channel_map_2, tvb, offset, 1, ENC_NA);
11769 proto_tree_add_item(tree, hf_btcommon_le_channel_map_3, tvb, offset, 1, ENC_NA);
11770 proto_tree_add_item(tree, hf_btcommon_le_channel_map_4, tvb, offset, 1, ENC_NA);
11771 proto_tree_add_item(tree, hf_btcommon_le_channel_map_5, tvb, offset, 1, ENC_NA);
11772 proto_tree_add_item(tree, hf_btcommon_le_channel_map_6, tvb, offset, 1, ENC_NA);
11773 proto_tree_add_item(tree, hf_btcommon_le_channel_map_7, tvb, offset, 1, ENC_NA);
11774 offset += 1;
11776 proto_tree_add_item(tree, hf_btcommon_le_channel_map_8, tvb, offset, 1, ENC_NA);
11777 proto_tree_add_item(tree, hf_btcommon_le_channel_map_9, tvb, offset, 1, ENC_NA);
11778 proto_tree_add_item(tree, hf_btcommon_le_channel_map_10, tvb, offset, 1, ENC_NA);
11779 proto_tree_add_item(tree, hf_btcommon_le_channel_map_11, tvb, offset, 1, ENC_NA);
11780 proto_tree_add_item(tree, hf_btcommon_le_channel_map_12, tvb, offset, 1, ENC_NA);
11781 proto_tree_add_item(tree, hf_btcommon_le_channel_map_13, tvb, offset, 1, ENC_NA);
11782 proto_tree_add_item(tree, hf_btcommon_le_channel_map_14, tvb, offset, 1, ENC_NA);
11783 proto_tree_add_item(tree, hf_btcommon_le_channel_map_15, tvb, offset, 1, ENC_NA);
11784 offset += 1;
11786 proto_tree_add_item(tree, hf_btcommon_le_channel_map_16, tvb, offset, 1, ENC_NA);
11787 proto_tree_add_item(tree, hf_btcommon_le_channel_map_17, tvb, offset, 1, ENC_NA);
11788 proto_tree_add_item(tree, hf_btcommon_le_channel_map_18, tvb, offset, 1, ENC_NA);
11789 proto_tree_add_item(tree, hf_btcommon_le_channel_map_19, tvb, offset, 1, ENC_NA);
11790 proto_tree_add_item(tree, hf_btcommon_le_channel_map_20, tvb, offset, 1, ENC_NA);
11791 proto_tree_add_item(tree, hf_btcommon_le_channel_map_21, tvb, offset, 1, ENC_NA);
11792 proto_tree_add_item(tree, hf_btcommon_le_channel_map_22, tvb, offset, 1, ENC_NA);
11793 proto_tree_add_item(tree, hf_btcommon_le_channel_map_23, tvb, offset, 1, ENC_NA);
11794 offset += 1;
11796 proto_tree_add_item(tree, hf_btcommon_le_channel_map_24, tvb, offset, 1, ENC_NA);
11797 proto_tree_add_item(tree, hf_btcommon_le_channel_map_25, tvb, offset, 1, ENC_NA);
11798 proto_tree_add_item(tree, hf_btcommon_le_channel_map_26, tvb, offset, 1, ENC_NA);
11799 proto_tree_add_item(tree, hf_btcommon_le_channel_map_27, tvb, offset, 1, ENC_NA);
11800 proto_tree_add_item(tree, hf_btcommon_le_channel_map_28, tvb, offset, 1, ENC_NA);
11801 proto_tree_add_item(tree, hf_btcommon_le_channel_map_29, tvb, offset, 1, ENC_NA);
11802 proto_tree_add_item(tree, hf_btcommon_le_channel_map_30, tvb, offset, 1, ENC_NA);
11803 proto_tree_add_item(tree, hf_btcommon_le_channel_map_31, tvb, offset, 1, ENC_NA);
11804 offset += 1;
11806 proto_tree_add_item(tree, hf_btcommon_le_channel_map_32, tvb, offset, 1, ENC_NA);
11807 proto_tree_add_item(tree, hf_btcommon_le_channel_map_33, tvb, offset, 1, ENC_NA);
11808 proto_tree_add_item(tree, hf_btcommon_le_channel_map_34, tvb, offset, 1, ENC_NA);
11809 proto_tree_add_item(tree, hf_btcommon_le_channel_map_35, tvb, offset, 1, ENC_NA);
11810 proto_tree_add_item(tree, hf_btcommon_le_channel_map_36, tvb, offset, 1, ENC_NA);
11812 if (reserved_bits_offset) {
11813 *reserved_bits_offset = offset;
11814 } else {
11815 proto_tree_add_item(tree, hf_btcommon_le_channel_map_37, tvb, offset, 1, ENC_NA);
11816 proto_tree_add_item(tree, hf_btcommon_le_channel_map_38, tvb, offset, 1, ENC_NA);
11817 proto_tree_add_item(tree, hf_btcommon_le_channel_map_39, tvb, offset, 1, ENC_NA);
11820 offset += 1;
11822 return offset;
11825 void
11826 proto_register_btcommon(void)
11828 expert_module_t *expert_module;
11830 static hf_register_info hf[] = {
11831 { &hf_btcommon_eir_ad_extended_inquiry_response_data,
11832 { "Extended Inquiry Response Data", "btcommon.eir_ad.extended_inquiry_response_data",
11833 FT_NONE, BASE_NONE, NULL, 0x0,
11834 NULL, HFILL }
11836 { &hf_btcommon_eir_ad_advertising_data,
11837 { "Advertising Data", "btcommon.eir_ad.advertising_data",
11838 FT_NONE, BASE_NONE, NULL, 0x0,
11839 NULL, HFILL }
11841 { &hf_btcommon_eir_ad_entry,
11842 { "Entry", "btcommon.eir_ad.entry",
11843 FT_NONE, BASE_NONE, NULL, 0x0,
11844 NULL, HFILL }
11846 { &hf_btcommon_eir_ad_unused,
11847 { "Unused", "btcommon.eir_ad.unused",
11848 FT_NONE, BASE_NONE, NULL, 0x0,
11849 NULL, HFILL }
11851 { &hf_btcommon_eir_ad_data,
11852 {"Data", "btcommon.eir_ad.entry.data",
11853 FT_BYTES, BASE_NONE, NULL, 0x0,
11854 NULL, HFILL}
11856 { &hf_btcommon_eir_ad_service_data,
11857 {"Service Data", "btcommon.eir_ad.entry.service_data",
11858 FT_BYTES, BASE_NONE, NULL, 0x0,
11859 NULL, HFILL}
11861 { &hf_btcommon_eir_ad_length,
11862 { "Length", "btcommon.eir_ad.entry.length",
11863 FT_UINT8, BASE_DEC, NULL, 0x0,
11864 NULL, HFILL }
11866 { &hf_btcommon_eir_ad_type,
11867 { "Type", "btcommon.eir_ad.entry.type",
11868 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_eir_data_type_vals_ext, 0x0,
11869 NULL, HFILL }
11871 { &hf_btcommon_eir_ad_company_id,
11872 { "Company ID", "btcommon.eir_ad.entry.company_id",
11873 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_company_id_vals_ext, 0x0,
11874 NULL, HFILL }
11876 { &hf_btcommon_eir_ad_flags_reserved,
11877 { "Reserved", "btcommon.eir_ad.entry.flags.reserved",
11878 FT_UINT8, BASE_HEX, NULL, 0xE0,
11879 NULL, HFILL }
11881 { &hf_btcommon_eir_ad_flags_le_bredr_support_host,
11882 { "Simultaneous LE and BR/EDR to Same Device Capable (Host)", "btcommon.eir_ad.entry.flags.le_bredr_support_host",
11883 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x10,
11884 NULL, HFILL }
11886 { &hf_btcommon_eir_ad_flags_le_bredr_support_controller,
11887 { "Simultaneous LE and BR/EDR to Same Device Capable (Controller)", "btcommon.eir_ad.entry.flags.le_bredr_support_controller",
11888 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x08,
11889 NULL, HFILL }
11891 { &hf_btcommon_eir_ad_flags_bredr_not_support,
11892 { "BR/EDR Not Supported", "btcommon.eir_ad.entry.flags.bredr_not_supported",
11893 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
11894 NULL, HFILL }
11896 { &hf_btcommon_eir_ad_flags_le_general_discoverable_mode,
11897 { "LE General Discoverable Mode", "btcommon.eir_ad.entry.flags.le_general_discoverable_mode",
11898 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
11899 NULL, HFILL }
11901 { &hf_btcommon_eir_ad_flags_le_limited_discoverable_mode,
11902 { "LE Limited Discoverable Mode", "btcommon.eir_ad.entry.flags.le_limited_discoverable_mode",
11903 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
11904 NULL, HFILL }
11906 { &hf_btcommon_eir_ad_uuid_16,
11907 { "UUID 16", "btcommon.eir_ad.entry.uuid_16",
11908 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
11909 NULL, HFILL }
11911 { &hf_btcommon_eir_ad_uuid_32,
11912 { "UUID 32", "btcommon.eir_ad.entry.uuid_32",
11913 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
11914 NULL, HFILL }
11916 { &hf_btcommon_eir_ad_uuid_128,
11917 { "UUID 128", "btcommon.eir_ad.entry.uuid_128",
11918 FT_BYTES, BASE_NONE, NULL, 0x0,
11919 NULL, HFILL }
11921 { &hf_btcommon_eir_ad_custom_uuid_32,
11922 { "Custom UUID", "btcommon.eir_ad.entry.custom_uuid_32",
11923 FT_UINT32, BASE_HEX, NULL, 0x0,
11924 NULL, HFILL }
11926 { &hf_btcommon_eir_ad_custom_uuid_128,
11927 { "Custom UUID", "btcommon.eir_ad.entry.custom_uuid_128",
11928 FT_BYTES, BASE_NONE, NULL, 0x0,
11929 NULL, HFILL }
11931 { &hf_btcommon_eir_ad_name,
11932 { "Device Name", "btcommon.eir_ad.entry.device_name",
11933 FT_STRING, BASE_NONE, NULL, 0x0,
11934 NULL, HFILL }
11936 { &hf_btcommon_eir_ad_tx_power,
11937 {"Power Level (dBm)", "btcommon.eir_ad.entry.power_level",
11938 FT_INT8, BASE_DEC, NULL, 0x0,
11939 NULL, HFILL}
11941 { &hf_btcommon_eir_ad_ssp_oob_length,
11942 { "SSP OOB Length", "btcommon.eir_ad.entry.ssp_oob_length",
11943 FT_UINT16, BASE_DEC, NULL, 0x0,
11944 NULL, HFILL }
11946 { &hf_btcommon_eir_ad_bd_addr,
11947 { "BD_ADDR", "btcommon.eir_ad.entry.bd_addr",
11948 FT_ETHER, BASE_NONE, NULL, 0x0,
11949 NULL, HFILL }
11951 { &hf_btcommon_eir_ad_le_bd_addr_reserved,
11952 { "Reserved", "btcommon.eir_ad.entry.le_bd_addr.reserved",
11953 FT_UINT8, BASE_HEX, NULL, 0xFE,
11954 NULL, HFILL }
11956 { &hf_btcommon_eir_ad_le_bd_addr_type,
11957 { "Type", "btcommon.eir_ad.entry.le_bd_addr.type",
11958 FT_UINT8, BASE_HEX, VALS(bluetooth_address_type_vals), 0x01,
11959 NULL, HFILL }
11961 { &hf_btcommon_eir_ad_le_role,
11962 { "Type", "btcommon.eir_ad.entry.le_role",
11963 FT_UINT8, BASE_HEX, VALS(le_role_vals), 0,
11964 NULL, HFILL }
11966 { &hf_btcommon_eir_ad_did_vendor_id_source,
11967 { "Vendor ID Source", "btcommon.eir_ad.entry.did.vendor_id_source",
11968 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &did_vendor_id_source_vals_ext, 0,
11969 NULL, HFILL }
11971 { &hf_btcommon_eir_ad_did_vendor_id,
11972 { "Vendor ID", "btcommon.eir_ad.entry.did.vendor_id",
11973 FT_UINT16, BASE_HEX, NULL, 0x0,
11974 NULL, HFILL }
11976 { &hf_btcommon_eir_ad_did_vendor_id_bluetooth_sig,
11977 { "Vendor ID", "btcommon.eir_ad.entry.did.vendor_id",
11978 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_company_id_vals_ext, 0x0,
11979 NULL, HFILL }
11981 { &hf_btcommon_eir_ad_did_vendor_id_usb_forum,
11982 { "Vendor ID", "btcommon.eir_ad.entry.did.vendor_id",
11983 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &ext_usb_vendors_vals, 0x0,
11984 NULL, HFILL }
11986 { &hf_btcommon_eir_ad_did_product_id,
11987 { "Product ID", "btcommon.eir_ad.entry.did.product_id",
11988 FT_UINT16, BASE_HEX, NULL, 0x0,
11989 NULL, HFILL }
11991 { &hf_btcommon_eir_ad_did_version,
11992 { "Version", "btcommon.eir_ad.entry.did.version",
11993 FT_UINT16, BASE_HEX, NULL, 0x0,
11994 NULL, HFILL }
11996 { &hf_btcommon_eir_ad_3ds_association_notification,
11997 { "3DS Association Notification", "btcommon.eir_ad.entry.3ds.association_notification",
11998 FT_BOOLEAN, 8, NULL, 0x01,
11999 NULL, HFILL }
12001 { &hf_btcommon_eir_ad_3ds_battery_level_reporting,
12002 { "3DS Battery Level Reporting", "btcommon.eir_ad.entry.3ds.battery_level_reporting",
12003 FT_BOOLEAN, 8, NULL, 0x02,
12004 NULL, HFILL }
12006 { &hf_btcommon_eir_ad_3ds_send_battery_level_report_on_startup,
12007 { "3DS Send Battery Level Report on Startup", "btcommon.eir_ad.entry.3ds.send_battery_level_report_on_startup",
12008 FT_BOOLEAN, 8, NULL, 0x04,
12009 NULL, HFILL }
12011 { &hf_btcommon_eir_ad_3ds_reserved,
12012 { "Reserved", "btcommon.eir_ad.entry.3ds.reserved",
12013 FT_BOOLEAN, 8, NULL, 0x78,
12014 NULL, HFILL }
12016 { &hf_btcommon_eir_ad_3ds_factory_test_mode,
12017 { "3DS Factory Test Mode", "btcommon.eir_ad.entry.3ds.factory_test_mode",
12018 FT_BOOLEAN, 8, NULL, 0x80,
12019 NULL, HFILL }
12021 { &hf_btcommon_eir_ad_3ds_path_loss_threshold,
12022 { "3DS Path Loss Threshold", "btcommon.eir_ad.entry.3ds.path_loss_threshold",
12023 FT_UINT8, BASE_DEC, NULL, 0x00,
12024 NULL, HFILL }
12026 { &hf_btcommon_eir_ad_3ds_legacy_fixed,
12027 { "3DS Legacy Fixed", "btcommon.eir_ad.entry.3ds_legacy.fixed_byte",
12028 FT_UINT8, BASE_DEC, NULL, 0x00,
12029 NULL, HFILL }
12031 { &hf_btcommon_eir_ad_3ds_legacy_3d_capable_tv,
12032 { "3DS Legacy Capable TV", "btcommon.eir_ad.entry.3ds_legacy.capable_tv",
12033 FT_BOOLEAN, 8, NULL, 0x01,
12034 NULL, HFILL }
12036 { &hf_btcommon_eir_ad_3ds_legacy_ignored_1_3,
12037 { "3DS Legacy Ignored", "btcommon.eir_ad.entry.3ds_legacy.ignored.1_3",
12038 FT_BOOLEAN, 8, NULL, 0x0E,
12039 NULL, HFILL }
12041 { &hf_btcommon_eir_ad_3ds_legacy_fixed_4,
12042 { "3DS Legacy Fixed", "btcommon.eir_ad.entry.3ds_legacy.fixed.4",
12043 FT_BOOLEAN, 8, NULL, 0x10,
12044 NULL, HFILL }
12046 { &hf_btcommon_eir_ad_3ds_legacy_ignored_5,
12047 { "3DS Legacy Ignored", "btcommon.eir_ad.entry.3ds_legacy.ignored.5",
12048 FT_BOOLEAN, 8, NULL, 0x20,
12049 NULL, HFILL }
12051 { &hf_btcommon_eir_ad_3ds_legacy_fixed_6,
12052 { "3DS Legacy Fixed", "btcommon.eir_ad.entry.3ds_legacy.fixed.6",
12053 FT_BOOLEAN, 8, NULL, 0x40,
12054 NULL, HFILL }
12056 { &hf_btcommon_eir_ad_3ds_legacy_test_mode,
12057 { "3DS Legacy Test Mode", "btcommon.eir_ad.entry.3ds_legacy.test_mode",
12058 FT_BOOLEAN, 8, NULL, 0x80,
12059 NULL, HFILL }
12061 { &hf_btcommon_eir_ad_3ds_legacy_path_loss_threshold,
12062 { "3DS Legacy Path Loss Threshold", "btcommon.eir_ad.entry.3ds_legacy.path_loss_threshold",
12063 FT_UINT8, BASE_DEC, NULL, 0x00,
12064 NULL, HFILL }
12066 { &hf_btcommon_eir_ad_advertising_interval,
12067 { "Advertising Interval", "btcommon.eir_ad.entry.advertising_interval",
12068 FT_UINT16, BASE_DEC, NULL, 0x0,
12069 NULL, HFILL }
12071 { &hf_btcommon_eir_ad_appearance,
12072 { "Appearance", "btcommon.eir_ad.entry.appearance",
12073 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_appearance_vals_ext, 0x0,
12074 NULL, HFILL }
12076 { &hf_btcommon_eir_ad_hash_c,
12077 {"Hash C", "btcommon.eir_ad.entry.hash_c",
12078 FT_BYTES, BASE_NONE, NULL, 0x0,
12079 NULL, HFILL}
12081 { &hf_btcommon_eir_ad_randomizer_r,
12082 {"Randomizer R", "btcommon.eir_ad.entry.randomizer_r",
12083 FT_BYTES, BASE_NONE, NULL, 0x0,
12084 NULL, HFILL}
12086 { &hf_btcommon_eir_ad_le_secure_confirmation_value,
12087 {"LE Secure Connections Confirmation Value", "btcommon.eir_ad.entry.le_secure_confirmation_value",
12088 FT_BYTES, BASE_NONE, NULL, 0x0,
12089 NULL, HFILL}
12091 { &hf_btcommon_eir_ad_le_secure_random_value,
12092 {"LE Secure Connections Random Value", "btcommon.eir_ad.entry.le_secure_random_value",
12093 FT_BYTES, BASE_NONE, NULL, 0x0,
12094 NULL, HFILL}
12096 { &hf_btcommon_eir_ad_oob_flags_reserved,
12097 { "Reserved", "btcommon.eir_ad.entry.oob_flags.oob_reserved",
12098 FT_UINT8, BASE_HEX, NULL, 0xF0,
12099 NULL, HFILL }
12101 { &hf_btcommon_eir_ad_oob_flags_address_type,
12102 { "Address Type", "btcommon.eir_ad.entry.oob_flags.oob_address_type",
12103 FT_UINT8, BASE_HEX, VALS(cmd_base_address_types_vals), 0x08,
12104 NULL, HFILL }
12106 { &hf_btcommon_eir_ad_oob_flags_le_bredr_support,
12107 { "Simultaneous LE and BR/EDR to Same Device Capable (Host)", "btcommon.eir_ad.entry.oob_flags.oob_le_bredr_support",
12108 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x04,
12109 NULL, HFILL }
12111 { &hf_btcommon_eir_ad_oob_flags_le_supported_host,
12112 { "LE Supported By Host", "btcommon.eir_ad.entry.oob_flags.oob_le_supported_host",
12113 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x02,
12114 NULL, HFILL }
12116 { &hf_btcommon_eir_ad_oob_flags_data_present,
12117 { "OOB Data Present", "btcommon.eir_ad.entry.oob_flags.oob_data_present",
12118 FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x01,
12119 NULL, HFILL }
12121 { &hf_btcommon_eir_ad_connection_interval_min,
12122 { "Connection Interval Min", "btcommon.eir_ad.entry.connection_interval_min",
12123 FT_UINT16, BASE_DEC, NULL, 0x0,
12124 NULL, HFILL }
12126 { &hf_btcommon_eir_ad_connection_interval_max,
12127 { "Connection Interval Max", "btcommon.eir_ad.entry.connection_interval_max",
12128 FT_UINT16, BASE_DEC, NULL, 0x0,
12129 NULL, HFILL }
12131 { &hf_btcommon_eir_ad_uri,
12132 {"URI", "btcommon.eir_ad.entry.uri",
12133 FT_STRING, BASE_NONE, NULL, 0x0,
12134 NULL, HFILL}
12136 {&hf_btcommon_eir_ad_ips_flags,
12137 {"Indoor Positioning Configuration", "btcommon.eir_ad.entry.ips.flags",
12138 FT_UINT8, BASE_HEX, NULL, 0x0,
12139 NULL, HFILL}
12141 {&hf_btcommon_eir_ad_ips_flags_reserved,
12142 {"Reserved", "btcommon.eir_ad.entry.ips.flags.reserved",
12143 FT_UINT8, BASE_HEX, NULL, 0x80,
12144 NULL, HFILL}
12146 {&hf_btcommon_eir_ad_ips_flags_location_name,
12147 {"Location Name", "btcommon.eir_ad.entry.ips.flags.location_name",
12148 FT_BOOLEAN, 8, NULL, 0x40,
12149 NULL, HFILL}
12151 {&hf_btcommon_eir_ad_ips_flags_uncertainty,
12152 {"Uncertainty", "btcommon.eir_ad.entry.ips.flags.uncertainty",
12153 FT_BOOLEAN, 8, NULL, 0x20,
12154 NULL, HFILL}
12156 {&hf_btcommon_eir_ad_ips_flags_floor_number,
12157 {"Floor Number", "btcommon.eir_ad.entry.ips.flags.floor_number",
12158 FT_BOOLEAN, 8, NULL, 0x10,
12159 NULL, HFILL}
12161 {&hf_btcommon_eir_ad_ips_flags_altitude,
12162 {"Altitude", "btcommon.eir_ad.entry.ips.flags.altitude",
12163 FT_BOOLEAN, 8, NULL, 0x08,
12164 NULL, HFILL}
12166 {&hf_btcommon_eir_ad_ips_flags_tx_power,
12167 {"Tx Power", "btcommon.eir_ad.entry.ips.flags.tx_power",
12168 FT_BOOLEAN, 8, NULL, 0x04,
12169 NULL, HFILL}
12171 {&hf_btcommon_eir_ad_ips_flags_coordinate_system,
12172 {"Coordinate System", "btcommon.eir_ad.entry.ips.flags.coordinate_system",
12173 FT_UINT8, BASE_HEX, VALS(btatt_ips_coordinate_system), 0x02,
12174 NULL, HFILL}
12176 {&hf_btcommon_eir_ad_ips_flags_coordinates,
12177 {"Coordinates", "btcommon.eir_ad.entry.ips.flags.coordinates",
12178 FT_BOOLEAN, 8, NULL, 0x01,
12179 NULL, HFILL}
12181 {&hf_btcommon_eir_ad_ips_uncertainty,
12182 {"Uncertainty", "btcommon.eir_ad.entry.ips.uncertainty",
12183 FT_UINT8, BASE_HEX, NULL, 0x0,
12184 NULL, HFILL}
12186 {&hf_btcommon_eir_ad_ips_uncertainty_reserved,
12187 {"Reserved", "btcommon.eir_ad.entry.ips.uncertainty.reserved",
12188 FT_UINT8, BASE_HEX, NULL, 0x80,
12189 NULL, HFILL}
12191 {&hf_btcommon_eir_ad_ips_uncertainty_precision,
12192 {"Precision", "btcommon.eir_ad.entry.ips.uncertainty.precision",
12193 FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_precision_vals), 0x70,
12194 NULL, HFILL}
12196 {&hf_btcommon_eir_ad_ips_uncertainty_update_time,
12197 {"Update Time", "btcommon.eir_ad.entry.ips.uncertainty.update_time",
12198 FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_update_time_vals), 0x0E,
12199 NULL, HFILL}
12201 {&hf_btcommon_eir_ad_ips_uncertainty_stationary,
12202 {"Stationary", "btcommon.eir_ad.entry.ips.uncertainty.stationary",
12203 FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_stationary_vals), 0x01,
12204 NULL, HFILL}
12206 {&hf_btcommon_eir_ad_ips_latitude,
12207 {"Latitude", "btcommon.eir_ad.entry.ips.latitude",
12208 FT_INT32, BASE_DEC, NULL, 0x0,
12209 NULL, HFILL}
12211 {&hf_btcommon_eir_ad_ips_longitude,
12212 {"Longitude", "btcommon.eir_ad.entry.ips.longitude",
12213 FT_INT32, BASE_DEC, NULL, 0x0,
12214 NULL, HFILL}
12216 {&hf_btcommon_eir_ad_ips_local_north_coordinate,
12217 {"Local North Coordinate", "btcommon.eir_ad.entry.ips.local_north_coordinate",
12218 FT_INT16, BASE_DEC, NULL, 0x0,
12219 NULL, HFILL}
12221 {&hf_btcommon_eir_ad_ips_local_east_coordinate,
12222 {"Local East Coordinate", "btcommon.eir_ad.entry.ips.local_east_coordinate",
12223 FT_INT16, BASE_DEC, NULL, 0x0,
12224 NULL, HFILL}
12226 {&hf_btcommon_eir_ad_ips_floor_number,
12227 {"Floor Number", "btcommon.eir_ad.entry.ips.floor_number",
12228 FT_UINT8, BASE_DEC, NULL, 0x0,
12229 NULL, HFILL}
12231 {&hf_btcommon_eir_ad_ips_altitude,
12232 {"Altitude", "btcommon.eir_ad.entry.ips.altitude",
12233 FT_UINT16, BASE_DEC, NULL, 0x0,
12234 NULL, HFILL}
12236 {&hf_btcommon_eir_ad_ips_tx_power_level,
12237 {"Tx Power Level", "btcommon.eir_ad.entry.ips.tx_power_level",
12238 FT_INT8, BASE_DEC, NULL, 0x0,
12239 NULL, HFILL}
12241 {&hf_btcommon_eir_ad_tds_organization_id,
12242 {"Organization ID", "btcommon.eir_ad.entry.tds.organization_id",
12243 FT_UINT8, BASE_HEX, VALS(tds_organization_id_vals), 0x0,
12244 NULL, HFILL}
12246 {&hf_btcommon_eir_ad_tds_flags,
12247 {"Flags", "btcommon.eir_ad.entry.tds.flags",
12248 FT_UINT8, BASE_HEX, NULL, 0x0,
12249 NULL, HFILL}
12251 {&hf_btcommon_eir_ad_tds_flags_reserved,
12252 {"Reserved", "btcommon.eir_ad.entry.tds.flags.reserved",
12253 FT_UINT8, BASE_HEX, NULL, 0xE0,
12254 NULL, HFILL}
12256 {&hf_btcommon_eir_ad_tds_flags_transport_state,
12257 {"Transport State", "btcommon.eir_ad.entry.tds.flags.transport_state",
12258 FT_UINT8, BASE_HEX, VALS(tds_transport_state_vals), 0x18,
12259 NULL, HFILL}
12261 {&hf_btcommon_eir_ad_tds_flags_transport_data_incomplete,
12262 {"Transport Data Incomplete", "btcommon.eir_ad.entry.tds.flags.transport_data_incomplete",
12263 FT_BOOLEAN, 8, NULL, 0x04,
12264 NULL, HFILL}
12266 {&hf_btcommon_eir_ad_tds_flags_role,
12267 {"Role", "btcommon.eir_ad.entry.tds.flags.role",
12268 FT_UINT8, BASE_HEX, VALS(tds_role_vals), 0x03,
12269 NULL, HFILL}
12272 {&hf_btcommon_eir_ad_tds_data_length,
12273 {"Data Length", "btcommon.eir_ad.entry.tds.data_length",
12274 FT_UINT8, BASE_DEC, NULL, 0x0,
12275 NULL, HFILL}
12277 {&hf_btcommon_eir_ad_tds_data,
12278 {"Data", "btcommon.eir_ad.entry.tds.data",
12279 FT_BYTES, BASE_NONE, NULL, 0x0,
12280 NULL, HFILL}
12282 { &hf_btcommon_eir_ad_le_features,
12283 { "LE Features", "btcommon.eir_ad.entry.le_features",
12284 FT_UINT8, BASE_HEX, NULL, 0x0,
12285 NULL, HFILL }
12287 { &hf_btcommon_eir_ad_le_channel_map,
12288 { "Channel Map", "btcommon.eir_ad.entry.le_channel_map",
12289 FT_BYTES, BASE_NONE, NULL, 0x0,
12290 NULL, HFILL }
12292 { &hf_btcommon_eir_ad_instant,
12293 { "Instant", "btcommon.eir_ad.entry.instant",
12294 FT_UINT16, BASE_DEC, NULL, 0x0,
12295 NULL, HFILL }
12297 { &hf_btcommon_eir_ad_le_features_encryption,
12298 { "LE Encryption", "btcommon.eir_ad.le_features.encryption",
12299 FT_BOOLEAN, 8, NULL, 0x01,
12300 NULL, HFILL }
12302 { &hf_btcommon_eir_ad_le_features_connection_parameters_request_procedure,
12303 { "Connection Parameters Request Procedure", "btcommon.eir_ad.le_features.connection_parameters_request_procedure",
12304 FT_BOOLEAN, 8, NULL, 0x02,
12305 NULL, HFILL }
12307 { &hf_btcommon_eir_ad_le_features_extended_reject_indication,
12308 { "Extended Reject Indication", "btcommon.eir_ad.le_features.extended_reject_indication",
12309 FT_BOOLEAN, 8, NULL, 0x04,
12310 NULL, HFILL }
12312 { &hf_btcommon_eir_ad_le_features_peripheral_initiated_features_exchange,
12313 { "Peripheral-Initiated Features Exchange", "btcommon.eir_ad.le_features.peripheral_initiated_features_exchange",
12314 FT_BOOLEAN, 8, NULL, 0x08,
12315 NULL, HFILL }
12317 { &hf_btcommon_eir_ad_le_features_ping,
12318 { "Ping", "btcommon.eir_ad.le_features.ping",
12319 FT_BOOLEAN, 8, NULL, 0x10,
12320 NULL, HFILL }
12322 { &hf_btcommon_eir_ad_le_features_data_packet_length_extension,
12323 { "Data Packet Length Extension", "btcommon.eir_ad.le_features.data_packet_length_extension",
12324 FT_BOOLEAN, 8, NULL, 0x20,
12325 NULL, HFILL }
12327 { &hf_btcommon_eir_ad_le_features_ll_privacy,
12328 { "LL Privacy", "btcommon.eir_ad.le_features.ll_privacy",
12329 FT_BOOLEAN, 8, NULL, 0x40,
12330 NULL, HFILL }
12332 { &hf_btcommon_eir_ad_le_features_extended_scanner_filter_policies,
12333 { "Extended Scanner Filter Policies", "btcommon.eir_ad.le_features.extended_scanner_filter_policies",
12334 FT_BOOLEAN, 8, NULL, 0x80,
12335 NULL, HFILL }
12337 { &hf_btcommon_eir_ad_le_features_2m_phy,
12338 { "LE 2M PHY", "btcommon.eir_ad.le_features.2m_phy",
12339 FT_BOOLEAN, 8, NULL, 0x01,
12340 NULL, HFILL }
12342 { &hf_btcommon_eir_ad_le_features_stable_modulation_index_tx,
12343 { "Stable Modulation Index - Tx", "btcommon.eir_ad.le_features.stable_modulation_index_tx",
12344 FT_BOOLEAN, 8, NULL, 0x02,
12345 NULL, HFILL }
12347 { &hf_btcommon_eir_ad_le_features_stable_modulation_index_rx,
12348 { "Stable Modulation Index - Rx", "btcommon.eir_ad.le_features.stable_modulation_index_rx",
12349 FT_BOOLEAN, 8, NULL, 0x04,
12350 NULL, HFILL }
12352 { &hf_btcommon_eir_ad_le_features_coded_phy,
12353 { "LE Coded PHY", "btcommon.eir_ad.le_features.coded_phy",
12354 FT_BOOLEAN, 8, NULL, 0x08,
12355 NULL, HFILL }
12357 { &hf_btcommon_eir_ad_le_features_extended_advertising,
12358 { "LE Extended Advertising", "btcommon.eir_ad.le_features.extended_advertising",
12359 FT_BOOLEAN, 8, NULL, 0x10,
12360 NULL, HFILL }
12362 { &hf_btcommon_eir_ad_le_features_periodic_advertising,
12363 { "LE Periodic Advertising", "btcommon.eir_ad.le_features.periodic_advertising",
12364 FT_BOOLEAN, 8, NULL, 0x20,
12365 NULL, HFILL }
12367 { &hf_btcommon_eir_ad_le_features_channel_selection_algorithm_2,
12368 { "Channel Selection Algorithm #2", "btcommon.eir_ad.le_features.channel_selection_algorithm_2",
12369 FT_BOOLEAN, 8, NULL, 0x40,
12370 NULL, HFILL }
12372 { &hf_btcommon_eir_ad_le_features_power_class_1,
12373 { "Power Class 1", "btcommon.eir_ad.le_features.power_class_1",
12374 FT_BOOLEAN, 8, NULL, 0x80,
12375 NULL, HFILL }
12377 { &hf_btcommon_eir_ad_le_features_minimum_number_of_used_channels_procedure,
12378 { "Minimum Number of Used Channels Procedure", "btcommon.eir_ad.entry.le_features.minimum_number_of_used_channels_procedure",
12379 FT_BOOLEAN, 8, NULL, 0x01,
12380 NULL, HFILL }
12382 { &hf_btcommon_eir_ad_le_features_reserved_1_7,
12383 { "Reserved", "btcommon.eir_ad.entry.le_features.reserved.1_7",
12384 FT_UINT8, BASE_HEX, NULL, 0xFE,
12385 NULL, HFILL }
12387 { &hf_btcommon_eir_ad_le_features_reserved,
12388 { "Reserved", "btcommon.eir_ad.entry.le_features.reserved",
12389 FT_UINT8, BASE_HEX, NULL, 0xFF,
12390 NULL, HFILL }
12392 { &hf_btcommon_eir_ad_biginfo_big_offset,
12393 { "BIG_Offset", "btcommon.eir_ad.entry.biginfo.big_offset",
12394 FT_UINT32, BASE_DEC, NULL, 0x00003fff,
12395 NULL, HFILL}
12397 { &hf_btcommon_eir_ad_biginfo_big_offset_units,
12398 { "BIG_Offset_Units", "btcommon.eir_ad.entry.biginfo.big_offset_units",
12399 FT_BOOLEAN, 32, TFS(&tfs_offset_units), 0x00004000,
12400 NULL, HFILL }
12402 { &hf_btcommon_eir_ad_biginfo_iso_interval,
12403 { "ISO_Interval", "btcommon.eir_ad.entry.biginfo.iso_interval",
12404 FT_UINT32, BASE_DEC, NULL, 0x07ff8000,
12405 NULL, HFILL}
12407 { &hf_btcommon_eir_ad_biginfo_num_bis,
12408 { "Num_BIS", "btcommon.eir_ad.entry.biginfo.num_bis",
12409 FT_UINT32, BASE_DEC, NULL, 0xf8000000,
12410 NULL, HFILL}
12412 { &hf_btcommon_eir_ad_biginfo_nse,
12413 { "NSE", "btcommon.eir_ad.entry.biginfo.nse",
12414 FT_UINT32, BASE_DEC, NULL, 0x0000001f,
12415 NULL, HFILL}
12417 { &hf_btcommon_eir_ad_biginfo_bn,
12418 { "BN", "btcommon.eir_ad.entry.biginfo.bn",
12419 FT_UINT32, BASE_DEC, NULL, 0x000000e0,
12420 NULL, HFILL}
12422 { &hf_btcommon_eir_ad_biginfo_sub_interval,
12423 { "Sub_Interval", "btcommon.eir_ad.entry.biginfo.sub_interval",
12424 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microsecond_microseconds), 0x0fffff00,
12425 NULL, HFILL}
12427 { &hf_btcommon_eir_ad_biginfo_pto,
12428 { "PTO", "btcommon.eir_ad.entry.biginfo.pto",
12429 FT_UINT32, BASE_DEC, NULL, 0xf0000000,
12430 NULL, HFILL}
12432 { &hf_btcommon_eir_ad_biginfo_bis_spacing,
12433 { "BIS_Spacing", "btcommon.eir_ad.entry.biginfo.bis_spacing",
12434 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microsecond_microseconds), 0x0fffff,
12435 NULL, HFILL}
12437 { &hf_btcommon_eir_ad_biginfo_irc,
12438 { "IRC", "btcommon.eir_ad.entry.biginfo.irc",
12439 FT_UINT24, BASE_DEC, NULL, 0xf00000,
12440 NULL, HFILL}
12442 { &hf_btcommon_eir_ad_biginfo_max_pdu,
12443 { "Max_PDU", "btcommon.eir_ad.entry.biginfo.max_pdu",
12444 FT_UINT8, BASE_DEC, NULL, 0x0,
12445 NULL, HFILL}
12447 { &hf_btcommon_eir_ad_biginfo_rfu,
12448 { "Reserved", "btcommon.eir_ad.entry.biginfo.rfu",
12449 FT_UINT8, BASE_DEC, NULL, 0x0,
12450 NULL, HFILL}
12452 { &hf_btcommon_eir_ad_biginfo_seed_access_address,
12453 { "Seed Access Address", "btcommon.eir_ad.entry.biginfo.seed_access_address",
12454 FT_UINT32, BASE_HEX, NULL, 0x0,
12455 NULL, HFILL}
12457 { &hf_btcommon_eir_ad_biginfo_sdu_interval,
12458 { "SDU_Interval", "btcommon.eir_ad.entry.biginfo.sdu_interval",
12459 FT_UINT32, BASE_DEC, NULL, 0x000fffff,
12460 NULL, HFILL}
12462 { &hf_btcommon_eir_ad_biginfo_max_sdu,
12463 { "Max_SDU", "btcommon.eir_ad.entry.biginfo.max_sdu",
12464 FT_UINT32, BASE_DEC, NULL, 0xfff00000,
12465 NULL, HFILL}
12467 { &hf_btcommon_eir_ad_biginfo_base_crc_init,
12468 { "BaseCRCInit", "btcommon.eir_ad.entry.biginfo.base_crc_init",
12469 FT_UINT16, BASE_HEX, NULL, 0x0,
12470 NULL, HFILL}
12472 { &hf_btcommon_eir_ad_biginfo_channel_map,
12473 { "Channel Map", "btcommon.eir_ad.entry.biginfo.channel_map",
12474 FT_UINT40, BASE_HEX, NULL, 0x1fffffffff,
12475 NULL, HFILL}
12477 { &hf_btcommon_eir_ad_biginfo_phy,
12478 { "PHY", "btcommon.eir_ad.entry.biginfo.phy",
12479 FT_UINT40, BASE_DEC|BASE_VAL64_STRING, VALS64(cmd_biginfo_le_phy_vals64), 0xe000000000,
12480 NULL, HFILL}
12482 { &hf_btcommon_eir_ad_biginfo_bis_payload_count,
12483 { "bisPayloadCount", "btcommon.eir_ad.entry.biginfo.bis_payload_count",
12484 FT_UINT40, BASE_DEC, NULL, 0x7fffffffff,
12485 NULL, HFILL}
12487 { &hf_btcommon_eir_ad_biginfo_framing,
12488 { "Framing", "btcommon.eir_ad.entry.biginfo.framing",
12489 FT_BOOLEAN, 40, NULL, 0x8000000000,
12490 NULL, HFILL }
12492 { &hf_btcommon_eir_ad_biginfo_giv,
12493 { "GIV", "btcommon.eir_ad.entry.biginfo.giv",
12494 FT_BYTES, BASE_NONE, NULL, 0x0,
12495 NULL, HFILL }
12497 { &hf_btcommon_eir_ad_biginfo_gskd,
12498 { "GSKD", "btcommon.eir_ad.entry.biginfo.gskd",
12499 FT_BYTES, BASE_NONE, NULL, 0x0,
12500 NULL, HFILL }
12502 { &hf_btcommon_eir_ad_biginfo_big_control_access_address,
12503 { "BIG Control Access Address", "btcommon.eir_ad.entry.biginfo.big_control_access_address",
12504 FT_UINT32, BASE_HEX, NULL, 0x0,
12505 NULL, HFILL}
12507 { &hf_btcommon_eir_ad_biginfo_bis_access_address,
12508 { "BIS Access Address", "btcommon.eir_ad.entry.biginfo.bis_access_address",
12509 FT_UINT32, BASE_HEX, NULL, 0x0,
12510 NULL, HFILL}
12512 { &hf_btcommon_eir_ad_broadcast_code,
12513 { "Broadcast Code", "btcommon.eir_ad.entry.broadcast_code",
12514 FT_STRING, BASE_NONE, NULL, 0x0,
12515 NULL, HFILL }
12517 { &hf_btcommon_eir_ad_rsi,
12518 { "Resolvable Set Identifier", "btcommon.eir_ad.entry.rsi",
12519 FT_BYTES, BASE_NONE, NULL, 0x0,
12520 NULL, HFILL }
12522 { &hf_btcommon_eir_ad_broadcast_name,
12523 { "Broadcast Name", "btcommon.eir_ad.entry.broadcast_name",
12524 FT_STRING, BASE_NONE, NULL, 0x0,
12525 NULL, HFILL }
12527 { &hf_btcommon_cod_class_of_device,
12528 { "Class of Device", "btcommon.cod.class_of_device",
12529 FT_UINT24, BASE_HEX, NULL, 0x0,
12530 NULL, HFILL }
12532 { &hf_btcommon_cod_major_service_class_information,
12533 { "Major Service Classes: Information", "btcommon.cod.major_service_classes.information",
12534 FT_BOOLEAN, 16, NULL, 0x8000,
12535 NULL, HFILL }
12537 { &hf_btcommon_cod_major_service_class_telephony,
12538 { "Major Service Classes: Telephony", "btcommon.cod.major_service_classes.telephony",
12539 FT_BOOLEAN, 16, NULL, 0x4000,
12540 NULL, HFILL }
12542 { &hf_btcommon_cod_major_service_class_audio,
12543 { "Major Service Classes: Audio", "btcommon.cod.major_service_classes.audio",
12544 FT_BOOLEAN, 16, NULL, 0x2000,
12545 NULL, HFILL }
12547 { &hf_btcommon_cod_major_service_class_object_transfer,
12548 { "Major Service Classes: Object Transfer", "btcommon.cod.major_service_classes.object_transfer",
12549 FT_BOOLEAN, 16, NULL, 0x1000,
12550 NULL, HFILL }
12552 { &hf_btcommon_cod_major_service_class_capturing,
12553 { "Major Service Classes: Capturing", "btcommon.cod.major_service_classes.capturing",
12554 FT_BOOLEAN, 16, NULL, 0x0800,
12555 NULL, HFILL }
12557 { &hf_btcommon_cod_major_service_class_rendering,
12558 { "Major Service Classes: Rendering", "btcommon.cod.major_service_classes.rendering",
12559 FT_BOOLEAN, 16, NULL, 0x0400,
12560 NULL, HFILL }
12562 { &hf_btcommon_cod_major_service_class_networking,
12563 { "Major Service Classes: Networking", "btcommon.cod.major_service_classes.networking",
12564 FT_BOOLEAN, 16, NULL, 0x0200,
12565 NULL, HFILL }
12567 { &hf_btcommon_cod_major_service_class_positioning,
12568 { "Major Service Classes: Positioning", "btcommon.cod.major_service_classes.positioning",
12569 FT_BOOLEAN, 16, NULL, 0x0100,
12570 NULL, HFILL }
12572 { &hf_btcommon_cod_major_service_class_reserved,
12573 { "Major Service Classes: Reserved", "btcommon.cod.major_service_classes.reserved",
12574 FT_UINT16, BASE_HEX, NULL, 0x0080,
12575 NULL, HFILL }
12577 { &hf_btcommon_cod_major_service_class_le_audio,
12578 { "Major Service Classes: LE Audio", "btcommon.cod.major_service_classes.le_audio",
12579 FT_UINT16, BASE_HEX, NULL, 0x0040,
12580 NULL, HFILL }
12582 { &hf_btcommon_cod_major_service_class_limited_discoverable_mode,
12583 { "Major Service Classes: Limited Discoverable Mode", "btcommon.cod.major_service_classes.limited_discoverable_mode",
12584 FT_BOOLEAN, 16, NULL, 0x0020,
12585 NULL, HFILL }
12587 { &hf_btcommon_cod_major_device_class,
12588 { "Major Device Class", "btcommon.cod.major_device_class",
12589 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_major_device_class_vals_ext, 0x1F,
12590 NULL, HFILL }
12592 { &hf_btcommon_cod_minor_device_class_computer,
12593 { "Minor Device Class", "btcommon.cod.minor_device_class",
12594 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_computer_vals_ext, 0xFC,
12595 NULL, HFILL }
12597 { &hf_btcommon_cod_minor_device_class_phone,
12598 { "Minor Device Class", "btcommon.cod.minor_device_class",
12599 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_phone_vals_ext, 0xFC,
12600 NULL, HFILL }
12602 { &hf_btcommon_cod_minor_device_class_lan_net_load_factor,
12603 { "Minor Device Class: Load Factor", "btcommon.cod.minor_device_class.load_factor",
12604 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_lan_net_load_factor_vals_ext, 0xE0,
12605 NULL, HFILL }
12607 { &hf_btcommon_cod_minor_device_class_lan_net_type,
12608 { "Minor Device Class: Type", "btcommon.cod.minor_device_class.type",
12609 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_lan_net_type_vals_ext, 0x1C,
12610 NULL, HFILL }
12612 { &hf_btcommon_cod_minor_device_class_audio_video,
12613 { "Minor Device Class", "btcommon.cod.minor_device_class",
12614 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_audio_video_vals_ext, 0xFC,
12615 NULL, HFILL }
12617 { &hf_btcommon_cod_minor_device_class_peripheral_class,
12618 { "Minor Device Class", "btcommon.cod.minor_device_class",
12619 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_peripheral_class_vals_ext, 0xC0,
12620 NULL, HFILL }
12622 { &hf_btcommon_cod_minor_device_class_peripheral_type,
12623 { "Minor Device Class", "btcommon.cod.minor_device_class",
12624 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_peripheral_type_vals_ext, 0x3C,
12625 NULL, HFILL }
12627 { &hf_btcommon_cod_minor_device_class_imaging_class_printer,
12628 { "Minor Device Class: Class: Printer", "btcommon.cod.minor_device_class.class.printer",
12629 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext, 0x80,
12630 NULL, HFILL }
12632 { &hf_btcommon_cod_minor_device_class_imaging_class_scanner,
12633 { "Minor Device Class: Class: Scanner", "btcommon.cod.minor_device_class.class.scanner",
12634 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext, 0x40,
12635 NULL, HFILL }
12637 { &hf_btcommon_cod_minor_device_class_imaging_class_camera,
12638 { "Minor Device Class: Class: Camera", "btcommon.cod.minor_device_class.class.camera",
12639 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext, 0x20,
12640 NULL, HFILL }
12642 { &hf_btcommon_cod_minor_device_class_imaging_class_display,
12643 { "Minor Device Class: Class: Display", "btcommon.cod.minor_device_class.class.display",
12644 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext, 0x10,
12645 NULL, HFILL }
12647 { &hf_btcommon_cod_minor_device_class_imaging_type,
12648 { "Minor Device Class: Type", "btcommon.cod.minor_device_class.type",
12649 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext, 0x0C,
12650 NULL, HFILL }
12652 { &hf_btcommon_cod_minor_device_class_wearable,
12653 { "Minor Device Class", "btcommon.cod.minor_device_class",
12654 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_wearable_vals_ext, 0xFC,
12655 NULL, HFILL }
12657 { &hf_btcommon_cod_minor_device_class_toy,
12658 { "Minor Device Class", "btcommon.cod.minor_device_class",
12659 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_toy_vals_ext, 0xFC,
12660 NULL, HFILL }
12662 { &hf_btcommon_cod_minor_device_class_health,
12663 { "Minor Device Class", "btcommon.cod.minor_device_class",
12664 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_cod_minor_device_class_health_vals_ext, 0xFC,
12665 NULL, HFILL }
12667 { &hf_btcommon_cod_minor_device_class_unknown,
12668 { "Minor Device Class", "btcommon.cod.minor_device_class",
12669 FT_UINT8, BASE_HEX, NULL, 0xFC,
12670 NULL, HFILL }
12672 { &hf_btcommon_cod_format_type,
12673 { "Format Type", "btcommon.cod.format_type",
12674 FT_UINT8, BASE_HEX, NULL, 0x03,
12675 NULL, HFILL }
12677 { &hf_btcommon_le_channel_map_39,
12678 { "Reserved", "btcommon.le_channel_map.39",
12679 FT_BOOLEAN, 8, NULL, 0x80,
12680 NULL, HFILL }
12682 { &hf_btcommon_le_channel_map_38,
12683 { "Reserved", "btcommon.le_channel_map.38",
12684 FT_BOOLEAN, 8, NULL, 0x40,
12685 NULL, HFILL }
12687 { &hf_btcommon_le_channel_map_37,
12688 { "Reserved", "btcommon.le_channel_map.37",
12689 FT_BOOLEAN, 8, NULL, 0x20,
12690 NULL, HFILL }
12692 { &hf_btcommon_le_channel_map_36,
12693 { "RF Channel 38 (2478 MHz - Data - 36)", "btcommon.le_channel_map.36",
12694 FT_BOOLEAN, 8, NULL, 0x10,
12695 NULL, HFILL }
12697 { &hf_btcommon_le_channel_map_35,
12698 { "RF Channel 37 (2476 MHz - Data - 35)", "btcommon.le_channel_map.35",
12699 FT_BOOLEAN, 8, NULL, 0x08,
12700 NULL, HFILL }
12702 { &hf_btcommon_le_channel_map_34,
12703 { "RF Channel 36 (2474 MHz - Data - 34)", "btcommon.le_channel_map.34",
12704 FT_BOOLEAN, 8, NULL, 0x04,
12705 NULL, HFILL }
12707 { &hf_btcommon_le_channel_map_33,
12708 { "RF Channel 35 (2472 MHz - Data - 33)", "btcommon.le_channel_map.33",
12709 FT_BOOLEAN, 8, NULL, 0x02,
12710 NULL, HFILL }
12712 { &hf_btcommon_le_channel_map_32,
12713 { "RF Channel 34 (2470 MHz - Data - 32)", "btcommon.le_channel_map.32",
12714 FT_BOOLEAN, 8, NULL, 0x01,
12715 NULL, HFILL }
12717 { &hf_btcommon_le_channel_map_31,
12718 { "RF Channel 33 (2468 MHz - Data - 31)", "btcommon.le_channel_map.31",
12719 FT_BOOLEAN, 8, NULL, 0x80,
12720 NULL, HFILL }
12722 { &hf_btcommon_le_channel_map_30,
12723 { "RF Channel 32 (2466 MHz - Data - 30)", "btcommon.le_channel_map.30",
12724 FT_BOOLEAN, 8, NULL, 0x40,
12725 NULL, HFILL }
12727 { &hf_btcommon_le_channel_map_29,
12728 { "RF Channel 31 (2464 MHz - Data - 29)", "btcommon.le_channel_map.29",
12729 FT_BOOLEAN, 8, NULL, 0x20,
12730 NULL, HFILL }
12732 { &hf_btcommon_le_channel_map_28,
12733 { "RF Channel 30 (2462 MHz - Data - 28)", "btcommon.le_channel_map.28",
12734 FT_BOOLEAN, 8, NULL, 0x10,
12735 NULL, HFILL }
12737 { &hf_btcommon_le_channel_map_27,
12738 { "RF Channel 29 (2460 MHz - Data - 27)", "btcommon.le_channel_map.27",
12739 FT_BOOLEAN, 8, NULL, 0x08,
12740 NULL, HFILL }
12742 { &hf_btcommon_le_channel_map_26,
12743 { "RF Channel 28 (2458 MHz - Data - 26)", "btcommon.le_channel_map.26",
12744 FT_BOOLEAN, 8, NULL, 0x04,
12745 NULL, HFILL }
12747 { &hf_btcommon_le_channel_map_25,
12748 { "RF Channel 27 (2456 MHz - Data - 25)", "btcommon.le_channel_map.25",
12749 FT_BOOLEAN, 8, NULL, 0x02,
12750 NULL, HFILL }
12752 { &hf_btcommon_le_channel_map_24,
12753 { "RF Channel 26 (2454 MHz - Data - 24)", "btcommon.le_channel_map.24",
12754 FT_BOOLEAN, 8, NULL, 0x01,
12755 NULL, HFILL }
12757 { &hf_btcommon_le_channel_map_23,
12758 { "RF Channel 25 (2452 MHz - Data - 23)", "btcommon.le_channel_map.23",
12759 FT_BOOLEAN, 8, NULL, 0x80,
12760 NULL, HFILL }
12762 { &hf_btcommon_le_channel_map_22,
12763 { "RF Channel 24 (2450 MHz - Data - 22)", "btcommon.le_channel_map.22",
12764 FT_BOOLEAN, 8, NULL, 0x40,
12765 NULL, HFILL }
12767 { &hf_btcommon_le_channel_map_21,
12768 { "RF Channel 23 (2448 MHz - Data - 21)", "btcommon.le_channel_map.21",
12769 FT_BOOLEAN, 8, NULL, 0x20,
12770 NULL, HFILL }
12772 { &hf_btcommon_le_channel_map_20,
12773 { "RF Channel 22 (2446 MHz - Data - 20)", "btcommon.le_channel_map.20",
12774 FT_BOOLEAN, 8, NULL, 0x10,
12775 NULL, HFILL }
12777 { &hf_btcommon_le_channel_map_19,
12778 { "RF Channel 21 (2444 MHz - Data - 19)", "btcommon.le_channel_map.19",
12779 FT_BOOLEAN, 8, NULL, 0x08,
12780 NULL, HFILL }
12782 { &hf_btcommon_le_channel_map_18,
12783 { "RF Channel 20 (2442 MHz - Data - 18)", "btcommon.le_channel_map.18",
12784 FT_BOOLEAN, 8, NULL, 0x04,
12785 NULL, HFILL }
12787 { &hf_btcommon_le_channel_map_17,
12788 { "RF Channel 19 (2440 MHz - Data - 17)", "btcommon.le_channel_map.17",
12789 FT_BOOLEAN, 8, NULL, 0x02,
12790 NULL, HFILL }
12792 { &hf_btcommon_le_channel_map_16,
12793 { "RF Channel 18 (2438 MHz - Data - 16)", "btcommon.le_channel_map.16",
12794 FT_BOOLEAN, 8, NULL, 0x01,
12795 NULL, HFILL }
12797 { &hf_btcommon_le_channel_map_15,
12798 { "RF Channel 17 (2436 MHz - Data - 15)", "btcommon.le_channel_map.15",
12799 FT_BOOLEAN, 8, NULL, 0x80,
12800 NULL, HFILL }
12802 { &hf_btcommon_le_channel_map_14,
12803 { "RF Channel 16 (2434 MHz - Data - 14)", "btcommon.le_channel_map.14",
12804 FT_BOOLEAN, 8, NULL, 0x40,
12805 NULL, HFILL }
12807 { &hf_btcommon_le_channel_map_13,
12808 { "RF Channel 15 (2432 MHz - Data - 13)", "btcommon.le_channel_map.13",
12809 FT_BOOLEAN, 8, NULL, 0x20,
12810 NULL, HFILL }
12812 { &hf_btcommon_le_channel_map_12,
12813 { "RF Channel 14 (2430 MHz - Data - 12)", "btcommon.le_channel_map.12",
12814 FT_BOOLEAN, 8, NULL, 0x10,
12815 NULL, HFILL }
12817 { &hf_btcommon_le_channel_map_11,
12818 { "RF Channel 13 (2428 MHz - Data - 11)", "btcommon.le_channel_map.11",
12819 FT_BOOLEAN, 8, NULL, 0x08,
12820 NULL, HFILL }
12822 { &hf_btcommon_le_channel_map_10,
12823 { "RF Channel 11 (2424 MHz - Data - 10)", "btcommon.le_channel_map.10",
12824 FT_BOOLEAN, 8, NULL, 0x04,
12825 NULL, HFILL }
12827 { &hf_btcommon_le_channel_map_9,
12828 { "RF Channel 10 (2422 MHz - Data - 9)", "btcommon.le_channel_map.9",
12829 FT_BOOLEAN, 8, NULL, 0x02,
12830 NULL, HFILL }
12832 { &hf_btcommon_le_channel_map_8,
12833 { "RF Channel 9 (2420 MHz - Data - 8)", "btcommon.le_channel_map.8",
12834 FT_BOOLEAN, 8, NULL, 0x01,
12835 NULL, HFILL }
12837 { &hf_btcommon_le_channel_map_7,
12838 { "RF Channel 8 (2418 MHz - Data - 7)", "btcommon.le_channel_map.7",
12839 FT_BOOLEAN, 8, NULL, 0x80,
12840 NULL, HFILL }
12842 { &hf_btcommon_le_channel_map_6,
12843 { "RF Channel 7 (2416 MHz - Data - 6)", "btcommon.le_channel_map.6",
12844 FT_BOOLEAN, 8, NULL, 0x40,
12845 NULL, HFILL }
12847 { &hf_btcommon_le_channel_map_5,
12848 { "RF Channel 6 (2414 MHz - Data - 5)", "btcommon.le_channel_map.5",
12849 FT_BOOLEAN, 8, NULL, 0x20,
12850 NULL, HFILL }
12852 { &hf_btcommon_le_channel_map_4,
12853 { "RF Channel 5 (2412 MHz - Data - 4)", "btcommon.le_channel_map.4",
12854 FT_BOOLEAN, 8, NULL, 0x10,
12855 NULL, HFILL }
12857 { &hf_btcommon_le_channel_map_3,
12858 { "RF Channel 4 (2410 MHz - Data - 3)", "btcommon.le_channel_map.3",
12859 FT_BOOLEAN, 8, NULL, 0x08,
12860 NULL, HFILL }
12862 { &hf_btcommon_le_channel_map_2,
12863 { "RF Channel 3 (2408 MHz - Data - 2)", "btcommon.le_channel_map.2",
12864 FT_BOOLEAN, 8, NULL, 0x04,
12865 NULL, HFILL }
12867 { &hf_btcommon_le_channel_map_1,
12868 { "RF Channel 2 (2406 MHz - Data - 1)", "btcommon.le_channel_map.1",
12869 FT_BOOLEAN, 8, NULL, 0x02,
12870 NULL, HFILL }
12872 { &hf_btcommon_le_channel_map_0,
12873 { "RF Channel 1 (2404 MHz - Data - 0)", "btcommon.le_channel_map.0",
12874 FT_BOOLEAN, 8, NULL, 0x01,
12875 NULL, HFILL }
12877 { &hf_btcommon_eir_ad_mesh_msg,
12878 { "Mesh message content", "btcommon.eir_ad.entry.mesh_msg",
12879 FT_BYTES, BASE_NONE, NULL, 0x0,
12880 NULL, HFILL }
12882 { &hf_btcommon_eir_ad_mesh_pbadv,
12883 { "Mesh PB-ADV message content", "btcommon.eir_ad.entry.mesh_pbadv",
12884 FT_BYTES, BASE_NONE, NULL, 0x0,
12885 NULL, HFILL }
12887 { &hf_btcommon_eir_ad_mesh_beacon,
12888 { "Mesh Beacon message content", "btcommon.eir_ad.entry.mesh_beacon",
12889 FT_BYTES, BASE_NONE, NULL, 0x0,
12890 NULL, HFILL }
12894 static int *ett[] = {
12895 &ett_eir_ad,
12896 &ett_eir_ad_entry,
12897 &ett_eir_ad_le_features,
12898 &ett_eir_ad_biginfo_seedaa
12901 static ei_register_info ei[] = {
12902 { &ei_eir_ad_undecoded, { "btcommon.eir_ad.undecoded", PI_UNDECODED, PI_NOTE, "Undecoded", EXPFILL }},
12903 { &ei_eir_ad_unknown, { "btcommon.eir_ad.unknown", PI_PROTOCOL, PI_WARN, "Unknown data", EXPFILL }},
12904 { &ei_eir_ad_not_used, { "btcommon.eir_ad.not_used", PI_PROTOCOL, PI_WARN, "Value should not be used", EXPFILL }},
12905 { &ei_eir_ad_invalid_length, { "btcommon.eir_ad.invalid_length", PI_PROTOCOL, PI_WARN, "Invalid Length", EXPFILL }},
12908 static build_valid_func bluetooth_eir_ad_manufacturer_company_id_da_build_value[1] = {bluetooth_eir_ad_manufacturer_company_id_value};
12909 static decode_as_value_t bluetooth_eir_ad_manufacturer_company_id_da_values = {bluetooth_eir_ad_manufacturer_company_id_prompt, 1, bluetooth_eir_ad_manufacturer_company_id_da_build_value};
12910 static decode_as_t bluetooth_eir_ad_manufacturer_company_id_da = {"btcommon.eir_ad", "btcommon.eir_ad.manufacturer_company_id", 1, 0, &bluetooth_eir_ad_manufacturer_company_id_da_values, NULL, NULL,
12911 decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL};
12913 static build_valid_func bluetooth_eir_ad_tds_organization_id_da_build_value[1] = {bluetooth_eir_ad_tds_organization_id_value};
12914 static decode_as_value_t bluetooth_eir_ad_tds_organization_id_da_values = {bluetooth_eir_ad_tds_organization_id_prompt, 1, bluetooth_eir_ad_tds_organization_id_da_build_value};
12915 static decode_as_t bluetooth_eir_ad_tds_organization_id_da = {"btcommon.eir_ad", "btcommon.eir_ad.tds_organization_id", 1, 0, &bluetooth_eir_ad_tds_organization_id_da_values, NULL, NULL,
12916 decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL};
12918 proto_btcommon = proto_register_protocol("Bluetooth Common", "BT Common", "btcommon");
12920 proto_register_field_array(proto_btcommon, hf, array_length(hf));
12921 proto_register_subtree_array(ett, array_length(ett));
12923 expert_module = expert_register_protocol(proto_btcommon);
12924 expert_register_field_array(expert_module, ei, array_length(ei));
12925 (void )ei_command_undecoded; /* Not needed not, but there is upcoming Bluetooth 5 */
12927 btcommon_ad_handle = register_dissector("btcommon.eir_ad.ad", dissect_btcommon_ad, proto_btcommon);
12928 btcommon_eir_handle = register_dissector("btcommon.eir_ad.eir", dissect_btcommon_eir, proto_btcommon);
12929 btcommon_cod_handle = register_dissector("btcommon.cod", dissect_btcommon_cod, proto_btcommon);
12930 btcommon_le_channel_map_handle = register_dissector("btcommon.le_channel_map", dissect_btcommon_le_channel_map, proto_btcommon);
12932 bluetooth_eir_ad_manufacturer_company_id = register_dissector_table("btcommon.eir_ad.manufacturer_company_id", "BT EIR/AD Manufacturer Company ID", proto_btcommon, FT_UINT16, BASE_HEX);
12933 bluetooth_eir_ad_tds_organization_id = register_dissector_table("btcommon.eir_ad.tds_organization_id", "BT EIR/AD TDS Organization ID", proto_btcommon, FT_UINT8, BASE_HEX);
12935 // Key for this table is the lower-case hex-representation of the service UUID. 16-bit UUIDs will have 4 characters, 32-bit UUIDs will have 8 characters.
12936 // 128-bit UUIDs have 4 dashes in them, and therefore have 36 characters.
12937 bluetooth_eir_ad_service_uuid = register_dissector_table("btcommon.eir_ad.entry.uuid", "BT EIR/AD Service UUID", proto_btcommon, FT_STRING, STRING_CASE_SENSITIVE);
12939 register_decode_as(&bluetooth_eir_ad_manufacturer_company_id_da);
12940 register_decode_as(&bluetooth_eir_ad_tds_organization_id_da);
12943 void
12944 proto_reg_handoff_btcommon(void)
12946 btmesh_handle = find_dissector("btmesh.msg");
12947 btmesh_pbadv_handle = find_dissector("btmesh.pbadv");
12948 btmesh_beacon_handle = find_dissector("btmesh.beacon");
12954 * Editor modelines - https://www.wireshark.org/tools/modelines.html
12956 * Local variables:
12957 * c-basic-offset: 4
12958 * tab-width: 8
12959 * indent-tabs-mode: nil
12960 * End:
12962 * vi: set shiftwidth=4 tabstop=8 expandtab:
12963 * :indentSize=4:tabSize=8:noTabs=true: