epan/dissectors/pidl/samr/samr.cnf cnf_dissect_lsa_BinaryString => lsarpc_dissect_str...
[wireshark-sm.git] / epan / dissectors / packet-btatt.c
blob31b763d0434724028bdb2046670ab66faaad8e2f
1 /* packet-btatt.c
2 * Routines for Bluetooth Attribute Protocol dissection
4 * Copyright 2012, Allan M. Madsen <allan.m@madsen.dk>
5 * Copyright 2015, Michal Labedzki for Tieto Corporation
6 * - dissect GATT level attributes
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include "config.h"
17 #include <glib/gprintf.h>
19 #include <epan/frame_data.h>
20 #include <epan/packet.h>
21 #include <epan/prefs.h>
22 #include <epan/decode_as.h>
23 #include <epan/tap.h>
24 #include <epan/proto_data.h>
25 #include <epan/unit_strings.h>
26 #include <epan/reassemble.h>
27 #include <epan/strutil.h>
29 #include "packet-bluetooth.h"
30 #include "packet-btatt.h"
31 #include "packet-btl2cap.h"
32 #include "packet-btsdp.h"
33 #include "packet-http.h"
34 #include "packet-usb-hid.h"
35 #include "packet-btmesh.h"
37 #define HANDLE_TVB -1
39 /* packet reassembly */
40 static reassembly_table msg_reassembly_table;
41 /* end packet reassembly */
43 /* Initialize the protocol and registered fields */
44 static int proto_btatt;
45 static int proto_btgatt;
47 static int hf_btatt_opcode;
48 static int hf_btatt_handle;
49 static int hf_btatt_starting_handle;
50 static int hf_btatt_ending_handle;
51 static int hf_btatt_group_end_handle;
52 static int hf_btatt_value;
53 static int hf_btatt_req_opcode_in_error;
54 static int hf_btatt_handle_in_error;
55 static int hf_btatt_error_code;
56 static int hf_btatt_error_code_aios;
57 static int hf_btatt_error_code_ans;
58 static int hf_btatt_error_code_bms;
59 static int hf_btatt_error_code_cgms;
60 static int hf_btatt_error_code_cps;
61 static int hf_btatt_error_code_cscs;
62 static int hf_btatt_error_code_cts;
63 static int hf_btatt_error_code_ess;
64 static int hf_btatt_error_code_gls;
65 static int hf_btatt_error_code_hps;
66 static int hf_btatt_error_code_hrs;
67 static int hf_btatt_error_code_hts;
68 static int hf_btatt_error_code_ips;
69 static int hf_btatt_error_code_ots;
70 static int hf_btatt_error_code_rscs;
71 static int hf_btatt_error_code_uds;
72 static int hf_btatt_service_uuid16;
73 static int hf_btatt_service_uuid128;
74 static int hf_btatt_characteristic_uuid16;
75 static int hf_btatt_characteristic_uuid128;
76 static int hf_btatt_uuid16;
77 static int hf_btatt_uuid128;
78 static int hf_btatt_client_rx_mtu;
79 static int hf_btatt_server_rx_mtu;
80 static int hf_btatt_uuid_format;
81 static int hf_btatt_length;
82 static int hf_btatt_offset;
83 static int hf_btatt_flags;
84 static int hf_btatt_sign_counter;
85 static int hf_btatt_signature;
86 static int hf_btatt_attribute_data;
87 static int hf_btatt_handles_info;
88 static int hf_btatt_opcode_authentication_signature;
89 static int hf_btatt_opcode_command;
90 static int hf_btatt_opcode_method;
91 static int hf_btatt_characteristic_properties;
92 static int hf_btatt_characteristic_value_handle;
93 static int hf_btatt_characteristic_properties_extended_properties;
94 static int hf_btatt_characteristic_properties_authenticated_signed_writes;
95 static int hf_btatt_characteristic_properties_indicate;
96 static int hf_btatt_characteristic_properties_notify;
97 static int hf_btatt_characteristic_properties_write;
98 static int hf_btatt_characteristic_properties_write_without_response;
99 static int hf_btatt_characteristic_properties_read;
100 static int hf_btatt_characteristic_properties_broadcast;
101 static int hf_btatt_information_data;
102 static int hf_btatt_included_service_handle;
103 static int hf_btatt_characteristic_configuration_client;
104 static int hf_btatt_characteristic_configuration_client_reserved;
105 static int hf_btatt_characteristic_configuration_client_indication;
106 static int hf_btatt_characteristic_configuration_client_notification;
107 static int hf_btatt_characteristic_configuration_server;
108 static int hf_btatt_characteristic_configuration_server_reserved;
109 static int hf_btatt_characteristic_configuration_server_broadcast;
110 static int hf_btatt_hogp_protocol_mode;
111 static int hf_btatt_hogp_bcd_hid;
112 static int hf_btatt_hogp_b_country_code;
113 static int hf_btatt_hogp_flags;
114 static int hf_btatt_hogp_flags_reserved;
115 static int hf_btatt_hogp_flags_normally_connectable;
116 static int hf_btatt_hogp_flags_remote_wake;
117 static int hf_btatt_hogp_hid_control_point_command;
118 static int hf_btatt_report_reference_report_id;
119 static int hf_btatt_report_reference_report_type;
120 static int hf_btatt_characteristic_user_description;
121 static int hf_btatt_characteristic_extended_properties;
122 static int hf_btatt_characteristic_extended_properties_reserved;
123 static int hf_btatt_characteristic_extended_properties_writable_auxiliaries;
124 static int hf_btatt_characteristic_extended_properties_reliable_write;
125 static int hf_btatt_characteristic_presentation_format;
126 static int hf_btatt_characteristic_presentation_exponent;
127 static int hf_btatt_characteristic_presentation_unit;
128 static int hf_btatt_characteristic_presentation_namespace;
129 static int hf_btatt_characteristic_presentation_namespace_description_btsig;
130 static int hf_btatt_characteristic_presentation_namespace_description;
131 static int hf_btatt_esp_trigger_logic;
132 static int hf_btatt_esp_condition;
133 static int hf_btatt_esp_operand;
134 static int hf_btatt_esp_flags;
135 static int hf_btatt_esp_sampling_function;
136 static int hf_btatt_esp_measurement_period;
137 static int hf_btatt_esp_update_interval;
138 static int hf_btatt_esp_application;
139 static int hf_btatt_esp_measurement_uncertainty;
140 static int hf_btatt_device_name;
141 static int hf_btatt_appearance;
142 static int hf_btatt_appearance_category;
143 static int hf_btatt_appearance_subcategory;
144 static int hf_btatt_appearance_subcategory_watch;
145 static int hf_btatt_appearance_subcategory_thermometer;
146 static int hf_btatt_appearance_subcategory_heart_rate;
147 static int hf_btatt_appearance_subcategory_blood_pressure;
148 static int hf_btatt_appearance_subcategory_hid;
149 static int hf_btatt_appearance_subcategory_running_walking_sensor;
150 static int hf_btatt_appearance_subcategory_cycling;
151 static int hf_btatt_appearance_subcategory_pulse_oximeter;
152 static int hf_btatt_appearance_subcategory_personal_mobility_device;
153 static int hf_btatt_appearance_subcategory_insulin_pump;
154 static int hf_btatt_appearance_subcategory_outdoor_sports_activity;
155 static int hf_btatt_peripheral_privacy_flag;
156 static int hf_btatt_minimum_connection_interval;
157 static int hf_btatt_maximum_connection_interval;
158 static int hf_btatt_peripheral_latency;
159 static int hf_btatt_connection_supervision_timeout_multiplier;
160 static int hf_btatt_reconnection_address;
161 static int hf_btatt_alert_level;
162 static int hf_btatt_tx_power_level;
163 static int hf_btatt_year;
164 static int hf_btatt_month;
165 static int hf_btatt_day;
166 static int hf_btatt_hours;
167 static int hf_btatt_minutes;
168 static int hf_btatt_seconds;
169 static int hf_btatt_day_of_week;
170 static int hf_btatt_fractions100;
171 static int hf_btatt_fractions256;
172 static int hf_btatt_dst_offset;
173 static int hf_btatt_model_number_string;
174 static int hf_btatt_serial_number_string;
175 static int hf_btatt_firmware_revision_string;
176 static int hf_btatt_hardware_revision_string;
177 static int hf_btatt_software_revision_string;
178 static int hf_btatt_manufacturer_string;
179 static int hf_btatt_system_id_manufacturer_identifier;
180 static int hf_btatt_system_id_organizationally_unique_identifier;
181 static int hf_btatt_timezone;
182 static int hf_btatt_time_accuracy;
183 static int hf_btatt_time_source;
184 static int hf_btatt_time_days_since_update;
185 static int hf_btatt_time_hours_since_update;
186 static int hf_btatt_time_update_control_point;
187 static int hf_btatt_time_current_state;
188 static int hf_btatt_time_result;
189 static int hf_btatt_battery_level;
190 static int hf_btatt_battery_power_state;
191 static int hf_btatt_battery_power_state_present;
192 static int hf_btatt_battery_power_state_discharging;
193 static int hf_btatt_battery_power_state_charging;
194 static int hf_btatt_battery_power_state_level;
195 static int hf_btatt_temperature_type;
196 static int hf_btatt_measurement_interval;
197 static int hf_btatt_time_adjust_reason;
198 static int hf_btatt_time_adjust_reason_reserved;
199 static int hf_btatt_time_adjust_reason_change_of_dst;
200 static int hf_btatt_time_adjust_reason_change_of_timezone;
201 static int hf_btatt_time_adjust_reason_external_reference_time_update;
202 static int hf_btatt_time_adjust_reason_manual_time_update;
203 static int hf_btatt_magnetic_declination;
204 static int hf_btatt_scan_refresh;
205 static int hf_btatt_body_sensor_location;
206 static int hf_btatt_heart_rate_control_point;
207 static int hf_btatt_alert_status;
208 static int hf_btatt_alert_status_reserved;
209 static int hf_btatt_alert_status_display_alert_status;
210 static int hf_btatt_alert_status_vibrate_state;
211 static int hf_btatt_alert_status_ringer_state;
212 static int hf_btatt_ringer_control_point;
213 static int hf_btatt_ringer_setting;
214 static int hf_btatt_alert_category_id_bitmask_1;
215 static int hf_btatt_alert_category_id_bitmask_1_schedule;
216 static int hf_btatt_alert_category_id_bitmask_1_voice_mail;
217 static int hf_btatt_alert_category_id_bitmask_1_sms_mms;
218 static int hf_btatt_alert_category_id_bitmask_1_missed_call;
219 static int hf_btatt_alert_category_id_bitmask_1_call;
220 static int hf_btatt_alert_category_id_bitmask_1_news;
221 static int hf_btatt_alert_category_id_bitmask_1_email;
222 static int hf_btatt_alert_category_id_bitmask_1_simple_alert;
223 static int hf_btatt_alert_category_id_bitmask_2;
224 static int hf_btatt_alert_category_id_bitmask_2_reserved;
225 static int hf_btatt_alert_category_id_bitmask_2_instant_message;
226 static int hf_btatt_alert_category_id_bitmask_2_high_prioritized_alert;
227 static int hf_btatt_alert_category_id;
228 static int hf_btatt_alert_command_id;
229 static int hf_btatt_alert_unread_count;
230 static int hf_btatt_alert_number_of_new_alert;
231 static int hf_btatt_alert_text_string_information;
232 static int hf_btatt_blood_pressure_feature;
233 static int hf_btatt_blood_pressure_feature_reserved;
234 static int hf_btatt_blood_pressure_feature_multiple_bond;
235 static int hf_btatt_blood_pressure_feature_measurement_position_detection;
236 static int hf_btatt_blood_pressure_feature_puls_rate_range;
237 static int hf_btatt_blood_pressure_feature_irregular_pulse_detection;
238 static int hf_btatt_blood_pressure_feature_cuff_fit_detection;
239 static int hf_btatt_blood_pressure_feature_body_movement_detection;
240 static int hf_btatt_le_scan_interval;
241 static int hf_btatt_le_scan_window;
242 static int hf_btatt_pnp_id_vendor_id_source;
243 static int hf_btatt_pnp_id_vendor_id;
244 static int hf_btatt_pnp_id_vendor_id_bluetooth_sig;
245 static int hf_btatt_pnp_id_vendor_id_usb_forum;
246 static int hf_btatt_pnp_id_product_id;
247 static int hf_btatt_pnp_id_product_version;
248 static int hf_btatt_glucose_feature;
249 static int hf_btatt_glucose_feature_reserved;
250 static int hf_btatt_glucose_feature_multiple_bond;
251 static int hf_btatt_glucose_feature_time_fault;
252 static int hf_btatt_glucose_feature_general_device_fault;
253 static int hf_btatt_glucose_feature_sensor_read_interrupt_detection;
254 static int hf_btatt_glucose_feature_sensor_temperature_high_low_detection;
255 static int hf_btatt_glucose_feature_sensor_result_high_low_detection;
256 static int hf_btatt_glucose_feature_sensor_strip_type_error_detection;
257 static int hf_btatt_glucose_feature_sensor_strip_insertion_error_detection;
258 static int hf_btatt_glucose_feature_sensor_sample_size;
259 static int hf_btatt_glucose_feature_sensor_malfunction_detection;
260 static int hf_btatt_glucose_feature_low_battery_detection_during_measurement;
261 static int hf_btatt_rsc_feature;
262 static int hf_btatt_rsc_feature_reserved;
263 static int hf_btatt_rsc_feature_multiple_sensor_locations;
264 static int hf_btatt_rsc_feature_calibration_procedure;
265 static int hf_btatt_rsc_feature_walking_or_running_status;
266 static int hf_btatt_rsc_feature_total_distance_measurement;
267 static int hf_btatt_rsc_feature_instantaneous_stride_length_measurement;
268 static int hf_btatt_csc_feature;
269 static int hf_btatt_csc_feature_reserved;
270 static int hf_btatt_csc_feature_multiple_sensor_locations;
271 static int hf_btatt_csc_feature_crank_revolution_data;
272 static int hf_btatt_csc_feature_wheel_revolution_data;
273 static int hf_btatt_sensor_location;
274 static int hf_btatt_elevation;
275 static int hf_btatt_pressure;
276 static int hf_btatt_temperature;
277 static int hf_btatt_humidity;
278 static int hf_btatt_true_wind_speed;
279 static int hf_btatt_true_wind_direction;
280 static int hf_btatt_apparent_wind_speed;
281 static int hf_btatt_apparent_wind_direction;
282 static int hf_btatt_gust_factor;
283 static int hf_btatt_pollen_concentration;
284 static int hf_btatt_uv_index;
285 static int hf_btatt_irradiance;
286 static int hf_btatt_rainfall;
287 static int hf_btatt_wind_chill;
288 static int hf_btatt_heart_index;
289 static int hf_btatt_dew_point;
290 static int hf_btatt_descriptor_value_changed_flags;
291 static int hf_btatt_descriptor_value_changed_flags_reserved;
292 static int hf_btatt_descriptor_value_changed_flags_change_to_characteristic_user_description_descriptor;
293 static int hf_btatt_descriptor_value_changed_flags_change_to_es_measurement_descriptor;
294 static int hf_btatt_descriptor_value_changed_flags_change_to_es_configuration_descriptor;
295 static int hf_btatt_descriptor_value_changed_flags_change_to_one_or_more_es_trigger_setting_descriptors;
296 static int hf_btatt_descriptor_value_changed_flags_source_of_change;
297 static int hf_btatt_aerobic_heart_rate_lower_limit;
298 static int hf_btatt_aerobic_threshold;
299 static int hf_btatt_age;
300 static int hf_btatt_anaerobic_heart_rate_lower_limit;
301 static int hf_btatt_anaerobic_heart_rate_upper_limit;
302 static int hf_btatt_anaerobic_threshold;
303 static int hf_btatt_aerobic_heart_rate_upper_limit;
304 static int hf_btatt_email_address;
305 static int hf_btatt_fat_burn_heart_rate_lower_limit;
306 static int hf_btatt_fat_burn_heart_rate_upper_limit;
307 static int hf_btatt_first_name;
308 static int hf_btatt_five_zone_heart_rate_limits_very_light_light_limit;
309 static int hf_btatt_five_zone_heart_rate_limits_light_moderate_limit;
310 static int hf_btatt_five_zone_heart_rate_limits_moderate_hard_limit;
311 static int hf_btatt_five_zone_heart_rate_limits_hard_maximum_limit;
312 static int hf_btatt_gender;
313 static int hf_btatt_heart_rate_max;
314 static int hf_btatt_height;
315 static int hf_btatt_hip_circumference;
316 static int hf_btatt_last_name;
317 static int hf_btatt_maximum_recommended_heart_rate;
318 static int hf_btatt_resting_heart_rate;
319 static int hf_btatt_sport_type_for_aerobic_and_anaerobic_thresholds;
320 static int hf_btatt_three_zone_heart_rate_limits_light_moderate;
321 static int hf_btatt_three_zone_heart_rate_limits_moderate_hard;
322 static int hf_btatt_two_zone_heart_rate_limit_fat_burn_fitness;
323 static int hf_btatt_vo2_max;
324 static int hf_btatt_waist_circumference;
325 static int hf_btatt_weight;
326 static int hf_btatt_database_change_increment;
327 static int hf_btatt_user_index;
328 static int hf_btatt_magnetic_flux_density_x;
329 static int hf_btatt_magnetic_flux_density_y;
330 static int hf_btatt_magnetic_flux_density_z;
331 static int hf_btatt_language;
332 static int hf_btatt_barometric_pressure_trend;
333 static int hf_btatt_central_address_resolution;
334 static int hf_btatt_resolvable_private_address;
335 static int hf_btatt_cycling_power_feature;
336 static int hf_btatt_cycling_power_feature_reserved;
337 static int hf_btatt_cycling_power_feature_factory_calibration_date;
338 static int hf_btatt_cycling_power_feature_instantaneous_measurement_direction;
339 static int hf_btatt_cycling_power_feature_sensor_measurement_context;
340 static int hf_btatt_cycling_power_feature_span_length_adjustment;
341 static int hf_btatt_cycling_power_feature_chain_weight_adjustment;
342 static int hf_btatt_cycling_power_feature_chain_length_adjustment;
343 static int hf_btatt_cycling_power_feature_crank_length_adjustment;
344 static int hf_btatt_cycling_power_feature_multiple_sensor_locations;
345 static int hf_btatt_cycling_power_feature_cycling_power_measurement_characteristic_content_masking;
346 static int hf_btatt_cycling_power_feature_offset_compensation;
347 static int hf_btatt_cycling_power_feature_offset_compensation_indicator;
348 static int hf_btatt_cycling_power_feature_accumulated_energy;
349 static int hf_btatt_cycling_power_feature_top_and_bottom_dead_spot_angles;
350 static int hf_btatt_cycling_power_feature_extreme_angles;
351 static int hf_btatt_cycling_power_feature_extreme_magnitudes;
352 static int hf_btatt_cycling_power_feature_crank_revolution_data;
353 static int hf_btatt_cycling_power_feature_wheel_revolution_data;
354 static int hf_btatt_cycling_power_feature_accumulated_torque;
355 static int hf_btatt_cycling_power_feature_pedal_power_balance;
356 static int hf_btatt_ln_feature;
357 static int hf_btatt_ln_feature_reserved;
358 static int hf_btatt_ln_feature_position_status;
359 static int hf_btatt_ln_feature_elevation_setting;
360 static int hf_btatt_ln_feature_fix_rate_setting;
361 static int hf_btatt_ln_feature_location_and_speed_characteristic_content_masking;
362 static int hf_btatt_ln_feature_vertical_dilution_of_precision;
363 static int hf_btatt_ln_feature_horizontal_dilution_of_precision;
364 static int hf_btatt_ln_feature_estimated_vertical_position_error;
365 static int hf_btatt_ln_feature_estimated_horizontal_position_error;
366 static int hf_btatt_ln_feature_time_to_first_fix;
367 static int hf_btatt_ln_feature_number_of_beacons_in_view;
368 static int hf_btatt_ln_feature_number_of_beacons_in_solution;
369 static int hf_btatt_ln_feature_estimated_time_of_arrival;
370 static int hf_btatt_ln_feature_remaining_vertical_distance;
371 static int hf_btatt_ln_feature_remaining_distance;
372 static int hf_btatt_ln_feature_utc_time;
373 static int hf_btatt_ln_feature_rolling_time;
374 static int hf_btatt_ln_feature_heading;
375 static int hf_btatt_ln_feature_elevation;
376 static int hf_btatt_ln_feature_location;
377 static int hf_btatt_ln_feature_total_distance;
378 static int hf_btatt_ln_feature_instantaneous_speed;
379 static int hf_btatt_body_composition_feature;
380 static int hf_btatt_body_composition_feature_reserved;
381 static int hf_btatt_body_composition_feature_height_measurement_resolution;
382 static int hf_btatt_body_composition_feature_mass_measurement_resolution;
383 static int hf_btatt_body_composition_feature_height;
384 static int hf_btatt_body_composition_feature_weight;
385 static int hf_btatt_body_composition_feature_impedance;
386 static int hf_btatt_body_composition_feature_body_water_mass;
387 static int hf_btatt_body_composition_feature_soft_lean_mass;
388 static int hf_btatt_body_composition_feature_fat_free_mass;
389 static int hf_btatt_body_composition_feature_muscle_mass;
390 static int hf_btatt_body_composition_feature_muscle_percentage;
391 static int hf_btatt_body_composition_feature_basal_metabolism;
392 static int hf_btatt_body_composition_feature_multiple_users;
393 static int hf_btatt_body_composition_feature_timestamp;
394 static int hf_btatt_weight_scale_feature;
395 static int hf_btatt_weight_scale_feature_reserved;
396 static int hf_btatt_weight_scale_feature_height_measurement_resolution;
397 static int hf_btatt_weight_scale_feature_weight_measurement_resolution;
398 static int hf_btatt_weight_scale_feature_bmi;
399 static int hf_btatt_weight_scale_feature_multiple_users;
400 static int hf_btatt_weight_scale_feature_timestamp;
401 static int hf_btatt_glucose_measurement_flags;
402 static int hf_btatt_glucose_measurement_flags_reserved;
403 static int hf_btatt_glucose_measurement_flags_context_information_follows;
404 static int hf_btatt_glucose_measurement_flags_sensor_status_annunciation_present;
405 static int hf_btatt_glucose_measurement_flags_glucose_concentration_units;
406 static int hf_btatt_glucose_measurement_flags_glucose_concentration_type_and_sample_location_present;
407 static int hf_btatt_glucose_measurement_flags_time_offset_present;
408 static int hf_btatt_glucose_measurement_sequence_number;
409 static int hf_btatt_glucose_measurement_base_time;
410 static int hf_btatt_glucose_measurement_time_offset;
411 static int hf_btatt_glucose_measurement_glucose_concentration_kg_per_l;
412 static int hf_btatt_glucose_measurement_glucose_concentration_mol_per_l;
413 static int hf_btatt_glucose_measurement_type_and_sample_location;
414 static int hf_btatt_glucose_measurement_type_and_sample_location_type;
415 static int hf_btatt_glucose_measurement_type_and_sample_location_sample_location;
416 static int hf_btatt_glucose_measurement_sensor_status_annunciation;
417 static int hf_btatt_glucose_measurement_sensor_status_annunciation_reserved;
418 static int hf_btatt_glucose_measurement_sensor_status_annunciation_time_fault;
419 static int hf_btatt_glucose_measurement_sensor_status_annunciation_general_fault;
420 static int hf_btatt_glucose_measurement_sensor_status_annunciation_read_interrupted;
421 static int hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_low;
422 static int hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_high;
423 static int hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_low;
424 static int hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_high;
425 static int hf_btatt_glucose_measurement_sensor_status_annunciation_strip_type_incorrect;
426 static int hf_btatt_glucose_measurement_sensor_status_annunciation_strip_insertion_error;
427 static int hf_btatt_glucose_measurement_sensor_status_annunciation_size_insufficient;
428 static int hf_btatt_glucose_measurement_sensor_status_annunciation_fault;
429 static int hf_btatt_glucose_measurement_sensor_status_annunciation_battery_low;
430 static int hf_btatt_bond_management_feature;
431 static int hf_btatt_bond_management_feature_feature_extension;
432 static int hf_btatt_bond_management_feature_reserved;
433 static int hf_btatt_bond_management_feature_identify_yourself;
434 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_9;
435 static int hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_le_transport_only_server;
436 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_8;
437 static int hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_transport_only_server;
438 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_7;
439 static int hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_and_le_server;
440 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_6;
441 static int hf_btatt_bond_management_feature_remove_all_bonds_on_le_transport_only_server;
442 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_5;
443 static int hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_transport_only_server;
444 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_4;
445 static int hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_and_le_server;
446 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_3;
447 static int hf_btatt_bond_management_feature_delete_bond_of_current_le_transport_only_connection;
448 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_2;
449 static int hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_transport_only_connection;
450 static int hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_1;
451 static int hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_and_le_connection;
452 static int hf_btatt_bond_management_feature_nth;
453 static int hf_btatt_bond_management_feature_nth_feature_extension;
454 static int hf_btatt_bond_management_feature_nth_reserved;
455 static int hf_btatt_bond_management_control_point_opcode;
456 static int hf_btatt_bond_management_control_point_authorization_code;
457 static int hf_btatt_temperature_measurement_flags;
458 static int hf_btatt_temperature_measurement_flags_reserved;
459 static int hf_btatt_temperature_measurement_flags_temperature_type;
460 static int hf_btatt_temperature_measurement_flags_timestamp;
461 static int hf_btatt_temperature_measurement_flags_temperature_unit;
462 static int hf_btatt_temperature_measurement_value_celsius;
463 static int hf_btatt_temperature_measurement_value_fahrenheit;
464 static int hf_btatt_temperature_measurement_timestamp;
465 static int hf_btatt_glucose_measurement_context_flags;
466 static int hf_btatt_glucose_measurement_context_flags_extended_flags;
467 static int hf_btatt_glucose_measurement_context_flags_hba1c;
468 static int hf_btatt_glucose_measurement_context_flags_medication_value_units;
469 static int hf_btatt_glucose_measurement_context_flags_medication_id_and_medication;
470 static int hf_btatt_glucose_measurement_context_flags_exercise_duration_and_exercise_intensity;
471 static int hf_btatt_glucose_measurement_context_flags_tester_health;
472 static int hf_btatt_glucose_measurement_context_flags_meal;
473 static int hf_btatt_glucose_measurement_context_flags_carbohydrate_id_and_carbohydrate;
474 static int hf_btatt_glucose_measurement_context_sequence_number;
475 static int hf_btatt_glucose_measurement_context_extended_flags;
476 static int hf_btatt_glucose_measurement_context_extended_flags_reserved;
477 static int hf_btatt_glucose_measurement_context_carbohydrate_id;
478 static int hf_btatt_glucose_measurement_context_carbohydrate_kg;
479 static int hf_btatt_glucose_measurement_context_meal;
480 static int hf_btatt_glucose_measurement_context_tester_health;
481 static int hf_btatt_glucose_measurement_context_tester;
482 static int hf_btatt_glucose_measurement_context_health;
483 static int hf_btatt_glucose_measurement_context_exercise_duration;
484 static int hf_btatt_glucose_measurement_context_exercise_intensity;
485 static int hf_btatt_glucose_measurement_context_medication_id;
486 static int hf_btatt_glucose_measurement_context_medication_l;
487 static int hf_btatt_glucose_measurement_context_medication_kg;
488 static int hf_btatt_glucose_measurement_context_hba1c;
489 static int hf_btatt_blood_pressure_measurement_flags;
490 static int hf_btatt_blood_pressure_measurement_flags_reserved;
491 static int hf_btatt_blood_pressure_measurement_flags_measurement_status;
492 static int hf_btatt_blood_pressure_measurement_flags_user_id;
493 static int hf_btatt_blood_pressure_measurement_flags_pulse_rate;
494 static int hf_btatt_blood_pressure_measurement_flags_timestamp;
495 static int hf_btatt_blood_pressure_measurement_flags_unit;
496 static int hf_btatt_blood_pressure_measurement_compound_value_systolic_kpa;
497 static int hf_btatt_blood_pressure_measurement_compound_value_diastolic_kpa;
498 static int hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_kpa;
499 static int hf_btatt_blood_pressure_measurement_compound_value_systolic_mmhg;
500 static int hf_btatt_blood_pressure_measurement_compound_value_diastolic_mmhg;
501 static int hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_mmhg;
502 static int hf_btatt_blood_pressure_measurement_timestamp;
503 static int hf_btatt_blood_pressure_measurement_pulse_rate;
504 static int hf_btatt_blood_pressure_measurement_user_id;
505 static int hf_btatt_blood_pressure_measurement_status;
506 static int hf_btatt_blood_pressure_measurement_status_reserved;
507 static int hf_btatt_blood_pressure_measurement_status_improper_measurement_position;
508 static int hf_btatt_blood_pressure_measurement_status_pulse_rate_range_detection;
509 static int hf_btatt_blood_pressure_measurement_status_irregular_pulse;
510 static int hf_btatt_blood_pressure_measurement_status_cuff_fit_too_loose;
511 static int hf_btatt_blood_pressure_measurement_status_body_movement;
512 static int hf_btatt_heart_rate_measurement_flags;
513 static int hf_btatt_heart_rate_measurement_flags_reserved;
514 static int hf_btatt_heart_rate_measurement_flags_rr_interval;
515 static int hf_btatt_heart_rate_measurement_flags_energy_expended;
516 static int hf_btatt_heart_rate_measurement_flags_sensor_contact_status_support;
517 static int hf_btatt_heart_rate_measurement_flags_sensor_contact_status_contact;
518 static int hf_btatt_heart_rate_measurement_flags_value_16;
519 static int hf_btatt_heart_rate_measurement_value_8;
520 static int hf_btatt_heart_rate_measurement_value_16;
521 static int hf_btatt_heart_rate_measurement_energy_expended;
522 static int hf_btatt_heart_rate_measurement_rr_intervals;
523 static int hf_btatt_heart_rate_measurement_rr_interval;
524 static int hf_btatt_record_access_control_point_opcode;
525 static int hf_btatt_record_access_control_point_operator;
526 static int hf_btatt_record_access_control_point_operand;
527 static int hf_btatt_record_access_control_point_operand_filter_type;
528 static int hf_btatt_record_access_control_point_operand_min_time_offset;
529 static int hf_btatt_record_access_control_point_operand_max_time_offset;
530 static int hf_btatt_record_access_control_point_operand_number_of_records;
531 static int hf_btatt_record_access_control_point_request_opcode;
532 static int hf_btatt_record_access_control_point_response_code;
533 static int hf_btatt_value_trigger_setting_condition;
534 static int hf_btatt_value_trigger_setting_analog;
535 static int hf_btatt_value_trigger_setting_analog_one;
536 static int hf_btatt_value_trigger_setting_analog_two;
537 static int hf_btatt_digital;
538 static int hf_btatt_digital_output;
539 static int hf_btatt_analog;
540 static int hf_btatt_analog_output;
541 static int hf_btatt_location_name;
542 static int hf_btatt_uncertainty;
543 static int hf_btatt_uncertainty_reserved;
544 static int hf_btatt_uncertainty_precision;
545 static int hf_btatt_uncertainty_update_time;
546 static int hf_btatt_uncertainty_stationary;
547 static int hf_btatt_latitude;
548 static int hf_btatt_longitude;
549 static int hf_btatt_local_north_coordinate;
550 static int hf_btatt_local_east_coordinate;
551 static int hf_btatt_floor_number;
552 static int hf_btatt_altitude;
553 static int hf_btatt_indoor_positioning_configuration;
554 static int hf_btatt_indoor_positioning_configuration_reserved;
555 static int hf_btatt_indoor_positioning_configuration_location_name;
556 static int hf_btatt_indoor_positioning_configuration_uncertainty;
557 static int hf_btatt_indoor_positioning_configuration_floor_number;
558 static int hf_btatt_indoor_positioning_configuration_altitude;
559 static int hf_btatt_indoor_positioning_configuration_tx_power;
560 static int hf_btatt_indoor_positioning_configuration_coordinate_system;
561 static int hf_btatt_indoor_positioning_configuration_coordinates;
562 static int hf_btatt_number_of_digitals;
563 static int hf_btatt_time_trigger_setting_condition;
564 static int hf_btatt_time_trigger_setting_value;
565 static int hf_btatt_time_trigger_setting_value_count;
566 static int hf_btatt_time_trigger_setting_value_time_interval;
567 static int hf_btatt_rsc_measurement_flags;
568 static int hf_btatt_rsc_measurement_flags_reserved;
569 static int hf_btatt_rsc_measurement_flags_type_of_movement;
570 static int hf_btatt_rsc_measurement_flags_total_distance_present;
571 static int hf_btatt_rsc_measurement_flags_instantaneous_stride_length_present;
572 static int hf_btatt_rsc_measurement_instantaneous_speed;
573 static int hf_btatt_rsc_measurement_instantaneous_cadence;
574 static int hf_btatt_rsc_measurement_instantaneous_stride_length;
575 static int hf_btatt_rsc_measurement_total_distance;
576 static int hf_btatt_sc_control_point_opcode;
577 static int hf_btatt_sc_control_point_cumulative_value;
578 static int hf_btatt_sc_control_point_request_opcode;
579 static int hf_btatt_sc_control_point_response_value;
580 static int hf_btatt_cycling_power_measurement_flags;
581 static int hf_btatt_cycling_power_measurement_flags_reserved;
582 static int hf_btatt_cycling_power_measurement_flags_offset_compensation_indicator;
583 static int hf_btatt_cycling_power_measurement_flags_accumulated_energy;
584 static int hf_btatt_cycling_power_measurement_flags_bottom_dead_spot_angle;
585 static int hf_btatt_cycling_power_measurement_flags_top_dead_spot_angle;
586 static int hf_btatt_cycling_power_measurement_flags_extreme_angles;
587 static int hf_btatt_cycling_power_measurement_flags_extreme_torque_magnitudes;
588 static int hf_btatt_cycling_power_measurement_flags_extreme_force_magnitudes;
589 static int hf_btatt_cycling_power_measurement_flags_crank_revolution_data;
590 static int hf_btatt_cycling_power_measurement_flags_wheel_revolution_data;
591 static int hf_btatt_cycling_power_measurement_flags_accumulated_torque_source;
592 static int hf_btatt_cycling_power_measurement_flags_accumulated_torque;
593 static int hf_btatt_cycling_power_measurement_flags_pedal_power_balance_reference;
594 static int hf_btatt_cycling_power_measurement_flags_pedal_power_balance;
595 static int hf_btatt_cycling_power_measurement_instantaneous_power;
596 static int hf_btatt_cycling_power_measurement_pedal_power_balance;
597 static int hf_btatt_cycling_power_measurement_accumulated_torque;
598 static int hf_btatt_cycling_power_measurement_wheel_revolution_data_cumulative_wheel_revolutions;
599 static int hf_btatt_cycling_power_measurement_wheel_revolution_data_last_wheel_event_time;
600 static int hf_btatt_cycling_power_measurement_crank_revolution_data_cumulative_crank_revolutions;
601 static int hf_btatt_cycling_power_measurement_crank_revolution_data_last_crank_event_time;
602 static int hf_btatt_cycling_power_measurement_extreme_force_magnitudes_maximum_force_magnitude;
603 static int hf_btatt_cycling_power_measurement_extreme_force_magnitudes_minimum_force_magnitude;
604 static int hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_maximum_torque_magnitude;
605 static int hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_minimum_torque_magnitude;
606 static int hf_btatt_cycling_power_measurement_extreme_angles;
607 static int hf_btatt_cycling_power_measurement_extreme_angles_maximum;
608 static int hf_btatt_cycling_power_measurement_extreme_angles_minimum;
609 static int hf_btatt_cycling_power_measurement_top_dead_spot_angle;
610 static int hf_btatt_cycling_power_measurement_bottom_dead_spot_angle;
611 static int hf_btatt_cycling_power_measurement_accumulated_energy;
612 static int hf_btatt_csc_measurement_flags;
613 static int hf_btatt_csc_measurement_flags_reserved;
614 static int hf_btatt_csc_measurement_flags_crank_revolution_data;
615 static int hf_btatt_csc_measurement_flags_wheel_revolution_data;
616 static int hf_btatt_csc_measurement_cumulative_wheel_revolutions;
617 static int hf_btatt_csc_measurement_cumulative_crank_revolutions;
618 static int hf_btatt_csc_measurement_last_event_time;
619 static int hf_btatt_cycling_power_vector_flags;
620 static int hf_btatt_cycling_power_vector_flags_reserved;
621 static int hf_btatt_cycling_power_vector_flags_instantaneous_measurement_direction;
622 static int hf_btatt_cycling_power_vector_flags_instantaneous_torque_magnitude_array;
623 static int hf_btatt_cycling_power_vector_flags_instantaneous_force_magnitude_array;
624 static int hf_btatt_cycling_power_vector_flags_first_crank_measurement_angle;
625 static int hf_btatt_cycling_power_vector_flags_crank_revolution_data;
626 static int hf_btatt_cycling_power_vector_crank_revolution_data_cumulative_crank_revolutions;
627 static int hf_btatt_cycling_power_vector_crank_revolution_data_last_crank_event_time;
628 static int hf_btatt_cycling_power_vector_first_crank_measurement_angle;
629 static int hf_btatt_cycling_power_vector_instantaneous_force_magnitude_array;
630 static int hf_btatt_cycling_power_vector_instantaneous_torque_magnitude_array;
631 static int hf_btatt_cycling_power_control_point_opcode;
632 static int hf_btatt_cycling_power_control_point_cumulative_value;
633 static int hf_btatt_cycling_power_control_point_sensor_location;
634 static int hf_btatt_cycling_power_control_point_crank_length;
635 static int hf_btatt_cycling_power_control_point_chain_length;
636 static int hf_btatt_cycling_power_control_point_chain_weight;
637 static int hf_btatt_cycling_power_control_point_span_length;
638 static int hf_btatt_cycling_power_control_point_content_mask;
639 static int hf_btatt_cycling_power_control_point_content_mask_reserved;
640 static int hf_btatt_cycling_power_control_point_content_mask_accumulated_energy;
641 static int hf_btatt_cycling_power_control_point_content_mask_bottom_dead_spot_angle;
642 static int hf_btatt_cycling_power_control_point_content_mask_top_dead_spot_angle;
643 static int hf_btatt_cycling_power_control_point_content_mask_extreme_angles;
644 static int hf_btatt_cycling_power_control_point_content_mask_extreme_magnitudes;
645 static int hf_btatt_cycling_power_control_point_content_mask_crank_revolution_data;
646 static int hf_btatt_cycling_power_control_point_content_mask_wheel_revolution_data;
647 static int hf_btatt_cycling_power_control_point_content_mask_accumulated_torque;
648 static int hf_btatt_cycling_power_control_point_content_mask_pedal_power_balance;
649 static int hf_btatt_cycling_power_control_point_request_opcode;
650 static int hf_btatt_cycling_power_control_point_response_value;
651 static int hf_btatt_cycling_power_control_point_start_offset_compensation;
652 static int hf_btatt_cycling_power_control_point_sampling_rate;
653 static int hf_btatt_cycling_power_control_point_factory_calibration_date;
654 static int hf_btatt_location_and_speed_flags;
655 static int hf_btatt_location_and_speed_flags_reserved;
656 static int hf_btatt_location_and_speed_flags_heading_source;
657 static int hf_btatt_location_and_speed_flags_elevation_source;
658 static int hf_btatt_location_and_speed_flags_speed_and_distance_format;
659 static int hf_btatt_location_and_speed_flags_position_status;
660 static int hf_btatt_location_and_speed_flags_utc_time;
661 static int hf_btatt_location_and_speed_flags_rolling_time;
662 static int hf_btatt_location_and_speed_flags_heading;
663 static int hf_btatt_location_and_speed_flags_elevation;
664 static int hf_btatt_location_and_speed_flags_location;
665 static int hf_btatt_location_and_speed_flags_total_distance;
666 static int hf_btatt_location_and_speed_flags_instantaneous_speed;
667 static int hf_btatt_location_and_speed_instantaneous_speed;
668 static int hf_btatt_location_and_speed_total_distance;
669 static int hf_btatt_location_and_speed_location_latitude;
670 static int hf_btatt_location_and_speed_location_longitude;
671 static int hf_btatt_location_and_speed_elevation;
672 static int hf_btatt_location_and_speed_heading;
673 static int hf_btatt_location_and_speed_rolling_time;
674 static int hf_btatt_location_and_speed_utc_time;
675 static int hf_btatt_navigation_flags;
676 static int hf_btatt_navigation_flags_reserved;
677 static int hf_btatt_navigation_flags_destination_reached;
678 static int hf_btatt_navigation_flags_waypoint_reached;
679 static int hf_btatt_navigation_flags_navigation_indicator_type;
680 static int hf_btatt_navigation_flags_heading_source;
681 static int hf_btatt_navigation_flags_position_status;
682 static int hf_btatt_navigation_flags_estimated_time_of_arrival;
683 static int hf_btatt_navigation_flags_remaining_vertical_distance;
684 static int hf_btatt_navigation_flags_remaining_distance;
685 static int hf_btatt_navigation_bearing;
686 static int hf_btatt_navigation_heading;
687 static int hf_btatt_navigation_remaining_distance;
688 static int hf_btatt_navigation_remaining_vertical_distance;
689 static int hf_btatt_navigation_estimated_time_of_arrival;
690 static int hf_btatt_position_quality_flags;
691 static int hf_btatt_position_quality_flags_reserved;
692 static int hf_btatt_position_quality_flags_position_status;
693 static int hf_btatt_position_quality_flags_vdop;
694 static int hf_btatt_position_quality_flags_hdop;
695 static int hf_btatt_position_quality_flags_evpe;
696 static int hf_btatt_position_quality_flags_ehpe;
697 static int hf_btatt_position_quality_flags_time_to_first_fix;
698 static int hf_btatt_position_quality_flags_number_of_beacons_in_view;
699 static int hf_btatt_position_quality_flags_number_of_beacons_in_solution;
700 static int hf_btatt_position_quality_number_of_beacons_in_solution;
701 static int hf_btatt_position_quality_number_of_beacons_in_view;
702 static int hf_btatt_position_quality_time_to_first_fix;
703 static int hf_btatt_position_quality_ehpe;
704 static int hf_btatt_position_quality_evpe;
705 static int hf_btatt_position_quality_hdop;
706 static int hf_btatt_position_quality_vdop;
707 static int hf_btatt_ln_control_point_opcode;
708 static int hf_btatt_ln_control_point_cumulative_value;
709 static int hf_btatt_ln_control_point_content_mask;
710 static int hf_btatt_ln_control_point_content_mask_reserved;
711 static int hf_btatt_ln_control_point_content_mask_utc_time;
712 static int hf_btatt_ln_control_point_content_mask_rolling_time;
713 static int hf_btatt_ln_control_point_content_mask_heading;
714 static int hf_btatt_ln_control_point_content_mask_elevation;
715 static int hf_btatt_ln_control_point_content_mask_location;
716 static int hf_btatt_ln_control_point_content_mask_total_distance;
717 static int hf_btatt_ln_control_point_content_mask_instantaneous_speed;
718 static int hf_btatt_ln_control_point_navigation_control;
719 static int hf_btatt_ln_control_point_route_number;
720 static int hf_btatt_ln_control_point_fix_rate;
721 static int hf_btatt_ln_control_point_elevation;
722 static int hf_btatt_ln_control_point_request_opcode;
723 static int hf_btatt_ln_control_point_response_value;
724 static int hf_btatt_ln_control_point_response_value_number_of_routes;
725 static int hf_btatt_ln_control_point_response_value_name_of_route;
726 static int hf_btatt_body_composition_measurement_flags;
727 static int hf_btatt_body_composition_measurement_flags_reserved;
728 static int hf_btatt_body_composition_measurement_flags_multiple_packet_measurement;
729 static int hf_btatt_body_composition_measurement_flags_height;
730 static int hf_btatt_body_composition_measurement_flags_weight;
731 static int hf_btatt_body_composition_measurement_flags_impedance;
732 static int hf_btatt_body_composition_measurement_flags_body_water_mass;
733 static int hf_btatt_body_composition_measurement_flags_soft_lean_mass;
734 static int hf_btatt_body_composition_measurement_flags_fat_free_mass;
735 static int hf_btatt_body_composition_measurement_flags_muscle_mass;
736 static int hf_btatt_body_composition_measurement_flags_muscle_percentage;
737 static int hf_btatt_body_composition_measurement_flags_basal_metabolism;
738 static int hf_btatt_body_composition_measurement_flags_user_id;
739 static int hf_btatt_body_composition_measurement_flags_timestamp;
740 static int hf_btatt_body_composition_measurement_flags_measurement_units;
741 static int hf_btatt_body_composition_measurement_body_fat_percentage;
742 static int hf_btatt_body_composition_measurement_timestamp;
743 static int hf_btatt_body_composition_measurement_user_id;
744 static int hf_btatt_body_composition_measurement_basal_metabolism;
745 static int hf_btatt_body_composition_measurement_muscle_percentage;
746 static int hf_btatt_body_composition_measurement_muscle_mass_lb;
747 static int hf_btatt_body_composition_measurement_muscle_mass_kg;
748 static int hf_btatt_body_composition_measurement_fat_free_mass_lb;
749 static int hf_btatt_body_composition_measurement_fat_free_mass_kg;
750 static int hf_btatt_body_composition_measurement_soft_lean_mass_lb;
751 static int hf_btatt_body_composition_measurement_soft_lean_mass_kg;
752 static int hf_btatt_body_composition_measurement_body_water_mass_lb;
753 static int hf_btatt_body_composition_measurement_body_water_mass_kg;
754 static int hf_btatt_body_composition_measurement_impedance;
755 static int hf_btatt_body_composition_measurement_weight_lb;
756 static int hf_btatt_body_composition_measurement_weight_kg;
757 static int hf_btatt_body_composition_measurement_height_inches;
758 static int hf_btatt_body_composition_measurement_height_meter;
759 static int hf_btatt_weight_measurement_flags;
760 static int hf_btatt_weight_measurement_flags_reserved;
761 static int hf_btatt_weight_measurement_flags_bmi_and_height;
762 static int hf_btatt_weight_measurement_flags_user_id;
763 static int hf_btatt_weight_measurement_flags_timestamp;
764 static int hf_btatt_weight_measurement_flags_measurement_units;
765 static int hf_btatt_weight_measurement_weight_lb;
766 static int hf_btatt_weight_measurement_weight_kg;
767 static int hf_btatt_weight_measurement_timestamp;
768 static int hf_btatt_weight_measurement_user_id;
769 static int hf_btatt_weight_measurement_bmi;
770 static int hf_btatt_weight_measurement_height_in;
771 static int hf_btatt_weight_measurement_height_m;
772 static int hf_btatt_user_control_point_opcode;
773 static int hf_btatt_user_control_point_request_opcode;
774 static int hf_btatt_user_control_point_response_value;
775 static int hf_btatt_user_control_point_consent_code;
776 static int hf_btatt_cgm_measurement_size;
777 static int hf_btatt_cgm_measurement_flags;
778 static int hf_btatt_cgm_measurement_flags_cgm_trend_information;
779 static int hf_btatt_cgm_measurement_flags_cgm_quality;
780 static int hf_btatt_cgm_measurement_flags_reserved;
781 static int hf_btatt_cgm_measurement_flags_sensor_status_annunciation_warning;
782 static int hf_btatt_cgm_measurement_flags_sensor_status_annunciation_cal_temp;
783 static int hf_btatt_cgm_measurement_flags_sensor_status_annunciation_status;
784 static int hf_btatt_cgm_measurement_glucose_concentration;
785 static int hf_btatt_cgm_measurement_time_offset;
786 static int hf_btatt_cgm_sensor_status_annunciation;
787 static int hf_btatt_cgm_sensor_status_annunciation_status;
788 static int hf_btatt_cgm_sensor_status_annunciation_status_reserved;
789 static int hf_btatt_cgm_sensor_status_annunciation_status_general_device_fault_has_occurred_in_the_sensor;
790 static int hf_btatt_cgm_sensor_status_annunciation_status_device_specific_alert;
791 static int hf_btatt_cgm_sensor_status_annunciation_status_sensor_malfunction;
792 static int hf_btatt_cgm_sensor_status_annunciation_status_sensor_type_incorrect_for_device;
793 static int hf_btatt_cgm_sensor_status_annunciation_status_device_battery_low;
794 static int hf_btatt_cgm_sensor_status_annunciation_status_session_stopped;
795 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp;
796 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp_reserved;
797 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_low_for_valid_test_result_at_time_of_measurement;
798 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_high_for_valid_test_result_at_time_of_measurement;
799 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_required;
800 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_recommended;
801 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_not_allowed;
802 static int hf_btatt_cgm_sensor_status_annunciation_cal_temp_time_synchronization_between_sensor_and_collector_required;
803 static int hf_btatt_cgm_sensor_status_annunciation_warning;
804 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_device_can_process;
805 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_device_can_process;
806 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_increase_exceeded;
807 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_decrease_exceeded;
808 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_hyper_level;
809 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_hypo_level;
810 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_patient_high_level;
811 static int hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_patient_low_level;
812 static int hf_btatt_cgm_measurement_trend_information;
813 static int hf_btatt_cgm_measurement_quality;
814 static int hf_btatt_cgm_e2e_crc;
815 static int hf_btatt_cgm_feature_feature;
816 static int hf_btatt_cgm_feature_feature_reserved;
817 static int hf_btatt_cgm_feature_feature_quality;
818 static int hf_btatt_cgm_feature_feature_trend_information;
819 static int hf_btatt_cgm_feature_feature_multiple_sessions;
820 static int hf_btatt_cgm_feature_feature_multiple_bond;
821 static int hf_btatt_cgm_feature_feature_e2e_crc;
822 static int hf_btatt_cgm_feature_feature_general_device_fault;
823 static int hf_btatt_cgm_feature_feature_sensor_type_error_detection;
824 static int hf_btatt_cgm_feature_feature_low_battery_detection;
825 static int hf_btatt_cgm_feature_feature_sensor_result_high_low_detection;
826 static int hf_btatt_cgm_feature_feature_sensor_temperature_high_low_detection;
827 static int hf_btatt_cgm_feature_feature_sensor_malfunction_detection;
828 static int hf_btatt_cgm_feature_feature_device_specific_alert;
829 static int hf_btatt_cgm_feature_feature_rate_of_increase_decrease_alerts;
830 static int hf_btatt_cgm_feature_feature_hyper_alerts;
831 static int hf_btatt_cgm_feature_feature_hypo_alerts;
832 static int hf_btatt_cgm_feature_feature_patient_high_low_alerts;
833 static int hf_btatt_cgm_feature_feature_calibration;
834 static int hf_btatt_cgm_type_and_sample_location;
835 static int hf_btatt_cgm_type;
836 static int hf_btatt_cgm_sample_location;
837 static int hf_btatt_cgm_time_offset;
838 static int hf_btatt_cgm_status;
839 static int hf_btatt_cgm_session_start_time;
840 static int hf_btatt_cgm_session_run_time;
841 static int hf_btatt_cgm_specific_ops_control_point_opcode;
842 static int hf_btatt_cgm_specific_ops_control_point_operand;
843 static int hf_btatt_cgm_specific_ops_control_point_operand_communication_interval;
844 static int hf_btatt_cgm_specific_ops_control_point_calibration_glucose_concentration;
845 static int hf_btatt_cgm_specific_ops_control_point_calibration_time;
846 static int hf_btatt_cgm_specific_ops_control_point_next_calibration_time;
847 static int hf_btatt_cgm_specific_ops_control_point_calibration_data_record_number;
848 static int hf_btatt_cgm_specific_ops_control_point_calibration_status;
849 static int hf_btatt_cgm_specific_ops_control_point_calibration_status_reserved;
850 static int hf_btatt_cgm_specific_ops_control_point_calibration_status_pending;
851 static int hf_btatt_cgm_specific_ops_control_point_calibration_status_out_of_range;
852 static int hf_btatt_cgm_specific_ops_control_point_calibration_status_rejected;
853 static int hf_btatt_cgm_specific_ops_control_point_operand_calibration_data_record_number;
854 static int hf_btatt_cgm_specific_ops_control_point_operand_alert_level;
855 static int hf_btatt_cgm_specific_ops_control_point_operand_alert_level_rate;
856 static int hf_btatt_cgm_specific_ops_control_point_request_opcode;
857 static int hf_btatt_cgm_specific_ops_control_point_response_code;
858 static int hf_btatt_uri;
859 static int hf_btatt_http_headers;
860 static int hf_btatt_http_status_code;
861 static int hf_btatt_http_data_status;
862 static int hf_btatt_http_data_status_reserved;
863 static int hf_btatt_http_data_status_body_truncated;
864 static int hf_btatt_http_data_status_body_received;
865 static int hf_btatt_http_data_status_headers_truncated;
866 static int hf_btatt_http_data_status_headers_received;
867 static int hf_btatt_http_entity_body;
868 static int hf_btatt_http_control_point_opcode;
869 static int hf_btatt_https_security;
870 static int hf_btatt_tds_opcode;
871 static int hf_btatt_tds_result_code;
872 static int hf_btatt_tds_organization_id;
873 static int hf_btatt_tds_data;
874 static int hf_btatt_ots_feature_oacp;
875 static int hf_btatt_ots_feature_oacp_reserved;
876 static int hf_btatt_ots_feature_oacp_abort;
877 static int hf_btatt_ots_feature_oacp_patching_of_object;
878 static int hf_btatt_ots_feature_oacp_truncation_of_objects;
879 static int hf_btatt_ots_feature_oacp_appending_additional_data_to_object;
880 static int hf_btatt_ots_feature_oacp_write;
881 static int hf_btatt_ots_feature_oacp_read;
882 static int hf_btatt_ots_feature_oacp_execute;
883 static int hf_btatt_ots_feature_oacp_calculate_checksum;
884 static int hf_btatt_ots_feature_oacp_delete;
885 static int hf_btatt_ots_feature_oacp_create;
886 static int hf_btatt_ots_feature_olcp;
887 static int hf_btatt_ots_feature_olcp_reserved;
888 static int hf_btatt_ots_feature_olcp_clear_marking;
889 static int hf_btatt_ots_feature_olcp_request_number_of_objects;
890 static int hf_btatt_ots_feature_olcp_order;
891 static int hf_btatt_ots_feature_olcp_go_to;
892 static int hf_btatt_ots_object_name;
893 static int hf_btatt_ots_current_size;
894 static int hf_btatt_ots_allocated_size;
895 static int hf_btatt_ots_object_id;
896 static int hf_btatt_ots_properties;
897 static int hf_btatt_ots_properties_reserved;
898 static int hf_btatt_ots_properties_mark;
899 static int hf_btatt_ots_properties_patch;
900 static int hf_btatt_ots_properties_truncate;
901 static int hf_btatt_ots_properties_append;
902 static int hf_btatt_ots_properties_write;
903 static int hf_btatt_ots_properties_read;
904 static int hf_btatt_ots_properties_execute;
905 static int hf_btatt_ots_properties_delete;
906 static int hf_btatt_ots_flags;
907 static int hf_btatt_ots_flags_reserved;
908 static int hf_btatt_ots_flags_object_deletion;
909 static int hf_btatt_ots_flags_object_creation;
910 static int hf_btatt_ots_flags_change_occurred_to_the_object_metadata;
911 static int hf_btatt_ots_flags_change_occurred_to_the_object_contents;
912 static int hf_btatt_ots_flags_source_of_change;
913 static int hf_btatt_ots_action_opcode;
914 static int hf_btatt_ots_size;
915 static int hf_btatt_ots_offset;
916 static int hf_btatt_ots_length;
917 static int hf_btatt_ots_execute_data;
918 static int hf_btatt_ots_action_response_opcode;
919 static int hf_btatt_ots_action_result_code;
920 static int hf_btatt_ots_checksum;
921 static int hf_btatt_ots_list_opcode;
922 static int hf_btatt_ots_list_order;
923 static int hf_btatt_ots_list_response_opcode;
924 static int hf_btatt_ots_list_result_code;
925 static int hf_btatt_ots_list_total_number_of_objects;
926 static int hf_btatt_ots_filter;
927 static int hf_btatt_ots_name_string;
928 static int hf_btatt_ots_size_from;
929 static int hf_btatt_ots_size_to;
930 static int hf_btatt_ots_object_first_created;
931 static int hf_btatt_ots_object_last_modified;
932 static int hf_btatt_plx_spot_check_measurement_flags;
933 static int hf_btatt_plx_spot_check_measurement_flags_reserved;
934 static int hf_btatt_plx_spot_check_measurement_flags_device_clock_is_not_set;
935 static int hf_btatt_plx_spot_check_measurement_flags_pulse_amplitude_index;
936 static int hf_btatt_plx_spot_check_measurement_flags_device_and_sensor_status;
937 static int hf_btatt_plx_spot_check_measurement_flags_measurement_status;
938 static int hf_btatt_plx_spot_check_measurement_flags_timestamp;
939 static int hf_btatt_plx_spo2;
940 static int hf_btatt_plx_pulse_rate;
941 static int hf_btatt_plx_spot_check_measurement_timestamp;
942 static int hf_btatt_plx_measurement_status;
943 static int hf_btatt_plx_measurement_status_invalid_measurement_detected;
944 static int hf_btatt_plx_measurement_status_questionable_measurement_detected;
945 static int hf_btatt_plx_measurement_status_measurement_unavailable;
946 static int hf_btatt_plx_measurement_status_calibration_ongoing;
947 static int hf_btatt_plx_measurement_status_data_for_testing;
948 static int hf_btatt_plx_measurement_status_data_for_demonstration;
949 static int hf_btatt_plx_measurement_status_data_from_measurement_storage;
950 static int hf_btatt_plx_measurement_status_fully_qualified_data;
951 static int hf_btatt_plx_measurement_status_validated_data;
952 static int hf_btatt_plx_measurement_status_early_estimated_data;
953 static int hf_btatt_plx_measurement_status_measurement_ongoing;
954 static int hf_btatt_plx_measurement_status_reserved;
955 static int hf_btatt_plx_device_and_sensor_status;
956 static int hf_btatt_plx_device_and_sensor_status_reserved;
957 static int hf_btatt_plx_device_and_sensor_status_sensor_disconnected;
958 static int hf_btatt_plx_device_and_sensor_status_sensor_malfunctioning;
959 static int hf_btatt_plx_device_and_sensor_status_sensor_displaced;
960 static int hf_btatt_plx_device_and_sensor_status_unknown_sensor_connected;
961 static int hf_btatt_plx_device_and_sensor_status_sensor_unconnected_to_user;
962 static int hf_btatt_plx_device_and_sensor_status_sensor_interference_detected;
963 static int hf_btatt_plx_device_and_sensor_status_signal_analysis_ongoing;
964 static int hf_btatt_plx_device_and_sensor_status_questionable_pulse_detected;
965 static int hf_btatt_plx_device_and_sensor_status_non_pulsatile_signal_detected;
966 static int hf_btatt_plx_device_and_sensor_status_erratic_signal_detected;
967 static int hf_btatt_plx_device_and_sensor_status_low_perfusion_detected;
968 static int hf_btatt_plx_device_and_sensor_status_poor_signal_detected;
969 static int hf_btatt_plx_device_and_sensor_status_inadequate_signal_detected;
970 static int hf_btatt_plx_device_and_sensor_status_signal_processing_irregularity_detected;
971 static int hf_btatt_plx_device_and_sensor_status_equipment_malfunction_detected;
972 static int hf_btatt_plx_device_and_sensor_status_extended_display_update_ongoing;
973 static int hf_btatt_plx_pulse_amplitude_index;
974 static int hf_btatt_plx_spo2pr_spot_check;
975 static int hf_btatt_plx_spo2pr_normal;
976 static int hf_btatt_plx_spo2pr_fast;
977 static int hf_btatt_plx_spo2pr_slow;
978 static int hf_btatt_plx_continuous_measurement_flags;
979 static int hf_btatt_plx_continuous_measurement_flags_reserved;
980 static int hf_btatt_plx_continuous_measurement_flags_pulse_amplitude_index;
981 static int hf_btatt_plx_continuous_measurement_flags_device_and_sensor_status;
982 static int hf_btatt_plx_continuous_measurement_flags_measurement_status;
983 static int hf_btatt_plx_continuous_measurement_flags_spo2pr_slow;
984 static int hf_btatt_plx_continuous_measurement_flags_spo2pr_fast;
985 static int hf_btatt_plx_features_supported_features;
986 static int hf_btatt_plx_features_supported_features_reserved;
987 static int hf_btatt_plx_features_supported_features_multiple_bonds;
988 static int hf_btatt_plx_features_supported_features_pulse_amplitude_index;
989 static int hf_btatt_plx_features_supported_features_spo2pr_slow;
990 static int hf_btatt_plx_features_supported_features_spo2pr_fast;
991 static int hf_btatt_plx_features_supported_features_timestamp_storage_for_spot_check;
992 static int hf_btatt_plx_features_supported_features_measurement_storage_for_spot_check;
993 static int hf_btatt_plx_features_supported_features_device_and_sensor_status;
994 static int hf_btatt_plx_features_supported_features_measurement_status;
995 static int hf_btatt_regulatory_certification_data_list_count;
996 static int hf_btatt_regulatory_certification_data_list_length;
997 static int hf_btatt_regulatory_certification_data_list_item;
998 static int hf_btatt_regulatory_certification_data_list_item_body;
999 static int hf_btatt_regulatory_certification_data_list_item_body_structure_type;
1000 static int hf_btatt_regulatory_certification_data_list_item_body_structure_length;
1001 static int hf_btatt_regulatory_certification_data_list_item_authorizing_body_data;
1002 static int hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_major_ig_version;
1003 static int hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_minor_ig_version;
1004 static int hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_count;
1005 static int hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_length;
1006 static int hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list;
1007 static int hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certified_device_class;
1008 static int hf_btatt_regulatory_certification_data_list_item_regulation_bit_field_type;
1009 static int hf_btatt_regulatory_certification_data_list_item_data;
1010 static int hf_btatt_timezone_information;
1011 static int hf_btatt_timezone_information_information;
1012 static int hf_btatt_timezone_information_information_type;
1013 static int hf_gatt_nordic_uart_tx;
1014 static int hf_gatt_nordic_uart_rx;
1015 static int hf_gatt_nordic_dfu_packet;
1016 static int hf_gatt_nordic_dfu_control_point_opcode;
1017 static int hf_gatt_nordic_dfu_control_point_init_packet;
1018 static int hf_gatt_nordic_dfu_control_point_number_of_bytes;
1019 static int hf_gatt_nordic_dfu_control_point_image_type;
1020 static int hf_gatt_nordic_dfu_control_point_number_of_packets;
1021 static int hf_gatt_nordic_dfu_control_point_request_opcode;
1022 static int hf_gatt_nordic_dfu_control_point_response_value;
1023 static int hf_gatt_microbit_accelerometer_data;
1024 static int hf_gatt_microbit_accelerometer_x;
1025 static int hf_gatt_microbit_accelerometer_y;
1026 static int hf_gatt_microbit_accelerometer_z;
1027 static int hf_gatt_microbit_accelerometer_period;
1028 static int hf_gatt_microbit_magnetometer_data;
1029 static int hf_gatt_microbit_magnetometer_x;
1030 static int hf_gatt_microbit_magnetometer_y;
1031 static int hf_gatt_microbit_magnetometer_z;
1032 static int hf_gatt_microbit_magnetometer_period;
1033 static int hf_gatt_microbit_magnetometer_bearing;
1034 static int hf_gatt_microbit_button_a_state;
1035 static int hf_gatt_microbit_button_b_state;
1036 static int hf_gatt_microbit_pin_data;
1037 static int hf_gatt_microbit_pin_number;
1038 static int hf_gatt_microbit_pin_value;
1039 static int hf_gatt_microbit_pin_ad_config;
1040 static int hf_gatt_microbit_ad_pin0;
1041 static int hf_gatt_microbit_ad_pin1;
1042 static int hf_gatt_microbit_ad_pin2;
1043 static int hf_gatt_microbit_ad_pin3;
1044 static int hf_gatt_microbit_ad_pin4;
1045 static int hf_gatt_microbit_ad_pin5;
1046 static int hf_gatt_microbit_ad_pin6;
1047 static int hf_gatt_microbit_ad_pin7;
1048 static int hf_gatt_microbit_ad_pin8;
1049 static int hf_gatt_microbit_ad_pin9;
1050 static int hf_gatt_microbit_ad_pin10;
1051 static int hf_gatt_microbit_ad_pin11;
1052 static int hf_gatt_microbit_ad_pin12;
1053 static int hf_gatt_microbit_ad_pin13;
1054 static int hf_gatt_microbit_ad_pin14;
1055 static int hf_gatt_microbit_ad_pin15;
1056 static int hf_gatt_microbit_ad_pin16;
1057 static int hf_gatt_microbit_ad_pin17;
1058 static int hf_gatt_microbit_ad_pin18;
1059 static int hf_gatt_microbit_ad_pin19;
1060 static int hf_gatt_microbit_pin_io_config;
1061 static int hf_gatt_microbit_io_pin0;
1062 static int hf_gatt_microbit_io_pin1;
1063 static int hf_gatt_microbit_io_pin2;
1064 static int hf_gatt_microbit_io_pin3;
1065 static int hf_gatt_microbit_io_pin4;
1066 static int hf_gatt_microbit_io_pin5;
1067 static int hf_gatt_microbit_io_pin6;
1068 static int hf_gatt_microbit_io_pin7;
1069 static int hf_gatt_microbit_io_pin8;
1070 static int hf_gatt_microbit_io_pin9;
1071 static int hf_gatt_microbit_io_pin10;
1072 static int hf_gatt_microbit_io_pin11;
1073 static int hf_gatt_microbit_io_pin12;
1074 static int hf_gatt_microbit_io_pin13;
1075 static int hf_gatt_microbit_io_pin14;
1076 static int hf_gatt_microbit_io_pin15;
1077 static int hf_gatt_microbit_io_pin16;
1078 static int hf_gatt_microbit_io_pin17;
1079 static int hf_gatt_microbit_io_pin18;
1080 static int hf_gatt_microbit_io_pin19;
1081 static int hf_gatt_microbit_pwm_control;
1082 static int hf_gatt_microbit_led_matrix;
1083 static int hf_gatt_microbit_led_text;
1084 static int hf_gatt_microbit_scrolling_delay;
1085 static int hf_gatt_microbit_microbit_requirements;
1086 static int hf_gatt_microbit_microbit_event;
1087 static int hf_gatt_microbit_client_requirements;
1088 static int hf_gatt_microbit_client_event;
1089 static int hf_gatt_microbit_dfu_control;
1090 static int hf_gatt_microbit_temperature_value;
1091 static int hf_gatt_microbit_temperature_period;
1092 static int hf_btatt_valid_range_lower_inclusive_value;
1093 static int hf_btatt_valid_range_upper_inclusive_value;
1094 static int hf_btatt_temperature_celsius;
1095 static int hf_btatt_temperature_fahrenheit;
1096 static int hf_btatt_removable;
1097 static int hf_btatt_removable_reserved;
1098 static int hf_btatt_removable_removable;
1099 static int hf_btatt_service_required;
1100 static int hf_btatt_service_required_reserved;
1101 static int hf_btatt_service_required_service_required;
1102 static int hf_btatt_scientific_temperature_celsius;
1103 static int hf_btatt_string;
1104 static int hf_btatt_network_availability;
1105 static int hf_btatt_fitness_machine_features;
1106 static int hf_btatt_fitness_machine_features_reserved;
1107 static int hf_btatt_fitness_machine_features_user_data_retention;
1108 static int hf_btatt_fitness_machine_features_force_on_belt_and_power_output;
1109 static int hf_btatt_fitness_machine_features_power_measurement;
1110 static int hf_btatt_fitness_machine_features_remaining_time;
1111 static int hf_btatt_fitness_machine_features_elapsed_time;
1112 static int hf_btatt_fitness_machine_features_metabolic_equivalent;
1113 static int hf_btatt_fitness_machine_features_heart_rate_measurement;
1114 static int hf_btatt_fitness_machine_features_expended_energy;
1115 static int hf_btatt_fitness_machine_features_stride_count;
1116 static int hf_btatt_fitness_machine_features_resistance_level;
1117 static int hf_btatt_fitness_machine_features_step_count;
1118 static int hf_btatt_fitness_machine_features_pace;
1119 static int hf_btatt_fitness_machine_features_elevation_gain;
1120 static int hf_btatt_fitness_machine_features_inclination;
1121 static int hf_btatt_fitness_machine_features_total_distance;
1122 static int hf_btatt_fitness_machine_features_cadence;
1123 static int hf_btatt_fitness_machine_features_average_speed;
1124 static int hf_btatt_target_setting_features;
1125 static int hf_btatt_target_setting_features_reserved;
1126 static int hf_btatt_target_setting_features_targeted_cadence_configuration;
1127 static int hf_btatt_target_setting_features_spin_down_control;
1128 static int hf_btatt_target_setting_features_wheel_circumference_configuration;
1129 static int hf_btatt_target_setting_features_indoor_bike_simulation_parameters;
1130 static int hf_btatt_target_setting_features_targeted_time_in_five_heart_rate_zones_configuration;
1131 static int hf_btatt_target_setting_features_targeted_time_in_three_heart_rate_zones_configuration;
1132 static int hf_btatt_target_setting_features_targeted_time_in_two_heart_rate_zones_configuration;
1133 static int hf_btatt_target_setting_features_targeted_training_time_configuration;
1134 static int hf_btatt_target_setting_features_targeted_distance_configuration;
1135 static int hf_btatt_target_setting_features_targeted_stride_number_configuration;
1136 static int hf_btatt_target_setting_features_targeted_step_number_configuration;
1137 static int hf_btatt_target_setting_features_targeted_expended_energy_configuration;
1138 static int hf_btatt_target_setting_features_heart_rate_target_setting;
1139 static int hf_btatt_target_setting_features_power_target_setting;
1140 static int hf_btatt_target_setting_features_resistance_target_setting;
1141 static int hf_btatt_target_setting_features_inclination_target_setting;
1142 static int hf_btatt_target_setting_features_speed_target_setting;
1143 static int hf_btatt_training_status_flags;
1144 static int hf_btatt_training_status_flags_reserved;
1145 static int hf_btatt_training_status_flags_extended_string;
1146 static int hf_btatt_training_status_flags_training_status_string;
1147 static int hf_btatt_training_status_status;
1148 static int hf_btatt_training_status_status_string;
1149 static int hf_btatt_supported_speed_range_minimum_speed;
1150 static int hf_btatt_supported_speed_range_maximum_speed;
1151 static int hf_btatt_supported_speed_range_minimum_increment;
1152 static int hf_btatt_supported_inclination_range_minimum_inclination;
1153 static int hf_btatt_supported_inclination_range_maximum_inclination;
1154 static int hf_btatt_supported_inclination_range_minimum_increment;
1155 static int hf_btatt_supported_resistance_level_range_minimum_resistance_level;
1156 static int hf_btatt_supported_resistance_level_range_maximum_resistance_level;
1157 static int hf_btatt_supported_resistance_level_range_minimum_increment;
1158 static int hf_btatt_supported_heart_rate_range_minimum_heart_rate;
1159 static int hf_btatt_supported_heart_rate_range_maximum_heart_rate;
1160 static int hf_btatt_supported_heart_rate_range_minimum_increment;
1161 static int hf_btatt_supported_power_range_minimum_power;
1162 static int hf_btatt_supported_power_range_maximum_power;
1163 static int hf_btatt_supported_power_range_minimum_increment;
1164 static int hf_btatt_fitness_machine_status_opcode;
1165 static int hf_btatt_fitness_machine_control_information;
1166 static int hf_btatt_fitness_machine_spin_down_status;
1167 static int hf_btatt_fitness_machine_speed;
1168 static int hf_btatt_fitness_machine_incline;
1169 static int hf_btatt_fitness_machine_resistance_level;
1170 static int hf_btatt_fitness_machine_power;
1171 static int hf_btatt_fitness_machine_heart_rate;
1172 static int hf_btatt_fitness_machine_expended_energy;
1173 static int hf_btatt_fitness_machine_number_of_steps;
1174 static int hf_btatt_fitness_machine_number_of_strides;
1175 static int hf_btatt_fitness_machine_distance;
1176 static int hf_btatt_fitness_machine_training_time;
1177 static int hf_btatt_fitness_machine_wheel_circumference;
1178 static int hf_btatt_fitness_machine_cadence;
1179 static int hf_btatt_fitness_machine_wind_speed;
1180 static int hf_btatt_fitness_machine_grade;
1181 static int hf_btatt_fitness_machine_coefficient_of_rolling_resistance;
1182 static int hf_btatt_fitness_machine_wind_resistance_coefficient;
1183 static int hf_btatt_fitness_machine_targeted_time_in_fat_burn_zone;
1184 static int hf_btatt_fitness_machine_targeted_time_in_fitness_zone;
1185 static int hf_btatt_fitness_machine_targeted_time_in_very_light_zone;
1186 static int hf_btatt_fitness_machine_targeted_time_in_light_zone;
1187 static int hf_btatt_fitness_machine_targeted_time_in_moderate_zone;
1188 static int hf_btatt_fitness_machine_targeted_time_in_hard_zone;
1189 static int hf_btatt_fitness_machine_targeted_time_in_maximum_zone;
1190 static int hf_btatt_volume_setting;
1191 static int hf_btatt_volume_mute;
1192 static int hf_btatt_volume_change_counter;
1193 static int hf_btatt_volume_control_point_procedure;
1194 static int hf_btatt_volume_flags;
1196 static int hf_request_in_frame;
1197 static int hf_response_in_frame;
1199 static int btatt_tap_handles = -1;
1201 static int * const hfx_btatt_opcode[] = {
1202 &hf_btatt_opcode_authentication_signature,
1203 &hf_btatt_opcode_command,
1204 &hf_btatt_opcode_method,
1205 NULL
1208 static int * const hfx_btatt_characteristic_properties[] = {
1209 &hf_btatt_characteristic_properties_extended_properties,
1210 &hf_btatt_characteristic_properties_authenticated_signed_writes,
1211 &hf_btatt_characteristic_properties_indicate,
1212 &hf_btatt_characteristic_properties_notify,
1213 &hf_btatt_characteristic_properties_write,
1214 &hf_btatt_characteristic_properties_write_without_response,
1215 &hf_btatt_characteristic_properties_read,
1216 &hf_btatt_characteristic_properties_broadcast,
1217 NULL
1220 static int * const hfx_btatt_characteristic_configuration_client[] = {
1221 &hf_btatt_characteristic_configuration_client_reserved,
1222 &hf_btatt_characteristic_configuration_client_indication,
1223 &hf_btatt_characteristic_configuration_client_notification,
1224 NULL
1227 static int * const hfx_btatt_characteristic_configuration_server[] = {
1228 &hf_btatt_characteristic_configuration_server_reserved,
1229 &hf_btatt_characteristic_configuration_server_broadcast,
1230 NULL
1233 static int * const hfx_btatt_hogp_flags[] = {
1234 &hf_btatt_hogp_flags_reserved,
1235 &hf_btatt_hogp_flags_normally_connectable,
1236 &hf_btatt_hogp_flags_remote_wake,
1237 NULL
1240 static int * const hfx_btatt_characteristic_extended_properties[] = {
1241 &hf_btatt_characteristic_extended_properties_reserved,
1242 &hf_btatt_characteristic_extended_properties_writable_auxiliaries,
1243 &hf_btatt_characteristic_extended_properties_reliable_write,
1244 NULL
1247 static int * const hfx_btatt_appearance[] = {
1248 &hf_btatt_appearance_category,
1249 &hf_btatt_appearance_subcategory,
1250 NULL
1253 static int * const hfx_btatt_appearance_watch[] = {
1254 &hf_btatt_appearance_category,
1255 &hf_btatt_appearance_subcategory_watch,
1256 NULL
1259 static int * const hfx_btatt_appearance_thermometer[] = {
1260 &hf_btatt_appearance_category,
1261 &hf_btatt_appearance_subcategory_thermometer,
1262 NULL
1265 static int * const hfx_btatt_appearance_heart_rate[] = {
1266 &hf_btatt_appearance_category,
1267 &hf_btatt_appearance_subcategory_heart_rate,
1268 NULL
1271 static int * const hfx_btatt_appearance_blood_pressure[] = {
1272 &hf_btatt_appearance_category,
1273 &hf_btatt_appearance_subcategory_blood_pressure,
1274 NULL
1277 static int * const hfx_btatt_appearance_hid[] = {
1278 &hf_btatt_appearance_category,
1279 &hf_btatt_appearance_subcategory_hid,
1280 NULL
1283 static int * const hfx_btatt_appearance_running_walking_sensor[] = {
1284 &hf_btatt_appearance_category,
1285 &hf_btatt_appearance_subcategory_running_walking_sensor,
1286 NULL
1289 static int * const hfx_btatt_appearance_cycling[] = {
1290 &hf_btatt_appearance_category,
1291 &hf_btatt_appearance_subcategory_cycling,
1292 NULL
1295 static int * const hfx_btatt_appearance_pulse_oximeter[] = {
1296 &hf_btatt_appearance_category,
1297 &hf_btatt_appearance_subcategory_pulse_oximeter,
1298 NULL
1301 static int * const hfx_btatt_appearance_personal_mobility_device[] = {
1302 &hf_btatt_appearance_category,
1303 &hf_btatt_appearance_subcategory_personal_mobility_device,
1304 NULL
1307 static int * const hfx_btatt_appearance_insulin_pump[] = {
1308 &hf_btatt_appearance_category,
1309 &hf_btatt_appearance_subcategory_insulin_pump,
1310 NULL
1313 static int * const hfx_btatt_appearance_outdoor_sports_activity[] = {
1314 &hf_btatt_appearance_category,
1315 &hf_btatt_appearance_subcategory_outdoor_sports_activity,
1316 NULL
1319 static int * const hfx_btatt_time_adjust_reason[] = {
1320 &hf_btatt_time_adjust_reason_reserved,
1321 &hf_btatt_time_adjust_reason_change_of_dst,
1322 &hf_btatt_time_adjust_reason_change_of_timezone,
1323 &hf_btatt_time_adjust_reason_external_reference_time_update,
1324 &hf_btatt_time_adjust_reason_manual_time_update,
1325 NULL
1328 static int * const hfx_btatt_alert_status[] = {
1329 &hf_btatt_alert_status_reserved,
1330 &hf_btatt_alert_status_display_alert_status,
1331 &hf_btatt_alert_status_vibrate_state,
1332 &hf_btatt_alert_status_ringer_state,
1333 NULL
1336 static int * const hfx_btatt_alert_category_id_bitmask_1[] = {
1337 &hf_btatt_alert_category_id_bitmask_1_schedule,
1338 &hf_btatt_alert_category_id_bitmask_1_voice_mail,
1339 &hf_btatt_alert_category_id_bitmask_1_sms_mms,
1340 &hf_btatt_alert_category_id_bitmask_1_missed_call,
1341 &hf_btatt_alert_category_id_bitmask_1_call,
1342 &hf_btatt_alert_category_id_bitmask_1_news,
1343 &hf_btatt_alert_category_id_bitmask_1_email,
1344 &hf_btatt_alert_category_id_bitmask_1_simple_alert,
1345 NULL
1348 static int * const hfx_btatt_alert_category_id_bitmask_2[] = {
1349 &hf_btatt_alert_category_id_bitmask_2_reserved,
1350 &hf_btatt_alert_category_id_bitmask_2_instant_message,
1351 &hf_btatt_alert_category_id_bitmask_2_high_prioritized_alert,
1352 NULL
1355 static int * const hfx_btatt_blood_pressure_feature[] = {
1356 &hf_btatt_blood_pressure_feature_reserved,
1357 &hf_btatt_blood_pressure_feature_multiple_bond,
1358 &hf_btatt_blood_pressure_feature_measurement_position_detection,
1359 &hf_btatt_blood_pressure_feature_puls_rate_range,
1360 &hf_btatt_blood_pressure_feature_irregular_pulse_detection,
1361 &hf_btatt_blood_pressure_feature_cuff_fit_detection,
1362 &hf_btatt_blood_pressure_feature_body_movement_detection,
1363 NULL
1366 static int * const hfx_btatt_glucose_feature[] = {
1367 &hf_btatt_glucose_feature_reserved,
1368 &hf_btatt_glucose_feature_multiple_bond,
1369 &hf_btatt_glucose_feature_time_fault,
1370 &hf_btatt_glucose_feature_general_device_fault,
1371 &hf_btatt_glucose_feature_sensor_read_interrupt_detection,
1372 &hf_btatt_glucose_feature_sensor_temperature_high_low_detection,
1373 &hf_btatt_glucose_feature_sensor_result_high_low_detection,
1374 &hf_btatt_glucose_feature_sensor_strip_type_error_detection,
1375 &hf_btatt_glucose_feature_sensor_strip_insertion_error_detection,
1376 &hf_btatt_glucose_feature_sensor_sample_size,
1377 &hf_btatt_glucose_feature_sensor_malfunction_detection,
1378 &hf_btatt_glucose_feature_low_battery_detection_during_measurement,
1379 NULL
1382 static int * const hfx_btatt_rsc_feature[] = {
1383 &hf_btatt_rsc_feature_reserved,
1384 &hf_btatt_rsc_feature_multiple_sensor_locations,
1385 &hf_btatt_rsc_feature_calibration_procedure,
1386 &hf_btatt_rsc_feature_walking_or_running_status,
1387 &hf_btatt_rsc_feature_total_distance_measurement,
1388 &hf_btatt_rsc_feature_instantaneous_stride_length_measurement,
1389 NULL
1392 static int * const hfx_btatt_csc_feature[] = {
1393 &hf_btatt_csc_feature_reserved,
1394 &hf_btatt_csc_feature_multiple_sensor_locations,
1395 &hf_btatt_csc_feature_crank_revolution_data,
1396 &hf_btatt_csc_feature_wheel_revolution_data,
1397 NULL
1400 static int * const hfx_btatt_descriptor_value_changed_flags[] = {
1401 &hf_btatt_descriptor_value_changed_flags_reserved,
1402 &hf_btatt_descriptor_value_changed_flags_change_to_characteristic_user_description_descriptor,
1403 &hf_btatt_descriptor_value_changed_flags_change_to_es_measurement_descriptor,
1404 &hf_btatt_descriptor_value_changed_flags_change_to_es_configuration_descriptor,
1405 &hf_btatt_descriptor_value_changed_flags_change_to_one_or_more_es_trigger_setting_descriptors,
1406 &hf_btatt_descriptor_value_changed_flags_source_of_change,
1407 NULL
1410 static int * const hfx_btatt_cycling_power_feature[] = {
1411 &hf_btatt_cycling_power_feature_reserved,
1412 &hf_btatt_cycling_power_feature_factory_calibration_date,
1413 &hf_btatt_cycling_power_feature_instantaneous_measurement_direction,
1414 &hf_btatt_cycling_power_feature_sensor_measurement_context,
1415 &hf_btatt_cycling_power_feature_span_length_adjustment,
1416 &hf_btatt_cycling_power_feature_chain_weight_adjustment,
1417 &hf_btatt_cycling_power_feature_chain_length_adjustment,
1418 &hf_btatt_cycling_power_feature_crank_length_adjustment,
1419 &hf_btatt_cycling_power_feature_multiple_sensor_locations,
1420 &hf_btatt_cycling_power_feature_cycling_power_measurement_characteristic_content_masking,
1421 &hf_btatt_cycling_power_feature_offset_compensation,
1422 &hf_btatt_cycling_power_feature_offset_compensation_indicator,
1423 &hf_btatt_cycling_power_feature_accumulated_energy,
1424 &hf_btatt_cycling_power_feature_top_and_bottom_dead_spot_angles,
1425 &hf_btatt_cycling_power_feature_extreme_angles,
1426 &hf_btatt_cycling_power_feature_extreme_magnitudes,
1427 &hf_btatt_cycling_power_feature_crank_revolution_data,
1428 &hf_btatt_cycling_power_feature_wheel_revolution_data,
1429 &hf_btatt_cycling_power_feature_accumulated_torque,
1430 &hf_btatt_cycling_power_feature_pedal_power_balance,
1431 NULL
1434 static int * const hfx_btatt_ln_feature[] = {
1435 &hf_btatt_ln_feature_reserved,
1436 &hf_btatt_ln_feature_position_status,
1437 &hf_btatt_ln_feature_elevation_setting,
1438 &hf_btatt_ln_feature_fix_rate_setting,
1439 &hf_btatt_ln_feature_location_and_speed_characteristic_content_masking,
1440 &hf_btatt_ln_feature_vertical_dilution_of_precision,
1441 &hf_btatt_ln_feature_horizontal_dilution_of_precision,
1442 &hf_btatt_ln_feature_estimated_vertical_position_error,
1443 &hf_btatt_ln_feature_estimated_horizontal_position_error,
1444 &hf_btatt_ln_feature_time_to_first_fix,
1445 &hf_btatt_ln_feature_number_of_beacons_in_view,
1446 &hf_btatt_ln_feature_number_of_beacons_in_solution,
1447 &hf_btatt_ln_feature_estimated_time_of_arrival,
1448 &hf_btatt_ln_feature_remaining_vertical_distance,
1449 &hf_btatt_ln_feature_remaining_distance,
1450 &hf_btatt_ln_feature_utc_time,
1451 &hf_btatt_ln_feature_rolling_time,
1452 &hf_btatt_ln_feature_heading,
1453 &hf_btatt_ln_feature_elevation,
1454 &hf_btatt_ln_feature_location,
1455 &hf_btatt_ln_feature_total_distance,
1456 &hf_btatt_ln_feature_instantaneous_speed,
1457 NULL
1460 static int * const hfx_btatt_body_composition_feature[] = {
1461 &hf_btatt_body_composition_feature_reserved,
1462 &hf_btatt_body_composition_feature_height_measurement_resolution,
1463 &hf_btatt_body_composition_feature_mass_measurement_resolution,
1464 &hf_btatt_body_composition_feature_height,
1465 &hf_btatt_body_composition_feature_weight,
1466 &hf_btatt_body_composition_feature_impedance,
1467 &hf_btatt_body_composition_feature_body_water_mass,
1468 &hf_btatt_body_composition_feature_soft_lean_mass,
1469 &hf_btatt_body_composition_feature_fat_free_mass,
1470 &hf_btatt_body_composition_feature_muscle_mass,
1471 &hf_btatt_body_composition_feature_muscle_percentage,
1472 &hf_btatt_body_composition_feature_basal_metabolism,
1473 &hf_btatt_body_composition_feature_multiple_users,
1474 &hf_btatt_body_composition_feature_timestamp,
1475 NULL
1478 static int * const hfx_btatt_weight_scale_feature[] = {
1479 &hf_btatt_weight_scale_feature_reserved,
1480 &hf_btatt_weight_scale_feature_height_measurement_resolution,
1481 &hf_btatt_weight_scale_feature_weight_measurement_resolution,
1482 &hf_btatt_weight_scale_feature_bmi,
1483 &hf_btatt_weight_scale_feature_multiple_users,
1484 &hf_btatt_weight_scale_feature_timestamp,
1485 NULL
1488 static int * const hfx_btatt_glucose_measurement_flags[] = {
1489 &hf_btatt_glucose_measurement_flags_reserved,
1490 &hf_btatt_glucose_measurement_flags_context_information_follows,
1491 &hf_btatt_glucose_measurement_flags_sensor_status_annunciation_present,
1492 &hf_btatt_glucose_measurement_flags_glucose_concentration_units,
1493 &hf_btatt_glucose_measurement_flags_glucose_concentration_type_and_sample_location_present,
1494 &hf_btatt_glucose_measurement_flags_time_offset_present,
1495 NULL
1498 static int * const hfx_btatt_glucose_measurement_type_and_sample_location[] = {
1499 &hf_btatt_glucose_measurement_type_and_sample_location_type,
1500 &hf_btatt_glucose_measurement_type_and_sample_location_sample_location,
1501 NULL
1504 static int * const hfx_btatt_glucose_measurement_sensor_status_annunciation[] = {
1505 &hf_btatt_glucose_measurement_sensor_status_annunciation_reserved,
1506 &hf_btatt_glucose_measurement_sensor_status_annunciation_time_fault,
1507 &hf_btatt_glucose_measurement_sensor_status_annunciation_general_fault,
1508 &hf_btatt_glucose_measurement_sensor_status_annunciation_read_interrupted,
1509 &hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_low,
1510 &hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_high,
1511 &hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_low,
1512 &hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_high,
1513 &hf_btatt_glucose_measurement_sensor_status_annunciation_strip_type_incorrect,
1514 &hf_btatt_glucose_measurement_sensor_status_annunciation_strip_insertion_error,
1515 &hf_btatt_glucose_measurement_sensor_status_annunciation_size_insufficient,
1516 &hf_btatt_glucose_measurement_sensor_status_annunciation_fault,
1517 &hf_btatt_glucose_measurement_sensor_status_annunciation_battery_low,
1518 NULL
1521 static int * const hfx_btatt_bond_management_feature[] = {
1522 &hf_btatt_bond_management_feature_feature_extension,
1523 &hf_btatt_bond_management_feature_reserved,
1524 &hf_btatt_bond_management_feature_identify_yourself,
1525 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_9,
1526 &hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_le_transport_only_server,
1527 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_8,
1528 &hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_transport_only_server,
1529 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_7,
1530 &hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_and_le_server,
1531 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_6,
1532 &hf_btatt_bond_management_feature_remove_all_bonds_on_le_transport_only_server,
1533 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_5,
1534 &hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_transport_only_server,
1535 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_4,
1536 &hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_and_le_server,
1537 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_3,
1538 &hf_btatt_bond_management_feature_delete_bond_of_current_le_transport_only_connection,
1539 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_2,
1540 &hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_transport_only_connection,
1541 &hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_1,
1542 &hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_and_le_connection,
1543 NULL
1546 static int * const hfx_btatt_bond_management_feature_nth[] = {
1547 &hf_btatt_bond_management_feature_nth_feature_extension,
1548 &hf_btatt_bond_management_feature_nth_reserved,
1549 NULL
1552 static int * const hfx_btatt_temperature_measurement_flags[] = {
1553 &hf_btatt_temperature_measurement_flags_reserved,
1554 &hf_btatt_temperature_measurement_flags_temperature_type,
1555 &hf_btatt_temperature_measurement_flags_timestamp,
1556 &hf_btatt_temperature_measurement_flags_temperature_unit,
1557 NULL
1560 static int * const hfx_btatt_glucose_measurement_context_flags[] = {
1561 &hf_btatt_glucose_measurement_context_flags_extended_flags,
1562 &hf_btatt_glucose_measurement_context_flags_hba1c,
1563 &hf_btatt_glucose_measurement_context_flags_medication_value_units,
1564 &hf_btatt_glucose_measurement_context_flags_medication_id_and_medication,
1565 &hf_btatt_glucose_measurement_context_flags_exercise_duration_and_exercise_intensity,
1566 &hf_btatt_glucose_measurement_context_flags_tester_health,
1567 &hf_btatt_glucose_measurement_context_flags_meal,
1568 &hf_btatt_glucose_measurement_context_flags_carbohydrate_id_and_carbohydrate,
1569 NULL
1572 static int * const hfx_btatt_glucose_measurement_context_extended_flags[] = {
1573 &hf_btatt_glucose_measurement_context_extended_flags_reserved,
1574 NULL
1577 static int * const hfx_btatt_glucose_measurement_context_tester_health[] = {
1578 &hf_btatt_glucose_measurement_context_tester,
1579 &hf_btatt_glucose_measurement_context_health,
1580 NULL
1583 static int * const hfx_btatt_blood_pressure_measurement_flags[] = {
1584 &hf_btatt_blood_pressure_measurement_flags_reserved,
1585 &hf_btatt_blood_pressure_measurement_flags_measurement_status,
1586 &hf_btatt_blood_pressure_measurement_flags_user_id,
1587 &hf_btatt_blood_pressure_measurement_flags_pulse_rate,
1588 &hf_btatt_blood_pressure_measurement_flags_timestamp,
1589 &hf_btatt_blood_pressure_measurement_flags_unit,
1590 NULL
1593 static int * const hfx_btatt_blood_pressure_measurement_status[] = {
1594 &hf_btatt_blood_pressure_measurement_status_reserved,
1595 &hf_btatt_blood_pressure_measurement_status_improper_measurement_position,
1596 &hf_btatt_blood_pressure_measurement_status_pulse_rate_range_detection,
1597 &hf_btatt_blood_pressure_measurement_status_irregular_pulse,
1598 &hf_btatt_blood_pressure_measurement_status_cuff_fit_too_loose,
1599 &hf_btatt_blood_pressure_measurement_status_body_movement,
1600 NULL
1603 static int * const hfx_btatt_heart_rate_measurement_flags[] = {
1604 &hf_btatt_heart_rate_measurement_flags_reserved,
1605 &hf_btatt_heart_rate_measurement_flags_rr_interval,
1606 &hf_btatt_heart_rate_measurement_flags_energy_expended,
1607 &hf_btatt_heart_rate_measurement_flags_sensor_contact_status_support,
1608 &hf_btatt_heart_rate_measurement_flags_sensor_contact_status_contact,
1609 &hf_btatt_heart_rate_measurement_flags_value_16,
1610 NULL
1613 static int * const hfx_btatt_uncertainty[] = {
1614 &hf_btatt_uncertainty_reserved,
1615 &hf_btatt_uncertainty_precision,
1616 &hf_btatt_uncertainty_update_time,
1617 &hf_btatt_uncertainty_stationary,
1618 NULL
1621 static int * const hfx_btatt_indoor_positioning_configuration[] = {
1622 &hf_btatt_indoor_positioning_configuration_reserved,
1623 &hf_btatt_indoor_positioning_configuration_location_name,
1624 &hf_btatt_indoor_positioning_configuration_uncertainty,
1625 &hf_btatt_indoor_positioning_configuration_floor_number,
1626 &hf_btatt_indoor_positioning_configuration_altitude,
1627 &hf_btatt_indoor_positioning_configuration_tx_power,
1628 &hf_btatt_indoor_positioning_configuration_coordinate_system,
1629 &hf_btatt_indoor_positioning_configuration_coordinates,
1630 NULL
1633 static int * const hfx_btatt_rsc_measurement_flags[] = {
1634 &hf_btatt_rsc_measurement_flags_reserved,
1635 &hf_btatt_rsc_measurement_flags_type_of_movement,
1636 &hf_btatt_rsc_measurement_flags_total_distance_present,
1637 &hf_btatt_rsc_measurement_flags_instantaneous_stride_length_present,
1638 NULL
1641 static int * const hfx_btatt_cycling_power_measurement_flags[] = {
1642 &hf_btatt_cycling_power_measurement_flags_reserved,
1643 &hf_btatt_cycling_power_measurement_flags_offset_compensation_indicator,
1644 &hf_btatt_cycling_power_measurement_flags_accumulated_energy,
1645 &hf_btatt_cycling_power_measurement_flags_bottom_dead_spot_angle,
1646 &hf_btatt_cycling_power_measurement_flags_top_dead_spot_angle,
1647 &hf_btatt_cycling_power_measurement_flags_extreme_angles,
1648 &hf_btatt_cycling_power_measurement_flags_extreme_torque_magnitudes,
1649 &hf_btatt_cycling_power_measurement_flags_extreme_force_magnitudes,
1650 &hf_btatt_cycling_power_measurement_flags_crank_revolution_data,
1651 &hf_btatt_cycling_power_measurement_flags_wheel_revolution_data,
1652 &hf_btatt_cycling_power_measurement_flags_accumulated_torque_source,
1653 &hf_btatt_cycling_power_measurement_flags_accumulated_torque,
1654 &hf_btatt_cycling_power_measurement_flags_pedal_power_balance_reference,
1655 &hf_btatt_cycling_power_measurement_flags_pedal_power_balance,
1656 NULL
1659 static int * const hfx_btatt_cycling_power_measurement_extreme_angles[] = {
1660 &hf_btatt_cycling_power_measurement_extreme_angles_maximum,
1661 &hf_btatt_cycling_power_measurement_extreme_angles_minimum,
1662 NULL
1665 static int * const hfx_btatt_csc_measurement_flags[] = {
1666 &hf_btatt_csc_measurement_flags_reserved,
1667 &hf_btatt_csc_measurement_flags_crank_revolution_data,
1668 &hf_btatt_csc_measurement_flags_wheel_revolution_data,
1669 NULL
1672 static int * const hfx_btatt_cycling_power_vector_flags[] = {
1673 &hf_btatt_cycling_power_vector_flags_reserved,
1674 &hf_btatt_cycling_power_vector_flags_instantaneous_measurement_direction,
1675 &hf_btatt_cycling_power_vector_flags_instantaneous_torque_magnitude_array,
1676 &hf_btatt_cycling_power_vector_flags_instantaneous_force_magnitude_array,
1677 &hf_btatt_cycling_power_vector_flags_first_crank_measurement_angle,
1678 &hf_btatt_cycling_power_vector_flags_crank_revolution_data,
1679 NULL
1682 static int * const hfx_btatt_cycling_power_control_point_content_mask[] = {
1683 &hf_btatt_cycling_power_control_point_content_mask_reserved,
1684 &hf_btatt_cycling_power_control_point_content_mask_accumulated_energy,
1685 &hf_btatt_cycling_power_control_point_content_mask_bottom_dead_spot_angle,
1686 &hf_btatt_cycling_power_control_point_content_mask_top_dead_spot_angle,
1687 &hf_btatt_cycling_power_control_point_content_mask_extreme_angles,
1688 &hf_btatt_cycling_power_control_point_content_mask_extreme_magnitudes,
1689 &hf_btatt_cycling_power_control_point_content_mask_crank_revolution_data,
1690 &hf_btatt_cycling_power_control_point_content_mask_wheel_revolution_data,
1691 &hf_btatt_cycling_power_control_point_content_mask_accumulated_torque,
1692 &hf_btatt_cycling_power_control_point_content_mask_pedal_power_balance,
1693 NULL
1696 static int * const hfx_btatt_location_and_speed_flags[] = {
1697 &hf_btatt_location_and_speed_flags_reserved,
1698 &hf_btatt_location_and_speed_flags_heading_source,
1699 &hf_btatt_location_and_speed_flags_elevation_source,
1700 &hf_btatt_location_and_speed_flags_speed_and_distance_format,
1701 &hf_btatt_location_and_speed_flags_position_status,
1702 &hf_btatt_location_and_speed_flags_utc_time,
1703 &hf_btatt_location_and_speed_flags_rolling_time,
1704 &hf_btatt_location_and_speed_flags_heading,
1705 &hf_btatt_location_and_speed_flags_elevation,
1706 &hf_btatt_location_and_speed_flags_location,
1707 &hf_btatt_location_and_speed_flags_total_distance,
1708 &hf_btatt_location_and_speed_flags_instantaneous_speed,
1709 NULL
1712 static int * const hfx_btatt_navigation_flags[] = {
1713 &hf_btatt_navigation_flags_reserved,
1714 &hf_btatt_navigation_flags_destination_reached,
1715 &hf_btatt_navigation_flags_waypoint_reached,
1716 &hf_btatt_navigation_flags_navigation_indicator_type,
1717 &hf_btatt_navigation_flags_heading_source,
1718 &hf_btatt_navigation_flags_position_status,
1719 &hf_btatt_navigation_flags_estimated_time_of_arrival,
1720 &hf_btatt_navigation_flags_remaining_vertical_distance,
1721 &hf_btatt_navigation_flags_remaining_distance,
1722 NULL
1725 static int * const hfx_btatt_position_quality_flags[] = {
1726 &hf_btatt_position_quality_flags_reserved,
1727 &hf_btatt_position_quality_flags_position_status,
1728 &hf_btatt_position_quality_flags_vdop,
1729 &hf_btatt_position_quality_flags_hdop,
1730 &hf_btatt_position_quality_flags_evpe,
1731 &hf_btatt_position_quality_flags_ehpe,
1732 &hf_btatt_position_quality_flags_time_to_first_fix,
1733 &hf_btatt_position_quality_flags_number_of_beacons_in_view,
1734 &hf_btatt_position_quality_flags_number_of_beacons_in_solution,
1735 NULL
1738 static int * const hfx_btatt_ln_control_point_content_mask[] = {
1739 &hf_btatt_ln_control_point_content_mask_reserved,
1740 &hf_btatt_ln_control_point_content_mask_utc_time,
1741 &hf_btatt_ln_control_point_content_mask_rolling_time,
1742 &hf_btatt_ln_control_point_content_mask_heading,
1743 &hf_btatt_ln_control_point_content_mask_elevation,
1744 &hf_btatt_ln_control_point_content_mask_location,
1745 &hf_btatt_ln_control_point_content_mask_total_distance,
1746 &hf_btatt_ln_control_point_content_mask_instantaneous_speed,
1747 NULL
1750 static int * const hfx_btatt_body_composition_measurement_flags[] = {
1751 &hf_btatt_body_composition_measurement_flags_reserved,
1752 &hf_btatt_body_composition_measurement_flags_multiple_packet_measurement,
1753 &hf_btatt_body_composition_measurement_flags_height,
1754 &hf_btatt_body_composition_measurement_flags_weight,
1755 &hf_btatt_body_composition_measurement_flags_impedance,
1756 &hf_btatt_body_composition_measurement_flags_body_water_mass,
1757 &hf_btatt_body_composition_measurement_flags_soft_lean_mass,
1758 &hf_btatt_body_composition_measurement_flags_fat_free_mass,
1759 &hf_btatt_body_composition_measurement_flags_muscle_mass,
1760 &hf_btatt_body_composition_measurement_flags_muscle_percentage,
1761 &hf_btatt_body_composition_measurement_flags_basal_metabolism,
1762 &hf_btatt_body_composition_measurement_flags_user_id,
1763 &hf_btatt_body_composition_measurement_flags_timestamp,
1764 &hf_btatt_body_composition_measurement_flags_measurement_units,
1765 NULL
1768 static int * const hfx_btatt_weight_measurement_flags[] = {
1769 &hf_btatt_weight_measurement_flags_reserved,
1770 &hf_btatt_weight_measurement_flags_bmi_and_height,
1771 &hf_btatt_weight_measurement_flags_user_id,
1772 &hf_btatt_weight_measurement_flags_timestamp,
1773 &hf_btatt_weight_measurement_flags_measurement_units,
1774 NULL
1777 static int * const hfx_btatt_cgm_measurement_flags[] = {
1778 &hf_btatt_cgm_measurement_flags_cgm_trend_information,
1779 &hf_btatt_cgm_measurement_flags_cgm_quality,
1780 &hf_btatt_cgm_measurement_flags_reserved,
1781 &hf_btatt_cgm_measurement_flags_sensor_status_annunciation_warning,
1782 &hf_btatt_cgm_measurement_flags_sensor_status_annunciation_cal_temp,
1783 &hf_btatt_cgm_measurement_flags_sensor_status_annunciation_status,
1784 NULL
1787 static int * const hfx_btatt_cgm_sensor_status_annunciation_status[] = {
1788 &hf_btatt_cgm_sensor_status_annunciation_status_reserved,
1789 &hf_btatt_cgm_sensor_status_annunciation_status_general_device_fault_has_occurred_in_the_sensor,
1790 &hf_btatt_cgm_sensor_status_annunciation_status_device_specific_alert,
1791 &hf_btatt_cgm_sensor_status_annunciation_status_sensor_malfunction,
1792 &hf_btatt_cgm_sensor_status_annunciation_status_sensor_type_incorrect_for_device,
1793 &hf_btatt_cgm_sensor_status_annunciation_status_device_battery_low,
1794 &hf_btatt_cgm_sensor_status_annunciation_status_session_stopped,
1795 NULL
1798 static int * const hfx_btatt_cgm_sensor_status_annunciation_cal_temp[] = {
1799 &hf_btatt_cgm_sensor_status_annunciation_cal_temp_reserved,
1800 &hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_low_for_valid_test_result_at_time_of_measurement,
1801 &hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_high_for_valid_test_result_at_time_of_measurement,
1802 &hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_required,
1803 &hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_recommended,
1804 &hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_not_allowed,
1805 &hf_btatt_cgm_sensor_status_annunciation_cal_temp_time_synchronization_between_sensor_and_collector_required,
1806 NULL
1809 static int * const hfx_btatt_cgm_sensor_status_annunciation_warning[] = {
1810 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_device_can_process,
1811 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_device_can_process,
1812 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_increase_exceeded,
1813 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_decrease_exceeded,
1814 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_hyper_level,
1815 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_hypo_level,
1816 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_patient_high_level,
1817 &hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_patient_low_level,
1818 NULL
1821 static int * const hfx_btatt_cgm_feature_feature[] = {
1822 &hf_btatt_cgm_feature_feature_reserved,
1823 &hf_btatt_cgm_feature_feature_quality,
1824 &hf_btatt_cgm_feature_feature_trend_information,
1825 &hf_btatt_cgm_feature_feature_multiple_sessions,
1826 &hf_btatt_cgm_feature_feature_multiple_bond,
1827 &hf_btatt_cgm_feature_feature_e2e_crc,
1828 &hf_btatt_cgm_feature_feature_general_device_fault,
1829 &hf_btatt_cgm_feature_feature_sensor_type_error_detection,
1830 &hf_btatt_cgm_feature_feature_low_battery_detection,
1831 &hf_btatt_cgm_feature_feature_sensor_result_high_low_detection,
1832 &hf_btatt_cgm_feature_feature_sensor_temperature_high_low_detection,
1833 &hf_btatt_cgm_feature_feature_sensor_malfunction_detection,
1834 &hf_btatt_cgm_feature_feature_device_specific_alert,
1835 &hf_btatt_cgm_feature_feature_rate_of_increase_decrease_alerts,
1836 &hf_btatt_cgm_feature_feature_hyper_alerts,
1837 &hf_btatt_cgm_feature_feature_hypo_alerts,
1838 &hf_btatt_cgm_feature_feature_patient_high_low_alerts,
1839 &hf_btatt_cgm_feature_feature_calibration,
1840 NULL
1843 static int * const hfx_btatt_cgm_type_and_sample_location[] = {
1844 &hf_btatt_cgm_type,
1845 &hf_btatt_cgm_sample_location,
1846 NULL
1849 static int * const hfx_btatt_cgm_specific_ops_control_point_calibration_status[] = {
1850 &hf_btatt_cgm_specific_ops_control_point_calibration_status_reserved,
1851 &hf_btatt_cgm_specific_ops_control_point_calibration_status_pending,
1852 &hf_btatt_cgm_specific_ops_control_point_calibration_status_out_of_range,
1853 &hf_btatt_cgm_specific_ops_control_point_calibration_status_rejected,
1854 NULL
1857 static int * const hfx_btatt_http_data_status[] = {
1858 &hf_btatt_http_data_status_reserved,
1859 &hf_btatt_http_data_status_body_truncated,
1860 &hf_btatt_http_data_status_body_received,
1861 &hf_btatt_http_data_status_headers_truncated,
1862 &hf_btatt_http_data_status_headers_received,
1863 NULL
1866 static int * const hfx_btatt_ots_feature_oacp[] = {
1867 &hf_btatt_ots_feature_oacp_reserved,
1868 &hf_btatt_ots_feature_oacp_abort,
1869 &hf_btatt_ots_feature_oacp_patching_of_object,
1870 &hf_btatt_ots_feature_oacp_truncation_of_objects,
1871 &hf_btatt_ots_feature_oacp_appending_additional_data_to_object,
1872 &hf_btatt_ots_feature_oacp_write,
1873 &hf_btatt_ots_feature_oacp_read,
1874 &hf_btatt_ots_feature_oacp_execute,
1875 &hf_btatt_ots_feature_oacp_calculate_checksum,
1876 &hf_btatt_ots_feature_oacp_delete,
1877 &hf_btatt_ots_feature_oacp_create,
1878 NULL
1881 static int * const hfx_btatt_ots_feature_olcp[] = {
1882 &hf_btatt_ots_feature_olcp_reserved,
1883 &hf_btatt_ots_feature_olcp_clear_marking,
1884 &hf_btatt_ots_feature_olcp_request_number_of_objects,
1885 &hf_btatt_ots_feature_olcp_order,
1886 &hf_btatt_ots_feature_olcp_go_to,
1887 NULL
1890 static int * const hfx_btatt_ots_properties[] = {
1891 &hf_btatt_ots_properties_reserved,
1892 &hf_btatt_ots_properties_mark,
1893 &hf_btatt_ots_properties_patch,
1894 &hf_btatt_ots_properties_truncate,
1895 &hf_btatt_ots_properties_append,
1896 &hf_btatt_ots_properties_write,
1897 &hf_btatt_ots_properties_read,
1898 &hf_btatt_ots_properties_execute,
1899 &hf_btatt_ots_properties_delete,
1900 NULL
1904 static int * const hfx_btatt_ots_flags[] = {
1905 &hf_btatt_ots_flags_reserved,
1906 &hf_btatt_ots_flags_object_deletion,
1907 &hf_btatt_ots_flags_object_creation,
1908 &hf_btatt_ots_flags_change_occurred_to_the_object_metadata,
1909 &hf_btatt_ots_flags_change_occurred_to_the_object_contents,
1910 &hf_btatt_ots_flags_source_of_change,
1911 NULL
1914 static int * const hfx_btatt_plx_spot_check_measurement_flags[] = {
1915 &hf_btatt_plx_spot_check_measurement_flags_reserved,
1916 &hf_btatt_plx_spot_check_measurement_flags_device_clock_is_not_set,
1917 &hf_btatt_plx_spot_check_measurement_flags_pulse_amplitude_index,
1918 &hf_btatt_plx_spot_check_measurement_flags_device_and_sensor_status,
1919 &hf_btatt_plx_spot_check_measurement_flags_measurement_status,
1920 &hf_btatt_plx_spot_check_measurement_flags_timestamp,
1921 NULL
1924 static int * const hfx_btatt_plx_measurement_status[] = {
1925 &hf_btatt_plx_measurement_status_invalid_measurement_detected,
1926 &hf_btatt_plx_measurement_status_questionable_measurement_detected,
1927 &hf_btatt_plx_measurement_status_measurement_unavailable,
1928 &hf_btatt_plx_measurement_status_calibration_ongoing,
1929 &hf_btatt_plx_measurement_status_data_for_testing,
1930 &hf_btatt_plx_measurement_status_data_for_demonstration,
1931 &hf_btatt_plx_measurement_status_data_from_measurement_storage,
1932 &hf_btatt_plx_measurement_status_fully_qualified_data,
1933 &hf_btatt_plx_measurement_status_validated_data,
1934 &hf_btatt_plx_measurement_status_early_estimated_data,
1935 &hf_btatt_plx_measurement_status_measurement_ongoing,
1936 &hf_btatt_plx_measurement_status_reserved,
1937 NULL
1940 static int * const hfx_btatt_plx_device_and_sensor_status[] = {
1941 &hf_btatt_plx_device_and_sensor_status_reserved,
1942 &hf_btatt_plx_device_and_sensor_status_sensor_disconnected,
1943 &hf_btatt_plx_device_and_sensor_status_sensor_malfunctioning,
1944 &hf_btatt_plx_device_and_sensor_status_sensor_displaced,
1945 &hf_btatt_plx_device_and_sensor_status_unknown_sensor_connected,
1946 &hf_btatt_plx_device_and_sensor_status_sensor_unconnected_to_user,
1947 &hf_btatt_plx_device_and_sensor_status_sensor_interference_detected,
1948 &hf_btatt_plx_device_and_sensor_status_signal_analysis_ongoing,
1949 &hf_btatt_plx_device_and_sensor_status_questionable_pulse_detected,
1950 &hf_btatt_plx_device_and_sensor_status_non_pulsatile_signal_detected,
1951 &hf_btatt_plx_device_and_sensor_status_erratic_signal_detected,
1952 &hf_btatt_plx_device_and_sensor_status_low_perfusion_detected,
1953 &hf_btatt_plx_device_and_sensor_status_poor_signal_detected,
1954 &hf_btatt_plx_device_and_sensor_status_inadequate_signal_detected,
1955 &hf_btatt_plx_device_and_sensor_status_signal_processing_irregularity_detected,
1956 &hf_btatt_plx_device_and_sensor_status_equipment_malfunction_detected,
1957 &hf_btatt_plx_device_and_sensor_status_extended_display_update_ongoing,
1958 NULL
1961 static int * const hfx_btatt_plx_continuous_measurement_flags[] = {
1962 &hf_btatt_plx_continuous_measurement_flags_reserved,
1963 &hf_btatt_plx_continuous_measurement_flags_pulse_amplitude_index,
1964 &hf_btatt_plx_continuous_measurement_flags_device_and_sensor_status,
1965 &hf_btatt_plx_continuous_measurement_flags_measurement_status,
1966 &hf_btatt_plx_continuous_measurement_flags_spo2pr_slow,
1967 &hf_btatt_plx_continuous_measurement_flags_spo2pr_fast,
1968 NULL
1971 static int * const hfx_btatt_plx_features_supported_features[] = {
1972 &hf_btatt_plx_features_supported_features_reserved,
1973 &hf_btatt_plx_features_supported_features_multiple_bonds,
1974 &hf_btatt_plx_features_supported_features_pulse_amplitude_index,
1975 &hf_btatt_plx_features_supported_features_spo2pr_slow,
1976 &hf_btatt_plx_features_supported_features_spo2pr_fast,
1977 &hf_btatt_plx_features_supported_features_timestamp_storage_for_spot_check,
1978 &hf_btatt_plx_features_supported_features_measurement_storage_for_spot_check,
1979 &hf_btatt_plx_features_supported_features_device_and_sensor_status,
1980 &hf_btatt_plx_features_supported_features_measurement_status,
1981 NULL
1984 static int * const hfx_btgatt_microbit_ad_pins[] = {
1985 &hf_gatt_microbit_ad_pin0,
1986 &hf_gatt_microbit_ad_pin1,
1987 &hf_gatt_microbit_ad_pin2,
1988 &hf_gatt_microbit_ad_pin3,
1989 &hf_gatt_microbit_ad_pin4,
1990 &hf_gatt_microbit_ad_pin5,
1991 &hf_gatt_microbit_ad_pin6,
1992 &hf_gatt_microbit_ad_pin7,
1993 &hf_gatt_microbit_ad_pin8,
1994 &hf_gatt_microbit_ad_pin9,
1995 &hf_gatt_microbit_ad_pin10,
1996 &hf_gatt_microbit_ad_pin11,
1997 &hf_gatt_microbit_ad_pin12,
1998 &hf_gatt_microbit_ad_pin13,
1999 &hf_gatt_microbit_ad_pin14,
2000 &hf_gatt_microbit_ad_pin15,
2001 &hf_gatt_microbit_ad_pin16,
2002 &hf_gatt_microbit_ad_pin17,
2003 &hf_gatt_microbit_ad_pin18,
2004 &hf_gatt_microbit_ad_pin19,
2005 NULL
2008 static int * const hfx_btgatt_microbit_io_pins[] = {
2009 &hf_gatt_microbit_io_pin0,
2010 &hf_gatt_microbit_io_pin1,
2011 &hf_gatt_microbit_io_pin2,
2012 &hf_gatt_microbit_io_pin3,
2013 &hf_gatt_microbit_io_pin4,
2014 &hf_gatt_microbit_io_pin5,
2015 &hf_gatt_microbit_io_pin6,
2016 &hf_gatt_microbit_io_pin7,
2017 &hf_gatt_microbit_io_pin8,
2018 &hf_gatt_microbit_io_pin9,
2019 &hf_gatt_microbit_io_pin10,
2020 &hf_gatt_microbit_io_pin11,
2021 &hf_gatt_microbit_io_pin12,
2022 &hf_gatt_microbit_io_pin13,
2023 &hf_gatt_microbit_io_pin14,
2024 &hf_gatt_microbit_io_pin15,
2025 &hf_gatt_microbit_io_pin16,
2026 &hf_gatt_microbit_io_pin17,
2027 &hf_gatt_microbit_io_pin18,
2028 &hf_gatt_microbit_io_pin19,
2029 NULL
2032 static int * const hfx_btatt_timezone_information[] = {
2033 &hf_btatt_timezone_information_information,
2034 &hf_btatt_timezone_information_information_type,
2035 NULL
2038 static int * const hfx_btatt_battery_power_state[] = {
2039 &hf_btatt_battery_power_state_present,
2040 &hf_btatt_battery_power_state_discharging,
2041 &hf_btatt_battery_power_state_charging,
2042 &hf_btatt_battery_power_state_level,
2043 NULL
2046 static int * const hfx_btatt_removable[] = {
2047 &hf_btatt_removable_reserved,
2048 &hf_btatt_removable_removable,
2049 NULL
2052 static int * const hfx_btatt_service_required[] = {
2053 &hf_btatt_service_required_reserved,
2054 &hf_btatt_service_required_service_required,
2055 NULL
2058 static int * const hfx_btatt_fitness_machine_features[] = {
2059 &hf_btatt_fitness_machine_features_reserved,
2060 &hf_btatt_fitness_machine_features_user_data_retention,
2061 &hf_btatt_fitness_machine_features_force_on_belt_and_power_output,
2062 &hf_btatt_fitness_machine_features_power_measurement,
2063 &hf_btatt_fitness_machine_features_remaining_time,
2064 &hf_btatt_fitness_machine_features_elapsed_time,
2065 &hf_btatt_fitness_machine_features_metabolic_equivalent,
2066 &hf_btatt_fitness_machine_features_heart_rate_measurement,
2067 &hf_btatt_fitness_machine_features_expended_energy,
2068 &hf_btatt_fitness_machine_features_stride_count,
2069 &hf_btatt_fitness_machine_features_resistance_level,
2070 &hf_btatt_fitness_machine_features_step_count,
2071 &hf_btatt_fitness_machine_features_pace,
2072 &hf_btatt_fitness_machine_features_elevation_gain,
2073 &hf_btatt_fitness_machine_features_inclination,
2074 &hf_btatt_fitness_machine_features_total_distance,
2075 &hf_btatt_fitness_machine_features_cadence,
2076 &hf_btatt_fitness_machine_features_average_speed,
2077 NULL
2080 static int * const hfx_btatt_target_setting_features[] = {
2081 &hf_btatt_target_setting_features_reserved,
2082 &hf_btatt_target_setting_features_targeted_cadence_configuration,
2083 &hf_btatt_target_setting_features_spin_down_control,
2084 &hf_btatt_target_setting_features_wheel_circumference_configuration,
2085 &hf_btatt_target_setting_features_indoor_bike_simulation_parameters,
2086 &hf_btatt_target_setting_features_targeted_time_in_five_heart_rate_zones_configuration,
2087 &hf_btatt_target_setting_features_targeted_time_in_three_heart_rate_zones_configuration,
2088 &hf_btatt_target_setting_features_targeted_time_in_two_heart_rate_zones_configuration,
2089 &hf_btatt_target_setting_features_targeted_training_time_configuration,
2090 &hf_btatt_target_setting_features_targeted_distance_configuration,
2091 &hf_btatt_target_setting_features_targeted_stride_number_configuration,
2092 &hf_btatt_target_setting_features_targeted_step_number_configuration,
2093 &hf_btatt_target_setting_features_targeted_expended_energy_configuration,
2094 &hf_btatt_target_setting_features_heart_rate_target_setting,
2095 &hf_btatt_target_setting_features_power_target_setting,
2096 &hf_btatt_target_setting_features_resistance_target_setting,
2097 &hf_btatt_target_setting_features_inclination_target_setting,
2098 &hf_btatt_target_setting_features_speed_target_setting,
2099 NULL
2102 static int * const hfx_btatt_training_status_flags[] = {
2103 &hf_btatt_training_status_flags_reserved,
2104 &hf_btatt_training_status_flags_extended_string,
2105 &hf_btatt_training_status_flags_training_status_string,
2106 NULL
2109 /* Initialize the subtree pointers */
2110 static int ett_btatt;
2111 static int ett_btatt_list;
2112 static int ett_btatt_value;
2113 static int ett_btatt_opcode;
2114 static int ett_btatt_handle;
2115 static int ett_btatt_characteristic_properties;
2116 static int ett_btgatt;
2117 static int ett_btgatt_microbit_accelerometer;
2118 static int ett_btgatt_microbit_magnetometer;
2119 static int ett_btgatt_microbit_pin_data;
2120 static int ett_btgatt_microbit_pin_ad_config;
2121 static int ett_btgatt_microbit_pin_io_config;
2122 static int ett_btatt_fragment;
2123 static int ett_btatt_fragments;
2125 static expert_field ei_btatt_uuid_format_unknown;
2126 static expert_field ei_btatt_handle_too_few;
2127 static expert_field ei_btatt_mtu_exceeded;
2128 static expert_field ei_btatt_mtu_full;
2129 static expert_field ei_btatt_consent_out_of_bounds;
2130 static expert_field ei_btatt_cgm_size_too_small;
2131 static expert_field ei_btatt_opcode_invalid_request;
2132 static expert_field ei_btatt_opcode_invalid_response;
2133 expert_field ei_btatt_invalid_usage;
2134 static expert_field ei_btatt_bad_data;
2135 static expert_field ei_btatt_unexpected_data;
2136 static expert_field ei_btatt_undecoded;
2137 static expert_field ei_btatt_invalid_length;
2139 static wmem_tree_t *mtus;
2140 static wmem_tree_t *requests;
2141 static wmem_tree_t *fragments;
2142 static wmem_tree_t *handle_to_uuid;
2144 static dissector_handle_t btatt_handle;
2145 static dissector_handle_t btgatt_handle;
2146 static dissector_handle_t http_handle;
2147 static dissector_handle_t usb_hid_boot_keyboard_input_report_handle;
2148 static dissector_handle_t usb_hid_boot_keyboard_output_report_handle;
2149 static dissector_handle_t usb_hid_boot_mouse_input_report_handle;
2150 static dissector_handle_t btmesh_proxy_handle;
2152 static dissector_table_t att_handle_dissector_table;
2153 static dissector_table_t att_service_dissector_table;
2155 static int hf_btatt_fragments;
2156 static int hf_btatt_fragment;
2157 static int hf_btatt_fragment_overlap;
2158 static int hf_btatt_fragment_overlap_conflicts;
2159 static int hf_btatt_fragment_multiple_tails;
2160 static int hf_btatt_fragment_too_long_fragment;
2161 static int hf_btatt_fragment_error;
2162 static int hf_btatt_fragment_count;
2163 static int hf_btatt_reassembled_in;
2164 static int hf_btatt_reassembled_length;
2165 static int hf_btatt_reassembled_data;
2167 static const fragment_items msg_frag_items = {
2168 /* Fragment subtrees */
2169 &ett_btatt_fragment,
2170 &ett_btatt_fragments,
2171 /* Fragment fields */
2172 &hf_btatt_fragments, /* FT_NONE */
2173 &hf_btatt_fragment, /* FT_FRAMENUM */
2174 &hf_btatt_fragment_overlap, /* FT_BOOLEAN */
2175 &hf_btatt_fragment_overlap_conflicts, /* FT_BOOLEAN */
2176 &hf_btatt_fragment_multiple_tails, /* FT_BOOLEAN */
2177 &hf_btatt_fragment_too_long_fragment, /* FT_BOOLEAN */
2178 &hf_btatt_fragment_error,
2179 &hf_btatt_fragment_count,
2180 /* Reassembled in field */
2181 &hf_btatt_reassembled_in,
2182 /* Reassembled length field */
2183 &hf_btatt_reassembled_length,
2184 &hf_btatt_reassembled_data,
2185 /* Tag */
2186 "Message fragments"};
2188 extern value_string_ext ext_usb_vendors_vals;
2190 /* Opcodes */
2191 static const value_string opcode_vals[] = {
2192 {0x01, "Error Response"},
2193 {0x02, "Exchange MTU Request"},
2194 {0x03, "Exchange MTU Response"},
2195 {0x04, "Find Information Request"},
2196 {0x05, "Find Information Response"},
2197 {0x06, "Find By Type Value Request"},
2198 {0x07, "Find By Type Value Response"},
2199 {0x08, "Read By Type Request"},
2200 {0x09, "Read By Type Response"},
2201 {0x0a, "Read Request"},
2202 {0x0b, "Read Response"},
2203 {0x0c, "Read Blob Request"},
2204 {0x0d, "Read Blob Response"},
2205 {0x0e, "Read Multiple Request"},
2206 {0x0f, "Read Multiple Response"},
2207 {0x10, "Read By Group Type Request"},
2208 {0x11, "Read By Group Type Response"},
2209 {0x12, "Write Request"},
2210 {0x13, "Write Response"},
2211 {0x16, "Prepare Write Request"},
2212 {0x17, "Prepare Write Response"},
2213 {0x18, "Execute Write Request"},
2214 {0x19, "Execute Write Response"},
2215 {0x1B, "Handle Value Notification"},
2216 {0x1D, "Handle Value Indication"},
2217 {0x1E, "Handle Value Confirmation"},
2218 {0x20, "Read Multiple Variable Request"},
2219 {0x21, "Read Multiple Variable Response"},
2220 {0x52, "Write Command"},
2221 {0xD2, "Signed Write Command"},
2222 {0x0, NULL}
2225 #define GATT_SERVICE_GENERIC_ACCESS_PROFILE 0x1800
2226 #define GATT_SERVICE_GENERIC_ATTRIBUTE_PROFILE 0x1801
2227 #define GATT_SERVICE_IMMEDIATE_ALERT 0x1802
2228 #define GATT_SERVICE_LINK_LOSS 0x1803
2229 #define GATT_SERVICE_TX_POWER 0x1804
2230 #define GATT_SERVICE_CURRENT_TIME_SERVICE 0x1805
2231 #define GATT_SERVICE_REFERENCE_TIME_UPDATE_SERVICE 0x1806
2232 #define GATT_SERVICE_NEXT_DST_CHANGE_SERVICE 0x1807
2233 #define GATT_SERVICE_GLUCOSE 0x1808
2234 #define GATT_SERVICE_HEALTH_THERMOMETER 0x1809
2235 #define GATT_SERVICE_DEVICE_INFORMATION 0x180A
2236 #define GATT_SERVICE_HEART_RATE 0x180D
2237 #define GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE 0x180E
2238 #define GATT_SERVICE_BATTERY_SERVICE 0x180F
2239 #define GATT_SERVICE_BLOOD_PRESSURE 0x1810
2240 #define GATT_SERVICE_ALERT_NOTIFICATION_SERVICE 0x1811
2241 #define GATT_SERVICE_HUMAN_INTERFACE_DEVICE 0x1812
2242 #define GATT_SERVICE_SCAN_PARAMETERS 0x1813
2243 #define GATT_SERVICE_RUNNING_SPEED_AND_CADENCE 0x1814
2244 #define GATT_SERVICE_AUTOMATION_IO 0x1815
2245 #define GATT_SERVICE_CYCLING_SPEED_AND_CADENCE 0x1816
2246 #define GATT_SERVICE_CYCLING_POWER 0x1818
2247 #define GATT_SERVICE_LOCATION_AND_NAVIGATION 0x1819
2248 #define GATT_SERVICE_ENVIRONMENTAL_SENSING 0x181A
2249 #define GATT_SERVICE_BODY_COMPOSITION 0x181B
2250 #define GATT_SERVICE_USER_DATA 0x181C
2251 #define GATT_SERVICE_WEIGHT_SCALE 0x181D
2252 #define GATT_SERVICE_BOND_MANAGEMENT 0x181E
2253 #define GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING 0x181F
2254 #define GATT_SERVICE_INTERNET_PROTOCOL_SUPPORT 0x1820
2255 #define GATT_SERVICE_INDOOR_POSITIONING 0x1821
2256 #define GATT_SERVICE_PULSE_OXIMETER 0x1822
2257 #define GATT_SERVICE_HTTP_PROXY 0x1823
2258 #define GATT_SERVICE_TRANSPORT_DISCOVERY 0x1824
2259 #define GATT_SERVICE_OBJECT_TRANSFER 0x1825
2260 #define GATT_SERVICE_FITNESS_MACHINE 0x1826
2262 /* Error codes */
2263 static const value_string error_code_vals[] = {
2264 {0x01, "Invalid Handle"},
2265 {0x02, "Read Not Permitted"},
2266 {0x03, "Write Not Permitted"},
2267 {0x04, "Invalid PDU"},
2268 {0x05, "Insufficient Authentication"},
2269 {0x06, "Request Not Supported"},
2270 {0x07, "Invalid Offset"},
2271 {0x08, "Insufficient Authorization"},
2272 {0x09, "Prepare Queue Full"},
2273 {0x0A, "Attribute Not Found"},
2274 {0x0B, "Attribute Not Long"},
2275 {0x0C, "Insufficient Encryption Key Size"},
2276 {0x0D, "Invalid Attribute Value Length"},
2277 {0x0E, "Unlikely Error"},
2278 {0x0F, "Insufficient Encryption"},
2279 {0x10, "Unsupported Group Type"},
2280 {0x11, "Insufficient Resources"},
2281 {0x80, "Application Error 0x80"},
2282 {0x81, "Application Error 0x81"},
2283 {0x82, "Application Error 0x82"},
2284 {0x83, "Application Error 0x83"},
2285 {0x84, "Application Error 0x84"},
2286 {0x85, "Application Error 0x85"},
2287 {0x86, "Application Error 0x86"},
2288 {0x87, "Application Error 0x87"},
2289 {0x88, "Application Error 0x88"},
2290 {0x89, "Application Error 0x89"},
2291 {0x8A, "Application Error 0x8A"},
2292 {0x8B, "Application Error 0x8B"},
2293 {0x8C, "Application Error 0x8C"},
2294 {0x8D, "Application Error 0x8D"},
2295 {0x8E, "Application Error 0x8E"},
2296 {0x8F, "Application Error 0x8F"},
2297 {0x90, "Application Error 0x90"},
2298 {0x91, "Application Error 0x91"},
2299 {0x92, "Application Error 0x92"},
2300 {0x93, "Application Error 0x93"},
2301 {0x94, "Application Error 0x94"},
2302 {0x95, "Application Error 0x95"},
2303 {0x96, "Application Error 0x96"},
2304 {0x97, "Application Error 0x97"},
2305 {0x98, "Application Error 0x98"},
2306 {0x99, "Application Error 0x99"},
2307 {0x9A, "Application Error 0x9A"},
2308 {0x9B, "Application Error 0x9B"},
2309 {0x9C, "Application Error 0x9C"},
2310 {0x9D, "Application Error 0x9D"},
2311 {0x9E, "Application Error 0x9E"},
2312 {0x9F, "Application Error 0x9F"},
2313 {0xFD, "Improper Client Characteristic Configuration Descriptor"},
2314 {0xFE, "Procedure Already In Progress"},
2315 {0xFF, "Out of Range"},
2316 {0x0, NULL}
2319 static const value_string error_code_aios_vals[] = {
2320 {0x80, "Trigger Condition Value not Supported"},
2321 {0x0, NULL}
2324 static const value_string error_code_ans_vals[] = {
2325 {0xA0, "Command not Supported"},
2326 {0x0, NULL}
2329 static const value_string error_code_bms_vals[] = {
2330 {0x80, "Opcode not Supported"},
2331 {0x81, "Operation Failed"},
2332 {0x0, NULL}
2335 static const value_string error_code_cgms_vals[] = {
2336 {0x80, "Missing CRC"},
2337 {0x81, "Invalid CRC"},
2338 {0x0, NULL}
2341 static const value_string error_code_cps_vals[] = {
2342 {0x80, "Inappropriate Connection Parameters"},
2343 {0x0, NULL}
2346 static const value_string error_code_cscs_vals[] = {
2347 {0x80, "Procedure Already in Progress"},
2348 {0x81, "Client Characteristic Configuration Descriptor Improperly Configured"},
2349 {0x0, NULL}
2352 static const value_string error_code_cts_vals[] = {
2353 {0x80, "Data Field Ignored"},
2354 {0x0, NULL}
2357 static const value_string error_code_ess_vals[] = {
2358 {0x80, "Write Request Rejected"},
2359 {0x81, "Condition not Supported"},
2360 {0x0, NULL}
2363 static const value_string error_code_gls_vals[] = {
2364 {0x80, "Procedure Already in Progress"},
2365 {0x81, "Client Characteristic Configuration Descriptor Improperly Configured"},
2366 {0x0, NULL}
2369 static const value_string error_code_hps_vals[] = {
2370 {0x81, "Invalid Request"},
2371 {0x82, "Network not Available"},
2372 {0x0, NULL}
2375 static const value_string error_code_hrs_vals[] = {
2376 {0x80, "Control Point not Supported"},
2377 {0x0, NULL}
2380 static const value_string error_code_hts_vals[] = {
2381 {0x80, "Out of Range"},
2382 {0x0, NULL}
2385 static const value_string error_code_ips_vals[] = {
2386 {0x80, "Invalid Value"},
2387 {0x0, NULL}
2390 static const value_string error_code_ots_vals[] = {
2391 {0x80, "Write Request Rejected"},
2392 {0x81, "Object not Selected"},
2393 {0x82, "Concurrency Limit Exceeded"},
2394 {0x83, "Object Name Already Exists"},
2395 {0x0, NULL}
2398 static const value_string error_code_rscs_vals[] = {
2399 {0x80, "Procedure Already in Progress"},
2400 {0x81, "Client Characteristic Configuration Descriptor Improperly Configured"},
2401 {0x0, NULL}
2404 static const value_string error_code_uds_vals[] = {
2405 {0x80, "User Data Access not Permitted"},
2406 {0x0, NULL}
2409 static const value_string uuid_format_vals[] = {
2410 {0x01, "16-bit UUIDs"},
2411 {0x02, "128-bit UUIDs"},
2412 {0x0, NULL}
2415 static const value_string flags_vals[] = {
2416 {0x00, "Cancel All"},
2417 {0x01, "Immediately Write All"},
2418 {0x0, NULL}
2421 static const value_string hogp_protocol_mode_vals[] = {
2422 {0x00, "Boot Protocol Mode"},
2423 {0x01, "Report Protocol Mode"},
2424 {0x0, NULL}
2427 static const value_string report_reference_report_type_vals[] = {
2428 {0x01, "Input Report"},
2429 {0x02, "Output Report"},
2430 {0x03, "Feature Report"},
2431 {0x0, NULL}
2434 static const value_string characteristic_presentation_format_vals[] = {
2435 {0x01, "unsigned 1-bit"},
2436 {0x02, "unsigned 2-bit integer"},
2437 {0x03, "unsigned 4-bit integer"},
2438 {0x04, "unsigned 8-bit integer"},
2439 {0x05, "unsigned 12-bit integer"},
2440 {0x06, "unsigned 16-bit integer"},
2441 {0x07, "unsigned 24-bit integer"},
2442 {0x08, "unsigned 32-bit integer"},
2443 {0x09, "unsigned 48-bit integer"},
2444 {0x0A, "unsigned 64-bit integer"},
2445 {0x0B, "unsigned 128-bit integer"},
2446 {0x0C, "signed 8-bit integer"},
2447 {0x0D, "signed 12-bit integer"},
2448 {0x0E, "signed 16-bit integer"},
2449 {0x0F, "signed 24-bit integer"},
2450 {0x10, "signed 32-bit integer"},
2451 {0x11, "signed 48-bit integer"},
2452 {0x12, "signed 64-bit integer"},
2453 {0x13, "signed 128-bit integer"},
2454 {0x14, "IEEE-754 32-bit floating point"},
2455 {0x15, "IEEE-754 64-bit floating point"},
2456 {0x16, "IEEE-11073 16-bit SFLOAT"},
2457 {0x17, "IEEE-11073 32-bit FLOAT"},
2458 {0x18, "IEEE-20601 format"},
2459 {0x19, "UTF-8 string"},
2460 {0x1A, "UTF-16 string"},
2461 {0x1B, "Opaque structure"},
2462 {0x0, NULL}
2465 static const value_string characteristic_presentation_namespace_vals[] = {
2466 {0x01, "Bluetooth SIG"},
2467 {0x0, NULL}
2470 const value_string characteristic_presentation_namespace_description_btsig_vals[] = {
2471 {0x0000, "unknown"},
2472 {0x0001, "first"},
2473 {0x0002, "second"},
2474 {0x0003, "third"},
2475 {0x0004, "fourth"},
2476 {0x0005, "fifth"},
2477 {0x0006, "sixth"},
2478 {0x0007, "seventh"},
2479 {0x0008, "eighth"},
2480 {0x0009, "ninth"},
2481 {0x000a, "tenth"},
2482 {0x000b, "eleventh"},
2483 {0x000c, "twelfth"},
2484 {0x000d, "thirteenth"},
2485 {0x000e, "fourteenth"},
2486 {0x000f, "fifteenth"},
2487 {0x0010, "sixteenth"},
2488 {0x0011, "seventeenth"},
2489 {0x0012, "eighteenth"},
2490 {0x0013, "nineteenth"},
2491 {0x0014, "twentieth"},
2492 {0x0015, "twenty-first"},
2493 {0x0016, "twenty-second"},
2494 {0x0017, "twenty-third"},
2495 {0x0018, "twenty-fourth"},
2496 {0x0019, "twenty-fifth"},
2497 {0x001a, "twenty-sixth"},
2498 {0x001b, "twenty-seventh"},
2499 {0x001c, "twenty-eighth"},
2500 {0x001d, "twenty-ninth"},
2501 {0x001e, "thirtieth"},
2502 {0x001f, "thirty-first"},
2503 {0x0020, "thirty-second"},
2504 {0x0021, "thirty-third"},
2505 {0x0022, "thirty-fourth"},
2506 {0x0023, "thirty-fifth"},
2507 {0x0024, "thirty-sixth"},
2508 {0x0025, "thirty-seventh"},
2509 {0x0026, "thirty-eighth"},
2510 {0x0027, "thirty-ninth"},
2511 {0x0028, "fortieth"},
2512 {0x0029, "forty-first"},
2513 {0x002a, "forty-second"},
2514 {0x002b, "forty-third"},
2515 {0x002c, "forty-fourth"},
2516 {0x002d, "forty-fifth"},
2517 {0x002e, "forty-sixth"},
2518 {0x002f, "forty-seventh"},
2519 {0x0030, "forty-eighth"},
2520 {0x0031, "forty-ninth"},
2521 {0x0032, "fiftieth"},
2522 {0x0033, "fifty-first"},
2523 {0x0034, "fifty-second"},
2524 {0x0035, "fifty-third"},
2525 {0x0036, "fifty-fourth"},
2526 {0x0037, "fifty-fifth"},
2527 {0x0038, "fifty-sixth"},
2528 {0x0039, "fifty-seventh"},
2529 {0x003a, "fifty-eighth"},
2530 {0x003b, "fifty-ninth"},
2531 {0x003c, "sixtieth"},
2532 {0x003d, "sixty-first"},
2533 {0x003e, "sixty-second"},
2534 {0x003f, "sixty-third"},
2535 {0x0040, "sixty-fourth"},
2536 {0x0041, "sixty-fifth"},
2537 {0x0042, "sixty-sixth"},
2538 {0x0043, "sixty-seventh"},
2539 {0x0044, "sixty-eighth"},
2540 {0x0045, "sixty-ninth"},
2541 {0x0046, "seventieth"},
2542 {0x0047, "seventy-first"},
2543 {0x0048, "seventy-second"},
2544 {0x0049, "seventy-third"},
2545 {0x004a, "seventy-fourth"},
2546 {0x004b, "seventy-fifth"},
2547 {0x004c, "seventy-sixth"},
2548 {0x004d, "seventy-seventh"},
2549 {0x004e, "seventy-eighth"},
2550 {0x004f, "seventy-ninth"},
2551 {0x0050, "eightieth"},
2552 {0x0051, "eighty-first"},
2553 {0x0052, "eighty-second"},
2554 {0x0053, "eighty-third"},
2555 {0x0054, "eighty-fourth"},
2556 {0x0055, "eighty-fifth"},
2557 {0x0056, "eighty-sixth"},
2558 {0x0057, "eighty-seventh"},
2559 {0x0058, "eighty-eighth"},
2560 {0x0059, "eighty-ninth"},
2561 {0x005a, "ninetieth"},
2562 {0x005b, "ninety-first"},
2563 {0x005c, "ninety-second"},
2564 {0x005d, "ninety-third"},
2565 {0x005e, "ninety-fourth"},
2566 {0x005f, "ninety-fifth"},
2567 {0x0060, "ninety-sixth"},
2568 {0x0061, "ninety-seventh"},
2569 {0x0062, "ninety-eighth"},
2570 {0x0063, "ninety-ninth"},
2571 {0x0064, "one-hundredth"},
2572 {0x0065, "one-hundred-and-first"},
2573 {0x0066, "one-hundred-and-second"},
2574 {0x0067, "one-hundred-and-third"},
2575 {0x0068, "one-hundred-and-fourth"},
2576 {0x0069, "one-hundred-and-fifth"},
2577 {0x006a, "one-hundred-and-sixth"},
2578 {0x006b, "one-hundred-and-seventh"},
2579 {0x006c, "one-hundred-and-eighth"},
2580 {0x006d, "one-hundred-and-ninth"},
2581 {0x006e, "one-hundred-and-tenth"},
2582 {0x006f, "one-hundred-and-eleventh"},
2583 {0x0070, "one-hundred-and-twelfth"},
2584 {0x0071, "one-hundred-and-thirteenth"},
2585 {0x0072, "one-hundred-and-fourteenth"},
2586 {0x0073, "one-hundred-and-fifteenth"},
2587 {0x0074, "one-hundred-and-sixteenth"},
2588 {0x0075, "one-hundred-and-seventeenth"},
2589 {0x0076, "one-hundred-and-eighteenth"},
2590 {0x0077, "one-hundred-and-nineteenth"},
2591 {0x0078, "one-hundred-twentieth"},
2592 {0x0079, "one-hundred-and-twenty-first"},
2593 {0x007a, "one-hundred-and-twenty-second"},
2594 {0x007b, "one-hundred-and-twenty-third"},
2595 {0x007c, "one-hundred-and-twenty-fourth"},
2596 {0x007d, "one-hundred-and-twenty-fifth"},
2597 {0x007e, "one-hundred-and-twenty-sixth"},
2598 {0x007f, "one-hundred-and-twenty-seventh"},
2599 {0x0080, "one-hundred-and-twenty-eighth"},
2600 {0x0081, "one-hundred-and-twenty-ninth"},
2601 {0x0082, "one-hundred-thirtieth"},
2602 {0x0083, "one-hundred-and-thirty-first"},
2603 {0x0084, "one-hundred-and-thirty-second"},
2604 {0x0085, "one-hundred-and-thirty-third"},
2605 {0x0086, "one-hundred-and-thirty-fourth"},
2606 {0x0087, "one-hundred-and-thirty-fifth"},
2607 {0x0088, "one-hundred-and-thirty-sixth"},
2608 {0x0089, "one-hundred-and-thirty-seventh"},
2609 {0x008a, "one-hundred-and-thirty-eighth"},
2610 {0x008b, "one-hundred-and-thirty-ninth"},
2611 {0x008c, "one-hundred-fortieth"},
2612 {0x008d, "one-hundred-and-forty-first"},
2613 {0x008e, "one-hundred-and-forty-second"},
2614 {0x008f, "one-hundred-and-forty-third"},
2615 {0x0090, "one-hundred-and-forty-fourth"},
2616 {0x0091, "one-hundred-and-forty-fifth"},
2617 {0x0092, "one-hundred-and-forty-sixth"},
2618 {0x0093, "one-hundred-and-forty-seventh"},
2619 {0x0094, "one-hundred-and-forty-eighth"},
2620 {0x0095, "one-hundred-and-forty-ninth"},
2621 {0x0096, "one-hundred-fiftieth"},
2622 {0x0097, "one-hundred-and-fifty-first"},
2623 {0x0098, "one-hundred-and-fifty-second"},
2624 {0x0099, "one-hundred-and-fifty-third"},
2625 {0x009a, "one-hundred-and-fifty-fourth"},
2626 {0x009b, "one-hundred-and-fifty-fifth"},
2627 {0x009c, "one-hundred-and-fifty-sixth"},
2628 {0x009d, "one-hundred-and-fifty-seventh"},
2629 {0x009e, "one-hundred-and-fifty-eighth"},
2630 {0x009f, "one-hundred-and-fifty-ninth"},
2631 {0x00a0, "one-hundred-sixtieth"},
2632 {0x00a1, "one-hundred-and-sixty-first"},
2633 {0x00a2, "one-hundred-and-sixty-second"},
2634 {0x00a3, "one-hundred-and-sixty-third"},
2635 {0x00a4, "one-hundred-and-sixty-fourth"},
2636 {0x00a5, "one-hundred-and-sixty-fifth"},
2637 {0x00a6, "one-hundred-and-sixty-sixth"},
2638 {0x00a7, "one-hundred-and-sixty-seventh"},
2639 {0x00a8, "one-hundred-and-sixty-eighth"},
2640 {0x00a9, "one-hundred-and-sixty-ninth"},
2641 {0x00aa, "one-hundred-seventieth"},
2642 {0x00ab, "one-hundred-and-seventy-first"},
2643 {0x00ac, "one-hundred-and-seventy-second"},
2644 {0x00ad, "one-hundred-and-seventy-third"},
2645 {0x00ae, "one-hundred-and-seventy-fourth"},
2646 {0x00af, "one-hundred-and-seventy-fifth"},
2647 {0x00b0, "one-hundred-and-seventy-sixth"},
2648 {0x00b1, "one-hundred-and-seventy-seventh"},
2649 {0x00b2, "one-hundred-and-seventy-eighth"},
2650 {0x00b3, "one-hundred-and-seventy-ninth"},
2651 {0x00b4, "one-hundred-eightieth"},
2652 {0x00b5, "one-hundred-and-eighty-first"},
2653 {0x00b6, "one-hundred-and-eighty-second"},
2654 {0x00b7, "one-hundred-and-eighty-third"},
2655 {0x00b8, "one-hundred-and-eighty-fourth"},
2656 {0x00b9, "one-hundred-and-eighty-fifth"},
2657 {0x00ba, "one-hundred-and-eighty-sixth"},
2658 {0x00bb, "one-hundred-and-eighty-seventh"},
2659 {0x00bc, "one-hundred-and-eighty-eighth"},
2660 {0x00bd, "one-hundred-and-eighty-ninth"},
2661 {0x00be, "one-hundred-ninetieth"},
2662 {0x00bf, "one-hundred-and-ninety-first"},
2663 {0x00c0, "one-hundred-and-ninety-second"},
2664 {0x00c1, "one-hundred-and-ninety-third"},
2665 {0x00c2, "one-hundred-and-ninety-fourth"},
2666 {0x00c3, "one-hundred-and-ninety-fifth"},
2667 {0x00c4, "one-hundred-and-ninety-sixth"},
2668 {0x00c5, "one-hundred-and-ninety-seventh"},
2669 {0x00c6, "one-hundred-and-ninety-eighth"},
2670 {0x00c7, "one-hundred-and-ninety-ninth"},
2671 {0x00c8, "two-hundredth"},
2672 {0x00c9, "two-hundred-and-first"},
2673 {0x00ca, "two-hundred-and-second"},
2674 {0x00cb, "two-hundred-and-third"},
2675 {0x00cc, "two-hundred-and-fourth"},
2676 {0x00cd, "two-hundred-and-fifth"},
2677 {0x00ce, "two-hundred-and-sixth"},
2678 {0x00cf, "two-hundred-and-seventh"},
2679 {0x00d0, "two-hundred-and-eighth"},
2680 {0x00d1, "two-hundred-and-ninth"},
2681 {0x00d2, "two-hundred-and-tenth"},
2682 {0x00d3, "two-hundred-and-eleventh"},
2683 {0x00d4, "two-hundred-and-twelfth"},
2684 {0x00d5, "two-hundred-and-thirteenth"},
2685 {0x00d6, "two-hundred-and-fourteenth"},
2686 {0x00d7, "two-hundred-and-fifteenth"},
2687 {0x00d8, "two-hundred-and-sixteenth"},
2688 {0x00d9, "two-hundred-and-seventeenth"},
2689 {0x00da, "two-hundred-and-eighteenth"},
2690 {0x00db, "two-hundred-and-nineteenth"},
2691 {0x00dc, "two-hundred-twentieth"},
2692 {0x00dd, "two-hundred-and-twenty-first"},
2693 {0x00de, "two-hundred-and-twenty-second"},
2694 {0x00df, "two-hundred-and-twenty-third"},
2695 {0x00e0, "two-hundred-and-twenty-fourth"},
2696 {0x00e1, "two-hundred-and-twenty-fifth"},
2697 {0x00e2, "two-hundred-and-twenty-sixth"},
2698 {0x00e3, "two-hundred-and-twenty-seventh"},
2699 {0x00e4, "two-hundred-and-twenty-eighth"},
2700 {0x00e5, "two-hundred-and-twenty-ninth"},
2701 {0x00e6, "two-hundred-thirtieth"},
2702 {0x00e7, "two-hundred-and-thirty-first"},
2703 {0x00e8, "two-hundred-and-thirty-second"},
2704 {0x00e9, "two-hundred-and-thirty-third"},
2705 {0x00ea, "two-hundred-and-thirty-fourth"},
2706 {0x00eb, "two-hundred-and-thirty-fifth"},
2707 {0x00ec, "two-hundred-and-thirty-sixth"},
2708 {0x00ed, "two-hundred-and-thirty-seventh"},
2709 {0x00ee, "two-hundred-and-thirty-eighth"},
2710 {0x00ef, "two-hundred-and-thirty-ninth"},
2711 {0x00f0, "two-hundred-fortieth"},
2712 {0x00f1, "two-hundred-and-forty-first"},
2713 {0x00f2, "two-hundred-and-forty-second"},
2714 {0x00f3, "two-hundred-and-forty-third"},
2715 {0x00f4, "two-hundred-and-forty-fourth"},
2716 {0x00f5, "two-hundred-and-forty-fifth"},
2717 {0x00f6, "two-hundred-and-forty-sixth"},
2718 {0x00f7, "two-hundred-and-forty-seventh"},
2719 {0x00f8, "two-hundred-and-forty-eighth"},
2720 {0x00f9, "two-hundred-and-forty-ninth"},
2721 {0x00fa, "two-hundred-fiftieth"},
2722 {0x00fb, "two-hundred-and-fifty-first"},
2723 {0x00fc, "two-hundred-and-fifty-second"},
2724 {0x00fd, "two-hundred-and-fifty-third"},
2725 {0x00fe, "two-hundred-and-fifty-fourth"},
2726 {0x00ff, "two-hundred-and-fifty-fifth"},
2727 {0x0100, "front"},
2728 {0x0101, "back"},
2729 {0x0102, "top"},
2730 {0x0103, "bottom"},
2731 {0x0104, "upper"},
2732 {0x0105, "lower"},
2733 {0x0106, "main"},
2734 {0x0107, "backup"},
2735 {0x0108, "auxiliary"},
2736 {0x0109, "supplementary"},
2737 {0x010A, "flash"},
2738 {0x010B, "inside"},
2739 {0x010C, "outside"},
2740 {0x010D, "left"},
2741 {0x010E, "right"},
2742 {0x010F, "internal"},
2743 {0x0110, "external"},
2744 {0x0, NULL}
2747 static const value_string esp_trigger_logic_vals[] = {
2748 {0x00, "Boolean AND"},
2749 {0x01, "Boolean OR"},
2750 {0x0, NULL}
2753 static const value_string esp_condition_vals[] = {
2754 {0x00, "Trigger inactive"},
2755 {0x01, "Use a fixed time interval between"},
2756 {0x02, "No less than the specified time between"},
2757 {0x03, "When value changes compared to"},
2758 {0x04, "While less than the specified value"},
2759 {0x05, "While less than or equal to the specified"},
2760 {0x06, "While greater than the specified value"},
2761 {0x07, "While greater than or equal to the"},
2762 {0x08, "While equal to the specified value"},
2763 {0x09, "While not equal to the specified value"},
2764 {0x0, NULL}
2767 static const value_string esp_sampling_function_vals[] = {
2768 {0x00, "Unspecified"},
2769 {0x01, "Instantaneous"},
2770 {0x02, "Arithmetic Mean"},
2771 {0x03, "RMS"},
2772 {0x04, "Maximum"},
2773 {0x05, "Minimum"},
2774 {0x06, "Accumulated"},
2775 {0x07, "Count"},
2776 {0x0, NULL}
2779 static const value_string esp_application_vals[] = {
2780 {0x00, "Unspecified"},
2781 {0x01, "Air"},
2782 {0x02, "Water"},
2783 {0x03, "Barometric"},
2784 {0x04, "Soil"},
2785 {0x05, "Infrared"},
2786 {0x06, "Map Database"},
2787 {0x07, "Barometric Elevation Source"},
2788 {0x08, "GPS only Elevation Source"},
2789 {0x09, "GPS and Map database Elevation Source"},
2790 {0x0A, "Vertical datum Elevation Source"},
2791 {0x0B, "Onshore"},
2792 {0x0C, "Onboard vessel or vehicle"},
2793 {0x0D, "Front"},
2794 {0x0E, "Back/Rear"},
2795 {0x0F, "Upper"},
2796 {0x10, "Lower"},
2797 {0x11, "Primary"},
2798 {0x12, "Secondary"},
2799 {0x13, "Outdoor"},
2800 {0x14, "Indoor"},
2801 {0x15, "Top"},
2802 {0x16, "Bottom"},
2803 {0x17, "Main"},
2804 {0x18, "Backup"},
2805 {0x19, "Auxiliary"},
2806 {0x1A, "Supplementary"},
2807 {0x1B, "Inside"},
2808 {0x1C, "Outside"},
2809 {0x1D, "Left"},
2810 {0x1E, "Right"},
2811 {0x1F, "Internal"},
2812 {0x20, "External"},
2813 {0x21, "Solar"},
2814 {0x0, NULL}
2817 static const value_string appearance_category_vals[] = {
2818 {0x01, "Phone"},
2819 {0x02, "Computer"},
2820 {0x03, "Watch"},
2821 {0x04, "Clock"},
2822 {0x05, "Display"},
2823 {0x06, "Remote Control"},
2824 {0x07, "Eye Glasses"},
2825 {0x08, "Tag"},
2826 {0x09, "Keyring"},
2827 {0x0A, "Media Player"},
2828 {0x0B, "Barcode Scanner"},
2829 {0x0C, "Thermometer"},
2830 {0x0D, "Heart Rate Sensor"},
2831 {0x0E, "Blood Pressure"},
2832 {0x0F, "Human Interface Device"},
2833 {0x10, "Glucose Meter"},
2834 {0x11, "Running Walking Sensor"},
2835 {0x12, "Cycling"},
2836 {0x31, "Pulse Oximeter"},
2837 {0x32, "Weight Scale"},
2838 {0x33, "Personal Mobility Device"},
2839 {0x34, "Continuous Glucose Monitor"},
2840 {0x35, "Insulin Pump"},
2841 {0x36, "Medication Delivery"},
2842 {0x51, "Outdoor Sports Activity"},
2843 {0x0, NULL}
2846 static const value_string appearance_subcategory_generic_vals[] = {
2847 {0x00, "Generic"},
2848 {0x0, NULL}
2851 static const value_string appearance_subcategory_watch_vals[] = {
2852 {0x00, "Generic"},
2853 {0x01, "Sports Watch"},
2854 {0x0, NULL}
2857 static const value_string appearance_subcategory_thermometer_vals[] = {
2858 {0x00, "Generic"},
2859 {0x01, "Ear"},
2860 {0x0, NULL}
2863 static const value_string appearance_subcategory_heart_rate_vals[] = {
2864 {0x00, "Generic"},
2865 {0x01, "Heart Rate Belt"},
2866 {0x0, NULL}
2869 static const value_string appearance_subcategory_blood_pressure_vals[] = {
2870 {0x00, "Generic"},
2871 {0x01, "Arm"},
2872 {0x02, "Wrist"},
2873 {0x0, NULL}
2876 static const value_string appearance_subcategory_hid_vals[] = {
2877 {0x00, "Generic"},
2878 {0x01, "Keyboard"},
2879 {0x02, "Mouse"},
2880 {0x03, "Joystick"},
2881 {0x04, "Gamepad"},
2882 {0x05, "Digitizer Tablet"},
2883 {0x06, "Card Reader"},
2884 {0x07, "Digital Pen"},
2885 {0x08, "Barcode"},
2886 {0x0, NULL}
2889 static const value_string appearance_subcategory_running_walking_sensor_vals[] = {
2890 {0x00, "Generic"},
2891 {0x01, "In-Shoe"},
2892 {0x02, "On-Shoe"},
2893 {0x03, "On-Hip"},
2894 {0x0, NULL}
2897 static const value_string appearance_subcategory_cycling_vals[] = {
2898 {0x00, "Generic"},
2899 {0x01, "Cycling Computer"},
2900 {0x02, "Speed Sensor"},
2901 {0x03, "Cadence Sensor"},
2902 {0x04, "Power Sensor"},
2903 {0x05, "Speed and Cadence Sensor"},
2904 {0x0, NULL}
2907 static const value_string appearance_subcategory_pulse_oximeter_vals[] = {
2908 {0x00, "Generic"},
2909 {0x01, "Fingertip"},
2910 {0x02, "Wrist Worn"},
2911 {0x0, NULL}
2914 static const value_string appearance_subcategory_personal_mobility_device_vals[] = {
2915 {0x00, "Generic"},
2916 {0x01, "Powered Wheelchair"},
2917 {0x02, "Mobility Scooter"},
2918 {0x0, NULL}
2921 static const value_string appearance_subcategory_insulin_pump_vals[] = {
2922 {0x00, "Generic"},
2923 {0x01, "Insulin Pump / Durable Pump"},
2924 {0x04, "Insulin Pump / Patch Pump"},
2925 {0x08, "Insulin Pen"},
2926 {0x0, NULL}
2929 static const value_string appearance_subcategory_outdoor_sports_activity_vals[] = {
2930 {0x00, "Generic"},
2931 {0x01, "Location Display Device"},
2932 {0x02, "Location and Navigation Display Device"},
2933 {0x03, "Location Pod"},
2934 {0x04, "Location and Navigation Pod"},
2935 {0x0, NULL}
2938 static const value_string alert_level_vals[] = {
2939 {0x00, "No Alert"},
2940 {0x01, "Mild Alert"},
2941 {0x02, "High Alert"},
2942 {0x0, NULL}
2945 static const value_string dst_offset_vals[] = {
2946 {0x00, "Standard Time"},
2947 {0x02, "Half an Hour Daylight Time (+0.5h)"},
2948 {0x04, "Daylight Time (+1h)"},
2949 {0x08, "Double Daylight Time (+2h)"},
2950 {0xFF, "DST is not known"},
2951 {0x0, NULL}
2954 static const value_string timezone_vals[] = {
2955 {-128, "Time zone offset is not known"},
2956 {-48, "UTC-12:00"},
2957 {-44, "UTC-11:00"},
2958 {-40, "UTC-10:00"},
2959 {-38, "UTC-9:30"},
2960 {-36, "UTC-9:00"},
2961 {-32, "UTC-8:00"},
2962 {-28, "UTC-7:00"},
2963 {-24, "UTC-6:00"},
2964 {-20, "UTC-5:00"},
2965 {-18, "UTC-4:30"},
2966 {-16, "UTC-4:00"},
2967 {-14, "UTC-3:30"},
2968 {-12, "UTC-3:00"},
2969 {-8, "UTC-2:00"},
2970 {-4, "UTC-1:00"},
2971 {0, "UTC+0:00"},
2972 {4, "UTC+1:00"},
2973 {8, "UTC+2:00"},
2974 {12, "UTC+3:00"},
2975 {14, "UTC+3:30"},
2976 {16, "UTC+4:00"},
2977 {18, "UTC+4:30"},
2978 {20, "UTC+5:00"},
2979 {22, "UTC+5:30"},
2980 {23, "UTC+5:45"},
2981 {24, "UTC+6:00"},
2982 {26, "UTC+6:30"},
2983 {28, "UTC+7:00"},
2984 {32, "UTC+8:00"},
2985 {35, "UTC+8:45"},
2986 {36, "UTC+9:00"},
2987 {38, "UTC+9:30"},
2988 {40, "UTC+10:00"},
2989 {42, "UTC+10:30"},
2990 {44, "UTC+11:00"},
2991 {46, "UTC+11:30"},
2992 {48, "UTC+12:00"},
2993 {51, "UTC+12:45"},
2994 {52, "UTC+13:00"},
2995 {56, "UTC+14:00"},
2996 {0x0, NULL}
2999 static const value_string time_source_vals[] = {
3000 {0x00, "Unknown"},
3001 {0x01, "Network Time Protocol"},
3002 {0x02, "GPS"},
3003 {0x03, "Radio Time Signal"},
3004 {0x04, "Manual"},
3005 {0x05, "Atomic Clock"},
3006 {0x06, "Cellular Network"},
3007 {0x0, NULL}
3010 static const value_string time_update_control_point_vals[] = {
3011 {0x01, "Get Reference Update"},
3012 {0x02, "Cancel Reference Update"},
3013 {0x0, NULL}
3016 static const value_string time_current_state_vals[] = {
3017 {0x00, "Idle"},
3018 {0x01, "Update Pending"},
3019 {0x0, NULL}
3022 static const value_string time_result_vals[] = {
3023 {0x00, "Successful"},
3024 {0x01, "Canceled"},
3025 {0x02, "No Connection To Reference"},
3026 {0x03, "Reference responded with an error"},
3027 {0x04, "Timeout"},
3028 {0x05, "Update not attempted after reset"},
3029 {0x0, NULL}
3032 static const value_string temperature_type_vals[] = {
3033 {0x01, "Armpit"},
3034 {0x02, "Body (general)"},
3035 {0x03, "Ear (usually ear lobe)"},
3036 {0x04, "Finger"},
3037 {0x05, "Gastro-intestinal Tract"},
3038 {0x06, "Mouth"},
3039 {0x07, "Rectum"},
3040 {0x08, "Toe"},
3041 {0x09, "Tympanum (ear drum)"},
3042 {0x0, NULL}
3045 static const value_string scan_refresh_vals[] = {
3046 {0x00, "Server Requires Refresh"},
3047 {0x0, NULL}
3050 static const value_string body_sensor_location_vals[] = {
3051 {0x00, "Other"},
3052 {0x01, "Chest"},
3053 {0x02, "Wrist"},
3054 {0x03, "Finger"},
3055 {0x04, "Hand"},
3056 {0x05, "Ear Lobe"},
3057 {0x06, "Foot"},
3058 {0x0, NULL}
3061 static const value_string heart_rate_control_point_vals[] = {
3062 {0x01, "Reset Energy Expended"},
3063 {0x0, NULL}
3066 static const value_string ringer_control_point_vals[] = {
3067 {0x01, "Silent Mode"},
3068 {0x02, "Mute Once"},
3069 {0x03, "Cancel Silent Mode"},
3070 {0x0, NULL}
3073 static const value_string ringer_setting_vals[] = {
3074 {0x00, "Ringer Silent"},
3075 {0x01, "Ringer Normal"},
3076 {0x0, NULL}
3079 static const value_string alert_category_id_vals[] = {
3080 {0x00, "Simple Alert: General text alert or non-text alert"},
3081 {0x01, "Email: Alert when Email messages arrives"},
3082 {0x02, "News: News feeds such as RSS, Atom"},
3083 {0x03, "Call: Incoming call"},
3084 {0x04, "Missed call: Missed Call"},
3085 {0x05, "SMS/MMS: SMS/MMS message arrives"},
3086 {0x06, "Voice mail: Voice mail"},
3087 {0x07, "Schedule: Alert occurred on calendar, planner"},
3088 {0x08, "High Prioritized Alert: Alert that should be handled as high priority"},
3089 {0x09, "Instant Message: Alert for incoming instant messages"},
3090 {0xFB, "Defined by service specification"},
3091 {0xFC, "Defined by service specification"},
3092 {0xFD, "Defined by service specification"},
3093 {0xFE, "Defined by service specification"},
3094 {0xFF, "Defined by service specification"},
3095 {0x0, NULL}
3098 static const value_string alert_command_id_vals[] = {
3099 {0x00, "Enable New Incoming Alert Notification"},
3100 {0x01, "Enable Unread Category Status Notification"},
3101 {0x02, "Disable New Incoming Alert Notification"},
3102 {0x03, "Disable Unread Category Status Notification"},
3103 {0x04, "Notify New Incoming Alert immediately"},
3104 {0x05, "Notify Unread Category Status immediately"},
3105 {0x0, NULL}
3108 static const value_string hid_control_point_command_vals[] = {
3109 {0x00, "Suspend"},
3110 {0x01, "Exit Suspend"},
3111 {0x0, NULL}
3114 static const value_string pnp_id_vendor_id_source_vals[] = {
3115 {0x01, "Bluetooth SIG"},
3116 {0x02, "USB Implementer's Forum"},
3117 {0x0, NULL}
3120 static const value_string sensor_location_vals[] = {
3121 {0x00, "Other"},
3122 {0x01, "Top of shoe"},
3123 {0x02, "In shoe"},
3124 {0x03, "Hip"},
3125 {0x04, "Front Wheel"},
3126 {0x05, "Left Crank"},
3127 {0x06, "Right Crank"},
3128 {0x07, "Left Pedal"},
3129 {0x08, "Right Pedal"},
3130 {0x09, "Front Hub"},
3131 {0x0A, "Rear Dropout"},
3132 {0x0B, "Chainstay"},
3133 {0x0C, "Rear Wheel"},
3134 {0x0D, "Rear Hub"},
3135 {0x0E, "Chest"},
3136 {0x0, NULL}
3139 static const value_string gender_vals[] = {
3140 {0x00, "Male"},
3141 {0x01, "Female"},
3142 {0x02, "Unspecified"},
3143 {0x0, NULL}
3146 static const value_string sport_type_for_aerobic_and_anaerobic_thresholds_vals[] = {
3147 {0x00, "Unspecified"},
3148 {0x01, "Running (Treadmill)"},
3149 {0x02, "Cycling (Ergometer)"},
3150 {0x03, "Rowing (Ergometer)"},
3151 {0x04, "Cross Training (Elliptical)"},
3152 {0x05, "Climbing"},
3153 {0x06, "Skiing"},
3154 {0x07, "Skating"},
3155 {0x08, "Arm exercising"},
3156 {0x09, "Lower body exercising"},
3157 {0x0A, "Upper body exercising"},
3158 {0x0B, "Whole body exercising"},
3159 {0x0, NULL}
3162 static const value_string barometric_pressure_trend_vals[] = {
3163 {0x00, "Unknown"},
3164 {0x01, "Continuously falling"},
3165 {0x02, "Continuously rising"},
3166 {0x03, "Falling, then steady"},
3167 {0x04, "Rising, then steady"},
3168 {0x05, "Falling before a lesser rise"},
3169 {0x06, "Falling before a greater rise"},
3170 {0x07, "Rising before a greater fall"},
3171 {0x08, "Rising before a lesser fall"},
3172 {0x09, "Steady"},
3173 {0x0, NULL}
3176 static const value_string central_address_resolution_vals[] = {
3177 {0x00, "Not Supported"},
3178 {0x01, "Supported"},
3179 {0x0, NULL}
3182 static const value_string resolvable_private_address_vals[] = {
3183 {0x00, "Only Resolvable Private Addresses will be used as local addresses after bonding"},
3184 {0x0, NULL}
3187 static const value_string cycling_power_feature_sensor_measurement_context_vals[] = {
3188 {0x00, "Force Based"},
3189 {0x01, "Torque Based"},
3190 {0x0, NULL}
3193 static const value_string body_composition_feature_mass_measurement_resolution_vals[] = {
3194 {0x00, "Not Specified"},
3195 {0x01, "Resolution of 0.5 kg or 1 lb"},
3196 {0x02, "Resolution of 0.2 kg or 0.5 lb"},
3197 {0x03, "Resolution of 0.1 kg or 0.2 lb"},
3198 {0x04, "Resolution of 0.05 kg or 0.1 lb"},
3199 {0x05, "Resolution of 0.02 kg or 0.05 lb"},
3200 {0x06, "Resolution of 0.01 kg or 0.02 lb"},
3201 {0x07, "Resolution of 0.005 kg or 0.01 lb"},
3202 {0x0, NULL}
3205 static const value_string body_composition_feature_height_measurement_resolution_vals[] = {
3206 {0x00, "Not Specified"},
3207 {0x01, "Resolution of 0.01 meter or 1 inch"},
3208 {0x02, "Resolution of 0.005 meter or 0.5 inch"},
3209 {0x03, "Resolution of 0.001 meter or 0.1 inch"},
3210 {0x0, NULL}
3213 static const value_string weight_scale_feature_height_measurement_resolution_vals[] = {
3214 {0x00, "Not Specified"},
3215 {0x01, "Resolution of 0.01 meter or 1 inch"},
3216 {0x02, "Resolution of 0.005 meter or 0.5 inch"},
3217 {0x03, "Resolution of 0.001 meter or 0.1 inch"},
3218 {0x0, NULL}
3221 static const value_string weight_scale_feature_weight_measurement_resolution_vals[] = {
3222 {0x00, "Not Specified"},
3223 {0x01, "Resolution of 0.5 kg or 1 lb"},
3224 {0x02, "Resolution of 0.2 kg or 0.5 lb"},
3225 {0x03, "Resolution of 0.1 kg or 0.2 lb"},
3226 {0x04, "Resolution of 0.05 kg or 0.1 lb"},
3227 {0x05, "Resolution of 0.02 kg or 0.05 lb"},
3228 {0x06, "Resolution of 0.01 kg or 0.02 lb"},
3229 {0x07, "Resolution of 0.005 kg or 0.01 lb"},
3230 {0x0, NULL}
3233 static const value_string glucose_measurement_flags_glucose_concentration_units_vals[] = {
3234 {0x00, "kg/L"},
3235 {0x01, "mol/L"},
3236 {0x0, NULL}
3239 static const value_string glucose_measurement_type_and_sample_location_type_vals[] = {
3240 {0x01, "Capillary Whole Blood"},
3241 {0x02, "Capillary Plasma"},
3242 {0x03, "Venous Whole Blood"},
3243 {0x04, "Venous Plasma"},
3244 {0x05, "Arterial Whole Blood"},
3245 {0x06, "Arterial Plasma"},
3246 {0x07, "Undetermined Whole Blood"},
3247 {0x08, "Undetermined Plasma"},
3248 {0x09, "Interstitial Fluid"},
3249 {0x0A, "Control Solution"},
3250 {0x0, NULL}
3253 static const value_string glucose_measurement_type_and_sample_location_sample_location_vals[] = {
3254 {0x01, "Finger"},
3255 {0x02, "Alternate Site Test"},
3256 {0x03, "Earlobe"},
3257 {0x04, "Control Solution"},
3258 {0x0F, "Sample Location Value Not Available"},
3259 {0x0, NULL}
3262 static const value_string bond_management_control_point_opcode_vals[] = {
3263 {0x01, "Delete bond of requesting device (BR/EDR and LE)"},
3264 {0x02, "Delete bond of requesting device (BR/EDR transport only)"},
3265 {0x03, "Delete bond of requesting device (LE transport only)"},
3266 {0x04, "Delete all bonds on server (BR/EDR and LE)"},
3267 {0x05, "Delete all bonds on server (BR/EDR transport only)"},
3268 {0x06, "Delete all bonds on server (LE transport only)"},
3269 {0x07, "Delete all but the active bond on server (BR/EDR and LE)"},
3270 {0x08, "Delete all but the active bond on server (BR/EDR transport only)"},
3271 {0x09, "Delete all but the active bond on server (LE transport only)"},
3272 {0x0, NULL}
3275 static const value_string temperature_measurement_flags_temperature_unit_vals[] = {
3276 {0x00, "Celsius"},
3277 {0x01, "Fahrenheit"},
3278 {0x0, NULL}
3281 static const value_string glucose_measurement_context_flags_medication_value_units_vals[] = {
3282 {0x00, "Kilograms"},
3283 {0x01, "Liters"},
3284 {0x0, NULL}
3287 static const value_string glucose_measurement_context_carbohydrate_id_vals[] = {
3288 {0x01, "Breakfast"},
3289 {0x02, "Lunch"},
3290 {0x03, "Dinner"},
3291 {0x04, "Snack"},
3292 {0x05, "Drink"},
3293 {0x06, "Supper"},
3294 {0x07, "Brunch"},
3295 {0x0, NULL}
3298 static const value_string glucose_measurement_context_meal_vals[] = {
3299 {0x01, "Preprandial (before meal)"},
3300 {0x02, "Postprandial (after meal)"},
3301 {0x03, "Fasting"},
3302 {0x04, "Casual (snacks, drinks, etc.)"},
3303 {0x05, "Bedtime"},
3304 {0x0, NULL}
3307 static const value_string glucose_measurement_context_tester_vals[] = {
3308 { 1, "Self"},
3309 { 2, "Health Care Professional"},
3310 { 3, "Lab Test"} ,
3311 {15, "Tester Value not Available"},
3312 {0x0, NULL}
3315 static const value_string glucose_measurement_context_health_vals[] = {
3316 { 1, "Minor Health Issues"},
3317 { 2, "Major Health Issues"},
3318 { 3, "During Menses"},
3319 { 4, "Under Stress"},
3320 { 5, "No Health Issues"},
3321 {15, "Health Value not Available"},
3322 {0x0, NULL}
3325 static const value_string glucose_measurement_context_medication_id_vals[] = {
3326 { 1, "Rapid Acting Insulin"},
3327 { 2, "Short Acting Insulin"},
3328 { 3, "Intermediate Acting Insulin"},
3329 { 4, "Long Acting Insulin"},
3330 { 5, "Pre-mixed Insulin"},
3331 {0x0, NULL}
3334 static const value_string blood_pressure_measurement_unit_vals[] = {
3335 { 0, "mmHg"},
3336 { 1, "kPa"},
3337 {0x0, NULL}
3340 static const value_string blood_pressure_measurement_status_pulse_rate_range_detection_vals[] = {
3341 { 0, "Pulse rate is within the range"},
3342 { 1, "Pulse rate exceeds upper limit"},
3343 { 2, "Pulse rate is less than lower limit"},
3344 { 3, "Reserved"},
3345 {0x0, NULL}
3348 static const value_string record_access_control_point_opcode_vals[] = {
3349 { 0, "Reserved"},
3350 { 1, "Report Stored Records"},
3351 { 2, "Delete Stored Records"},
3352 { 3, "Abort Operation"},
3353 { 4, "Report Number of Stored Records"},
3354 { 5, "Number of Stored Records Response"},
3355 { 6, "Response Code"},
3356 {0x0, NULL}
3359 static const value_string record_access_control_point_operator_vals[] = {
3360 { 0, "Null"},
3361 { 1, "All Records"},
3362 { 2, "Less than or equal to"},
3363 { 3, "Greater than or equal to"},
3364 { 4, "Within range of (inclusive)"},
3365 { 5, "First record(i.e. oldest record)"},
3366 { 6, "Last record (i.e. most recent record)"},
3367 {0x0, NULL}
3370 static const value_string record_access_control_point_operand_filter_type_vals[] = {
3371 { 0x00, "Reserved"},
3372 { 0x01, "Sequence Number"},
3373 { 0x02, "User Facing Time (Base Time + Offset Time)"},
3374 {0x0, NULL}
3377 static const value_string record_access_control_point_response_code_vals[] = {
3378 { 0x00, "Reserved"},
3379 { 0x01, "Success"},
3380 { 0x02, "Op Code not supported"},
3381 { 0x03, "Invalid Operator"},
3382 { 0x04, "Operator not supported"},
3383 { 0x05, "Invalid Operand"},
3384 { 0x06, "No records found"},
3385 { 0x07, "Abort unsuccessful"},
3386 { 0x08, "Procedure not completed"},
3387 { 0x09, "Operand not supported"},
3388 {0x0, NULL}
3391 static const value_string value_trigger_setting_condition_vals[] = {
3392 { 0x00, "None"},
3393 { 0x01, "Analog - Crossed a boundary"},
3394 { 0x02, "Analog - On the boundary"},
3395 { 0x03, "Analog - Exceeds a boundary"},
3396 { 0x04, "Bitmask"},
3397 { 0x05, "Analog Interval - Inside or outside the boundaries"},
3398 { 0x06, "Analog Interval - On the boundaries"},
3399 { 0x07, "No value trigger"},
3400 {0x0, NULL}
3404 static const value_string digital_vals[] = {
3405 { 0x00, "Inactive"},
3406 { 0x01, "Active"},
3407 { 0x02, "Tri-state"},
3408 { 0x03, "Output-state"},
3409 {0x0, NULL}
3413 const value_string btatt_ips_uncertainty_stationary_vals[] = {
3414 { 0x00, "Stationary"},
3415 { 0x01, "Mobile"},
3416 {0x0, NULL}
3420 const value_string btatt_ips_uncertainty_update_time_vals[] = {
3421 { 0x00, "Up to 3s"},
3422 { 0x01, "Up to 4s"},
3423 { 0x02, "Up to 6s"},
3424 { 0x03, "Up to 12s"},
3425 { 0x04, "Up to 28s"},
3426 { 0x05, "Up to 89s"},
3427 { 0x06, "Up to 426s"},
3428 { 0x07, "3541s"},
3429 {0x0, NULL}
3433 const value_string btatt_ips_uncertainty_precision_vals[] = {
3434 { 0x00, "Less than 0.1m"},
3435 { 0x01, "0.1-1m"},
3436 { 0x02, "1-2m"},
3437 { 0x03, "2-5m"},
3438 { 0x04, "5-10m"},
3439 { 0x05, "10-50m"},
3440 { 0x06, "Greater than 50m"},
3441 { 0x07, "N/A"},
3442 {0x0, NULL}
3446 const value_string btatt_ips_coordinate_system[] = {
3447 { 0x00, "WGS84 Coordinate System"},
3448 { 0x01, "Local Coordinate System"},
3449 {0x0, NULL}
3453 static const value_string time_trigger_setting_condition_vals[] = {
3454 { 0x00, "No time-based triggering used"},
3455 { 0x01, "Indicates or notifies unconditionally after a settable time"},
3456 { 0x02, "Not indicated or notified more often than a settable time"},
3457 { 0x03, "Changed more often than"},
3458 {0x0, NULL}
3462 static const value_string rsc_measurement_flags_type_of_movement_vals[] = {
3463 { 0x00, "Walking"},
3464 { 0x01, "Running"},
3465 {0x0, NULL}
3468 static const value_string sc_control_point_opcode_vals[] = {
3469 { 0x01, "Set Cumulative Value"},
3470 { 0x02, "Start Sensor Calibration"},
3471 { 0x03, "Update Sensor Location"},
3472 { 0x04, "Request Supported Sensor Locations"},
3473 { 0x10, "Response Code"},
3474 {0x0, NULL}
3477 static const value_string sc_control_point_response_value_vals[] = {
3478 { 0x01, "Success"},
3479 { 0x02, "Opcode not Supported"},
3480 { 0x03, "Invalid Parameter"},
3481 { 0x04, "Operation Failed"},
3482 {0x0, NULL}
3485 static const value_string cycling_power_measurement_flags_accumulated_torque_source_vals[] = {
3486 { 0x00, "Wheel Based"},
3487 { 0x01, "Crank Based"},
3488 {0x0, NULL}
3491 static const value_string cycling_power_vector_flags_instantaneous_measurement_direction_vals[] = {
3492 { 0x00, "Unknown"},
3493 { 0x01, "Tangential Component"},
3494 { 0x02, "Radial Component"},
3495 { 0x03, "Lateral Component"},
3496 {0x0, NULL}
3499 static const value_string cycling_power_control_point_opcode[] = {
3500 { 0x01, "Set Cumulative Value"},
3501 { 0x02, "Update Sensor Location"},
3502 { 0x03, "Request Supported Sensor Locations"},
3503 { 0x04, "Set Crank Length"},
3504 { 0x05, "Request Crank Length"},
3505 { 0x06, "Set Chain Length"},
3506 { 0x07, "Request Chain Length"},
3507 { 0x08, "Set Chain Weight"},
3508 { 0x09, "Request Chain Weight"},
3509 { 0x0A, "Set Span Length"},
3510 { 0x0B, "Request Span Length"},
3511 { 0x0C, "Start Offset Compensation"},
3512 { 0x0D, "Mask Cycling Power Measurement Characteristic Content"},
3513 { 0x0E, "Request Sampling Rate"},
3514 { 0x0F, "Request Factory Calibration Date"},
3515 { 0x20, "Response Code"},
3516 {0x0, NULL}
3519 static const value_string cycling_power_control_point_response_value[] = {
3520 { 0x01, "Success"},
3521 { 0x02, "Opcode not Supported"},
3522 { 0x03, "Invalid Parameter"},
3523 { 0x04, "Operation Failed"},
3524 {0x0, NULL}
3527 static const value_string location_and_speed_flags_elevation_source_vals[] = {
3528 { 0x00, "Positioning System"},
3529 { 0x01, "Barometric Air Pressure"},
3530 { 0x02, "Database Service (or similar)"},
3531 { 0x03, "Other"},
3532 {0x0, NULL}
3535 static const value_string flags_position_status_vals[] = {
3536 { 0x00, "No Position"},
3537 { 0x01, "Position Ok"},
3538 { 0x02, "Estimated Position"},
3539 { 0x03, "Last Known Position"},
3540 {0x0, NULL}
3543 static const value_string ln_control_point_opcode[] = {
3544 { 0x01, "Set Cumulative Value"},
3545 { 0x02, "Mask Location and Speed Characteristic Content"},
3546 { 0x03, "Navigation Control"},
3547 { 0x04, "Request Number of Routes"},
3548 { 0x05, "Request Name of Route"},
3549 { 0x06, "Select Route"},
3550 { 0x07, "Set Fix Rate"},
3551 { 0x08, "Set Elevation"},
3552 { 0x20, "Response Code"},
3553 {0x0, NULL}
3556 static const value_string ln_control_point_navigation_control_vals[] = {
3557 { 0x00, "Stop Notification of the Navigation characteristic. Stop Navigation."},
3558 { 0x01, "Start Notification of the Navigation characteristic. Start Navigation to the first waypoint on a route."},
3559 { 0x02, "Stop Notification of the Navigation characteristic. Pause Navigation keeping the next waypoint on the route in the memory for continuing the navigation later."},
3560 { 0x03, "Start Notification of the Navigation characteristic. Continue Navigation from the point where navigation was paused to the next waypoint on the route."},
3561 { 0x04, "Notification of the Navigation characteristic not affected. Skip Waypoint: disregard next waypoint and continue navigation to the waypoint following next waypoint on the route."},
3562 { 0x05, "Start Notification of the Navigation characteristic. Select Nearest Waypoint on a Route: measure the distance to all waypoints on the route, and start navigation to the closest or optimal waypoint on the route (left to the implementation) and from there to waypoints following next waypoint along the route."},
3563 {0x0, NULL}
3566 static const value_string ln_control_point_response_value[] = {
3567 { 0x01, "Success"},
3568 { 0x02, "Opcode not Supported"},
3569 { 0x03, "Invalid Parameter"},
3570 { 0x04, "Operation Failed"},
3571 {0x0, NULL}
3574 static const value_string body_composition_measurement_flags_measurement_units_vals[] = {
3575 { 0, "SI (kg & m)"},
3576 { 1, "Imperial (lb & in)"},
3577 {0x0, NULL}
3580 static const value_string user_control_point_opcode_vals[] = {
3581 { 0x01, "Register New User"},
3582 { 0x02, "Consent"},
3583 { 0x03, "Delete User Data"},
3584 { 0x20, "Response Code"},
3585 {0x0, NULL}
3588 static const value_string user_control_point_response_value_vals[] = {
3589 { 0x01, "Success"},
3590 { 0x02, "Opcode not Supported"},
3591 { 0x03, "Invalid Parameter"},
3592 { 0x04, "Operation Failed"},
3593 { 0x05, "User not Authorized"},
3594 {0x0, NULL}
3597 static const value_string cgm_feature_type_vals[] = {
3598 { 0x01, "Capillary Whole Blood"},
3599 { 0x02, "Capillary Plasma"},
3600 { 0x03, "Capillary Whole Blood"},
3601 { 0x04, "Venous Plasma"},
3602 { 0x05, "Arterial Whole Blood"},
3603 { 0x06, "Arterial Plasma"},
3604 { 0x07, "Undetermined Whole Blood"},
3605 { 0x08, "Undetermined Plasma"},
3606 { 0x09, "Interstitial Fluid (ISF)"},
3607 { 0x0A, "Control Solution"},
3608 {0x0, NULL}
3611 static const value_string cgm_feature_sample_location_vals[] = {
3612 { 0x01, "Finger"},
3613 { 0x02, "Alternate Site Test (AST)"},
3614 { 0x03, "Earlobe"},
3615 { 0x04, "Control Solution"},
3616 { 0x05, "Subcutaneous Tissue"},
3617 { 0x0F, "Sample Location Value not Available"},
3618 {0x0, NULL}
3621 static const value_string cgm_specific_ops_control_point_opcode_vals[] = {
3622 { 0x01, "Set CGM Communication Interval"},
3623 { 0x02, "Get CGM Communication Interval"},
3624 { 0x03, "CGM Communication Interval response"},
3625 { 0x04, "Set Glucose Calibration Value"},
3626 { 0x05, "Get Glucose Calibration Value"},
3627 { 0x06, "Glucose Calibration Value response"},
3628 { 0x07, "Set Patient High Alert Level"},
3629 { 0x08, "Get Patient High Alert Level"},
3630 { 0x09, "Patient High Alert Level Response"},
3631 { 0x0A, "Set Patient Low Alert Level"},
3632 { 0x0B, "Get Patient Low Alert Level"},
3633 { 0x0C, "Patient Low Alert Level Response"},
3634 { 0x0D, "Set Hypo Alert Level"},
3635 { 0x0E, "Get Hypo Alert Level"},
3636 { 0x0F, "Hypo Alert Level Response"},
3637 { 0x10, "Set Hyper Alert Level"},
3638 { 0x11, "Get Hyper Alert Level"},
3639 { 0x12, "Hyper Alert Level Response"},
3640 { 0x13, "Set Rate of Decrease Alert Level"},
3641 { 0x14, "Get Rate of Decrease Alert Level"},
3642 { 0x15, "Rate of Decrease Alert Level Response"},
3643 { 0x16, "Set Rate of Increase Alert Level"},
3644 { 0x17, "Get Rate of Increase Alert Level"},
3645 { 0x18, "Rate of Increase Alert Level Response"},
3646 { 0x19, "Reset Device Specific Alert"},
3647 { 0x1A, "Start the Session"},
3648 { 0x1B, "Stop the Session"},
3649 { 0x1C, "Response Code"},
3650 {0x0, NULL}
3653 static const value_string cgm_specific_ops_control_point_response_code_vals[] = {
3654 { 0x01, "Success"},
3655 { 0x02, "Op Code not Supported"},
3656 { 0x03, "Invalid Operand"},
3657 { 0x04, "Procedure not Completed"},
3658 { 0x05, "Parameter Out of Range"},
3659 {0x0, NULL}
3662 static const value_string nordic_dfu_control_point_opcode_vals[] = {
3663 { 0x01, "Start DFU"},
3664 { 0x02, "Initialize DFU Parameters"},
3665 { 0x03, "Receive Firmware Image"},
3666 { 0x04, "Validate Firmware"},
3667 { 0x05, "Activate Image and Reset"},
3668 { 0x06, "Reset System"},
3669 { 0x07, "Report Received Image Size"},
3670 { 0x08, "Packet Receipt Notification Request"},
3671 { 0x10, "Response Code"},
3672 { 0x11, "Packet Receipt Notification"},
3673 {0x0, NULL}
3676 static const value_string nordic_dfu_control_point_image_type_vals[] = {
3677 { 0x00, "No Image"},
3678 { 0x01, "SoftDevice"},
3679 { 0x02, "Bootloader"},
3680 { 0x03, "Bootloader+SoftDevice"},
3681 { 0x04, "Application"},
3682 { 0x05, "Other Image Combination - currently not supported"},
3683 { 0x06, "Other Image Combination - currently not supported"},
3684 { 0x07, "Other Image Combination - currently not supported"},
3685 {0x0, NULL}
3688 static const value_string nordic_dfu_control_point_init_packet_vals[] = {
3689 { 0x00, "Receive Init Packet"},
3690 { 0x01, "Init Packet Complete"},
3691 {0x0, NULL}
3694 static const value_string nordic_dfu_control_point_response_value_vals[] = {
3695 { 0x01, "Success"},
3696 { 0x02, "Invalid State"},
3697 { 0x03, "Not Supported"},
3698 { 0x04, "Data Size Exceeds Limit"},
3699 { 0x05, "CRC Error"},
3700 { 0x06, "Operation Failed"},
3701 {0x0, NULL}
3704 static const value_string https_security_vals[] = {
3705 { 0x00, "False"},
3706 { 0x01, "True"},
3707 {0x0, NULL}
3710 static const value_string http_control_point_opcode_vals[] = {
3711 { 0x01, "HTTP GET Request"},
3712 { 0x02, "HTTP HEAD Request"},
3713 { 0x03, "HTTP POST Request"},
3714 { 0x04, "HTTP PUT Request"},
3715 { 0x05, "HTTP DELETE Request"},
3716 { 0x06, "HTTPS GET Request"},
3717 { 0x07, "HTTPS HEAD Request"},
3718 { 0x08, "HTTPS POST Request"},
3719 { 0x09, "HTTPS PUT Request"},
3720 { 0x0A, "HTTPS DELETE Request"},
3721 { 0x0B, "HTTP Request Cancel"},
3722 {0x0, NULL}
3725 const value_string tds_organization_id_vals[] = {
3726 { 0x00, "RFU" },
3727 { 0x01, "Bluetooth SIG" },
3728 {0, NULL }
3731 static const value_string tds_opcode_vals[] = {
3732 { 0x00, "RFU" },
3733 { 0x01, "Activate Transport" },
3734 {0, NULL }
3737 static const value_string tds_result_code_vals[] = {
3738 { 0x00, "Success" },
3739 { 0x01, "Opcode not Supported" },
3740 { 0x02, "Invalid Parameter" },
3741 { 0x03, "Unsupported Organization ID" },
3742 { 0x04, "Operation Failed" },
3743 {0, NULL }
3746 static const value_string timezone_information_vals[] = {
3747 { 0x00, "Signification Unknown" },
3748 { 0x01, "Manually Set Time Zone" },
3749 { 0x02, "Time Zone at Place of Departure" },
3750 { 0x03, "Time Zone at Destination" },
3751 { 0x04, "Time Zone at Home" },
3752 {0, NULL }
3755 static const value_string ots_action_opcode_vals[] = {
3756 { 0x00, "Reserved" },
3757 { 0x01, "Create" },
3758 { 0x02, "Delete" },
3759 { 0x03, "Calculate Checksum" },
3760 { 0x04, "Execute" },
3761 { 0x05, "Read" },
3762 { 0x06, "Write" },
3763 { 0x07, "Abort" },
3764 { 0x60, "Response Code" },
3765 {0, NULL }
3768 static const value_string ots_action_result_code_vals[] = {
3769 { 0x00, "Reserved" },
3770 { 0x01, "Success" },
3771 { 0x02, "Opcode not Supported" },
3772 { 0x03, "Invalid Parameter" },
3773 { 0x04, "Insufficient Resources" },
3774 { 0x05, "Invalid Object" },
3775 { 0x06, "Channel Unavailable" },
3776 { 0x07, "Unsupported Type" },
3777 { 0x08, "Procedure not Permitted" },
3778 { 0x09, "Object Locked" },
3779 { 0x0A, "Operation Failed" },
3780 {0, NULL }
3783 static const value_string ots_list_opcode_vals[] = {
3784 { 0x00, "Reserved" },
3785 { 0x01, "First" },
3786 { 0x02, "Last" },
3787 { 0x03, "Previous" },
3788 { 0x04, "Next" },
3789 { 0x05, "Go To" },
3790 { 0x06, "Order" },
3791 { 0x07, "Request Number of Objects" },
3792 { 0x08, "Clear Marking" },
3793 { 0x70, "Response Code" },
3794 {0, NULL }
3797 static const value_string ots_list_order_vals[] = {
3798 { 0x00, "Reserved" },
3799 { 0x01, "Name, Ascending" },
3800 { 0x02, "Type, Ascending" },
3801 { 0x03, "Current Size Ascending" },
3802 { 0x04, "First-created Timestamp, Ascending" },
3803 { 0x05, "Last-modified Timestamp, Ascending" },
3804 { 0x11, "Name, Descending" },
3805 { 0x12, "Type, Descending" },
3806 { 0x13, "Current Size Descending" },
3807 { 0x14, "First-created Timestamp, Descending" },
3808 { 0x15, "Last-modified Timestamp, Descending" },
3809 {0, NULL }
3812 static const value_string ots_list_result_code_vals[] = {
3813 { 0x00, "Reserved" },
3814 { 0x01, "Success" },
3815 { 0x02, "Opcode not Supported" },
3816 { 0x03, "Invalid Parameter" },
3817 { 0x04, "Operation Failed" },
3818 { 0x05, "Out of Bounds" },
3819 { 0x06, "Too Many Objects" },
3820 { 0x07, "No Object" },
3821 { 0x08, "Object ID not Found" },
3822 {0, NULL }
3825 static const value_string ots_filter_vals[] = {
3826 { 0x00, "No Filter" },
3827 { 0x01, "Name Starts With" },
3828 { 0x02, "Name Ends With" },
3829 { 0x03, "Name Contains" },
3830 { 0x04, "Name is Exactly" },
3831 { 0x05, "Object Type" },
3832 { 0x06, "Created Between" },
3833 { 0x07, "Modified Between" },
3834 { 0x08, "Current Size Between" },
3835 { 0x09, "Allocated Size Between" },
3836 { 0x0A, "Marked Objects" },
3837 {0, NULL }
3840 static const value_string regulatory_certification_data_list_item_body_structure_type_vals[] = {
3841 { 0x01, "Authorizing Body" },
3842 { 0x02, "Continua Regulatory" },
3843 {0, NULL }
3846 static const value_string btgatt_microbit_button_state_vals[] = {
3847 { 0x00, "Not Pressed" },
3848 { 0x01, "Pressed" },
3849 { 0x02, "Long Press" },
3850 {0, NULL }
3853 static const value_string battery_power_state_present_vals[] = {
3854 { 0x00, "Unknown" },
3855 { 0x01, "Not Supported" },
3856 { 0x02, "Not Present" },
3857 { 0x03, "Present" },
3858 {0, NULL }
3861 static const value_string battery_power_state_discharging_vals[] = {
3862 { 0x00, "Unknown" },
3863 { 0x01, "Not Supported" },
3864 { 0x02, "Not Discharging" },
3865 { 0x03, "Discharging" },
3866 {0, NULL }
3869 static const value_string battery_power_state_charging_vals[] = {
3870 { 0x00, "Unknown" },
3871 { 0x01, "Not Chargeable" },
3872 { 0x02, "Not Charging " },
3873 { 0x03, "Charging" },
3874 {0, NULL }
3877 static const value_string battery_power_state_level_vals[] = {
3878 { 0x00, "Unknown" },
3879 { 0x01, "Not Supported" },
3880 { 0x02, "Good Level" },
3881 { 0x03, "Critically Low Level" },
3882 {0, NULL }
3885 static const value_string removable_removable_vals[] = {
3886 { 0x00, "Unknown" },
3887 { 0x01, "Not Removable" },
3888 { 0x02, "Removable" },
3889 {0, NULL }
3892 static const value_string service_required_service_required_vals[] = {
3893 { 0x00, "Unknown" },
3894 { 0x01, "No Service Required" },
3895 { 0x02, "Service Required" },
3896 {0, NULL }
3899 static const value_string network_availability_vals[] = {
3900 { 0x00, "No network available" },
3901 { 0x01, "One or more networks available" },
3902 {0, NULL }
3905 static const value_string training_status_status_vals[] = {
3906 { 0x00, "Other" },
3907 { 0x01, "Idle" },
3908 { 0x02, "Warming Up" },
3909 { 0x03, "Low Intensity Interval" },
3910 { 0x04, "High Intensity Interval" },
3911 { 0x05, "Recovery Interval" },
3912 { 0x06, "Isometric" },
3913 { 0x07, "Heart Rate Control" },
3914 { 0x08, "Fitness Test" },
3915 { 0x09, "Speed Outside of Control Region - Low" },
3916 { 0x0A, "Speed Outside of Control Region - High" },
3917 { 0x0B, "Cool Down" },
3918 { 0x0C, "Watt Control" },
3919 { 0x0D, "Manual Mode (Quick Start)" },
3920 { 0x0E, "Pre-Workout" },
3921 { 0x0F, "Post-Workout" },
3922 {0, NULL }
3925 static const value_string fitness_machine_status_opcode_vals[] = {
3926 { 0x01, "Reset" },
3927 { 0x02, "Fitness Machine Stopped or Paused by the User" },
3928 { 0x03, "Fitness Machine Stopped by Safety Key" },
3929 { 0x04, "Fitness Machine Started or Resumed by the User" },
3930 { 0x05, "Target Speed Changed" },
3931 { 0x06, "Target Incline Changed" },
3932 { 0x07, "Target Resistance Level Changed" },
3933 { 0x08, "Target Power Changed" },
3934 { 0x09, "Target Heart Rate Changed" },
3935 { 0x0A, "Targeted Expended Energy Changed" },
3936 { 0x0B, "Targeted Number of Steps Changed" },
3937 { 0x0C, "Targeted Number of Strides Changed" },
3938 { 0x0D, "Targeted Distance Changed" },
3939 { 0x0E, "Targeted Training Time Changed" },
3940 { 0x0F, "Targeted Time in Three Heart Rate Zones Changed" },
3941 { 0x10, "Targeted Time in Three Heart Rate Zones Changed" },
3942 { 0x11, "Targeted Time in Five Heart Rate Zones Changed" },
3943 { 0x12, "Indoor Bike Simulation Parameters Changed" },
3944 { 0x13, "Wheel Circumference Changed" },
3945 { 0x14, "Spin Down Status" },
3946 { 0x15, "Targeted Cadence Changed" },
3947 { 0xFF, "Control Permission Lost" },
3948 {0, NULL }
3951 static const value_string fitness_machine_control_information_vals[] = {
3952 { 0x01, "Stop" },
3953 { 0x02, "Pause" },
3954 {0, NULL }
3957 static const value_string fitness_machine_spin_down_status_vals[] = {
3958 { 0x01, "Spin Down Requested" },
3959 { 0x02, "Success" },
3960 { 0x03, "Error" },
3961 { 0x04, "Stop Pedalling" },
3962 {0, NULL }
3965 static const value_string ots_volume_control_point_procedure_vals[] = {
3966 { 0x00, "Relative Volume Down" },
3967 { 0x01, "Relative Volume Up" },
3968 { 0x02, "Unmute/Relative Volume Down" },
3969 { 0x03, "Unmute/Relative Volume Up" },
3970 { 0x04, "Set Absolute Volume" },
3971 { 0x05, "Unmute" },
3972 { 0x06, "Mute" },
3973 {0, NULL }
3976 static const true_false_string control_point_mask_value_tfs = {
3977 "Leave as Default",
3978 "Turn Off" };
3980 static const true_false_string flags_heading_source_tfs = {
3981 "Magnetic Compass",
3982 "Movement" };
3984 static const true_false_string location_and_speed_flags_speed_and_distance_format_tfs = {
3985 "3D",
3986 "2D" };
3988 static const true_false_string navigation_indicator_type_tfs = {
3989 "To Destination",
3990 "To Waypoint" };
3992 static const true_false_string weight_measurement_flags_measurement_units_tfs = {
3993 "Imperial (lb & in)",
3994 "SI (kg & m)" };
3996 static const true_false_string microbit_ad_tfs = {
3997 "Analogue",
3998 "Digital"
4001 static const true_false_string microbit_io_tfs = {
4002 "Input",
4003 "Output"
4006 static const true_false_string timezone_information_type_tfs = {
4007 "Information relative to local time",
4008 "Information relative to UTC"
4012 static const char *unit_unitless = "";
4014 /* signed area*/
4016 static void helper_base_signed_negative_exponent(char * const buf, const int base, const char * const unit, const uint32_t value)
4018 const int32_t signed_value = (const int32_t) value;
4019 const int32_t fraction = (((signed_value < 0) ? -1 : 1) * signed_value) % base;
4020 snprintf(buf, ITEM_LABEL_LENGTH, "%i.%i%s", signed_value / base, fraction, unit);
4023 static void base_signed_one_tenth_unitless(char *buf, uint32_t value) {
4024 helper_base_signed_negative_exponent(buf, 10, unit_unitless, value);
4027 static void base_signed_one_tenth_percentage(char *buf, uint32_t value) {
4028 helper_base_signed_negative_exponent(buf, 10, "%%", value);
4031 static void base_signed_one_thousandth_meters_per_seconds(char *buf, uint32_t value) {
4032 helper_base_signed_negative_exponent(buf, 1000, "m/s", value);
4035 static void base_signed_one_hundredth_percentage(char *buf, uint32_t value) {
4036 helper_base_signed_negative_exponent(buf, 100, "%%", value);
4039 /* unsigned area */
4041 static void base_unsigned_one_tenth_unitless(char *buf, uint32_t value) {
4042 snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u", value / 10, value % 10);
4045 static void base_unsigned_one_hundredth_km_h(char *buf, uint32_t value) {
4046 snprintf(buf, ITEM_LABEL_LENGTH, "%u.%02u km/h", value / 100, value % 100);
4049 static void base_unsigned_one_tenth_percentage(char *buf, uint32_t value) {
4050 snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u%%", value / 10, value % 10);
4053 static void base_unsigned_one_tenth_milimeters(char *buf, uint32_t value) {
4054 snprintf(buf, ITEM_LABEL_LENGTH, "%u.%umm", value / 10, value % 10);
4057 static void base_unsigned_one_half_half_minute(char *buf, uint32_t value) {
4058 snprintf(buf, ITEM_LABEL_LENGTH, "%u.%um 1/min", value / 2, value % 2);
4061 static void base_unsigned_one_ten_thousandth_unitless(char *buf, uint32_t value) {
4062 snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u", value / 10000, value % 10000);
4066 static void base_unsigned_one_hundredth_kg_per_meter(char *buf, uint32_t value) {
4067 snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u Kg/m", value / 100, value % 100);
4071 union request_parameters_union {
4072 void *data;
4074 struct _read_write {
4075 uint16_t handle;
4076 uint16_t offset;
4077 } read_write;
4079 struct _read_multiple {
4080 unsigned number_of_handles;
4081 uint16_t *handle;
4082 } read_multiple;
4084 struct _mtu {
4085 uint16_t mtu;
4086 } mtu;
4088 struct _read_by_type {
4089 uint16_t starting_handle;
4090 uint16_t ending_handle;
4091 bluetooth_uuid_t uuid;
4092 } read_by_type;
4094 struct _find_information {
4095 uint16_t starting_handle;
4096 uint16_t ending_handle;
4097 } find_information;
4100 typedef struct _request_data_t {
4101 uint8_t opcode;
4102 uint32_t request_in_frame;
4103 uint32_t response_in_frame;
4105 union request_parameters_union parameters;
4106 } request_data_t;
4108 typedef struct _handle_data_t {
4109 bluetooth_uuid_t uuid;
4111 enum attribute_type type;
4112 } handle_data_t;
4115 typedef struct _mtu_data_t {
4116 unsigned mtu;
4117 } mtu_data_t;
4119 typedef struct _fragment_data_t {
4120 unsigned length;
4121 unsigned offset;
4122 int data_in_frame;
4123 uint8_t *data;
4124 } fragment_data_t;
4127 void proto_register_btatt(void);
4128 void proto_reg_handoff_btatt(void);
4130 void proto_register_btgatt(void);
4131 void proto_reg_handoff_btgatt(void);
4133 #define PROTO_DATA_BTATT_HANDLE 0x00
4135 static void btatt_handle_prompt(packet_info *pinfo, char* result)
4137 uint16_t *value_data;
4139 value_data = (uint16_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE);
4140 if (value_data)
4141 snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "ATT Handle 0x%04x as", (unsigned) *value_data);
4142 else
4143 snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Unknown ATT Handle");
4146 static void *btatt_handle_value(packet_info *pinfo)
4148 uint16_t *value_data;
4150 value_data = (uint16_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE);
4152 if (value_data)
4153 return GUINT_TO_POINTER((unsigned long)*value_data);
4155 return NULL;
4158 static bool is_readable_request(uint8_t opcode)
4160 return (opcode == ATT_OPCODE_READ_REQUEST ||
4161 opcode == ATT_OPCODE_READ_BLOB_REQUEST ||
4162 opcode == ATT_OPCODE_READ_BY_TYPE_REQUEST ||
4163 opcode == ATT_OPCODE_READ_MULTIPLE_REQUEST);
4166 static bool is_readable_response(uint8_t opcode)
4168 return (opcode == ATT_OPCODE_READ_RESPONSE ||
4169 opcode == ATT_OPCODE_READ_BLOB_RESPONSE ||
4170 opcode == ATT_OPCODE_READ_BY_TYPE_RESPONSE ||
4171 opcode == ATT_OPCODE_READ_MULTIPLE_RESPONSE);
4174 static bool is_writeable_request(uint8_t opcode)
4176 return (opcode == ATT_OPCODE_WRITE_REQUEST ||
4177 opcode == ATT_OPCODE_WRITE_PREPARE_REQUEST);
4180 static bool is_writeable_response(uint8_t opcode)
4182 return (opcode == ATT_OPCODE_WRITE_RESPONSE ||
4183 opcode == ATT_OPCODE_WRITE_PREPARE_RESPONSE);
4186 static uint16_t
4187 get_gatt_service_handle_from_handle(packet_info *pinfo, uint32_t handle,
4188 bluetooth_data_t *bluetooth_data);
4190 static uint16_t
4191 get_gatt_char_decl_handle_from_handle(packet_info *pinfo, uint32_t handle,
4192 bluetooth_data_t *bluetooth_data);
4194 bool bluetooth_gatt_has_no_parameter(uint8_t opcode)
4196 return is_readable_request(opcode) ||
4197 opcode == ATT_OPCODE_WRITE_RESPONSE ||
4198 opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION;
4201 static int
4202 get_handle_db_direction(uint8_t opcode, int direction)
4204 if (is_readable_request(opcode) || is_writeable_request(opcode) || opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION || opcode == ATT_OPCODE_WRITE_REQUEST)
4205 return !direction;
4206 if (is_readable_response(opcode) || is_writeable_response(opcode))
4207 return direction;
4208 if (opcode == ATT_OPCODE_HANDLE_VALUE_NOTIFICATION || opcode == ATT_OPCODE_HANDLE_VALUE_INDICATION)
4209 return direction;
4211 return direction;
4214 static request_data_t *
4215 get_request(tvbuff_t *tvb, int offset, packet_info *pinfo, uint8_t opcode,
4216 bluetooth_data_t *bluetooth_data)
4218 request_data_t *request_data;
4219 wmem_tree_key_t key[5];
4220 wmem_tree_t *sub_wmemtree;
4221 uint32_t frame_number, curr_layer_num, direction;
4223 if (!bluetooth_data)
4224 return NULL;
4226 curr_layer_num = pinfo->curr_layer_num;
4227 // Request is always in opposite direction from response
4228 direction = pinfo->p2p_dir == P2P_DIR_SENT ? P2P_DIR_RECV : P2P_DIR_SENT;
4230 key[0].length = 1;
4231 key[0].key = &bluetooth_data->interface_id;
4232 key[1].length = 1;
4233 key[1].key = &bluetooth_data->adapter_id;
4234 key[2].length = 1;
4235 key[2].key = &curr_layer_num;
4236 key[3].length = 1;
4237 key[3].key = &direction;
4238 key[4].length = 0;
4239 key[4].key = NULL;
4241 frame_number = pinfo->num;
4243 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(requests, key);
4244 request_data = (sub_wmemtree) ? (request_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4245 if (request_data && request_data->request_in_frame == pinfo->num)
4246 return request_data;
4248 if (request_data) do {
4249 frame_number = request_data->request_in_frame - 1;
4251 if (request_data->request_in_frame == pinfo->num)
4252 break;
4254 switch (opcode) {
4255 case 0x01: /* Error Response */
4256 if (tvb_captured_length_remaining(tvb, offset) < 1)
4257 return NULL;
4258 opcode = tvb_get_uint8(tvb, 1) + 1;
4259 /* FALL THROUGH */
4260 case 0x03: /* Exchange MTU Response */
4261 case 0x05: /* Find Information Response */
4262 case 0x07: /* Find By Type Value Response */
4263 case 0x09: /* Read By Type Response */
4264 case 0x0b: /* Read Response */
4265 case 0x0d: /* Read Blob Response */
4266 case 0x0f: /* Read Multiple Response */
4267 case 0x11: /* Read By Group Type Response */
4268 case 0x13: /* Write Response */
4269 case 0x17: /* Prepare Write Response */
4270 case 0x19: /* Execute Write Response */
4271 case 0x21: /* Read Multiple Variable Response */
4272 case 0x1E: /* Handle Value Confirmation */
4273 if (request_data->opcode == opcode - 1)
4274 return request_data;
4276 break;
4278 } while(0);
4280 request_data = (sub_wmemtree) ? (request_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4282 if (!request_data)
4283 return NULL;
4285 if (request_data->request_in_frame == pinfo->num)
4286 return request_data;
4288 switch (opcode) {
4289 case 0x01: /* Error Response */
4290 if (tvb_captured_length_remaining(tvb, offset) < 1)
4291 return NULL;
4292 opcode = tvb_get_uint8(tvb, 1) + 1;
4293 /* FALL THROUGH */
4294 case 0x03: /* Exchange MTU Response */
4295 case 0x05: /* Find Information Response */
4296 case 0x07: /* Find By Type Value Response */
4297 case 0x09: /* Read By Type Response */
4298 case 0x0b: /* Read Response */
4299 case 0x0d: /* Read Blob Response */
4300 case 0x0f: /* Read Multiple Response */
4301 case 0x11: /* Read By Group Type Response */
4302 case 0x13: /* Write Response */
4303 case 0x17: /* Prepare Write Response */
4304 case 0x19: /* Execute Write Response */
4305 case 0x21: /* Read Multiple Variable Response */
4306 case 0x1E: /* Handle Value Confirmation */
4307 if (request_data->opcode == opcode -1)
4308 return request_data;
4310 break;
4311 case 0x1B: /* Handle Value Notification */
4312 case 0x52: /* Write Command */
4313 case 0xD2: /* Signed Write Command */
4314 /* There is no response for them */
4315 return NULL;
4316 case 0x02: /* Exchange MTU Request */
4317 case 0x04: /* Find Information Request */
4318 case 0x06: /* Find By Type Value Request */
4319 case 0x08: /* Read By Type Request */
4320 case 0x0a: /* Read Request */
4321 case 0x0c: /* Read Blob Request */
4322 case 0x0e: /* Read Multiple Request */
4323 case 0x10: /* Read By Group Type Request */
4324 case 0x12: /* Write Request */
4325 case 0x16: /* Prepare Write Request */
4326 case 0x18: /* Execute Write Request */
4327 case 0x1D: /* Handle Value Indication */
4328 case 0x20: /* Read Multiple Variable Request */
4329 /* This should never happen */
4330 default:
4331 return NULL;
4334 return NULL;
4337 static void
4338 save_request(packet_info *pinfo, uint8_t opcode, union request_parameters_union parameters,
4339 bluetooth_data_t *bluetooth_data)
4341 wmem_tree_key_t key[6];
4342 uint32_t frame_number, curr_layer_num, direction;
4343 request_data_t *request_data;
4345 frame_number = pinfo->num;
4346 curr_layer_num = pinfo->curr_layer_num;
4347 direction = pinfo->p2p_dir;
4349 key[0].length = 1;
4350 key[0].key = &bluetooth_data->interface_id;
4351 key[1].length = 1;
4352 key[1].key = &bluetooth_data->adapter_id;
4353 key[2].length = 1;
4354 key[2].key = &curr_layer_num;
4355 key[3].length = 1;
4356 key[3].key = &direction;
4357 key[4].length = 1;
4358 key[4].key = &frame_number;
4359 key[5].length = 0;
4360 key[5].key = NULL;
4362 request_data = wmem_new0(wmem_file_scope(), request_data_t);
4363 request_data->opcode = opcode;
4364 request_data->request_in_frame = frame_number;
4365 request_data->response_in_frame = 0;
4367 request_data->parameters = parameters;
4369 wmem_tree_insert32_array(requests, key, request_data);
4372 static void
4373 save_handle(packet_info *pinfo, bluetooth_uuid_t uuid, uint32_t handle,
4374 enum attribute_type attribute_type, bluetooth_data_t *bluetooth_data)
4376 if (!handle && uuid.size != 2 && uuid.size != 16)
4377 return;
4379 if (have_tap_listener(btatt_tap_handles)) {
4380 tap_handles_t *tap_handles;
4382 tap_handles = wmem_new(pinfo->pool, tap_handles_t);
4383 tap_handles->handle = handle;
4384 tap_handles->uuid = uuid;
4385 tap_handles->attribute_type = attribute_type;
4387 tap_handles->service_handle =
4388 get_gatt_service_handle_from_handle(pinfo, handle, bluetooth_data);
4389 tap_handles->char_decl_handle =
4390 get_gatt_char_decl_handle_from_handle(pinfo, handle, bluetooth_data);
4392 tap_queue_packet(btatt_tap_handles, pinfo, tap_handles);
4395 if (!pinfo->fd->visited && bluetooth_data) {
4396 wmem_tree_key_t key[6];
4397 uint32_t frame_number, direction;
4398 handle_data_t *handle_data;
4400 frame_number = pinfo->num;
4401 direction = pinfo->p2p_dir;
4402 if (uuid.bt_uuid == 0x2ADB || uuid.bt_uuid == 0x2ADD) {
4403 // Mesh Provisioning Data In and Mesh Proxy Data In
4404 // are in the opposite direction
4405 direction = !direction;
4408 key[0].length = 1;
4409 key[0].key = &bluetooth_data->interface_id;
4410 key[1].length = 1;
4411 key[1].key = &bluetooth_data->adapter_id;
4412 key[2].length = 1;
4413 key[2].key = &direction;
4414 key[3].length = 1;
4415 key[3].key = &handle;
4416 key[4].length = 1;
4417 key[4].key = &frame_number;
4418 key[5].length = 0;
4419 key[5].key = NULL;
4421 handle_data = wmem_new(wmem_file_scope(), handle_data_t);
4422 handle_data->uuid = uuid;
4423 handle_data->type = attribute_type;
4425 wmem_tree_insert32_array(handle_to_uuid, key, handle_data);
4429 bluetooth_uuid_t
4430 get_gatt_bluetooth_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
4431 bluetooth_data_t *bluetooth_data)
4433 wmem_tree_key_t key[5];
4434 uint32_t frame_number, direction;
4435 handle_data_t *handle_data;
4436 wmem_tree_t *sub_wmemtree;
4437 bluetooth_uuid_t uuid;
4439 memset(&uuid, 0, sizeof uuid);
4441 if (bluetooth_data) {
4442 frame_number = pinfo->num;
4443 direction = get_handle_db_direction(opcode, pinfo->p2p_dir);
4445 key[0].length = 1;
4446 key[0].key = &bluetooth_data->interface_id;
4447 key[1].length = 1;
4448 key[1].key = &bluetooth_data->adapter_id;
4449 key[2].length = 1;
4450 key[2].key = &direction;
4451 key[3].length = 1;
4452 key[3].key = &handle;
4453 key[4].length = 0;
4454 key[4].key = NULL;
4456 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4457 handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4459 if (handle_data)
4460 uuid = handle_data->uuid;
4463 return uuid;
4466 static uint16_t
4467 get_gatt_service_handle_from_handle(packet_info *pinfo, uint32_t handle,
4468 bluetooth_data_t *bluetooth_data)
4470 wmem_tree_key_t key[5];
4471 uint32_t frame_number, direction;
4472 handle_data_t *handle_data;
4473 wmem_tree_t *sub_wmemtree;
4475 if (bluetooth_data) {
4476 frame_number = pinfo->num;
4477 direction = pinfo->p2p_dir;
4479 key[0].length = 1;
4480 key[0].key = &bluetooth_data->interface_id;
4481 key[1].length = 1;
4482 key[1].key = &bluetooth_data->adapter_id;
4483 key[2].length = 1;
4484 key[2].key = &direction;
4485 key[3].length = 1;
4486 key[3].key = &handle;
4487 key[4].length = 0;
4488 key[4].key = NULL;
4490 while (handle > 0) {
4491 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4492 handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4494 if (handle_data && handle_data->type == ATTRIBUTE_TYPE_SERVICE) {
4495 return handle;
4498 handle -= 1;
4502 return 0;
4505 static uint16_t
4506 get_gatt_char_decl_handle_from_handle(packet_info *pinfo, uint32_t handle,
4507 bluetooth_data_t *bluetooth_data)
4509 wmem_tree_key_t key[5];
4510 uint32_t frame_number, direction;
4511 handle_data_t *handle_data;
4512 wmem_tree_t *sub_wmemtree;
4514 if (bluetooth_data) {
4515 frame_number = pinfo->num;
4516 direction = pinfo->p2p_dir;
4518 key[0].length = 1;
4519 key[0].key = &bluetooth_data->interface_id;
4520 key[1].length = 1;
4521 key[1].key = &bluetooth_data->adapter_id;
4522 key[2].length = 1;
4523 key[2].key = &direction;
4524 key[3].length = 1;
4525 key[3].key = &handle;
4526 key[4].length = 0;
4527 key[4].key = NULL;
4529 while (handle > 0) {
4530 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4531 handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4533 if (handle_data) {
4534 if ((handle_data->uuid.bt_uuid == UUID_GATT_INCLUDE_DECLARATION) ||
4535 (handle_data->uuid.bt_uuid == UUID_GATT_CHARACTERISTIC_DECLARATION)) {
4536 return handle;
4540 handle -= 1;
4544 return 0;
4547 static bluetooth_uuid_t
4548 get_service_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
4549 bluetooth_data_t *bluetooth_data)
4551 wmem_tree_key_t key[5];
4552 uint32_t frame_number, direction;
4553 handle_data_t *handle_data;
4554 wmem_tree_t *sub_wmemtree;
4555 bluetooth_uuid_t uuid;
4557 memset(&uuid, 0, sizeof uuid);
4559 if (bluetooth_data) {
4560 frame_number = pinfo->num;
4561 direction = get_handle_db_direction(opcode, pinfo->p2p_dir);
4563 key[0].length = 1;
4564 key[0].key = &bluetooth_data->interface_id;
4565 key[1].length = 1;
4566 key[1].key = &bluetooth_data->adapter_id;
4567 key[2].length = 1;
4568 key[2].key = &direction;
4569 key[3].length = 1;
4570 key[3].key = &handle;
4571 key[4].length = 0;
4572 key[4].key = NULL;
4574 while (handle > 0) {
4575 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4576 handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4578 if (handle_data && handle_data->type == ATTRIBUTE_TYPE_SERVICE) {
4579 uuid = handle_data->uuid;
4580 return uuid;
4583 handle -= 1;
4587 return uuid;
4590 static bluetooth_uuid_t
4591 get_characteristic_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
4592 bluetooth_data_t *bluetooth_data)
4594 wmem_tree_key_t key[5];
4595 uint32_t frame_number, direction;
4596 handle_data_t *handle_data;
4597 wmem_tree_t *sub_wmemtree;
4598 bluetooth_uuid_t uuid;
4600 memset(&uuid, 0, sizeof uuid);
4602 if (bluetooth_data) {
4603 frame_number = pinfo->num;
4604 direction = get_handle_db_direction(opcode, pinfo->p2p_dir);
4606 key[0].length = 1;
4607 key[0].key = &bluetooth_data->interface_id;
4608 key[1].length = 1;
4609 key[1].key = &bluetooth_data->adapter_id;
4610 key[2].length = 1;
4611 key[2].key = &direction;
4612 key[3].length = 1;
4613 key[3].key = &handle;
4614 key[4].length = 0;
4615 key[4].key = NULL;
4617 while (handle > 0) {
4618 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4619 handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4621 if (handle_data && handle_data->type == ATTRIBUTE_TYPE_SERVICE)
4622 return uuid;
4624 if (handle_data && handle_data->type == ATTRIBUTE_TYPE_CHARACTERISTIC) {
4625 uuid = handle_data->uuid;
4626 return uuid;
4629 handle -= 1;
4633 return uuid;
4636 static void col_append_info_by_handle(packet_info *pinfo, uint16_t handle, uint8_t opcode, bluetooth_data_t *bluetooth_data)
4638 bluetooth_uuid_t service_uuid;
4639 bluetooth_uuid_t characteristic_uuid;
4640 bluetooth_uuid_t uuid;
4642 if (!bluetooth_data)
4643 return;
4645 service_uuid = get_service_uuid_from_handle(pinfo, handle, opcode, bluetooth_data);
4646 characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, handle, opcode, bluetooth_data);
4647 uuid = get_gatt_bluetooth_uuid_from_handle(pinfo, handle, opcode, bluetooth_data);
4650 if (!memcmp(&service_uuid, &uuid, sizeof(uuid))) {
4651 col_append_fstr(pinfo->cinfo, COL_INFO, ", Handle: 0x%04x (%s)",
4652 handle, print_bluetooth_uuid(pinfo->pool, &uuid));
4653 } else if (!memcmp(&characteristic_uuid, &uuid, sizeof(uuid))) {
4654 col_append_fstr(pinfo->cinfo, COL_INFO, ", Handle: 0x%04x (%s: %s)",
4655 handle, print_bluetooth_uuid(pinfo->pool, &service_uuid), print_bluetooth_uuid(pinfo->pool, &uuid));
4656 } else {
4657 col_append_fstr(pinfo->cinfo, COL_INFO, ", Handle: 0x%04x (%s: %s: %s)",
4658 handle, print_bluetooth_uuid(pinfo->pool, &service_uuid), print_bluetooth_uuid(pinfo->pool, &characteristic_uuid), print_bluetooth_uuid(pinfo->pool, &uuid));
4662 static int dissect_gatt_uuid(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset)
4664 proto_item *sub_item;
4665 bluetooth_uuid_t sub_uuid;
4667 if (tvb_reported_length_remaining(tvb, offset) == 2) {
4668 proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4669 /* TODO: want to do this and show? */
4670 /* sub_uuid = get_bluetooth_uuid(tvb, offset, 2); */
4671 offset += 2;
4672 } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
4673 sub_item = proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
4674 sub_uuid = get_bluetooth_uuid(tvb, offset, 16);
4675 proto_item_append_text(sub_item, " (%s)", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
4676 offset += 16;
4677 } else {
4678 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
4679 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
4680 offset = tvb_captured_length(tvb);
4683 return offset;
4686 static int
4687 dissect_handle(proto_tree *tree, packet_info *pinfo, int hf,
4688 tvbuff_t *tvb, int offset, bluetooth_data_t *bluetooth_data,
4689 bluetooth_uuid_t *uuid, int32_t handle, uint8_t opcode)
4691 proto_item *handle_item;
4692 proto_item *sub_item;
4693 proto_tree *sub_tree;
4694 bluetooth_uuid_t service_uuid;
4695 bluetooth_uuid_t characteristic_uuid;
4696 bluetooth_uuid_t attribute_uuid;
4698 if (handle == HANDLE_TVB) {
4699 handle_item = proto_tree_add_item(tree, hf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4700 handle = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
4701 } else if (handle >= 0 && handle <= UINT16_MAX) {
4702 handle_item = proto_tree_add_uint(tree, hf, tvb, 0, 0, handle);
4703 proto_item_set_generated(handle_item);
4704 } else {
4705 DISSECTOR_ASSERT_NOT_REACHED();
4708 service_uuid = get_service_uuid_from_handle(pinfo, (uint16_t) handle, opcode, bluetooth_data);
4709 characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, (uint16_t) handle, opcode, bluetooth_data);
4710 attribute_uuid = get_gatt_bluetooth_uuid_from_handle(pinfo, (uint16_t) handle, opcode, bluetooth_data);
4712 proto_item_append_text(handle_item, " (");
4713 if (memcmp(&service_uuid, &attribute_uuid, sizeof(attribute_uuid))) {
4714 if (service_uuid.size == 2 || service_uuid.size == 16) {
4715 proto_item_append_text(handle_item, "%s: ", print_bluetooth_uuid(pinfo->pool, &service_uuid));
4716 sub_tree = proto_item_add_subtree(handle_item, ett_btatt_handle);
4718 if (service_uuid.size == 2)
4719 sub_item = proto_tree_add_uint(sub_tree, hf_btatt_service_uuid16, tvb, 0, 0, service_uuid.bt_uuid);
4720 else
4721 sub_item = proto_tree_add_bytes_with_length(sub_tree, hf_btatt_service_uuid128, tvb, 0, 0, service_uuid.data, 16);
4723 proto_item_set_generated(sub_item);
4727 if (memcmp(&characteristic_uuid, &attribute_uuid, sizeof(attribute_uuid))) {
4728 if (characteristic_uuid.size == 2 || characteristic_uuid.size == 16) {
4729 proto_item_append_text(handle_item, "%s: ", print_bluetooth_uuid(pinfo->pool, &characteristic_uuid));
4730 sub_tree = proto_item_add_subtree(handle_item, ett_btatt_handle);
4732 if (characteristic_uuid.size == 2)
4733 sub_item = proto_tree_add_uint(sub_tree, hf_btatt_characteristic_uuid16, tvb, 0, 0, characteristic_uuid.bt_uuid);
4734 else
4735 sub_item = proto_tree_add_bytes_with_length(sub_tree, hf_btatt_characteristic_uuid128, tvb, 0, 0, characteristic_uuid.data, 16);
4737 proto_item_set_generated(sub_item);
4741 proto_item_append_text(handle_item, "%s)", print_bluetooth_uuid(pinfo->pool, &attribute_uuid));
4742 if (attribute_uuid.size == 2 || attribute_uuid.size == 16) {
4743 sub_tree = proto_item_add_subtree(handle_item, ett_btatt_handle);
4745 if (attribute_uuid.size == 2)
4746 sub_item = proto_tree_add_uint(sub_tree, hf_btatt_uuid16, tvb, 0, 0, attribute_uuid.bt_uuid);
4747 else
4748 sub_item = proto_tree_add_bytes_with_length(sub_tree, hf_btatt_uuid128, tvb, 0, 0, attribute_uuid.data, 16);
4750 proto_item_set_generated(sub_item);
4753 if (uuid)
4754 *uuid = attribute_uuid;
4756 return offset + 2;
4759 static int
4760 btatt_dissect_attribute_handle(uint16_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, btatt_data_t *att_data);
4762 static int
4763 btatt_call_dissector_by_dissector_name_with_data(const char *dissector_name,
4764 tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
4766 dissector_handle_t handle;
4768 handle = find_dissector(dissector_name);
4769 if (handle != NULL)
4770 return call_dissector_with_data(handle, tvb, pinfo, tree, data);
4771 else
4772 REPORT_DISSECTOR_BUG("Dissector %s not registered", dissector_name);
4776 dissects attribute handle and takes care of reassemly:
4777 If sub-dissector sets pinfo->deseg_offset >0 && < pktlen the leftover bytes are stored and front-attached to the next packet
4778 returns 0 if paket was not handled
4779 returns #bytes consumed
4781 static int
4782 btatt_dissect_with_reassmbly(uint16_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, btatt_data_t *att_data){
4784 * Cases
4785 * 1) single paket: deseg_len=0 deseg_offset=pktlen oder 0??
4786 * 2) start stream: deseg_len=MORE_BYTE deseg_offset>-1<pktlen -> partially consumed, store fragment, finish
4787 * 3) cont stream: deseg_len=MORE_BYTE deseg_offset=-1 (due to header mismatch) -> not consumed, add previous fragment, run again
4788 * 4) end stream: deseg_len=0 deseg_offset=pktlen -> completely consumed, return pktlen
4790 * case 3 can lead to case 2 -> stop fragment stream, create new fragment stream
4791 * */
4792 unsigned consumed;
4793 bool save_fragmented;
4794 bool more_fragments = false;
4795 int offset = 0;
4796 // do not test for (PINFO_FD_VISITED(pinfo)) otherwise the lua dissector is not added
4798 again:
4799 pinfo->desegment_offset = -1;
4800 pinfo->desegment_len = 0;
4801 consumed = btatt_dissect_attribute_handle(handle, tvb, pinfo, tree, att_data);
4803 //consumed == 0: paket was rejected by subdissector, do not test for fragmentation
4804 if (!(consumed == 0 && pinfo->desegment_len == 0))
4806 uint32_t msg_seqid = handle << 16 | ( att_data->opcode & 0xffff);
4807 pinfo->srcport = handle;
4808 pinfo->destport = att_data->opcode;
4809 if ((unsigned)pinfo->desegment_offset == tvb_captured_length(tvb))
4811 // case 1
4812 more_fragments = false;
4814 if (pinfo->desegment_offset > -1 && (unsigned)pinfo->desegment_offset < tvb_captured_length(tvb))
4816 // case 2
4817 //drop leftovers before a fresh fragment ist started
4818 tvbuff_t *old_tvb_data = fragment_delete(&msg_reassembly_table, pinfo, msg_seqid, NULL);
4819 if (old_tvb_data)
4820 tvb_free(old_tvb_data);
4821 more_fragments = true;
4823 if (pinfo->desegment_offset == -1)
4825 // case 3
4826 more_fragments = false;
4828 if (pinfo->desegment_offset == -1 && consumed == tvb_captured_length(tvb))
4830 // case 4
4831 more_fragments = false;
4834 save_fragmented = pinfo->fragmented;
4835 if (consumed < tvb_captured_length(tvb))
4837 offset = (pinfo->desegment_offset==-1?0:pinfo->desegment_offset);
4838 tvbuff_t *new_tvb = NULL;
4839 fragment_head *frag_msg = NULL;
4840 pinfo->fragmented = true;
4841 frag_msg = fragment_add_seq_next(&msg_reassembly_table,
4842 tvb, offset, pinfo,
4843 msg_seqid, NULL, /* ID for fragments belonging together */
4844 tvb_captured_length_remaining(tvb, offset),
4845 more_fragments); /* More fragments? */
4847 new_tvb = process_reassembled_data(tvb, offset, pinfo,
4848 "Reassembled Message", frag_msg, &msg_frag_items,
4849 NULL, tree);
4851 if (frag_msg)
4852 { /* Reassembled */
4853 col_append_str(pinfo->cinfo, COL_INFO,
4854 "Last Pckt (Message Reassembled)");
4856 else
4857 { /* Not last packet of reassembled Short Message */
4858 col_append_fstr(pinfo->cinfo, COL_INFO,
4859 "(Message fragment %u)", pinfo->num);
4862 pinfo->fragmented = save_fragmented;
4863 //Reassembly buffer is empty but reassembly requested. break the loop
4864 if (new_tvb && (tvb_captured_length(tvb) == tvb_captured_length(new_tvb)))
4865 return 0;
4866 if (new_tvb)
4867 { /* take it all */
4868 tvb = new_tvb;
4869 goto again;
4871 return offset;
4874 return 0;
4878 static unsigned
4879 add_item_btatt_time(proto_tree *tree, tvbuff_t *tvb, unsigned offset)
4881 proto_tree_add_item(tree, hf_btatt_year, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4882 offset += 2;
4884 proto_tree_add_item(tree, hf_btatt_month, tvb, offset, 1, ENC_NA);
4885 offset += 1;
4887 proto_tree_add_item(tree, hf_btatt_day, tvb, offset, 1, ENC_NA);
4888 offset += 1;
4890 proto_tree_add_item(tree, hf_btatt_hours, tvb, offset, 1, ENC_NA);
4891 offset += 1;
4893 proto_tree_add_item(tree, hf_btatt_minutes, tvb, offset, 1, ENC_NA);
4894 offset += 1;
4896 proto_tree_add_item(tree, hf_btatt_seconds, tvb, offset, 1, ENC_NA);
4897 offset += 1;
4899 return offset;
4902 static unsigned
4903 add_item_btatt_timestamp(proto_tree *tree, int hf_index, tvbuff_t *tvb, unsigned offset)
4905 proto_item *sub_item;
4906 proto_tree *sub_tree;
4908 sub_item = proto_tree_add_item(tree, hf_index, tvb, offset, 7, ENC_NA);
4909 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
4911 proto_item_append_text(sub_item, ": %04u-%02u-%02u %02u:%02u:%02u",
4912 tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN),
4913 tvb_get_uint8(tvb, offset + 2),
4914 tvb_get_uint8(tvb, offset + 3),
4915 tvb_get_uint8(tvb, offset + 4),
4916 tvb_get_uint8(tvb, offset + 5),
4917 tvb_get_uint8(tvb, offset + 6));
4919 return add_item_btatt_time(sub_tree, tvb, offset);
4922 static int
4923 dissect_attribute_value(proto_tree *tree, proto_item *patron_item, packet_info *pinfo, tvbuff_t *old_tvb,
4924 int old_offset, int length, uint16_t handle, bluetooth_uuid_t uuid, btatt_data_t *att_data)
4926 proto_item *sub_item;
4927 proto_tree *sub_tree = NULL;
4928 tvbuff_t *tvb;
4929 unsigned offset = 0;
4930 bluetooth_uuid_t sub_uuid;
4931 bluetooth_uuid_t service_uuid;
4932 uint16_t sub_handle;
4933 uint32_t value;
4934 uint32_t flags;
4935 uint32_t operator_value;
4936 uint32_t opcode;
4937 uint32_t operand_offset;
4938 uint32_t interface_id;
4939 uint32_t adapter_id;
4940 int * const *hfs;
4941 bluetooth_data_t *bluetooth_data = NULL;
4943 tvb = tvb_new_subset_length(old_tvb, old_offset, length);
4945 DISSECTOR_ASSERT(att_data);
4947 bluetooth_data = att_data->bluetooth_data;
4948 att_data->handle = handle;
4950 if (p_get_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE) == NULL) {
4951 uint16_t *value_data;
4953 value_data = wmem_new(wmem_file_scope(), uint16_t);
4954 *value_data = handle;
4956 p_add_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE, value_data);
4959 offset = btatt_dissect_with_reassmbly(handle,tvb,pinfo,tree,att_data);
4960 if (offset == tvb_captured_length(tvb))
4961 return old_offset + offset;
4963 if (p_get_proto_data(pinfo->pool, pinfo, proto_bluetooth, PROTO_DATA_BLUETOOTH_SERVICE_UUID) == NULL) {
4964 uint8_t *value_data;
4966 value_data = wmem_strdup(wmem_file_scope(), print_numeric_bluetooth_uuid(pinfo->pool, &uuid));
4968 p_add_proto_data(pinfo->pool, pinfo, proto_bluetooth, PROTO_DATA_BLUETOOTH_SERVICE_UUID, value_data);
4971 service_uuid = get_service_uuid_from_handle(pinfo, handle, att_data->opcode, bluetooth_data);
4972 offset = dissector_try_uint_new(att_service_dissector_table, service_uuid.bt_uuid, tvb, pinfo, tree, true, att_data);
4973 if (offset == tvb_captured_length(tvb))
4974 return old_offset + offset;
4976 /* hier wird subdissector aufgerufen */
4977 /* dort wird auch von einem neuen PAket ausgegangen, was es natürlich nicht ist, darum fehelern und kein subdissector aufgerufen*/
4978 if (dissector_try_string(bluetooth_uuid_table, print_numeric_bluetooth_uuid(pinfo->pool, &uuid), tvb, pinfo, tree, att_data))
4979 return old_offset + length;
4980 else if (!uuid.bt_uuid) {
4981 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
4982 return old_offset;
4984 proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
4986 return old_offset + tvb_captured_length(tvb);
4989 switch (uuid.bt_uuid) {
4990 case 0x2800: /* GATT Primary Service Declaration */
4991 case 0x2801: /* GATT Secondary Service Declaration */
4992 if (is_readable_request(att_data->opcode) || att_data->opcode == ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST)
4993 break;
4995 if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE)
4996 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
4998 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
4999 break;
5001 if (tvb_reported_length_remaining(tvb, offset) == 2) {
5002 proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5003 sub_uuid = get_bluetooth_uuid(tvb, offset, 2);
5004 proto_item_append_text(patron_item, ", UUID: %s", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5005 offset += 2;
5007 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5009 save_handle(pinfo, sub_uuid, handle, ATTRIBUTE_TYPE_SERVICE, bluetooth_data);
5011 else if (tvb_reported_length_remaining(tvb, offset) == 16)
5013 proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
5014 sub_uuid = get_bluetooth_uuid(tvb, offset, 16);
5015 proto_item_append_text(patron_item, ", UUID128: %s", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5016 offset += 16;
5018 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5020 save_handle(pinfo, sub_uuid, handle, ATTRIBUTE_TYPE_SERVICE, bluetooth_data);
5022 else
5024 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
5025 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
5026 offset = tvb_captured_length(tvb);
5029 break;
5030 case 0x2802: /* GATT Include Declaration */
5031 if (is_readable_request(att_data->opcode))
5032 break;
5034 if (!is_readable_response(att_data->opcode))
5035 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5037 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5038 break;
5040 offset = dissect_handle(tree, pinfo, hf_btatt_included_service_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, att_data->opcode);
5041 sub_handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
5043 proto_tree_add_item(tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5044 offset += 2;
5046 proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5047 sub_uuid = get_bluetooth_uuid(tvb, offset, 2);
5048 proto_item_append_text(patron_item, ", Included Handle: 0x%04x, UUID: %s", sub_handle, print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5049 offset += 2;
5051 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5053 save_handle(pinfo, sub_uuid, sub_handle, ATTRIBUTE_TYPE_OTHER, bluetooth_data);
5055 break;
5056 case 0x2803: /* GATT Characteristic Declaration*/
5057 if (is_readable_request(att_data->opcode) || att_data->opcode == ATT_OPCODE_READ_BY_TYPE_REQUEST)
5058 break;
5060 if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_READ_BY_TYPE_RESPONSE)
5061 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5063 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5064 break;
5066 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_properties, ett_btatt_characteristic_properties, hfx_btatt_characteristic_properties, ENC_NA);
5067 offset += 1;
5069 offset = dissect_handle(tree, pinfo, hf_btatt_characteristic_value_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, att_data->opcode);
5070 sub_handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
5072 if (tvb_reported_length_remaining(tvb, offset) == 16) {
5073 proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
5074 sub_uuid = get_bluetooth_uuid(tvb, offset, 16);
5075 proto_item_append_text(patron_item, ", Characteristic Handle: 0x%04x, UUID128: %s", tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN), print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5076 offset += 16;
5078 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5080 save_handle(pinfo, sub_uuid, sub_handle, ATTRIBUTE_TYPE_CHARACTERISTIC, bluetooth_data);
5082 else if (tvb_reported_length_remaining(tvb, offset) == 2)
5084 proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5085 sub_uuid = get_bluetooth_uuid(tvb, offset, 2);
5086 proto_item_append_text(patron_item, ", Characteristic Handle: 0x%04x, UUID: %s", sub_handle, print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5087 offset += 2;
5089 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(pinfo->pool, &sub_uuid));
5091 save_handle(pinfo, sub_uuid, sub_handle, ATTRIBUTE_TYPE_CHARACTERISTIC, bluetooth_data);
5092 } else {
5093 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
5094 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
5095 offset = tvb_captured_length(tvb);
5098 break;
5099 case 0x2900: /* Characteristic Extended Properties */
5100 if (is_readable_request(att_data->opcode))
5101 break;
5103 if (!is_readable_response(att_data->opcode))
5104 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5106 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5107 break;
5109 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_extended_properties, ett_btatt_value, hfx_btatt_characteristic_extended_properties, ENC_LITTLE_ENDIAN);
5110 offset += 2;
5112 break;
5113 case 0x2901: /* Characteristic User Description */
5114 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5115 break;
5117 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5118 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5120 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5121 break;
5123 proto_tree_add_item(tree, hf_btatt_characteristic_user_description, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
5124 offset += tvb_captured_length_remaining(tvb, offset);
5126 break;
5127 case 0x2902: /* GATT: Client Characteristic Configuration */
5128 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
5129 break;
5131 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5132 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5134 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5135 break;
5137 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_configuration_client, ett_btatt_value, hfx_btatt_characteristic_configuration_client, ENC_LITTLE_ENDIAN);
5138 value = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
5139 offset += 2;
5142 bluetooth_uuid_t characteristic_uuid;
5144 characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, handle, att_data->opcode, bluetooth_data);
5146 if (value & 0x1) switch (characteristic_uuid.bt_uuid) { /* Notification */
5147 case 0x2A05: /* Service Changed */
5148 case 0x2A1C: /* Temperature Measurement */
5149 case 0x2A21: /* Measurement Interval */
5150 case 0x2A35: /* Blood Pressure Measurement */
5151 case 0x2A52: /* Record Access Control Point */
5152 case 0x2A55: /* SC Control Point */
5153 case 0x2A66: /* Cycling Power Control Point */
5154 case 0x2A6B: /* LN Control Point */
5155 case 0x2A99: /* Database Change Increment */
5156 case 0x2A9C: /* Body Composition Measurement */
5157 case 0x2A9D: /* Weight Measurement */
5158 case 0x2A9F: /* User Control Point */
5159 case 0x2ABC: /* TDS Control Point */
5160 case 0x2AC5: /* Object Action Control Point */
5161 case 0x2AC6: /* Object List Control Point */
5162 case 0x2AC8: /* Object Changed */
5163 case 0x2AC9: /* Resolvable Private Address */
5164 case 0x2ACC: /* Fitness Machine Feature */
5165 case 0x2AD4: /* Supported Speed Range */
5166 case 0x2AD5: /* Supported Inclination Range */
5167 case 0x2AD6: /* Supported Resistance Level Range */
5168 case 0x2AD7: /* Supported Heart Rate Range */
5169 case 0x2AD8: /* Supported Power Range */
5170 case 0x2AD9: /* Fitness Machine Control Point */
5171 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5172 break;
5174 case 0x2A18: /* Glucose Measurement */
5175 case 0x2A19: /* Battery Level */
5176 case 0x2A1E: /* Intermediate Temperature */
5177 case 0x2A22: /* Boot Keyboard Input Report */
5178 case 0x2A2C: /* Magnetic Declination */
5179 case 0x2A2B: /* Current Time */
5180 case 0x2A31: /* Scan Refresh */
5181 case 0x2A33: /* Boot Mouse Input Report */
5182 case 0x2A34: /* Glucose Measurement Context */
5183 case 0x2A36: /* Intermediate Cuff Pressure */
5184 case 0x2A37: /* Heart Rate Measurement */
5185 case 0x2A3F: /* Alert Status */
5186 case 0x2A45: /* Unread Alert Status */
5187 case 0x2A46: /* New Alert */
5188 case 0x2A4D: /* Report */
5189 case 0x2A53: /* RSC Measurement */
5190 case 0x2A56: /* Digital */
5191 case 0x2A58: /* Analog */
5192 case 0x2A5A: /* Aggregate */
5193 case 0x2A5B: /* CSC Measurement */
5194 case 0x2A63: /* Cycling Power Measurement */
5195 case 0x2A64: /* Cycling Power Vector */
5196 case 0x2A67: /* Location and Speed */
5197 case 0x2A68: /* Navigation */
5198 case 0x2A6C: /* Elevation */
5199 case 0x2A6D: /* Pressure */
5200 case 0x2A6E: /* Temperature */
5201 case 0x2A6F: /* Humidity */
5202 case 0x2A70: /* True Wind Speed */
5203 case 0x2A71: /* True Wind Direction */
5204 case 0x2A72: /* Apparent Wind Speed */
5205 case 0x2A73: /* Apparent Wind Direction */
5206 case 0x2A74: /* Gust Factor */
5207 case 0x2A75: /* Pollen Concentration */
5208 case 0x2A76: /* UV Index */
5209 case 0x2A77: /* Irradiance */
5210 case 0x2A78: /* Rainfall */
5211 case 0x2A79: /* Wind Chill */
5212 case 0x2A7A: /* Heat Index */
5213 case 0x2A7B: /* Dew Point */
5214 case 0x2AA0: /* Magnetic Flux Density - 2D */
5215 case 0x2AA1: /* Magnetic Flux Density - 3D */
5216 case 0x2AA3: /* Barometric Pressure Trend */
5217 case 0x2AA7: /* CGM Measurement */
5218 case 0x2AB8: /* HTTP Status Code */
5219 case 0x2ACD: /* Treadmill Data */
5220 case 0x2ACE: /* Cross Trainer Data */
5221 case 0x2ACF: /* Step Climber Data */
5222 case 0x2AD0: /* Stair Climber Data */
5223 case 0x2AD1: /* Rower Data */
5224 case 0x2AD2: /* Indoor Bike Data */
5225 case 0x2AD3: /* Training Status */
5226 case 0x2ADA: /* Fitness Machine Status */
5227 default:
5228 /* Supported */
5229 break;
5232 if (value & 0x2) switch (characteristic_uuid.bt_uuid) { /* Indication */
5233 case 0x2A18: /* Glucose Measurement */
5234 case 0x2A19: /* Battery Level */
5235 case 0x2A1E: /* Intermediate Temperature */
5236 case 0x2A22: /* Boot Keyboard Input Report */
5237 case 0x2A2B: /* Current Time */
5238 case 0x2A2C: /* Magnetic Declination */
5239 case 0x2A31: /* Scan Refresh */
5240 case 0x2A33: /* Boot Mouse Input Report */
5241 case 0x2A34: /* Glucose Measurement Context */
5242 case 0x2A36: /* Intermediate Cuff Pressure */
5243 case 0x2A37: /* Heart Rate Measurement */
5244 case 0x2A3F: /* Alert Status */
5245 case 0x2A45: /* Unread Alert Status */
5246 case 0x2A46: /* New Alert */
5247 case 0x2A4D: /* Report */
5248 case 0x2A53: /* RSC Measurement */
5249 case 0x2A5B: /* CSC Measurement */
5250 case 0x2A63: /* Cycling Power Measurement */
5251 case 0x2A64: /* Cycling Power Vector */
5252 case 0x2A67: /* Location and Speed */
5253 case 0x2A68: /* Navigation */
5254 case 0x2A6C: /* Elevation */
5255 case 0x2A6D: /* Pressure */
5256 case 0x2A6E: /* Temperature */
5257 case 0x2A6F: /* Humidity */
5258 case 0x2A70: /* True Wind Speed */
5259 case 0x2A71: /* True Wind Direction */
5260 case 0x2A72: /* Apparent Wind Speed */
5261 case 0x2A73: /* Apparent Wind Direction */
5262 case 0x2A74: /* Gust Factor */
5263 case 0x2A75: /* Pollen Concentration */
5264 case 0x2A76: /* UV Index */
5265 case 0x2A77: /* Irradiance */
5266 case 0x2A78: /* Rainfall */
5267 case 0x2A79: /* Wind Chill */
5268 case 0x2A7A: /* Heat Index */
5269 case 0x2A7B: /* Dew Point */
5270 case 0x2AA0: /* Magnetic Flux Density - 2D */
5271 case 0x2AA1: /* Magnetic Flux Density - 3D */
5272 case 0x2AA3: /* Barometric Pressure Trend */
5273 case 0x2AA7: /* CGM Measurement */
5274 case 0x2AB8: /* HTTP Status Code */
5275 case 0x2AC9: /* Resolvable Private Address */
5276 case 0x2ACC: /* Fitness Machine Feature */
5277 case 0x2ACD: /* Treadmill Data */
5278 case 0x2ACE: /* Cross Trainer Data */
5279 case 0x2ACF: /* Step Climber Data */
5280 case 0x2AD0: /* Stair Climber Data */
5281 case 0x2AD1: /* Rower Data */
5282 case 0x2AD2: /* Indoor Bike Data */
5283 case 0x2AD3: /* Training Status */
5284 case 0x2AD4: /* Supported Speed Range */
5285 case 0x2AD5: /* Supported Inclination Range */
5286 case 0x2AD6: /* Supported Resistance Level Range */
5287 case 0x2AD7: /* Supported Heart Rate Range */
5288 case 0x2AD8: /* Supported Power Range */
5289 case 0x2ADA: /* Fitness Machine Status */
5290 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5291 break;
5293 case 0x2A05: /* Service Changed */
5294 case 0x2A1C: /* Temperature Measurement */
5295 case 0x2A21: /* Measurement Interval */
5296 case 0x2A35: /* Blood Pressure Measurement */
5297 case 0x2A52: /* Record Access Control Point */
5298 case 0x2A55: /* SC Control Point */
5299 case 0x2A56: /* Digital */
5300 case 0x2A58: /* Analog */
5301 case 0x2A5A: /* Aggregate */
5302 case 0x2A66: /* Cycling Power Control Point */
5303 case 0x2A6B: /* LN Control Point */
5304 case 0x2A99: /* Database Change Increment */
5305 case 0x2A9C: /* Body Composition Measurement */
5306 case 0x2A9D: /* Weight Measurement */
5307 case 0x2A9F: /* User Control Point */
5308 case 0x2ABC: /* TDS Control Point */
5309 case 0x2AC5: /* Object Action Control Point */
5310 case 0x2AC6: /* Object List Control Point */
5311 case 0x2AC8: /* Object Changed */
5312 case 0x2AD9: /* Fitness Machine Control Point */
5313 default:
5314 /* Supported */
5315 break;
5318 if (value > 0x3)
5319 expert_add_info(pinfo, tree, &ei_btatt_bad_data);
5323 break;
5324 case 0x2903: /* Server Characteristic Configuration */
5325 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5326 break;
5328 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5329 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5331 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5332 break;
5334 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_configuration_server, ett_btatt_value, hfx_btatt_characteristic_configuration_server, ENC_LITTLE_ENDIAN);
5335 offset += 2;
5337 break;
5338 case 0x2904: /* Characteristic Presentation Format */
5339 if (is_readable_request(att_data->opcode))
5340 break;
5342 if (!is_readable_response(att_data->opcode))
5343 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5345 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5346 break;
5348 proto_tree_add_item(tree, hf_btatt_characteristic_presentation_format, tvb, offset, 1, ENC_NA);
5349 offset += 1;
5351 proto_tree_add_item(tree, hf_btatt_characteristic_presentation_exponent, tvb, offset, 1, ENC_NA);
5352 offset += 1;
5354 proto_tree_add_item(tree, hf_btatt_characteristic_presentation_unit, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5355 offset += 2;
5357 proto_tree_add_item(tree, hf_btatt_characteristic_presentation_namespace, tvb, offset, 1, ENC_NA);
5358 value = tvb_get_uint8(tvb, offset);
5359 offset += 1;
5361 if (value == 0x01) /* Bluetooth SIG */
5362 proto_tree_add_item(tree, hf_btatt_characteristic_presentation_namespace_description_btsig, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5363 else
5364 proto_tree_add_item(tree, hf_btatt_characteristic_presentation_namespace_description, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5365 offset += 2;
5367 break;
5368 case 0x2905: /* Characteristic Aggregate Format */
5369 if (is_readable_request(att_data->opcode))
5370 break;
5372 if (!is_readable_response(att_data->opcode))
5373 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5375 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5376 break;
5378 sub_item = proto_tree_add_none_format(tree, hf_btatt_handles_info,
5379 tvb, offset, tvb_captured_length(tvb), "Handles (%i items)",
5380 tvb_captured_length(tvb) / 2);
5381 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
5383 while (offset < (int64_t) tvb_captured_length(tvb)) {
5384 offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, att_data->opcode);
5386 break;
5387 case 0x2906: /* Valid Range */ {
5388 bluetooth_uuid_t characteristic_uuid;
5389 uint8_t *characteristic_dissector_name;
5390 dissector_handle_t characteristic_dissector;
5392 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5393 break;
5395 characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, handle, att_data->opcode, bluetooth_data);
5397 characteristic_dissector_name = wmem_strdup_printf(pinfo->pool, "btgatt.uuid0x%s", print_numeric_bluetooth_uuid(pinfo->pool, &characteristic_uuid));
5398 characteristic_dissector = find_dissector(characteristic_dissector_name);
5400 sub_item = proto_tree_add_item(tree, hf_btatt_valid_range_lower_inclusive_value, tvb, offset, tvb_reported_length_remaining(tvb, offset) / 2, ENC_NA);
5401 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
5403 if (characteristic_dissector)
5404 call_dissector_with_data(characteristic_dissector, tvb_new_subset_length(tvb, offset, tvb_reported_length_remaining(tvb, offset) / 2), pinfo, sub_tree, att_data);
5406 sub_item = proto_tree_add_item(tree, hf_btatt_valid_range_upper_inclusive_value, tvb, offset + tvb_reported_length_remaining(tvb, offset) / 2, tvb_reported_length_remaining(tvb, offset) / 2, ENC_NA);
5407 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
5409 if (characteristic_dissector)
5410 call_dissector_with_data(characteristic_dissector, tvb_new_subset_length(tvb, offset + tvb_reported_length_remaining(tvb, offset) / 2, tvb_reported_length_remaining(tvb, offset) / 2), pinfo, sub_tree, att_data);
5412 offset += tvb_reported_length_remaining(tvb, offset);
5414 break;
5415 case 0x2907: /* External Report Reference */
5416 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
5417 if (is_readable_request(att_data->opcode))
5418 break;
5420 if (!is_readable_response(att_data->opcode))
5421 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5424 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5425 break;
5427 if (tvb_reported_length_remaining(tvb, offset) == 2) {
5428 proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5429 offset += 2;
5430 } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
5431 proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
5432 offset += 16;
5433 } else {
5434 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
5435 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
5436 offset = tvb_captured_length(tvb);
5438 break;
5439 case 0x2908: /* GATT: Report Reference */
5440 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
5441 if (is_readable_request(att_data->opcode))
5442 break;
5444 if (!is_readable_response(att_data->opcode))
5445 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5448 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5449 break;
5451 proto_tree_add_item(tree, hf_btatt_report_reference_report_id, tvb, offset, 1, ENC_NA);
5452 offset += 1;
5454 proto_tree_add_item(tree, hf_btatt_report_reference_report_type, tvb, offset, 1, ENC_NA);
5455 offset += 1;
5457 break;
5458 case 0x2909: /* Number of Digitals */
5459 if (is_readable_request(att_data->opcode))
5460 break;
5462 if (!is_readable_response(att_data->opcode))
5463 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5465 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5466 break;
5468 proto_tree_add_item(tree, hf_btatt_number_of_digitals, tvb, offset, 1, ENC_NA);
5469 offset += 1;
5471 break;
5472 case 0x290A: /* Value Trigger Setting */
5473 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5474 break;
5476 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5477 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5479 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5480 break;
5482 proto_tree_add_item(tree, hf_btatt_value_trigger_setting_condition, tvb, offset, 1, ENC_NA);
5483 value = tvb_get_uint8(tvb, offset);
5484 offset += 1;
5486 if (value >= 1 && value <= 3) {
5487 proto_tree_add_item(tree, hf_btatt_value_trigger_setting_analog, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5488 offset += 2;
5489 } else if (value == 4) {
5490 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a56", tvb_new_subset_length(tvb, offset, 1), pinfo, tree, att_data);
5491 offset += 1;
5492 } else if (value == 5 || value == 6) {
5493 proto_tree_add_item(tree, hf_btatt_value_trigger_setting_analog_one, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5494 offset += 2;
5496 proto_tree_add_item(tree, hf_btatt_value_trigger_setting_analog_two, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5497 offset += 2;
5500 break;
5501 case 0x290B: /* Environmental Sensing Configuration */
5502 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5503 break;
5505 proto_tree_add_item(tree, hf_btatt_esp_trigger_logic, tvb, offset, 1, ENC_NA);
5506 offset += 1;
5508 break;
5509 case 0x290C: /* Environmental Sensing Measurement */
5510 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5511 break;
5513 proto_tree_add_item(tree, hf_btatt_esp_flags, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5514 offset += 2;
5516 proto_tree_add_item(tree, hf_btatt_esp_sampling_function, tvb, offset, 1, ENC_NA);
5517 offset += 1;
5519 proto_tree_add_item(tree, hf_btatt_esp_measurement_period, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5520 offset += 3;
5522 proto_tree_add_item(tree, hf_btatt_esp_update_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5523 offset += 3;
5525 proto_tree_add_item(tree, hf_btatt_esp_application, tvb, offset, 1, ENC_NA);
5526 offset += 1;
5528 proto_tree_add_item(tree, hf_btatt_esp_measurement_uncertainty, tvb, offset, 1, ENC_NA);
5529 offset += 1;
5531 break;
5532 case 0x290D: /* Environmental Sensing Trigger Setting */
5533 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5534 break;
5536 proto_tree_add_item(tree, hf_btatt_esp_condition, tvb, offset, 1, ENC_NA);
5537 offset += 1;
5539 proto_tree_add_item(tree, hf_btatt_esp_operand, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
5540 offset += tvb_captured_length_remaining(tvb, offset);
5541 break;
5542 case 0x290E: /* Time Trigger Setting */
5543 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5544 break;
5546 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5547 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5549 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5550 break;
5552 proto_tree_add_item(tree, hf_btatt_time_trigger_setting_condition, tvb, offset, 1, ENC_NA);
5553 value = tvb_get_uint8(tvb, offset);
5554 offset += 1;
5556 if (value == 0) {
5557 proto_tree_add_item(tree, hf_btatt_time_trigger_setting_value, tvb, offset, 1, ENC_NA);
5558 offset += 1;
5559 } else if (value == 1 || value == 2) {
5560 proto_tree_add_item(tree, hf_btatt_time_trigger_setting_value_time_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5561 offset += 3;
5562 } else if (value == 3) {
5563 proto_tree_add_item(tree, hf_btatt_time_trigger_setting_value_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5564 offset += 2;
5567 break;
5568 case 0x2A00: /* Device Name */
5569 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5570 break;
5572 proto_tree_add_item(tree, hf_btatt_device_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
5573 offset += tvb_captured_length_remaining(tvb, offset);
5575 break;
5576 case 0x2A01: /* Appearance */
5577 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5578 break;
5580 switch ((tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN) & 0xFFC0) >> 6) {
5581 case 0x003: /* Watch */
5582 hfs = hfx_btatt_appearance_watch;
5583 break;
5585 case 0x00C: /* Thermometer */
5586 hfs = hfx_btatt_appearance_thermometer;
5587 break;
5589 case 0x00D: /* Heart Rate Sensor */
5590 hfs = hfx_btatt_appearance_heart_rate;
5591 break;
5593 case 0x00E: /* Blood Pressure */
5594 hfs = hfx_btatt_appearance_blood_pressure;
5595 break;
5597 case 0x00F: /* HID */
5598 hfs = hfx_btatt_appearance_hid;
5599 break;
5601 case 0x011: /* Running Walking Sensor */
5602 hfs = hfx_btatt_appearance_running_walking_sensor;
5603 break;
5605 case 0x012: /* Cycling */
5606 hfs = hfx_btatt_appearance_cycling;
5607 break;
5609 case 0x031: /* Pulse Oximeter */
5610 hfs = hfx_btatt_appearance_pulse_oximeter;
5611 break;
5613 case 0x033: /* Personal Mobility Device */
5614 hfs = hfx_btatt_appearance_personal_mobility_device;
5615 break;
5617 case 0x035: /* Insulin Pump */
5618 hfs = hfx_btatt_appearance_insulin_pump;
5619 break;
5621 case 0x051: /* Outdoor Sports Activity */
5622 hfs = hfx_btatt_appearance_outdoor_sports_activity;
5623 break;
5625 default:
5626 hfs = hfx_btatt_appearance;
5628 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_appearance, ett_btatt_value, hfs, ENC_LITTLE_ENDIAN);
5629 offset += 2;
5631 break;
5632 case 0x2A02: /* Peripheral Privacy Flag */
5633 if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
5634 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5635 break;
5637 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5638 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5641 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5642 break;
5644 proto_tree_add_item(tree, hf_btatt_peripheral_privacy_flag, tvb, offset, 1, ENC_NA);
5645 offset += 1;
5647 break;
5648 case 0x2A03: /* Reconnection Address */
5649 if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
5650 if (is_writeable_response(att_data->opcode))
5651 break;
5653 if (!is_writeable_request(att_data->opcode))
5654 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5657 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5658 break;
5660 if (bluetooth_data) {
5661 interface_id = bluetooth_data->interface_id;
5662 adapter_id = bluetooth_data->adapter_id;
5663 } else {
5664 interface_id = adapter_id = 0;
5666 offset = dissect_bd_addr(hf_btatt_reconnection_address, pinfo, tree, tvb, offset, false, interface_id, adapter_id, NULL);
5668 break;
5669 case 0x2A04: /* Peripheral Preferred Connection Parameters */
5670 if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
5671 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
5672 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5675 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5676 break;
5678 proto_tree_add_item(tree, hf_btatt_minimum_connection_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5679 offset += 2;
5681 proto_tree_add_item(tree, hf_btatt_maximum_connection_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5682 offset += 2;
5684 proto_tree_add_item(tree, hf_btatt_peripheral_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5685 offset += 2;
5687 proto_tree_add_item(tree, hf_btatt_connection_supervision_timeout_multiplier, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5688 offset += 2;
5690 break;
5691 case 0x2A05: /* Service Changed */
5692 if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ATTRIBUTE_PROFILE) {
5693 if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
5694 break;
5696 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
5697 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5700 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5701 break;
5703 proto_tree_add_item(tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5704 offset += 2;
5706 proto_tree_add_item(tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5707 offset += 2;
5709 break;
5710 case 0x2A06: /* Alert Level */
5711 if (service_uuid.bt_uuid == GATT_SERVICE_IMMEDIATE_ALERT) {
5712 if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
5713 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5714 } else if (service_uuid.bt_uuid == GATT_SERVICE_LINK_LOSS) {
5715 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5716 break;
5718 if (!is_readable_response(att_data->opcode) &&
5719 !is_writeable_request(att_data->opcode))
5720 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5723 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5724 break;
5726 proto_tree_add_item(tree, hf_btatt_alert_level, tvb, offset, 1, ENC_NA);
5727 offset += 1;
5729 break;
5730 case 0x2A07: /* Tx Power Level */
5731 if (service_uuid.bt_uuid == GATT_SERVICE_TX_POWER) {
5732 if (is_readable_request(att_data->opcode))
5733 break;
5735 if (!is_readable_response(att_data->opcode))
5736 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5739 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5740 break;
5742 proto_tree_add_item(tree, hf_btatt_tx_power_level, tvb, offset, 1, ENC_NA);
5743 offset += 1;
5745 break;
5746 case 0x2A08: /* Date Time */
5747 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5748 break;
5750 offset = add_item_btatt_time(tree, tvb, offset);
5752 break;
5753 case 0x2A09: /* Day of Week */
5754 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5755 break;
5757 proto_tree_add_item(tree, hf_btatt_day_of_week, tvb, offset, 1, ENC_NA);
5758 offset += 1;
5760 break;
5761 case 0x2A0A: /* Day Date Time */
5762 case 0x2A0B: /* Exact Time 100 */ /* APPROVED: NO */
5763 case 0x2A0C: /* Exact Time 256 */
5764 case 0x2A2B: /* Current Time */
5765 if (uuid.bt_uuid == 0x2A2B) {/* Current Time */
5766 if (service_uuid.bt_uuid == GATT_SERVICE_CURRENT_TIME_SERVICE) {
5767 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5768 break;
5770 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) &&
5771 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
5772 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5776 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5777 break;
5779 offset = add_item_btatt_time(tree, tvb, offset);
5781 proto_tree_add_item(tree, hf_btatt_day_of_week, tvb, offset, 1, ENC_NA);
5782 offset += 1;
5784 if (uuid.bt_uuid == 0x2A0C || uuid.bt_uuid == 0x2A2B) {
5785 proto_tree_add_item(tree, hf_btatt_fractions256, tvb, offset, 1, ENC_NA);
5786 offset += 1;
5787 } else if (uuid.bt_uuid == 0x2A0B) {
5788 proto_tree_add_item(tree, hf_btatt_fractions100, tvb, offset, 1, ENC_NA);
5789 offset += 1;
5792 if (uuid.bt_uuid == 0x2A2B) {
5793 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_time_adjust_reason, ett_btatt_value, hfx_btatt_time_adjust_reason, ENC_NA);
5794 offset += 1;
5797 break;
5798 case 0x2A0D: /* DST Offset */
5799 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5800 break;
5802 proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
5803 offset += 1;
5805 break;
5806 case 0x2A0E: /* Time Zone */
5807 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5808 break;
5810 proto_tree_add_item(tree, hf_btatt_timezone, tvb, offset, 1, ENC_NA);
5811 offset += 1;
5813 break;
5814 case 0x2A0F: /* Local Time Information */
5815 case 0x2A10: /* Secondary Time Zone */ /* APPROVED: NO */
5816 if (service_uuid.bt_uuid == GATT_SERVICE_CURRENT_TIME_SERVICE) {
5817 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5818 break;
5820 if (!is_readable_response(att_data->opcode) &&
5821 !is_writeable_request(att_data->opcode))
5822 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5825 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5826 break;
5828 if (uuid.bt_uuid == 0x2A10) {
5829 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_timezone_information, ett_btatt_value, hfx_btatt_timezone_information, ENC_NA);
5830 offset += 1;
5833 proto_tree_add_item(tree, hf_btatt_timezone, tvb, offset, 1, ENC_NA);
5834 offset += 1;
5836 proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
5837 offset += 1;
5839 break;
5840 case 0x2A11: /* Time with DST */
5841 if (service_uuid.bt_uuid == GATT_SERVICE_NEXT_DST_CHANGE_SERVICE) {
5842 if (is_readable_request(att_data->opcode))
5843 break;
5845 if (!is_readable_response(att_data->opcode))
5846 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5849 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5850 break;
5852 offset = add_item_btatt_time(tree, tvb, offset);
5854 proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
5855 offset += 1;
5857 break;
5858 case 0x2A12: /* Time Accuracy */
5859 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5860 break;
5862 proto_tree_add_item(tree, hf_btatt_time_accuracy, tvb, offset, 1, ENC_NA);
5863 offset += 1;
5865 break;
5866 case 0x2A13: /* Time Source */
5867 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5868 break;
5870 proto_tree_add_item(tree, hf_btatt_time_source, tvb, offset, 1, ENC_NA);
5871 offset += 1;
5873 break;
5874 case 0x2A14: /* Reference Time Information */
5875 if (service_uuid.bt_uuid == GATT_SERVICE_CURRENT_TIME_SERVICE) {
5876 if (is_readable_request(att_data->opcode))
5877 break;
5879 if (!is_readable_response(att_data->opcode))
5880 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5883 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5884 break;
5886 proto_tree_add_item(tree, hf_btatt_time_source, tvb, offset, 1, ENC_NA);
5887 offset += 1;
5889 proto_tree_add_item(tree, hf_btatt_time_accuracy, tvb, offset, 1, ENC_NA);
5890 offset += 1;
5892 proto_tree_add_item(tree, hf_btatt_time_days_since_update, tvb, offset, 1, ENC_NA);
5893 offset += 1;
5895 proto_tree_add_item(tree, hf_btatt_time_hours_since_update, tvb, offset, 1, ENC_NA);
5896 offset += 1;
5898 break;
5899 case 0x2A15: /* Time Broadcast */ /* APPROVED: NO */
5900 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5901 break;
5903 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a0c", tvb_new_subset_length(tvb, offset, 9), pinfo, tree, att_data);
5904 offset += 9;
5906 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a0f", tvb_new_subset_length(tvb, offset, 2), pinfo, tree, att_data);
5907 offset += 2;
5909 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a14", tvb_new_subset_length(tvb, offset, 4), pinfo, tree, att_data);
5910 offset += 4;
5912 break;
5913 case 0x2A16: /* Time Update Control Point */
5914 if (service_uuid.bt_uuid == GATT_SERVICE_REFERENCE_TIME_UPDATE_SERVICE) {
5915 if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
5916 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5919 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5920 break;
5922 proto_tree_add_item(tree, hf_btatt_time_update_control_point, tvb, offset, 1, ENC_NA);
5923 offset += 1;
5925 break;
5926 case 0x2A17: /* Time Update State */
5927 if (service_uuid.bt_uuid == GATT_SERVICE_REFERENCE_TIME_UPDATE_SERVICE) {
5928 if (is_readable_request(att_data->opcode))
5929 break;
5931 if (!is_readable_response(att_data->opcode))
5932 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5935 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5936 break;
5938 proto_tree_add_item(tree, hf_btatt_time_current_state, tvb, offset, 1, ENC_NA);
5939 offset += 1;
5941 proto_tree_add_item(tree, hf_btatt_time_result, tvb, offset, 1, ENC_NA);
5942 offset += 1;
5944 break;
5945 case 0x2A18: /* Glucose Measurement */
5946 if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE) {
5947 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
5948 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5951 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5952 break;
5954 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_flags, ett_btatt_value, hfx_btatt_glucose_measurement_flags, ENC_NA);
5955 flags = tvb_get_uint8(tvb, offset);
5956 offset += 1;
5958 proto_tree_add_item(tree, hf_btatt_glucose_measurement_sequence_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5959 offset += 2;
5961 offset = add_item_btatt_timestamp(tree, hf_btatt_glucose_measurement_base_time, tvb, offset);
5963 if (flags & 0x01) {
5964 proto_tree_add_item(tree, hf_btatt_glucose_measurement_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5965 offset += 2;
5968 if ((flags & 0x02) && !(flags & 0x04)) {
5969 proto_tree_add_item(tree, hf_btatt_glucose_measurement_glucose_concentration_kg_per_l, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5970 offset += 2;
5973 if ((flags & 0x02) && (flags & 0x04)) {
5974 proto_tree_add_item(tree, hf_btatt_glucose_measurement_glucose_concentration_mol_per_l, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5975 offset += 2;
5978 if (flags & 0x02) {
5979 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_type_and_sample_location, ett_btatt_value, hfx_btatt_glucose_measurement_type_and_sample_location, ENC_NA);
5980 offset += 1;
5983 if (flags & 0x08) {
5984 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_sensor_status_annunciation, ett_btatt_value, hfx_btatt_glucose_measurement_sensor_status_annunciation, ENC_LITTLE_ENDIAN);
5985 offset += 2;
5988 break;
5989 case 0x2A19: /* Battery Level */ {
5990 if (service_uuid.bt_uuid == GATT_SERVICE_BATTERY_SERVICE) {
5991 if (is_readable_request(att_data->opcode))
5992 break;
5994 if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
5995 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5998 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5999 break;
6001 uint32_t battery_level;
6002 sub_item = proto_tree_add_item_ret_uint(tree, hf_btatt_battery_level, tvb, offset, 1, ENC_NA, &battery_level);
6003 if (battery_level > 100)
6004 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6005 offset += 1;
6008 break;
6009 case 0x2A1A: /* Battery Power State */ /* APPROVED: NO */
6010 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6011 break;
6013 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_battery_power_state, ett_btatt_value, hfx_btatt_battery_power_state, ENC_NA);
6014 offset += 1;
6016 break;
6017 case 0x2A1B: /* Battery Level State */ /* APPROVED: NO */ {
6018 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6019 break;
6021 uint32_t battery_level;
6022 sub_item = proto_tree_add_item_ret_uint(tree, hf_btatt_battery_level, tvb, offset, 1, ENC_NA, &battery_level);
6023 if (battery_level > 100)
6024 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6025 offset += 1;
6027 if (tvb_reported_length_remaining(tvb, offset) >= 1) { /* optional field */
6028 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_battery_power_state, ett_btatt_value, hfx_btatt_battery_power_state, ENC_NA);
6029 offset += 1;
6033 break;
6034 case 0x2A1C: /* Temperature Measurement */
6035 case 0x2A1E: /* Intermediate Temperature */
6036 if (uuid.bt_uuid == 0x2A1C) {/* Temperature Measurement */
6037 if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6038 if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
6039 break;
6041 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
6042 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6044 } else if (uuid.bt_uuid == 0x2A1E) {/* Intermediate Temperature */
6045 if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6046 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6047 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6051 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6052 break;
6054 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_temperature_measurement_flags, ett_btatt_value, hfx_btatt_temperature_measurement_flags, ENC_NA);
6055 flags = tvb_get_uint8(tvb, offset);
6056 offset += 1;
6058 if (flags & 0x01) {
6059 proto_tree_add_item(tree, hf_btatt_temperature_measurement_value_fahrenheit, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6060 } else {
6061 proto_tree_add_item(tree, hf_btatt_temperature_measurement_value_celsius, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6063 offset += 4;
6065 if (flags & 0x02) {
6066 offset = add_item_btatt_timestamp(tree, hf_btatt_temperature_measurement_timestamp, tvb, offset);
6069 if (flags & 0x04) {
6070 proto_tree_add_item(tree, hf_btatt_temperature_type, tvb, offset, 1, ENC_NA);
6071 offset += 1;
6074 break;
6075 case 0x2A1D: /* Temperature Type */
6076 if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6077 if (is_readable_request(att_data->opcode))
6078 break;
6080 if (!is_readable_response(att_data->opcode))
6081 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6084 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6085 break;
6087 proto_tree_add_item(tree, hf_btatt_temperature_type, tvb, offset, 1, ENC_NA);
6088 offset += 1;
6090 break;
6091 case 0x2A1F: /* Temperature Celsius */ /* APPROVED: NO */ {
6092 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6093 break;
6095 int32_t temperature;
6096 sub_item = proto_tree_add_item_ret_int(tree, hf_btatt_temperature_celsius, tvb, offset, 2, ENC_LITTLE_ENDIAN, &temperature);
6097 if (temperature < -2732)
6098 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6099 offset += 2;
6102 break;
6103 case 0x2A20: /* Temperature Fahrenheit */ /* APPROVED: NO */ {
6104 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6105 break;
6107 int32_t temperature;
6108 sub_item = proto_tree_add_item_ret_int(tree, hf_btatt_temperature_fahrenheit, tvb, offset, 2, ENC_LITTLE_ENDIAN, &temperature);
6109 if (temperature < -4597)
6110 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6111 offset += 2;
6114 break;
6115 case 0x2A21: /* Measurement Interval */
6116 if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6117 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
6118 break;
6120 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
6121 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6124 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6125 break;
6127 proto_tree_add_item(tree, hf_btatt_measurement_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6128 offset += 2;
6130 break;
6131 case 0x2A22: /* Boot Keyboard Input Report */
6132 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6133 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6134 break;
6136 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6137 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6140 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6141 break;
6143 call_dissector_with_data(usb_hid_boot_keyboard_input_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
6144 offset += tvb_reported_length_remaining(tvb, offset);
6146 break;
6147 case 0x2A23: /* System ID */
6148 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6149 if (is_readable_request(att_data->opcode))
6150 break;
6152 if (!is_readable_response(att_data->opcode))
6153 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6156 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6157 break;
6159 proto_tree_add_item(tree, hf_btatt_system_id_manufacturer_identifier, tvb, offset, 5, ENC_LITTLE_ENDIAN);
6160 offset += 5;
6162 proto_tree_add_item(tree, hf_btatt_system_id_organizationally_unique_identifier, tvb, offset, 3, ENC_LITTLE_ENDIAN);
6163 offset += 3;
6164 break;
6165 case 0x2A24: /* Model Number String */
6166 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6167 if (is_readable_request(att_data->opcode))
6168 break;
6170 if (!is_readable_response(att_data->opcode))
6171 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6174 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6175 break;
6177 proto_tree_add_item(tree, hf_btatt_model_number_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6178 offset += tvb_captured_length_remaining(tvb, offset);
6180 break;
6181 case 0x2A25: /* Serial Number String */
6182 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6183 if (is_readable_request(att_data->opcode))
6184 break;
6186 if (!is_readable_response(att_data->opcode))
6187 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6190 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6191 break;
6193 proto_tree_add_item(tree, hf_btatt_serial_number_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6194 offset += tvb_captured_length_remaining(tvb, offset);
6196 break;
6197 case 0x2A26: /* Firmware Revision String */
6198 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6199 if (is_readable_request(att_data->opcode))
6200 break;
6202 if (!is_readable_response(att_data->opcode))
6203 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6206 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6207 break;
6209 proto_tree_add_item(tree, hf_btatt_firmware_revision_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6210 offset += tvb_captured_length_remaining(tvb, offset);
6212 break;
6213 case 0x2A27: /* Hardware Revision String */
6214 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6215 if (is_readable_request(att_data->opcode))
6216 break;
6218 if (!is_readable_response(att_data->opcode))
6219 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6222 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6223 break;
6225 proto_tree_add_item(tree, hf_btatt_hardware_revision_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6226 offset += tvb_captured_length_remaining(tvb, offset);
6228 break;
6229 case 0x2A28: /* Software Revision String */
6230 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6231 if (is_readable_request(att_data->opcode))
6232 break;
6234 if (!is_readable_response(att_data->opcode))
6235 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6238 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6239 break;
6241 proto_tree_add_item(tree, hf_btatt_software_revision_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6242 offset += tvb_captured_length_remaining(tvb, offset);
6244 break;
6245 case 0x2A29: /* Manufacturer Name String */
6246 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6247 if (is_readable_request(att_data->opcode))
6248 break;
6250 if (!is_readable_response(att_data->opcode))
6251 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6254 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6255 break;
6257 proto_tree_add_item(tree, hf_btatt_manufacturer_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6258 offset += tvb_captured_length_remaining(tvb, offset);
6260 break;
6261 case 0x2A2A: /* IEEE 11073-20601 Regulatory Certification Data List */ {
6262 uint16_t count;
6263 uint16_t list_length = 0;
6265 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6266 if (is_readable_request(att_data->opcode))
6267 break;
6269 if (!is_readable_response(att_data->opcode))
6270 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6273 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6274 break;
6276 proto_tree_add_item(tree, hf_btatt_regulatory_certification_data_list_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6277 count = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6278 list_length += 2;
6279 offset += 2;
6281 proto_tree_add_item(tree, hf_btatt_regulatory_certification_data_list_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6282 list_length += 2;
6283 offset += 2;
6285 while (count--) {
6286 proto_item *authorizing_body_data_item;
6287 proto_tree *authorizing_body_data_tree;
6288 uint8_t item_type;
6289 uint16_t item_length;
6290 uint16_t certification_data_list_count = 0;
6291 uint16_t certification_data_list_length = 0;
6292 proto_item *list_length_item;
6294 sub_item = proto_tree_add_item(tree, hf_btatt_regulatory_certification_data_list_item, tvb, offset, 0, ENC_NA);
6295 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
6297 proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_body, tvb, offset, 1, ENC_NA);
6298 list_length += 1;
6299 offset += 1;
6301 proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_body_structure_type, tvb, offset, 1, ENC_NA);
6302 item_type = tvb_get_uint8(tvb, offset);
6303 list_length += 1;
6304 offset += 1;
6306 list_length_item = proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_body_structure_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6307 item_length = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6308 list_length += 2 + item_length;
6309 offset += 2;
6311 if (item_type == 0x01) {
6312 authorizing_body_data_item = proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_authorizing_body_data, tvb, offset, item_length, ENC_NA);
6313 authorizing_body_data_tree = proto_item_add_subtree(authorizing_body_data_item, ett_btatt_list);
6315 if (item_length > 0) {
6316 proto_tree_add_item(authorizing_body_data_tree, hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_major_ig_version, tvb, offset, 1, ENC_NA);
6317 offset += 1;
6320 if (item_length > 1) {
6321 proto_tree_add_item(authorizing_body_data_tree, hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_minor_ig_version, tvb, offset, 1, ENC_NA);
6322 offset += 1;
6325 if (item_length > 2) {
6326 proto_tree_add_item(authorizing_body_data_tree, hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6327 certification_data_list_count = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6328 offset += 2;
6331 if (item_length > 4) {
6332 proto_tree_add_item(authorizing_body_data_tree, hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6333 certification_data_list_length = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6334 offset += 2;
6337 if (item_length > 6 && certification_data_list_count) {
6338 proto_item *certification_data_list_item;
6339 proto_tree *certification_data_list_tree;
6341 certification_data_list_item = proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list, tvb, offset, certification_data_list_length, ENC_NA);
6342 certification_data_list_tree = proto_item_add_subtree(certification_data_list_item, ett_btatt_list);
6344 while (certification_data_list_count--) {
6345 proto_tree_add_item(certification_data_list_tree, hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certified_device_class, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6346 offset += 2;
6349 } else if (item_type == 0x02) {
6350 proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_regulation_bit_field_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6351 offset += 2;
6352 } else {
6353 proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_data, tvb, offset, item_length, ENC_NA);
6354 offset += item_length;
6357 proto_item_set_len(sub_item, 1 + 1 + 2 + item_length);
6359 if (list_length != length)
6360 expert_add_info(pinfo, list_length_item, &ei_btatt_invalid_length);
6364 break;
6365 case 0x2A2C: /* Magnetic Declination */
6366 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
6367 if (is_readable_request(att_data->opcode))
6368 break;
6370 if (!is_readable_response(att_data->opcode) &&
6371 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6372 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6375 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6376 break;
6378 proto_tree_add_item(tree, hf_btatt_magnetic_declination, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6379 offset += 2;
6381 break;
6382 case 0x2A2F: /* Position 2D */ /* APPROVED: NO */
6383 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6384 break;
6386 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2aae", tvb_new_subset_length(tvb, offset, 4), pinfo, tree, att_data);
6387 offset += 4;
6389 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2aaf", tvb_new_subset_length(tvb, offset, 4), pinfo, tree, att_data);
6390 offset += 4;
6392 break;
6393 case 0x2A30: /* Position 3D */ /* APPROVED: NO */
6394 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6395 break;
6397 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a2f", tvb_new_subset_length(tvb, offset, 8), pinfo, tree, att_data);
6398 offset += 8;
6400 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a6c", tvb_new_subset_length(tvb, offset, 3), pinfo, tree, att_data);
6401 offset += 3;
6403 break;
6404 case 0x2A31: /* Scan Refresh */
6405 if (service_uuid.bt_uuid == GATT_SERVICE_SCAN_PARAMETERS) {
6406 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6407 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6410 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6411 break;
6413 proto_tree_add_item(tree, hf_btatt_scan_refresh, tvb, offset, 1, ENC_NA);
6414 offset += 1;
6416 break;
6417 case 0x2A32: /* Boot Keyboard Output Report */
6418 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6419 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6420 break;
6422 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6423 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6426 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6427 break;
6429 call_dissector_with_data(usb_hid_boot_keyboard_output_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
6430 offset += tvb_reported_length_remaining(tvb, offset);
6432 break;
6433 case 0x2A33: /* Boot Mouse Input Report */
6434 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6435 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6436 break;
6438 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6439 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6442 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6443 break;
6445 call_dissector_with_data(usb_hid_boot_mouse_input_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
6446 offset += tvb_reported_length_remaining(tvb, offset);
6448 break;
6449 case 0x2A34: /* Glucose Measurement Context */
6450 if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE) {
6451 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6452 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6455 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6456 break;
6458 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_context_flags, ett_btatt_value, hfx_btatt_glucose_measurement_context_flags, ENC_NA);
6459 flags = tvb_get_uint8(tvb, offset);
6460 offset += 1;
6462 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_sequence_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6463 offset += 2;
6465 if (flags & 0x80) {
6466 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_context_extended_flags, ett_btatt_value, hfx_btatt_glucose_measurement_context_extended_flags, ENC_NA);
6467 offset += 1;
6470 if (flags & 0x01) {
6471 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_carbohydrate_id, tvb, offset, 1, ENC_NA);
6472 offset += 1;
6474 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_carbohydrate_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6475 offset += 2;
6478 if (flags & 0x02) {
6479 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_meal, tvb, offset, 1, ENC_NA);
6480 offset += 1;
6483 if (flags & 0x04) {
6484 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_context_tester_health, ett_btatt_value, hfx_btatt_glucose_measurement_context_tester_health, ENC_NA);
6485 offset += 1;
6488 if (flags & 0x08) {
6489 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_exercise_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6490 offset += 2;
6492 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_exercise_intensity, tvb, offset, 1, ENC_NA);
6493 offset += 1;
6496 if (flags & 0x10) {
6497 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_medication_id, tvb, offset, 1, ENC_NA);
6498 offset += 1;
6500 if (flags & 0x20) {
6501 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_medication_l, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6502 offset += 2;
6503 } else {
6504 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_medication_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6505 offset += 2;
6509 if (flags & 0x40) {
6510 proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_hba1c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6511 offset += 2;
6514 break;
6515 case 0x2A35: /* Blood Pressure Measurement */
6516 case 0x2A36: /* Intermediate Cuff Pressure */
6517 if (uuid.bt_uuid == 0x2A35) {/* Blood Pressure Measurement */
6518 if (service_uuid.bt_uuid == GATT_SERVICE_BLOOD_PRESSURE) {
6519 if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
6520 break;
6522 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
6523 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6525 } else if (uuid.bt_uuid == 0x2A36) {/* Intermediate Cuff Pressure */
6526 if (service_uuid.bt_uuid == GATT_SERVICE_BLOOD_PRESSURE) {
6527 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6528 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6532 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6533 break;
6535 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_blood_pressure_measurement_flags, ett_btatt_value, hfx_btatt_blood_pressure_measurement_flags, ENC_NA);
6536 flags = tvb_get_uint8(tvb, offset);
6537 offset += 1;
6539 if (flags & 0x01) {
6540 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_systolic_kpa, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6541 offset += 2;
6543 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_diastolic_kpa, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6544 offset += 2;
6546 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_kpa, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6547 offset += 2;
6548 } else {
6549 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_systolic_mmhg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6550 offset += 2;
6552 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_diastolic_mmhg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6553 offset += 2;
6555 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_mmhg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6556 offset += 2;
6559 if (flags & 0x02) {
6560 offset = add_item_btatt_timestamp(tree, hf_btatt_blood_pressure_measurement_timestamp, tvb, offset);
6563 if (flags & 0x04) {
6564 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6565 offset += 2;
6568 if (flags & 0x08) {
6569 proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_user_id, tvb, offset, 1, ENC_NA);
6570 offset += 1;
6573 if (flags & 0x10) {
6574 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_blood_pressure_measurement_status, ett_btatt_value, hfx_btatt_blood_pressure_measurement_status, ENC_LITTLE_ENDIAN);
6575 offset += 2;
6578 break;
6579 case 0x2A37: /* Heart Rate Measurement */
6580 if (service_uuid.bt_uuid == GATT_SERVICE_HEART_RATE) {
6581 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6582 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6585 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6586 break;
6588 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_heart_rate_measurement_flags, ett_btatt_value, hfx_btatt_heart_rate_measurement_flags, ENC_NA);
6589 flags = tvb_get_uint8(tvb, offset);
6590 offset += 1;
6592 if (flags & 0x01) {
6593 proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_value_16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6594 offset += 2;
6595 } else {
6596 proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_value_8, tvb, offset, 1, ENC_NA);
6597 offset += 1;
6600 if (flags & 0x08) {
6601 proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_energy_expended, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6602 offset += 2;
6605 if (flags & 0x10) {
6606 unsigned interval_count = 0;
6608 sub_item = proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_rr_intervals, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
6609 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
6610 while (tvb_reported_length_remaining(tvb, offset)) {
6611 proto_tree_add_item(sub_tree, hf_btatt_heart_rate_measurement_rr_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6612 offset += 2;
6613 interval_count += 1;
6616 proto_item_append_text(sub_item, " [count = %2u]", interval_count);
6619 break;
6620 case 0x2A38: /* Body Sensor Location */
6621 if (service_uuid.bt_uuid == GATT_SERVICE_HEART_RATE) {
6622 if (is_readable_request(att_data->opcode))
6623 break;
6625 if (!is_readable_response(att_data->opcode))
6626 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6629 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6630 break;
6632 proto_tree_add_item(tree, hf_btatt_body_sensor_location, tvb, offset, 1, ENC_NA);
6633 offset += 1;
6635 break;
6636 case 0x2A39: /* Heart Rate Control Point */
6637 if (service_uuid.bt_uuid == GATT_SERVICE_HEART_RATE) {
6638 if (is_writeable_response(att_data->opcode))
6639 break;
6641 if (!is_writeable_request(att_data->opcode))
6642 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6645 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6646 break;
6648 proto_tree_add_item(tree, hf_btatt_heart_rate_control_point, tvb, offset, 1, ENC_NA);
6649 offset += 1;
6651 break;
6652 case 0x2A3A: /* Removable */ /* APPROVED: NO */
6653 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6654 break;
6656 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_removable, ett_btatt_value, hfx_btatt_removable, ENC_NA);
6657 offset += 1;
6659 break;
6660 case 0x2A3B: /* Service Required */ /* APPROVED: NO */
6661 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6662 break;
6664 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_service_required, ett_btatt_value, hfx_btatt_service_required, ENC_NA);
6665 offset += 1;
6667 break;
6668 case 0x2A3C: /* Scientific Temperature Celsius */ /* APPROVED: NO */
6669 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6670 break;
6672 proto_tree_add_item(tree, hf_btatt_scientific_temperature_celsius, tvb, offset, 8, ENC_LITTLE_ENDIAN);
6673 offset += 8;
6675 break;
6676 case 0x2A3D: /* String */ /* APPROVED: NO */
6677 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6678 break;
6680 proto_tree_add_item(tree, hf_btatt_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6681 offset += tvb_reported_length_remaining(tvb, offset);
6683 break;
6684 case 0x2A3E: /* Network Availability */ /* APPROVED: NO */
6685 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6686 break;
6688 proto_tree_add_item(tree, hf_btatt_network_availability, tvb, offset, 1, ENC_NA);
6689 offset += 1;
6691 break;
6692 case 0x2A3F: /* Alert Status */
6693 if (service_uuid.bt_uuid == GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE) {
6694 if (is_readable_request(att_data->opcode))
6695 break;
6697 if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6698 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6701 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6702 break;
6704 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_alert_status, ett_btatt_value, hfx_btatt_alert_status, ENC_NA);
6705 offset += 1;
6707 break;
6708 case 0x2A40: /* Ringer Control Point */
6709 if (service_uuid.bt_uuid == GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE) {
6710 if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6711 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6714 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6715 break;
6717 proto_tree_add_item(tree, hf_btatt_ringer_control_point, tvb, offset, 1, ENC_NA);
6718 offset += 1;
6720 break;
6721 case 0x2A41: /* Ringer Setting */
6722 if (service_uuid.bt_uuid == GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE) {
6723 if (is_readable_request(att_data->opcode))
6724 break;
6726 if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6727 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6730 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6731 break;
6733 proto_tree_add_item(tree, hf_btatt_ringer_setting, tvb, offset, 1, ENC_NA);
6734 offset += 1;
6736 break;
6737 case 0x2A42: /* Alert Category ID Bit Mask */
6738 case 0x2A47: /* Supported New Alert Category */
6739 case 0x2A48: /* Supported Unread Alert Category */
6740 if (uuid.bt_uuid == 0x2A47 || uuid.bt_uuid == 0x2A48) {/* Supported New Alert Category || Supported Unread Alert Category*/
6741 if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6742 if (is_readable_request(att_data->opcode))
6743 break;
6745 if (!is_readable_response(att_data->opcode))
6746 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6750 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6751 break;
6753 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_alert_category_id_bitmask_1, ett_btatt_value, hfx_btatt_alert_category_id_bitmask_1, ENC_NA);
6754 offset += 1;
6756 if (tvb_reported_length_remaining(tvb, offset) >= 1) {
6757 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_alert_category_id_bitmask_2, ett_btatt_value, hfx_btatt_alert_category_id_bitmask_2, ENC_NA);
6758 offset += 1;
6761 break;
6762 case 0x2A43: /* Alert Category ID */
6763 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6764 break;
6766 proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6767 offset += 1;
6769 break;
6770 case 0x2A44: /* Alert Notification Control Point */
6771 if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6772 if (is_writeable_response(att_data->opcode))
6773 break;
6775 if (!is_writeable_request(att_data->opcode))
6776 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6779 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6780 break;
6782 proto_tree_add_item(tree, hf_btatt_alert_command_id, tvb, offset, 1, ENC_NA);
6783 offset += 1;
6785 proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6786 offset += 1;
6788 break;
6789 case 0x2A45: /* Unread Alert Status */
6790 if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6791 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6792 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6795 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6796 break;
6798 proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6799 offset += 1;
6801 proto_tree_add_item(tree, hf_btatt_alert_unread_count, tvb, offset, 1, ENC_NA);
6802 offset += 1;
6804 break;
6805 case 0x2A46: /* New Alert */
6806 if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6807 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6808 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6811 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6812 break;
6814 proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6815 offset += 1;
6817 proto_tree_add_item(tree, hf_btatt_alert_number_of_new_alert, tvb, offset, 1, ENC_NA);
6818 offset += 1;
6820 if (tvb_reported_length_remaining(tvb, offset) > 0) {
6821 proto_tree_add_item(tree, hf_btatt_alert_text_string_information, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
6822 offset += tvb_captured_length_remaining(tvb, offset);
6825 break;
6826 case 0x2A49: /* Blood Pressure Feature */
6827 if (service_uuid.bt_uuid == GATT_SERVICE_BLOOD_PRESSURE) {
6828 if (is_readable_request(att_data->opcode))
6829 break;
6831 if (!is_readable_response(att_data->opcode))
6832 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6835 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6836 break;
6838 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_blood_pressure_feature, ett_btatt_value, hfx_btatt_blood_pressure_feature, ENC_LITTLE_ENDIAN);
6839 offset += 2;
6841 break;
6842 case 0x2A4A: /* HOGP: HID Information */
6843 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6844 if (is_readable_request(att_data->opcode))
6845 break;
6847 if (!is_readable_response(att_data->opcode))
6848 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6851 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6852 break;
6854 proto_tree_add_item(tree, hf_btatt_hogp_bcd_hid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6855 offset += 2;
6857 proto_tree_add_item(tree, hf_btatt_hogp_b_country_code, tvb, offset, 1, ENC_NA);
6858 offset += 1;
6860 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_hogp_flags, ett_btatt_value, hfx_btatt_hogp_flags, ENC_NA);
6861 offset += 1;
6863 break;
6864 case 0x2A4B: /* HOGP: Report Map */
6865 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6866 if (is_readable_request(att_data->opcode))
6867 break;
6869 if (!is_readable_response(att_data->opcode))
6870 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6873 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6874 break;
6876 offset = dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, NULL);
6878 break;
6879 case 0x2A4C: /* HID Control Point */
6880 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6881 if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6882 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6885 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6886 break;
6888 proto_tree_add_item(tree, hf_btatt_hogp_hid_control_point_command, tvb, offset, 1, ENC_NA);
6889 offset += 1;
6891 break;
6892 case 0x2A4D: /* Report */
6893 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6894 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6895 break;
6897 if (!is_readable_response(att_data->opcode) &&
6898 !is_writeable_request(att_data->opcode) &&
6899 att_data->opcode != ATT_OPCODE_WRITE_COMMAND &&
6900 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6901 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6904 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6905 break;
6907 /* TODO: Implement */
6908 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
6909 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
6910 offset = tvb_captured_length(tvb);
6912 break;
6913 case 0x2A4E: /* HOGP: Protocol Mode */
6914 if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6915 if (is_readable_request(att_data->opcode))
6916 break;
6918 if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6919 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6922 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6923 break;
6925 proto_tree_add_item(tree, hf_btatt_hogp_protocol_mode, tvb, offset, 1, ENC_NA);
6926 offset += 1;
6928 break;
6929 case 0x2A4F: /* Scan Interval Window */
6930 if (service_uuid.bt_uuid == GATT_SERVICE_SCAN_PARAMETERS) {
6931 if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6932 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6935 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6936 break;
6938 proto_tree_add_item(tree, hf_btatt_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6939 offset += 2;
6941 proto_tree_add_item(tree, hf_btatt_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6942 offset += 2;
6944 break;
6945 case 0x2A50: /* PnP ID */
6946 if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6947 if (is_readable_request(att_data->opcode))
6948 break;
6950 if (!is_readable_response(att_data->opcode))
6951 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6954 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6955 break;
6957 proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id_source, tvb, offset, 1, ENC_NA);
6958 value = tvb_get_uint8(tvb, offset);
6959 offset += 1;
6961 if (value == 1)
6962 proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id_bluetooth_sig, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6963 else if (value == 2)
6964 proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id_usb_forum, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6965 else
6966 proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6967 offset += 2;
6969 proto_tree_add_item(tree, hf_btatt_pnp_id_product_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6970 offset += 2;
6972 proto_tree_add_item(tree, hf_btatt_pnp_id_product_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6973 offset += 2;
6975 break;
6976 case 0x2A51: /* Glucose Feature */
6977 if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE) {
6978 if (is_readable_request(att_data->opcode))
6979 break;
6981 if (!is_readable_response(att_data->opcode))
6982 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6985 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6986 break;
6988 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_feature, ett_btatt_value, hfx_btatt_glucose_feature, ENC_LITTLE_ENDIAN);
6989 offset += 2;
6991 break;
6992 case 0x2A52: /* Record Access Control Point */
6993 if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE ||
6994 service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING ||
6995 service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
6996 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
6997 break;
6999 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7000 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7003 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7004 break;
7006 proto_tree_add_item(tree, hf_btatt_record_access_control_point_opcode, tvb, offset, 1, ENC_NA);
7007 opcode = tvb_get_uint8(tvb, offset);
7008 offset += 1;
7010 proto_tree_add_item(tree, hf_btatt_record_access_control_point_operator, tvb, offset, 1, ENC_NA);
7011 operator_value = tvb_get_uint8(tvb, offset);
7012 offset += 1;
7014 sub_item = proto_tree_add_item(tree, hf_btatt_record_access_control_point_operand, tvb, offset, 0, ENC_NA);
7015 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
7016 operand_offset = offset;
7018 switch (opcode) {
7019 case 1: /* Report Stored Records */
7020 case 2: /* Delete Stored Records */
7021 case 4: /* Report Number of Stored Records */
7022 switch (operator_value) {
7023 case 0: /* Null */
7024 case 1: /* All records */
7025 case 5: /* First record(i.e. oldest record) */
7026 case 6: /* Last record (i.e. most recent record) */
7027 /* N/A */
7029 break;
7030 case 2: /* Less than or equal to */
7031 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_filter_type, tvb, offset, 1, ENC_NA);
7032 value = tvb_get_uint8(tvb, offset);
7033 offset += 1;
7035 if (value == 0x01) /* Time offset */ {
7036 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_max_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7037 offset += 2;
7038 } else {
7039 proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
7040 offset = tvb_captured_length(tvb);
7043 break;
7044 case 3: /* Greater than or equal to */
7045 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_filter_type, tvb, offset, 1, ENC_NA);
7046 value = tvb_get_uint8(tvb, offset);
7047 offset += 1;
7049 if (value == 0x01) /* Time offset */ {
7050 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_min_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7051 offset += 2;
7052 } else {
7053 proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
7054 offset = tvb_captured_length(tvb);
7057 break;
7058 case 4: /* Within range of (inclusive) */
7059 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_filter_type, tvb, offset, 1, ENC_NA);
7060 value = tvb_get_uint8(tvb, offset);
7061 offset += 1;
7063 if (value == 0x01) /* Time offset */ {
7064 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_min_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7065 offset += 2;
7067 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_max_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7068 offset += 2;
7069 } else {
7070 proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
7071 offset = tvb_captured_length(tvb);
7074 break;
7077 break;
7078 case 3: /* Abort Operation */
7079 /* N/A */
7081 break;
7083 case 5: /* Number of Stored Records Response */
7084 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_number_of_records, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7085 offset += 2;
7087 break;
7088 case 6: /* Response Code */
7089 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7090 offset += 1;
7092 proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_response_code, tvb, offset, 1, ENC_NA);
7093 offset += 1;
7095 break;
7098 proto_item_set_len(sub_item, offset - operand_offset);
7100 break;
7101 case 0x2A53: /* RSC Measurement */
7102 if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE) {
7103 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7104 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7107 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7108 break;
7110 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_rsc_measurement_flags, ett_btatt_value, hfx_btatt_rsc_measurement_flags, ENC_NA);
7111 flags = tvb_get_uint8(tvb, offset);
7112 offset += 1;
7114 proto_tree_add_item(tree, hf_btatt_rsc_measurement_instantaneous_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7115 offset += 2;
7117 proto_tree_add_item(tree, hf_btatt_rsc_measurement_instantaneous_cadence, tvb, offset, 1, ENC_NA);
7118 offset += 1;
7120 if (flags & 0x01) {
7121 proto_tree_add_item(tree, hf_btatt_rsc_measurement_instantaneous_stride_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7122 offset += 2;
7125 if (flags & 0x02) {
7126 proto_tree_add_item(tree, hf_btatt_rsc_measurement_total_distance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7127 offset += 4;
7130 break;
7131 case 0x2A54: /* RSC Feature */
7132 if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE) {
7133 if (is_readable_request(att_data->opcode))
7134 break;
7136 if (!is_readable_response(att_data->opcode))
7137 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7140 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7141 break;
7143 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_rsc_feature, ett_btatt_value, hfx_btatt_rsc_feature, ENC_LITTLE_ENDIAN);
7144 offset += 2;
7146 break;
7147 case 0x2A55: /* SC Control Point */
7148 if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE || service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE) {
7149 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7150 break;
7152 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7153 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7156 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7157 break;
7159 proto_tree_add_item(tree, hf_btatt_sc_control_point_opcode, tvb, offset, 1, ENC_NA);
7160 opcode = tvb_get_uint8(tvb, offset);
7161 offset += 1;
7163 switch (opcode) {
7164 case 1: /* Set Cumulative Value */
7165 proto_tree_add_item(tree, hf_btatt_sc_control_point_cumulative_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7166 offset += 4;
7168 break;
7169 case 3: /* Update Sensor Location */
7170 proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7171 offset += 1;
7173 break;
7174 case 16: /* Response Code */
7175 proto_tree_add_item(tree, hf_btatt_sc_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7176 value = tvb_get_uint8(tvb, offset);
7177 offset += 1;
7179 proto_tree_add_item(tree, hf_btatt_sc_control_point_response_value, tvb, offset, 1, ENC_NA);
7180 offset += 1;
7182 if (value == 0x04 && tvb_get_uint8(tvb, offset) == 0x01) { /* Request Supported Sensor Locations */
7183 while (tvb_captured_length_remaining(tvb, offset)) {
7184 proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7185 offset += 1;
7189 break;
7190 case 2: /* Start Sensor Calibration */
7191 case 4: /* Request Supported Sensor Locations */
7192 /* N/A */
7193 break;
7196 break;
7197 case 0x2A56: /* Digital */
7198 if (service_uuid.bt_uuid == GATT_SERVICE_AUTOMATION_IO) {
7199 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7200 break;
7202 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) &&
7203 att_data->opcode != ATT_OPCODE_WRITE_COMMAND && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7204 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7207 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7208 break;
7210 proto_tree_add_item(tree, hf_btatt_digital, tvb, offset, 1, ENC_NA);
7211 offset += 1;
7213 break;
7214 case 0x2A57: /* Digital Output */ /* APPROVED: NO */
7215 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7216 break;
7218 proto_tree_add_item(tree, hf_btatt_digital_output, tvb, offset, -1, ENC_NA);
7219 offset += tvb_reported_length_remaining(tvb, offset);
7221 break;
7222 case 0x2A58: /* Analog */
7223 if (service_uuid.bt_uuid == GATT_SERVICE_AUTOMATION_IO) {
7224 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7225 break;
7227 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) &&
7228 att_data->opcode != ATT_OPCODE_WRITE_COMMAND && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7229 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7232 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7233 break;
7235 proto_tree_add_item(tree, hf_btatt_analog, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7236 offset += 2;
7238 break;
7239 case 0x2A59: /* Analog Output */ /* APPROVED: NO */
7240 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7241 break;
7243 proto_tree_add_item(tree, hf_btatt_analog_output, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7244 offset += 2;
7246 break;
7247 case 0x2A5A: /* Aggregate */
7248 if (service_uuid.bt_uuid == GATT_SERVICE_AUTOMATION_IO) {
7249 if (is_readable_request(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7250 break;
7252 if (!is_readable_response(att_data->opcode) &&
7253 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7254 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7257 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7258 break;
7260 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a56", tvb_new_subset_length(tvb, offset, 1), pinfo, tree, att_data);
7261 offset += 1;
7263 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a58", tvb_new_subset_length(tvb, offset, 2), pinfo, tree, att_data);
7264 offset += 2;
7266 break;
7267 case 0x2A5B: /* CSC Measurement */
7268 if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE) {
7269 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7270 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7273 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7274 break;
7276 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_csc_measurement_flags, ett_btatt_value, hfx_btatt_csc_measurement_flags, ENC_NA);
7277 flags = tvb_get_uint8(tvb, offset);
7278 offset += 1;
7280 if (flags & 0x01) {
7281 proto_tree_add_item(tree, hf_btatt_csc_measurement_cumulative_wheel_revolutions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7282 offset += 4;
7284 proto_tree_add_item(tree, hf_btatt_csc_measurement_last_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7285 offset += 2;
7288 if (flags & 0x02) {
7289 proto_tree_add_item(tree, hf_btatt_csc_measurement_cumulative_crank_revolutions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7290 offset += 2;
7292 proto_tree_add_item(tree, hf_btatt_csc_measurement_last_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7293 offset += 2;
7296 break;
7297 case 0x2A5C: /* CSC Feature */
7298 if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE) {
7299 if (is_readable_request(att_data->opcode))
7300 break;
7302 if (!is_readable_response(att_data->opcode))
7303 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7306 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7307 break;
7309 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_csc_feature, ett_btatt_value, hfx_btatt_csc_feature, ENC_LITTLE_ENDIAN);
7310 offset += 2;
7312 break;
7313 case 0x2A5D: /* Sensor Location */
7314 if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE ||
7315 service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE ||
7316 service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7317 if (is_readable_request(att_data->opcode))
7318 break;
7320 if (!is_readable_response(att_data->opcode))
7321 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7324 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7325 break;
7327 proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7328 offset += 1;
7330 break;
7331 case 0x2A5E: /* PLX Spot-Check Measurement */
7332 if (service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
7333 if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7334 break;
7336 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7337 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7340 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7341 break;
7343 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_spot_check_measurement_flags, ett_btatt_value, hfx_btatt_plx_spot_check_measurement_flags, ENC_NA);
7344 flags = tvb_get_uint8(tvb, offset);
7345 offset += 1;
7347 sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_spot_check, tvb, offset, 4, ENC_NA);
7348 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7350 proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7351 offset += 2;
7353 proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7354 offset += 2;
7356 if (flags & 0x01) {
7357 sub_item = proto_tree_add_item(tree, hf_btatt_plx_spot_check_measurement_timestamp, tvb, offset, 7, ENC_NA);
7358 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7360 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, sub_tree, att_data);
7361 offset += 7;
7364 if (flags & 0x02) {
7365 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_measurement_status, ett_btatt_value, hfx_btatt_plx_measurement_status, ENC_LITTLE_ENDIAN);
7366 offset += 2;
7369 if (flags & 0x04) {
7370 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_device_and_sensor_status, ett_btatt_value, hfx_btatt_plx_device_and_sensor_status, ENC_LITTLE_ENDIAN);
7371 offset += 3;
7374 if (flags & 0x08) {
7375 proto_tree_add_item(tree, hf_btatt_plx_pulse_amplitude_index, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7376 offset += 2;
7379 break;
7380 case 0x2A5F: /* PLX Continuous Measurement */
7381 if (service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
7382 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7383 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7386 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7387 break;
7389 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_continuous_measurement_flags, ett_btatt_value, hfx_btatt_plx_continuous_measurement_flags, ENC_NA);
7390 flags = tvb_get_uint8(tvb, offset);
7391 offset += 1;
7393 sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_normal, tvb, offset, 4, ENC_NA);
7394 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7396 proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7397 offset += 2;
7399 proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7400 offset += 2;
7402 if (flags & 0x01) {
7403 sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_fast, tvb, offset, 4, ENC_NA);
7404 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7406 proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7407 offset += 2;
7409 proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7410 offset += 2;
7413 if (flags & 0x02) {
7414 sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_slow, tvb, offset, 4, ENC_NA);
7415 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7417 proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7418 offset += 2;
7420 proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7421 offset += 2;
7424 if (flags & 0x04) {
7425 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_measurement_status, ett_btatt_value, hfx_btatt_plx_measurement_status, ENC_LITTLE_ENDIAN);
7426 offset += 2;
7429 if (flags & 0x08) {
7430 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_device_and_sensor_status, ett_btatt_value, hfx_btatt_plx_device_and_sensor_status, ENC_LITTLE_ENDIAN);
7431 offset += 3;
7434 if (flags & 0x10) {
7435 proto_tree_add_item(tree, hf_btatt_plx_pulse_amplitude_index, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7436 offset += 2;
7439 break;
7440 case 0x2A60: /* PLX Features */
7441 if (service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
7442 if (is_readable_request(att_data->opcode))
7443 break;
7445 if (!is_readable_response(att_data->opcode))
7446 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7449 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7450 break;
7452 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_features_supported_features, ett_btatt_value, hfx_btatt_plx_features_supported_features, ENC_LITTLE_ENDIAN);
7453 flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7454 offset += 2;
7456 if (flags & 0x01) {
7457 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_measurement_status, ett_btatt_value, hfx_btatt_plx_measurement_status, ENC_LITTLE_ENDIAN);
7458 offset += 2;
7461 if (flags & 0x02) {
7462 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_device_and_sensor_status, ett_btatt_value, hfx_btatt_plx_device_and_sensor_status, ENC_LITTLE_ENDIAN);
7463 offset += 3;
7466 break;
7467 case 0x2A63: /* Cycling Power Measurement */
7468 if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7469 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7470 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7473 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7474 break;
7476 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cycling_power_measurement_flags, ett_btatt_value, hfx_btatt_cycling_power_measurement_flags, ENC_LITTLE_ENDIAN);
7477 flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7478 offset += 2;
7480 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_instantaneous_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7481 offset += 2;
7483 if (flags & 0x01) {
7484 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_pedal_power_balance, tvb, offset, 1, ENC_NA);
7485 offset += 1;
7488 if (flags & 0x04) {
7489 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_accumulated_torque, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7490 offset += 2;
7493 if (flags & 0x10) {
7494 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_wheel_revolution_data_cumulative_wheel_revolutions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7495 offset += 4;
7497 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_wheel_revolution_data_last_wheel_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7498 offset += 2;
7501 if (flags & 0x20) {
7502 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_crank_revolution_data_cumulative_crank_revolutions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7503 offset += 2;
7505 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_crank_revolution_data_last_crank_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7506 offset += 2;
7509 if (flags & 0x40) {
7510 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_force_magnitudes_maximum_force_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7511 offset += 2;
7513 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_force_magnitudes_minimum_force_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7514 offset += 2;
7517 if (flags & 0x80) {
7518 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_maximum_torque_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7519 offset += 2;
7521 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_minimum_torque_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7522 offset += 2;
7525 if (flags & 0x100) {
7526 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cycling_power_measurement_extreme_angles, ett_btatt_value, hfx_btatt_cycling_power_measurement_extreme_angles, ENC_NA);
7527 offset += 3;
7530 if (flags & 0x200) {
7531 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_top_dead_spot_angle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7532 offset += 2;
7535 if (flags & 0x400) {
7536 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_bottom_dead_spot_angle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7537 offset += 2;
7540 if (flags & 0x800) {
7541 proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_accumulated_energy, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7542 offset += 2;
7545 break;
7546 case 0x2A64: /* Cycling Power Vector */
7547 if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7548 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7549 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7552 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7553 break;
7555 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cycling_power_vector_flags, ett_btatt_value, hfx_btatt_cycling_power_vector_flags, ENC_NA);
7556 flags = tvb_get_uint8(tvb, offset);
7557 offset += 1;
7559 if (flags & 0x01) {
7560 proto_tree_add_item(tree, hf_btatt_cycling_power_vector_crank_revolution_data_cumulative_crank_revolutions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7561 offset += 2;
7563 proto_tree_add_item(tree, hf_btatt_cycling_power_vector_crank_revolution_data_last_crank_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7564 offset += 2;
7567 if (flags & 0x02) {
7568 proto_tree_add_item(tree, hf_btatt_cycling_power_vector_first_crank_measurement_angle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7569 offset += 2;
7572 if (flags & 0x04) {
7573 while (tvb_reported_length_remaining(tvb, offset) > 0) {
7574 proto_tree_add_item(tree, hf_btatt_cycling_power_vector_instantaneous_force_magnitude_array, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7575 offset += 2;
7579 if (flags & 0x08) {
7580 while (tvb_reported_length_remaining(tvb, offset) > 0) {
7581 proto_tree_add_item(tree, hf_btatt_cycling_power_vector_instantaneous_torque_magnitude_array, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7582 offset += 2;
7586 break;
7587 case 0x2A65: /* Cycling Power Feature */
7588 if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7589 if (is_readable_request(att_data->opcode))
7590 break;
7592 if (!is_readable_response(att_data->opcode))
7593 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7596 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7597 break;
7599 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cycling_power_feature, ett_btatt_value, hfx_btatt_cycling_power_feature, ENC_LITTLE_ENDIAN);
7600 offset += 4;
7602 break;
7603 case 0x2A66: /* Cycling Power Control Point */
7604 if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7605 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7606 break;
7608 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7609 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7612 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7613 break;
7615 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_opcode, tvb, offset, 1, ENC_NA);
7616 opcode = tvb_get_uint8(tvb, offset);
7617 offset += 1;
7619 switch (opcode) {
7620 case 1: /* Set Cumulative Value */
7621 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_cumulative_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7622 offset += 4;
7624 break;
7625 case 2: /* Update Sensor Location */
7626 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_sensor_location, tvb, offset, 1, ENC_NA);
7627 offset += 1;
7629 break;
7630 case 4: /* Set Crank Length */
7631 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_crank_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7632 offset += 2;
7634 break;
7635 case 6: /* Set Chain Length */
7636 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7637 offset += 2;
7639 break;
7640 case 8: /* Set Chain Weight */
7641 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_weight, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7642 offset += 2;
7644 break;
7645 case 10: /* Set Span Length */
7646 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_span_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7647 offset += 2;
7649 break;
7650 case 13: /* Mask Cycling Power Measurement Characteristic Content */
7651 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cycling_power_control_point_content_mask, ett_btatt_value, hfx_btatt_cycling_power_control_point_content_mask, ENC_LITTLE_ENDIAN);
7652 offset += 2;
7654 break;
7655 case 3: /* Request Supported Sensor Locations */
7656 case 5: /* Request Crank Length */
7657 case 7: /* Request Chain Length */
7658 case 9: /* Request Chain Weight */
7659 case 11: /* Request Span Length */
7660 case 12: /* Start Offset Compensation */
7661 case 14: /* Request Sampling Rate */
7662 case 15: /* Request Factory Calibration Date */
7663 /* N/A */
7665 break;
7666 case 32: /* Response Code */
7667 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7668 offset += 1;
7670 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_response_value, tvb, offset, 1, ENC_NA);
7671 offset += 1;
7673 switch (tvb_get_uint8(tvb, offset - 2)) {
7674 case 1: /* Set Cumulative Value */
7675 case 2: /* Update Sensor Location */
7676 case 4: /* Set Crank Length */
7677 case 6: /* Set Chain Length */
7678 case 8: /* Set Chain Weight */
7679 case 10: /* Set Span Length */
7680 case 13: /* Mask Cycling Power Measurement Characteristic Content */
7681 /* N/A */
7683 break;
7684 case 3: /* Request Supported Sensor Locations */
7685 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7686 while (tvb_captured_length_remaining(tvb, offset)) {
7687 proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7688 offset += 1;
7692 break;
7693 case 5: /* Request Crank Length */
7694 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7695 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_crank_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7696 offset += 2;
7699 break;
7700 case 7: /* Request Chain Length */
7701 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7702 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7703 offset += 2;
7706 break;
7707 case 9: /* Request Chain Weight */
7708 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7709 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_weight, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7710 offset += 2;
7713 break;
7714 case 11: /* Request Span Length */
7715 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7716 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_span_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7717 offset += 2;
7720 break;
7721 case 12: /* Start Offset Compensation */
7722 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7723 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_start_offset_compensation, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7724 offset += 2;
7727 break;
7728 case 14: /* Request Sampling Rate */
7729 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7730 proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_sampling_rate, tvb, offset, 1, ENC_NA);
7731 offset += 1;
7734 break;
7735 case 15: /* Request Factory Calibration Date */
7736 if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7737 offset = add_item_btatt_timestamp(tree, hf_btatt_cycling_power_control_point_factory_calibration_date, tvb, offset);
7740 break;
7742 break;
7745 break;
7746 case 0x2A67: /* Location and Speed */
7747 if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7748 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7749 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7752 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7753 break;
7755 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_location_and_speed_flags, ett_btatt_value, hfx_btatt_location_and_speed_flags, ENC_LITTLE_ENDIAN);
7756 flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7757 offset += 2;
7759 if (flags & 0x01) {
7760 proto_tree_add_item(tree, hf_btatt_location_and_speed_instantaneous_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7761 offset += 2;
7764 if (flags & 0x02) {
7765 proto_tree_add_item(tree, hf_btatt_location_and_speed_total_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7766 offset += 3;
7769 if (flags & 0x04) {
7770 proto_tree_add_item(tree, hf_btatt_location_and_speed_location_latitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7771 offset += 4;
7773 proto_tree_add_item(tree, hf_btatt_location_and_speed_location_longitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7774 offset += 4;
7777 if (flags & 0x08) {
7778 proto_tree_add_item(tree, hf_btatt_location_and_speed_elevation, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7779 offset += 3;
7782 if (flags & 0x10) {
7783 proto_tree_add_item(tree, hf_btatt_location_and_speed_heading, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7784 offset += 2;
7787 if (flags & 0x20) {
7788 proto_tree_add_item(tree, hf_btatt_location_and_speed_rolling_time, tvb, offset, 1, ENC_NA);
7789 offset += 1;
7792 if (flags & 0x40) {
7793 offset = add_item_btatt_timestamp(tree, hf_btatt_location_and_speed_utc_time, tvb, offset);
7796 break;
7797 case 0x2A68: /* Navigation */
7798 if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7799 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7800 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7803 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7804 break;
7806 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_navigation_flags, ett_btatt_value, hfx_btatt_navigation_flags, ENC_LITTLE_ENDIAN);
7807 flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7808 offset += 2;
7810 proto_tree_add_item(tree, hf_btatt_navigation_bearing, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7811 offset += 2;
7813 proto_tree_add_item(tree, hf_btatt_navigation_heading, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7814 offset += 2;
7816 if (flags & 0x01) {
7817 proto_tree_add_item(tree, hf_btatt_navigation_remaining_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7818 offset += 3;
7821 if (flags & 0x02) {
7822 proto_tree_add_item(tree, hf_btatt_navigation_remaining_vertical_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7823 offset += 3;
7826 if (flags & 0x04) {
7827 offset = add_item_btatt_timestamp(tree, hf_btatt_navigation_estimated_time_of_arrival, tvb, offset);
7830 break;
7831 case 0x2A69: /* Position Quality */
7832 if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7833 if (is_readable_request(att_data->opcode))
7834 break;
7836 if (!is_readable_response(att_data->opcode))
7837 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7840 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7841 break;
7843 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_position_quality_flags, ett_btatt_value, hfx_btatt_position_quality_flags, ENC_LITTLE_ENDIAN);
7844 flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7845 offset += 2;
7847 if (flags & 0x01) {
7848 proto_tree_add_item(tree, hf_btatt_position_quality_number_of_beacons_in_solution, tvb, offset, 1, ENC_NA);
7849 offset += 1;
7852 if (flags & 0x02) {
7853 proto_tree_add_item(tree, hf_btatt_position_quality_number_of_beacons_in_view, tvb, offset, 1, ENC_NA);
7854 offset += 1;
7857 if (flags & 0x04) {
7858 proto_tree_add_item(tree, hf_btatt_position_quality_time_to_first_fix, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7859 offset += 2;
7862 if (flags & 0x08) {
7863 proto_tree_add_item(tree, hf_btatt_position_quality_ehpe, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7864 offset += 4;
7867 if (flags & 0x10) {
7868 proto_tree_add_item(tree, hf_btatt_position_quality_evpe, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7869 offset += 4;
7872 if (flags & 0x20) {
7873 proto_tree_add_item(tree, hf_btatt_position_quality_hdop, tvb, offset, 1, ENC_NA);
7874 offset += 1;
7877 if (flags & 0x40) {
7878 proto_tree_add_item(tree, hf_btatt_position_quality_vdop, tvb, offset, 1, ENC_NA);
7879 offset += 1;
7882 break;
7883 case 0x2A6A: /* LN Feature */
7884 if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7885 if (is_readable_request(att_data->opcode))
7886 break;
7888 if (!is_readable_response(att_data->opcode))
7889 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7892 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7893 break;
7895 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ln_feature, ett_btatt_value, hfx_btatt_ln_feature, ENC_LITTLE_ENDIAN);
7896 offset += 4;
7898 break;
7899 case 0x2A6B: /* LN Control Point */
7900 if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7901 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7902 break;
7904 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7905 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7908 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7909 break;
7911 proto_tree_add_item(tree, hf_btatt_ln_control_point_opcode, tvb, offset, 1, ENC_NA);
7912 opcode = tvb_get_uint8(tvb, offset);
7913 offset += 1;
7915 switch (opcode) {
7916 case 1: /* Set Cumulative Value */
7917 proto_tree_add_item(tree, hf_btatt_ln_control_point_cumulative_value, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7918 offset += 3;
7920 break;
7921 case 2: /* Mask Location and Speed Characteristic Content */
7922 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ln_control_point_content_mask, ett_btatt_value, hfx_btatt_ln_control_point_content_mask, ENC_LITTLE_ENDIAN);
7923 offset += 2;
7925 break;
7926 case 3: /* Navigation Control */
7927 proto_tree_add_item(tree, hf_btatt_ln_control_point_navigation_control, tvb, offset, 1, ENC_NA);
7928 offset += 1;
7930 break;
7931 case 4: /* Request Number of Routes */
7932 /* N/A */
7934 break;
7935 case 5: /* Request Name of Route */
7936 case 6: /* Select Route */
7937 proto_tree_add_item(tree, hf_btatt_ln_control_point_route_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7938 offset += 2;
7940 break;
7941 case 7: /* Set Fix Rate */
7942 proto_tree_add_item(tree, hf_btatt_ln_control_point_fix_rate, tvb, offset, 1, ENC_NA);
7943 offset += 1;
7945 break;
7946 case 8: /* Set Elevation */
7947 proto_tree_add_item(tree, hf_btatt_ln_control_point_elevation, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7948 offset += 3;
7950 break;
7951 case 32: /* Response Code */
7952 proto_tree_add_item(tree, hf_btatt_ln_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7953 offset += 1;
7955 proto_tree_add_item(tree, hf_btatt_ln_control_point_response_value, tvb, offset, 1, ENC_NA);
7956 offset += 1;
7958 switch (tvb_get_uint8(tvb, offset - 2)) {
7959 case 1: /* Set Cumulative Value */
7960 case 2: /* Mask Location and Speed Characteristic Content */
7961 case 3: /* Navigation Control */
7962 case 6: /* Select Route */
7963 case 7: /* Set Fix Rate */
7964 case 8: /* Set Elevation */
7965 /* N/A */
7967 break;
7968 case 4: /* Request Number of Routes */
7969 proto_tree_add_item(tree, hf_btatt_ln_control_point_response_value_number_of_routes, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7970 offset += 2;
7972 break;
7973 case 5: /* Request Name of Route */
7974 proto_tree_add_item(tree, hf_btatt_ln_control_point_response_value_name_of_route, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
7975 offset += tvb_captured_length_remaining(tvb, offset);
7977 break;
7980 break;
7983 break;
7984 case 0x2A6C: /* Elevation */
7985 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
7986 if (is_readable_request(att_data->opcode))
7987 break;
7989 if (!is_readable_response(att_data->opcode) &&
7990 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7991 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7994 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7995 break;
7997 proto_tree_add_item(tree, hf_btatt_elevation, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7998 offset += 3;
8000 break;
8001 case 0x2A6D: /* Pressure */
8002 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8003 if (is_readable_request(att_data->opcode))
8004 break;
8006 if (!is_readable_response(att_data->opcode) &&
8007 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8008 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8011 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8012 break;
8014 proto_tree_add_item(tree, hf_btatt_pressure, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8015 offset += 4;
8017 break;
8018 case 0x2A6E: /* Temperature */
8019 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8020 if (is_readable_request(att_data->opcode))
8021 break;
8023 if (!is_readable_response(att_data->opcode) &&
8024 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8025 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8028 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8029 break;
8031 proto_tree_add_item(tree, hf_btatt_temperature, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8032 offset += 2;
8034 break;
8035 case 0x2A6F: /* Humidity */
8036 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8037 if (is_readable_request(att_data->opcode))
8038 break;
8040 if (!is_readable_response(att_data->opcode) &&
8041 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8042 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8045 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8046 break;
8048 proto_tree_add_item(tree, hf_btatt_humidity, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8049 offset += 2;
8051 break;
8052 case 0x2A70: /* True Wind Speed */
8053 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8054 if (is_readable_request(att_data->opcode))
8055 break;
8057 if (!is_readable_response(att_data->opcode) &&
8058 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8059 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8062 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8063 break;
8065 proto_tree_add_item(tree, hf_btatt_true_wind_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8066 offset += 2;
8068 break;
8069 case 0x2A71: /* True Wind Direction */
8070 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8071 if (is_readable_request(att_data->opcode))
8072 break;
8074 if (!is_readable_response(att_data->opcode) &&
8075 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8076 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8079 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8080 break;
8082 proto_tree_add_item(tree, hf_btatt_true_wind_direction, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8083 offset += 2;
8085 break;
8086 case 0x2A72: /* Apparent Wind Speed */
8087 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8088 if (is_readable_request(att_data->opcode))
8089 break;
8091 if (!is_readable_response(att_data->opcode) &&
8092 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8093 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8096 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8097 break;
8099 proto_tree_add_item(tree, hf_btatt_apparent_wind_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8100 offset += 2;
8102 break;
8103 case 0x2A73: /* Apparent Wind Direction */
8104 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8105 if (is_readable_request(att_data->opcode))
8106 break;
8108 if (!is_readable_response(att_data->opcode) &&
8109 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8110 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8113 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8114 break;
8116 proto_tree_add_item(tree, hf_btatt_apparent_wind_direction, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8117 offset += 2;
8119 break;
8120 case 0x2A74: /* Gust Factor */
8121 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8122 if (is_readable_request(att_data->opcode))
8123 break;
8125 if (!is_readable_response(att_data->opcode) &&
8126 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8127 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8130 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8131 break;
8133 proto_tree_add_item(tree, hf_btatt_gust_factor, tvb, offset, 1, ENC_NA);
8134 offset += 1;
8136 break;
8137 case 0x2A75: /* Pollen Concentration */
8138 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8139 if (is_readable_request(att_data->opcode))
8140 break;
8142 if (!is_readable_response(att_data->opcode) &&
8143 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8144 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8147 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8148 break;
8150 proto_tree_add_item(tree, hf_btatt_pollen_concentration, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8151 offset += 3;
8153 break;
8154 case 0x2A76: /* UV Index */
8155 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8156 if (is_readable_request(att_data->opcode))
8157 break;
8159 if (!is_readable_response(att_data->opcode) &&
8160 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8161 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8164 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8165 break;
8167 proto_tree_add_item(tree, hf_btatt_uv_index, tvb, offset, 1, ENC_NA);
8168 offset += 1;
8170 break;
8171 case 0x2A77: /* Irradiance */
8172 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8173 if (is_readable_request(att_data->opcode))
8174 break;
8176 if (!is_readable_response(att_data->opcode) &&
8177 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8178 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8181 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8182 break;
8184 proto_tree_add_item(tree, hf_btatt_irradiance, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8185 offset += 2;
8187 break;
8188 case 0x2A78: /* Rainfall */
8189 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8190 if (is_readable_request(att_data->opcode))
8191 break;
8193 if (!is_readable_response(att_data->opcode) &&
8194 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8195 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8198 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8199 break;
8201 proto_tree_add_item(tree, hf_btatt_rainfall, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8202 offset += 2;
8204 break;
8205 case 0x2A79: /* Wind Chill */
8206 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8207 if (is_readable_request(att_data->opcode))
8208 break;
8210 if (!is_readable_response(att_data->opcode) &&
8211 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8212 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8215 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8216 break;
8218 proto_tree_add_item(tree, hf_btatt_wind_chill, tvb, offset, 1, ENC_NA);
8219 offset += 1;
8221 break;
8222 case 0x2A7A: /* Heat Index */
8223 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8224 if (is_readable_request(att_data->opcode))
8225 break;
8227 if (!is_readable_response(att_data->opcode) &&
8228 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8229 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8232 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8233 break;
8235 proto_tree_add_item(tree, hf_btatt_heart_index, tvb, offset, 1, ENC_NA);
8236 offset += 1;
8238 break;
8239 case 0x2A7B: /* Dew Point */
8240 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8241 if (is_readable_request(att_data->opcode))
8242 break;
8244 if (!is_readable_response(att_data->opcode) &&
8245 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8246 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8249 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8250 break;
8252 proto_tree_add_item(tree, hf_btatt_dew_point, tvb, offset, 1, ENC_NA);
8253 offset += 1;
8255 break;
8256 case 0x2A7D: /* Descriptor Value Changed */
8257 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8258 if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8259 break;
8261 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8262 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8265 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8266 break;
8268 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_descriptor_value_changed_flags , ett_btatt_value, hfx_btatt_descriptor_value_changed_flags, ENC_LITTLE_ENDIAN);
8269 offset += 2;
8271 if (tvb_reported_length_remaining(tvb, offset) == 2) {
8272 proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8273 offset += 2;
8274 } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
8275 proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
8276 offset += 16;
8277 } else {
8278 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
8279 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
8280 offset = tvb_captured_length(tvb);
8283 break;
8284 case 0x2A7E: /* Aerobic Heart Rate Lower Limit */
8285 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8286 break;
8288 proto_tree_add_item(tree, hf_btatt_aerobic_heart_rate_lower_limit, tvb, offset, 1, ENC_NA);
8289 offset += 1;
8291 break;
8292 case 0x2A7F: /* Aerobic Threshold */
8293 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8294 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8295 break;
8297 if (!is_readable_response(att_data->opcode) &&
8298 !is_writeable_request(att_data->opcode))
8299 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8302 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8303 break;
8305 proto_tree_add_item(tree, hf_btatt_aerobic_threshold, tvb, offset, 1, ENC_NA);
8306 offset += 1;
8308 break;
8309 case 0x2A80: /* Age */
8310 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8311 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8312 break;
8314 if (!is_readable_response(att_data->opcode) &&
8315 !is_writeable_request(att_data->opcode))
8316 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8319 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8320 break;
8322 proto_tree_add_item(tree, hf_btatt_age, tvb, offset, 1, ENC_NA);
8323 offset += 1;
8325 break;
8326 case 0x2A81: /* Anaerobic Heart Rate Lower Limit */
8327 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8328 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8329 break;
8331 if (!is_readable_response(att_data->opcode) &&
8332 !is_writeable_request(att_data->opcode))
8333 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8336 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8337 break;
8339 proto_tree_add_item(tree, hf_btatt_anaerobic_heart_rate_lower_limit, tvb, offset, 1, ENC_NA);
8340 offset += 1;
8342 break;
8343 case 0x2A82: /* Anaerobic Heart Rate Upper Limit */
8344 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8345 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8346 break;
8348 if (!is_readable_response(att_data->opcode) &&
8349 !is_writeable_request(att_data->opcode))
8350 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8353 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8354 break;
8356 proto_tree_add_item(tree, hf_btatt_anaerobic_heart_rate_upper_limit, tvb, offset, 1, ENC_NA);
8357 offset += 1;
8359 break;
8360 case 0x2A83: /* Anaerobic Threshold */
8361 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8362 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8363 break;
8365 if (!is_readable_response(att_data->opcode) &&
8366 !is_writeable_request(att_data->opcode))
8367 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8370 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8371 break;
8373 proto_tree_add_item(tree, hf_btatt_anaerobic_threshold, tvb, offset, 1, ENC_NA);
8374 offset += 1;
8376 break;
8377 case 0x2A84: /* Aerobic Heart Rate Upper Limit */
8378 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8379 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8380 break;
8382 if (!is_readable_response(att_data->opcode) &&
8383 !is_writeable_request(att_data->opcode))
8384 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8387 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8388 break;
8390 proto_tree_add_item(tree, hf_btatt_aerobic_heart_rate_upper_limit, tvb, offset, 1, ENC_NA);
8391 offset += 1;
8393 break;
8394 case 0x2A85: /* Date of Birth */
8395 case 0x2A86: /* Date of Threshold Assessment */
8396 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8397 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8398 break;
8400 if (!is_readable_response(att_data->opcode) &&
8401 !is_writeable_request(att_data->opcode))
8402 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8405 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8406 break;
8408 proto_tree_add_item(tree, hf_btatt_year, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8409 offset += 2;
8411 proto_tree_add_item(tree, hf_btatt_month, tvb, offset, 1, ENC_NA);
8412 offset += 1;
8414 proto_tree_add_item(tree, hf_btatt_day, tvb, offset, 1, ENC_NA);
8415 offset += 1;
8417 break;
8418 case 0x2A87: /* Email Address */
8419 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8420 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8421 break;
8423 if (!is_readable_response(att_data->opcode) &&
8424 !is_writeable_request(att_data->opcode))
8425 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8428 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8429 break;
8431 proto_tree_add_item(tree, hf_btatt_email_address, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
8432 offset += tvb_captured_length_remaining(tvb, offset);
8434 break;
8435 case 0x2A88: /* Fat Burn Heart Rate Lower Limit */
8436 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8437 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8438 break;
8440 if (!is_readable_response(att_data->opcode) &&
8441 !is_writeable_request(att_data->opcode))
8442 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8445 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8446 break;
8448 proto_tree_add_item(tree, hf_btatt_fat_burn_heart_rate_lower_limit, tvb, offset, 1, ENC_NA);
8449 offset += 1;
8451 break;
8452 case 0x2A89: /* Fat Burn Heart Rate Upper Limit */
8453 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8454 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8455 break;
8457 if (!is_readable_response(att_data->opcode) &&
8458 !is_writeable_request(att_data->opcode))
8459 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8462 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8463 break;
8465 proto_tree_add_item(tree, hf_btatt_fat_burn_heart_rate_upper_limit, tvb, offset, 1, ENC_NA);
8466 offset += 1;
8468 break;
8469 case 0x2A8A: /* First Name */
8470 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8471 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8472 break;
8474 if (!is_readable_response(att_data->opcode) &&
8475 !is_writeable_request(att_data->opcode))
8476 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8479 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8480 break;
8482 proto_tree_add_item(tree, hf_btatt_first_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
8483 offset += tvb_captured_length_remaining(tvb, offset);
8485 break;
8486 case 0x2A8B: /* Five Zone Heart Rate Limits */
8487 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8488 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8489 break;
8491 if (!is_readable_response(att_data->opcode) &&
8492 !is_writeable_request(att_data->opcode))
8493 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8496 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8497 break;
8499 proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_very_light_light_limit, tvb, offset, 1, ENC_NA);
8500 offset += 1;
8502 proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_light_moderate_limit, tvb, offset, 1, ENC_NA);
8503 offset += 1;
8505 proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_moderate_hard_limit, tvb, offset, 1, ENC_NA);
8506 offset += 1;
8508 proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_hard_maximum_limit, tvb, offset, 1, ENC_NA);
8509 offset += 1;
8511 break;
8512 case 0x2A8C: /* Gender */
8513 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8514 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8515 break;
8517 if (!is_readable_response(att_data->opcode) &&
8518 !is_writeable_request(att_data->opcode))
8519 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8522 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8523 break;
8525 proto_tree_add_item(tree, hf_btatt_gender, tvb, offset, 1, ENC_NA);
8526 offset += 1;
8528 break;
8529 case 0x2A8D: /* Heart Rate Max */
8530 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8531 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8532 break;
8534 if (!is_readable_response(att_data->opcode) &&
8535 !is_writeable_request(att_data->opcode))
8536 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8539 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8540 break;
8542 proto_tree_add_item(tree, hf_btatt_heart_rate_max, tvb, offset, 1, ENC_NA);
8543 offset += 1;
8545 break;
8546 case 0x2A8E: /* Height */
8547 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8548 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8549 break;
8551 if (!is_readable_response(att_data->opcode) &&
8552 !is_writeable_request(att_data->opcode))
8553 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8556 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8557 break;
8559 proto_tree_add_item(tree, hf_btatt_height, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8560 offset += 2;
8562 break;
8563 case 0x2A8F: /* Hip Circumference */
8564 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8565 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8566 break;
8568 if (!is_readable_response(att_data->opcode) &&
8569 !is_writeable_request(att_data->opcode))
8570 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8573 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8574 break;
8576 proto_tree_add_item(tree, hf_btatt_hip_circumference, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8577 offset += 2;
8579 break;
8580 case 0x2A90: /* Last Name */
8581 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8582 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8583 break;
8585 if (!is_readable_response(att_data->opcode) &&
8586 !is_writeable_request(att_data->opcode))
8587 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8590 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8591 break;
8593 proto_tree_add_item(tree, hf_btatt_last_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
8594 offset += tvb_captured_length_remaining(tvb, offset);
8596 break;
8597 case 0x2A91: /* Maximum Recommended Heart Rate */
8598 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8599 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8600 break;
8602 if (!is_readable_response(att_data->opcode) &&
8603 !is_writeable_request(att_data->opcode))
8604 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8607 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8608 break;
8610 proto_tree_add_item(tree, hf_btatt_maximum_recommended_heart_rate, tvb, offset, 1, ENC_NA);
8611 offset += 1;
8613 break;
8614 case 0x2A92: /* Resting Heart Rate */
8615 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8616 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8617 break;
8619 if (!is_readable_response(att_data->opcode) &&
8620 !is_writeable_request(att_data->opcode))
8621 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8624 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8625 break;
8627 proto_tree_add_item(tree, hf_btatt_resting_heart_rate, tvb, offset, 1, ENC_NA);
8628 offset += 1;
8630 break;
8631 case 0x2A93: /* Sport Type for Aerobic and Anaerobic Thresholds */
8632 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8633 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8634 break;
8636 if (!is_readable_response(att_data->opcode) &&
8637 !is_writeable_request(att_data->opcode))
8638 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8641 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8642 break;
8644 proto_tree_add_item(tree, hf_btatt_sport_type_for_aerobic_and_anaerobic_thresholds, tvb, offset, 1, ENC_NA);
8645 offset += 1;
8647 break;
8648 case 0x2A94: /* Three Zone Heart Rate Limits */
8649 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8650 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8651 break;
8653 if (!is_readable_response(att_data->opcode) &&
8654 !is_writeable_request(att_data->opcode))
8655 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8658 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8659 break;
8661 proto_tree_add_item(tree, hf_btatt_three_zone_heart_rate_limits_light_moderate, tvb, offset, 1, ENC_NA);
8662 offset += 1;
8664 proto_tree_add_item(tree, hf_btatt_three_zone_heart_rate_limits_moderate_hard, tvb, offset, 1, ENC_NA);
8665 offset += 1;
8667 break;
8668 case 0x2A95: /* Two Zone Heart Rate Limit */
8669 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8670 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8671 break;
8673 if (!is_readable_response(att_data->opcode) &&
8674 !is_writeable_request(att_data->opcode))
8675 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8678 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8679 break;
8681 proto_tree_add_item(tree, hf_btatt_two_zone_heart_rate_limit_fat_burn_fitness, tvb, offset, 1, ENC_NA);
8682 offset += 1;
8684 break;
8685 case 0x2A96: /* VO2 Max */
8686 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8687 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8688 break;
8690 if (!is_readable_response(att_data->opcode) &&
8691 !is_writeable_request(att_data->opcode))
8692 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8695 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8696 break;
8698 proto_tree_add_item(tree, hf_btatt_vo2_max, tvb, offset, 1, ENC_NA);
8699 offset += 1;
8701 break;
8702 case 0x2A97: /* Waist Circumference */
8703 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8704 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8705 break;
8707 if (!is_readable_response(att_data->opcode) &&
8708 !is_writeable_request(att_data->opcode))
8709 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8712 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8713 break;
8715 proto_tree_add_item(tree, hf_btatt_waist_circumference, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8716 offset += 2;
8718 break;
8719 case 0x2A98: /* Weight */
8720 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8721 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8722 break;
8724 if (!is_readable_response(att_data->opcode) &&
8725 !is_writeable_request(att_data->opcode))
8726 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8729 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8730 break;
8732 proto_tree_add_item(tree, hf_btatt_weight, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8733 offset += 2;
8735 break;
8736 case 0x2A99: /* Database Change Increment */
8737 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8738 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8739 break;
8741 if (!is_readable_response(att_data->opcode) &&
8742 !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8743 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8746 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8747 break;
8749 proto_tree_add_item(tree, hf_btatt_database_change_increment, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8750 offset += 4;
8752 break;
8753 case 0x2A9A: /* User Index */
8754 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8755 if (is_readable_request(att_data->opcode))
8756 break;
8758 if (!is_readable_response(att_data->opcode))
8759 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8762 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8763 break;
8765 proto_tree_add_item(tree, hf_btatt_user_index, tvb, offset, 1, ENC_NA);
8766 offset += 1;
8768 break;
8769 case 0x2A9B: /* Body Composition Feature */
8770 if (service_uuid.bt_uuid == GATT_SERVICE_BODY_COMPOSITION) {
8771 if (is_readable_request(att_data->opcode))
8772 break;
8774 if (!is_readable_response(att_data->opcode))
8775 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8778 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8779 break;
8781 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_body_composition_feature, ett_btatt_value, hfx_btatt_body_composition_feature, ENC_LITTLE_ENDIAN);
8782 offset += 4;
8784 break;
8785 case 0x2A9C: /* Body Composition Measurement */
8786 if (service_uuid.bt_uuid == GATT_SERVICE_BODY_COMPOSITION) {
8787 if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8788 break;
8790 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8791 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8794 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8795 break;
8797 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_body_composition_measurement_flags, ett_btatt_value, hfx_btatt_body_composition_measurement_flags, ENC_LITTLE_ENDIAN);
8798 flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
8799 offset += 2;
8801 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_body_fat_percentage, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8802 offset += 2;
8804 if (flags & 0x02) {
8805 offset = add_item_btatt_timestamp(tree, hf_btatt_body_composition_measurement_timestamp, tvb, offset);
8808 if (flags & 0x04) {
8809 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_user_id, tvb, offset, 1, ENC_NA);
8810 offset += 1;
8813 if (flags & 0x08) {
8814 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_basal_metabolism, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8815 offset += 2;
8818 if (flags & 0x10) {
8819 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_muscle_percentage, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8820 offset += 2;
8823 if (flags & 0x20) {
8824 if (flags & 0x01)
8825 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_muscle_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8826 else
8827 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_muscle_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8828 offset += 2;
8832 if (flags & 0x40) {
8833 if (flags & 0x01)
8834 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_fat_free_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8835 else
8836 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_fat_free_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8837 offset += 2;
8841 if (flags & 0x80) {
8842 if (flags & 0x01)
8843 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_soft_lean_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8844 else
8845 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_soft_lean_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8846 offset += 2;
8849 if (flags & 0x100) {
8850 if (flags & 0x01)
8851 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_body_water_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8852 else
8853 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_body_water_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8854 offset += 2;
8857 if (flags & 0x200) {
8858 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_impedance, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8859 offset += 2;
8862 if (flags & 0x400) {
8863 if (flags & 0x01)
8864 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_weight_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8865 else
8866 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_weight_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8867 offset += 2;
8870 if (flags & 0x800) {
8871 if (flags & 0x01)
8872 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_height_inches, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8873 else
8874 proto_tree_add_item(tree, hf_btatt_body_composition_measurement_height_meter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8875 offset += 2;
8878 break;
8879 case 0x2A9D: /* Weight Measurement */
8880 if (service_uuid.bt_uuid == GATT_SERVICE_WEIGHT_SCALE) {
8881 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8882 break;
8884 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8885 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8888 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8889 break;
8891 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_weight_measurement_flags, ett_btatt_value, hfx_btatt_weight_measurement_flags, ENC_NA);
8892 flags = tvb_get_uint8(tvb, offset);
8893 offset += 1;
8895 if (flags & 0x01)
8896 proto_tree_add_item(tree, hf_btatt_weight_measurement_weight_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8897 else
8898 proto_tree_add_item(tree, hf_btatt_weight_measurement_weight_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8899 offset += 2;
8901 if (flags & 0x02) {
8902 offset = add_item_btatt_timestamp(tree, hf_btatt_weight_measurement_timestamp, tvb, offset);
8905 if (flags & 0x04) {
8906 proto_tree_add_item(tree, hf_btatt_weight_measurement_user_id, tvb, offset, 1, ENC_NA);
8907 offset += 1;
8910 if (flags & 0x08) {
8911 proto_tree_add_item(tree, hf_btatt_weight_measurement_bmi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8912 offset += 2;
8914 if (flags & 0x01)
8915 proto_tree_add_item(tree, hf_btatt_weight_measurement_height_in, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8916 else
8917 proto_tree_add_item(tree, hf_btatt_weight_measurement_height_m, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8918 offset += 2;
8921 break;
8922 case 0x2A9E: /* Weight Scale Feature */
8923 if (service_uuid.bt_uuid == GATT_SERVICE_WEIGHT_SCALE) {
8924 if (is_readable_request(att_data->opcode))
8925 break;
8927 if (!is_readable_response(att_data->opcode))
8928 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8931 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8932 break;
8934 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_weight_scale_feature, ett_btatt_value, hfx_btatt_weight_scale_feature, ENC_LITTLE_ENDIAN);
8935 offset += 4;
8937 break;
8938 case 0x2A9F: /* User Control Point */
8939 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8940 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8941 break;
8943 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8944 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8947 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8948 break;
8950 proto_tree_add_item(tree, hf_btatt_user_control_point_opcode, tvb, offset, 1, ENC_NA);
8951 opcode = tvb_get_uint8(tvb, offset);
8952 offset += 1;
8954 switch (opcode) {
8955 case 0x01: /* Register New User */
8956 sub_item = proto_tree_add_item(tree, hf_btatt_user_control_point_consent_code, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8957 value = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
8958 if (value > 9999)
8959 expert_add_info(pinfo, sub_item, &ei_btatt_consent_out_of_bounds);
8960 offset += 2;
8962 break;
8963 case 0x02: /* Consent */
8964 proto_tree_add_item(tree, hf_btatt_user_index, tvb, offset, 1, ENC_NA);
8965 offset += 1;
8967 sub_item = proto_tree_add_item(tree, hf_btatt_user_control_point_consent_code, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8968 value = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
8969 if (value > 9999)
8970 expert_add_info(pinfo, sub_item, &ei_btatt_consent_out_of_bounds);
8971 offset += 2;
8973 break;
8974 case 0x03: /* Delete User Data */
8975 /* N/A */
8976 break;
8977 case 0x20: /* Response Code */
8978 proto_tree_add_item(tree, hf_btatt_user_control_point_request_opcode, tvb, offset, 1, ENC_NA);
8979 offset += 1;
8981 proto_tree_add_item(tree, hf_btatt_user_control_point_response_value, tvb, offset, 1, ENC_NA);
8982 offset += 1;
8984 if (tvb_get_uint8(tvb, offset - 2) == 0x01 && tvb_get_uint8(tvb, offset - 1) == 0x01) { /* Register New User && Success */
8985 proto_tree_add_item(tree, hf_btatt_user_index, tvb, offset, 1, ENC_NA);
8986 offset += 1;
8989 break;
8992 break;
8993 case 0x2AA0: /* Magnetic Flux Density - 2D */
8994 case 0x2AA1: /* Magnetic Flux Density - 3D */
8995 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8996 if (is_readable_request(att_data->opcode))
8997 break;
8999 if (!is_readable_response(att_data->opcode) &&
9000 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9001 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9004 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9005 break;
9007 proto_tree_add_item(tree, hf_btatt_magnetic_flux_density_x, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9008 offset += 2;
9010 proto_tree_add_item(tree, hf_btatt_magnetic_flux_density_y, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9011 offset += 2;
9013 if (uuid.bt_uuid == 0x2AA1) {
9014 proto_tree_add_item(tree, hf_btatt_magnetic_flux_density_z, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9015 offset += 2;
9018 break;
9019 case 0x2AA2: /* Language */
9020 if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
9021 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9022 break;
9024 if (!is_readable_response(att_data->opcode) &&
9025 !is_writeable_request(att_data->opcode))
9026 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9029 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9030 break;
9032 proto_tree_add_item(tree, hf_btatt_language, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9033 offset += tvb_captured_length_remaining(tvb, offset);
9035 break;
9036 case 0x2AA3: /* Barometric Pressure Trend */
9037 if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
9038 if (is_readable_request(att_data->opcode))
9039 break;
9041 if (!is_readable_response(att_data->opcode) &&
9042 att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9043 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9046 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9047 break;
9049 proto_tree_add_item(tree, hf_btatt_barometric_pressure_trend, tvb, offset, 1, ENC_NA);
9050 offset += 1;
9052 break;
9053 case 0x2AA4: /* Bond Management Control Point */
9054 if (service_uuid.bt_uuid == GATT_SERVICE_BOND_MANAGEMENT) {
9055 if (is_writeable_response(att_data->opcode))
9056 break;
9058 if (!is_writeable_request(att_data->opcode))
9059 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9062 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9063 break;
9065 proto_tree_add_item(tree, hf_btatt_bond_management_control_point_opcode, tvb, offset, 1, ENC_NA);
9066 offset += 1;
9068 if (tvb_reported_length_remaining(tvb, offset) > 0) {
9069 proto_tree_add_item(tree, hf_btatt_bond_management_control_point_authorization_code, tvb, offset, length -1, ENC_NA | ENC_UTF_8);
9070 offset += tvb_reported_length_remaining(tvb, offset);
9072 break;
9073 case 0x2AA5: /* Bond Management Feature */
9074 if (service_uuid.bt_uuid == GATT_SERVICE_BOND_MANAGEMENT) {
9075 if (is_readable_request(att_data->opcode))
9076 break;
9078 if (!is_readable_response(att_data->opcode))
9079 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9082 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9083 break;
9085 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_bond_management_feature, ett_btatt_value, hfx_btatt_bond_management_feature, ENC_LITTLE_ENDIAN);
9086 flags = tvb_get_uint24(tvb, offset, ENC_LITTLE_ENDIAN);
9087 offset += 3;
9089 if (flags & 0x800000) {
9090 do {
9091 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_bond_management_feature_nth, ett_btatt_value, hfx_btatt_bond_management_feature_nth, ENC_LITTLE_ENDIAN);
9092 offset += 1;
9093 } while (tvb_get_uint8(tvb, offset - 1) & 0x80);
9096 break;
9097 case 0x2AA6: /* Central Address Resolution */
9098 if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
9099 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
9100 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9103 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9104 break;
9106 proto_tree_add_item(tree, hf_btatt_central_address_resolution, tvb, offset, 1, ENC_NA);
9107 offset += 1;
9109 break;
9110 case 0x2AA7: /* CGM Measurement */
9111 if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9112 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9113 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9116 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9117 break;
9119 sub_item = proto_tree_add_item(tree, hf_btatt_cgm_measurement_size, tvb, offset, 1, ENC_NA);
9120 if (tvb_get_uint8(tvb, offset) >= 6)
9121 expert_add_info(pinfo, sub_item, &ei_btatt_cgm_size_too_small);
9122 offset += 1;
9124 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cgm_measurement_flags, ett_btatt_value, hfx_btatt_cgm_measurement_flags, ENC_NA);
9125 flags = tvb_get_uint8(tvb, offset);
9126 offset += 1;
9128 proto_tree_add_item(tree, hf_btatt_cgm_measurement_glucose_concentration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9129 offset += 2;
9131 proto_tree_add_item(tree, hf_btatt_cgm_measurement_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9132 offset += 2;
9134 if (flags & 0xE0) {
9135 value = 0;
9136 if (flags & 0x80)
9137 value += 1;
9138 if (flags & 0x40)
9139 value += 1;
9140 if (flags & 0x20)
9141 value += 1;
9143 sub_item = proto_tree_add_item(tree, hf_btatt_cgm_sensor_status_annunciation, tvb, offset, value, ENC_NA);
9144 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
9147 if (flags & 0x80) {
9148 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_sensor_status_annunciation_status, ett_btatt_value, hfx_btatt_cgm_sensor_status_annunciation_status, ENC_NA);
9149 offset += 1;
9152 if (flags & 0x40) {
9153 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_sensor_status_annunciation_cal_temp, ett_btatt_value, hfx_btatt_cgm_sensor_status_annunciation_cal_temp, ENC_NA);
9154 offset += 1;
9157 if (flags & 0x20) {
9158 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_sensor_status_annunciation_warning, ett_btatt_value, hfx_btatt_cgm_sensor_status_annunciation_warning, ENC_NA);
9159 offset += 1;
9162 if (flags & 0x01) {
9163 proto_tree_add_item(tree, hf_btatt_cgm_measurement_trend_information, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9164 offset += 2;
9167 if (flags & 0x02) {
9168 proto_tree_add_item(tree, hf_btatt_cgm_measurement_quality, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9169 offset += 2;
9172 /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9173 if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9174 proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9175 offset += 2;
9178 break;
9179 case 0x2AA8: /* CGM Feature */
9180 if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9181 if (is_readable_request(att_data->opcode))
9182 break;
9184 if (!is_readable_response(att_data->opcode))
9185 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9188 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9189 break;
9191 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cgm_feature_feature, ett_btatt_value, hfx_btatt_cgm_feature_feature, ENC_LITTLE_ENDIAN);
9192 offset += 3;
9194 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cgm_type_and_sample_location, ett_btatt_value, hfx_btatt_cgm_type_and_sample_location, ENC_NA);
9195 offset += 1;
9197 /* NOTE: This one is mandatory - if not supported then 0xFFFF */
9198 proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9199 offset += 2;
9201 break;
9202 case 0x2AA9: /* CGM Status */
9203 if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9204 if (is_readable_request(att_data->opcode))
9205 break;
9207 if (!is_readable_response(att_data->opcode))
9208 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9211 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9212 break;
9214 proto_tree_add_item(tree, hf_btatt_cgm_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9215 offset += 2;
9217 sub_item = proto_tree_add_item(tree, hf_btatt_cgm_status, tvb, offset, 3, ENC_LITTLE_ENDIAN);
9218 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
9220 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_sensor_status_annunciation_status, ett_btatt_value, hfx_btatt_cgm_sensor_status_annunciation_status, ENC_NA);
9221 offset += 1;
9223 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_sensor_status_annunciation_cal_temp, ett_btatt_value, hfx_btatt_cgm_sensor_status_annunciation_cal_temp, ENC_NA);
9224 offset += 1;
9226 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_sensor_status_annunciation_warning, ett_btatt_value, hfx_btatt_cgm_sensor_status_annunciation_warning, ENC_NA);
9227 offset += 1;
9230 /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9231 if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9232 proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9233 offset += 2;
9236 break;
9237 case 0x2AAA: /* CGM Session Start Time */
9238 if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9239 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9240 break;
9242 if (!is_readable_response(att_data->opcode) &&
9243 !is_writeable_request(att_data->opcode))
9244 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9247 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9248 break;
9250 offset = add_item_btatt_timestamp(tree, hf_btatt_cgm_session_start_time, tvb, offset);
9252 proto_tree_add_item(tree, hf_btatt_timezone, tvb, offset, 1, ENC_NA);
9253 offset += 1;
9255 proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
9256 offset += 1;
9258 /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9259 if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9260 proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9261 offset += 2;
9264 break;
9265 case 0x2AAB: /* CGM Session Run Time */
9266 if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9267 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9268 break;
9270 if (!is_readable_response(att_data->opcode) &&
9271 !is_writeable_request(att_data->opcode))
9272 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9275 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9276 break;
9278 proto_tree_add_item(tree, hf_btatt_cgm_session_run_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9279 offset += 2;
9281 /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9282 if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9283 proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9284 offset += 2;
9287 break;
9288 case 0x2AAC: /* CGM Specific Ops Control Point */
9289 if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9290 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9291 break;
9293 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9294 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9297 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9298 break;
9300 proto_tree_add_item(tree, hf_btatt_cgm_specific_ops_control_point_opcode, tvb, offset, 1, ENC_NA);
9301 opcode = tvb_get_uint8(tvb, offset);
9302 offset += 1;
9304 sub_item = proto_tree_add_item(tree, hf_btatt_cgm_specific_ops_control_point_operand, tvb, offset, 0, ENC_NA);
9305 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
9306 operand_offset = offset;
9308 switch (opcode) {
9309 case 1: /* Set CGM Communication Interval */
9310 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_communication_interval, tvb, offset, 1, ENC_NA);
9311 offset += 1;
9313 break;
9314 case 2: /* Get CGM Communication Interval */
9315 case 8: /* Get Patient High Alert Level */
9316 case 11: /* Get Patient Low Alert Level */
9317 case 14: /* Get Hypo Alert Level */
9318 case 17: /* Get Hyper Alert Level */
9319 case 20: /* Get Rate of Decrease Alert Level */
9320 case 23: /* Get Rate of Increase Alert Level */
9321 case 25: /* Reset Device Specific Alert */
9322 case 26: /* Start the Session */
9323 case 27: /* Stop the Session */
9324 /* N/A */
9326 break;
9327 case 4: /* Set Glucose Calibration Value */
9328 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_glucose_concentration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9329 offset += 2;
9331 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9332 offset += 2;
9334 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_type_and_sample_location, ett_btatt_value, hfx_btatt_cgm_type_and_sample_location, ENC_NA);
9335 offset += 1;
9337 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_next_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9338 offset += 2;
9340 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_data_record_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9341 offset += 2;
9343 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_specific_ops_control_point_calibration_status, ett_btatt_value, hfx_btatt_cgm_specific_ops_control_point_calibration_status, ENC_NA);
9344 offset += 1;
9346 break;
9347 case 5: /* Get Glucose Calibration Value */
9348 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_calibration_data_record_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9349 offset += 2;
9351 break;
9352 case 7: /* Set Patient High Alert Level */
9353 case 10: /* Set Patient Low Alert Level */
9354 case 13: /* Set Hypo Alert Level */
9355 case 16: /* Set Hyper Alert Level */
9356 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9357 offset += 2;
9359 break;
9360 case 19: /* Set Rate of Decrease Alert Level */
9361 case 22: /* Set Rate of Increase Alert Level */
9362 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9363 offset += 2;
9365 break;
9366 case 3: /* CGM Communication Interval response */
9367 case 6: /* Glucose Calibration Value response */
9368 case 9: /* Patient High Alert Level Response */
9369 case 12: /* Patient Low Alert Level Response */
9370 case 15: /* Hypo Alert Level Response */
9371 case 18: /* Hyper Alert Level Response */
9372 case 21: /* Rate of Decrease Alert Level Response */
9373 case 24: /* Rate of Increase Alert Level Response */
9374 expert_add_info(pinfo, sub_item, &ei_btatt_opcode_invalid_request);
9375 break;
9377 case 28: /* Response Code */
9378 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_request_opcode, tvb, offset, 1, ENC_NA);
9379 offset += 1;
9381 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_response_code, tvb, offset, 1, ENC_NA);
9382 offset += 1;
9384 switch (tvb_get_uint8(tvb, offset - 2)) {
9385 case 1: /* Set CGM Communication Interval */
9386 case 2: /* Get CGM Communication Interval */
9387 case 4: /* Set Glucose Calibration Value */
9388 case 5: /* Get Glucose Calibration Value */
9389 case 7: /* Set Patient High Alert Level */
9390 case 8: /* Get Patient High Alert Level */
9391 case 10: /* Set Patient Low Alert Level */
9392 case 11: /* Get Patient Low Alert Level */
9393 case 13: /* Set Hypo Alert Level */
9394 case 14: /* Get Hypo Alert Level */
9395 case 16: /* Set Hyper Alert Level */
9396 case 17: /* Get Hyper Alert Level */
9397 case 19: /* Set Rate of Decrease Alert Level */
9398 case 20: /* Get Rate of Decrease Alert Level */
9399 case 22: /* Set Rate of Increase Alert Level */
9400 case 23: /* Get Rate of Increase Alert Level */
9401 case 25: /* Reset Device Specific Alert */
9402 case 26: /* Start the Session */
9403 case 27: /* Stop the Session */
9404 expert_add_info(pinfo, sub_item, &ei_btatt_opcode_invalid_response);
9405 break;
9407 case 3: /* CGM Communication Interval response */
9408 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_communication_interval, tvb, offset, 1, ENC_NA);
9409 offset += 1;
9411 break;
9412 case 6: /* Glucose Calibration Value response */
9413 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_glucose_concentration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9414 offset += 2;
9416 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9417 offset += 2;
9419 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_type_and_sample_location, ett_btatt_value, hfx_btatt_cgm_type_and_sample_location, ENC_NA);
9420 offset += 1;
9422 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_next_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9423 offset += 2;
9425 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_data_record_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9426 offset += 2;
9428 proto_tree_add_bitmask(sub_tree, tvb, offset, hf_btatt_cgm_specific_ops_control_point_calibration_status, ett_btatt_value, hfx_btatt_cgm_specific_ops_control_point_calibration_status, ENC_NA);
9429 offset += 1;
9431 break;
9432 case 9: /* Patient High Alert Level Response */
9433 case 12: /* Patient Low Alert Level Response */
9434 case 15: /* Hypo Alert Level Response */
9435 case 18: /* Hyper Alert Level Response */
9436 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9437 offset += 2;
9439 break;
9440 case 21: /* Rate of Decrease Alert Level Response */
9441 case 24: /* Rate of Increase Alert Level Response */
9442 proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9443 offset += 2;
9445 break;
9448 break;
9451 proto_item_set_len(sub_item, offset - operand_offset);
9453 /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9454 if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9455 proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9456 offset += 2;
9459 break;
9460 case 0x2AAD: /* Indoor Positioning Configuration */
9461 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9462 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9463 break;
9465 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9466 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9469 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9470 break;
9472 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_indoor_positioning_configuration, ett_btatt_value, hfx_btatt_indoor_positioning_configuration, ENC_NA);
9473 offset += 1;
9475 break;
9476 case 0x2AAE: /* Latitude */
9477 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9478 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9479 break;
9481 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9482 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9485 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9486 break;
9488 proto_tree_add_item(tree, hf_btatt_latitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9489 offset += 4;
9491 break;
9492 case 0x2AAF: /* Longitude */
9493 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9494 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9495 break;
9497 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9498 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9501 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9502 break;
9504 proto_tree_add_item(tree, hf_btatt_longitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9505 offset += 4;
9507 break;
9508 case 0x2AB0: /* Local North Coordinate */
9509 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9510 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9511 break;
9513 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9514 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9517 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9518 break;
9520 proto_tree_add_item(tree, hf_btatt_local_north_coordinate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9521 offset += 2;
9523 break;
9524 case 0x2AB1: /* Local East Coordinate */
9525 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9526 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9527 break;
9529 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9530 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9533 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9534 break;
9536 proto_tree_add_item(tree, hf_btatt_local_east_coordinate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9537 offset += 2;
9539 break;
9540 case 0x2AB2: /* Floor Number */
9541 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9542 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9543 break;
9545 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9546 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9549 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9550 break;
9552 proto_tree_add_item(tree, hf_btatt_floor_number, tvb, offset, 1, ENC_NA);
9553 offset += 1;
9555 break;
9556 case 0x2AB3: /* Altitude */
9557 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9558 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9559 break;
9561 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9562 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9565 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9566 break;
9568 proto_tree_add_item(tree, hf_btatt_altitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9569 offset += 2;
9571 break;
9572 case 0x2AB4: /* Uncertainty */
9573 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9574 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9575 break;
9577 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9578 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9581 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9582 break;
9584 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_uncertainty, ett_btatt_value, hfx_btatt_uncertainty, ENC_NA);
9585 offset += 1;
9587 break;
9588 case 0x2AB5: /* Location Name */
9589 if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9590 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9591 break;
9593 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9594 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9597 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9598 break;
9600 proto_tree_add_item(tree, hf_btatt_location_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9601 offset += tvb_captured_length_remaining(tvb, offset);
9603 break;
9604 case 0x2AB6: /* URI */
9605 if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9606 if (is_writeable_response(att_data->opcode))
9607 break;
9609 if (!is_writeable_request(att_data->opcode))
9610 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9613 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9614 break;
9616 proto_tree_add_item(tree, hf_btatt_uri, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9617 offset += tvb_captured_length_remaining(tvb, offset);
9619 break;
9620 case 0x2AB7: /* HTTP Headers */
9621 if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9622 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9623 break;
9625 if (!is_readable_response(att_data->opcode) &&
9626 !is_writeable_request(att_data->opcode))
9627 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9630 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9631 break;
9633 sub_item = proto_tree_add_item(tree, hf_btatt_http_headers, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9634 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
9636 call_dissector(http_handle, tvb_new_subset_remaining(tvb, offset), pinfo, sub_tree);
9638 offset += tvb_captured_length_remaining(tvb, offset);
9640 break;
9641 case 0x2AB8: /* HTTP Status Code */
9642 if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9643 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9644 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9647 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9648 break;
9650 proto_tree_add_item(tree, hf_btatt_http_status_code, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9651 offset += 2;
9653 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_http_data_status, ett_btatt_value, hfx_btatt_http_data_status, ENC_NA);
9654 offset += 1;
9656 break;
9657 case 0x2AB9: /* HTTP Entity Body */
9658 if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9659 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9660 break;
9662 if (!is_readable_response(att_data->opcode) &&
9663 !is_writeable_request(att_data->opcode))
9664 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9667 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9668 break;
9670 proto_tree_add_item(tree, hf_btatt_http_entity_body, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9671 offset += tvb_captured_length_remaining(tvb, offset);
9673 break;
9674 case 0x2ABA: /* HTTP Control Point */
9675 if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9676 if (is_writeable_response(att_data->opcode))
9677 break;
9679 if (!is_writeable_request(att_data->opcode))
9680 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9683 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9684 break;
9686 proto_tree_add_item(tree, hf_btatt_http_control_point_opcode, tvb, offset, 1, ENC_NA);
9687 offset += 1;
9689 break;
9690 case 0x2ABB: /* HTTPS Security */
9691 if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9692 if (is_readable_request(att_data->opcode))
9693 break;
9695 if (!is_readable_response(att_data->opcode))
9696 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9699 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9700 break;
9702 proto_tree_add_item(tree, hf_btatt_https_security, tvb, offset, 1, ENC_NA);
9703 offset += 1;
9705 break;
9706 case 0x2ABC: /* TDS Control Point */
9707 if (service_uuid.bt_uuid == GATT_SERVICE_TRANSPORT_DISCOVERY) {
9708 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9709 break;
9711 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9712 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9715 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9716 break;
9718 proto_tree_add_item(tree, hf_btatt_tds_opcode, tvb, offset, 1, ENC_NA);
9719 offset += 1;
9721 if (att_data->opcode == 0x1B || att_data->opcode == 0x1D) { /* Handle Value Notification || Handle Value Indication" */
9722 proto_tree_add_item(tree, hf_btatt_tds_result_code, tvb, offset, 1, ENC_NA);
9723 offset += 1;
9724 } else {
9725 proto_tree_add_item(tree, hf_btatt_tds_organization_id, tvb, offset, 1, ENC_NA);
9726 offset += 1;
9729 if (tvb_reported_length_remaining(tvb, offset) > 0) {
9730 proto_tree_add_item(tree, hf_btatt_tds_data, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
9731 offset += tvb_reported_length_remaining(tvb, offset);
9734 break;
9735 case 0x2ABD: /* OTS Feature */
9736 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9737 if (is_readable_request(att_data->opcode))
9738 break;
9740 if (!is_readable_response(att_data->opcode))
9741 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9744 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9745 break;
9747 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_feature_oacp, ett_btatt_value, hfx_btatt_ots_feature_oacp, ENC_LITTLE_ENDIAN);
9748 offset += 4;
9750 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_feature_olcp, ett_btatt_value, hfx_btatt_ots_feature_olcp, ENC_LITTLE_ENDIAN);
9751 offset += 4;
9753 break;
9754 case 0x2ABE: /* Object Name */
9755 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9756 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9757 break;
9759 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9760 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9763 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9764 break;
9766 proto_tree_add_item(tree, hf_btatt_ots_object_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9767 offset += tvb_captured_length_remaining(tvb, offset);
9769 break;
9770 case 0x2ABF: /* Object Type */
9771 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9772 if (is_readable_request(att_data->opcode))
9773 break;
9775 if (!is_readable_response(att_data->opcode))
9776 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9779 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9780 break;
9782 offset = dissect_gatt_uuid(tree, pinfo, tvb, offset);
9784 break;
9785 case 0x2AC0: /* Object Size */
9786 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9787 if (is_readable_request(att_data->opcode))
9788 break;
9790 if (!is_readable_response(att_data->opcode))
9791 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9794 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9795 break;
9797 proto_tree_add_item(tree, hf_btatt_ots_current_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9798 offset += 4;
9800 proto_tree_add_item(tree, hf_btatt_ots_allocated_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9801 offset += 4;
9803 break;
9804 case 0x2AC1: /* Object First-Created */
9805 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9806 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9807 break;
9809 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9810 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9813 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9814 break;
9816 sub_item = proto_tree_add_item(tree, hf_btatt_ots_object_first_created, tvb, offset, 7, ENC_NA);
9817 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
9819 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, sub_tree, att_data);
9820 offset += 7;
9822 break;
9823 case 0x2AC2: /* Object Last-Modified */
9824 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9825 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9826 break;
9828 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9829 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9832 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9833 break;
9835 sub_item = proto_tree_add_item(tree, hf_btatt_ots_object_last_modified, tvb, offset, 7, ENC_NA);
9836 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
9838 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, sub_tree, att_data);
9839 offset += 7;
9841 break;
9842 case 0x2AC3: /* Object ID */
9843 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9844 if (is_readable_request(att_data->opcode))
9845 break;
9847 if (!is_readable_response(att_data->opcode))
9848 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9851 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9852 break;
9854 proto_tree_add_item(tree, hf_btatt_ots_object_id, tvb, offset, 6, ENC_LITTLE_ENDIAN);
9855 offset += 6;
9857 break;
9858 case 0x2AC4: /* Object Properties */
9859 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9860 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9861 break;
9863 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9864 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9867 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9868 break;
9870 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_properties, ett_btatt_value, hfx_btatt_ots_properties, ENC_LITTLE_ENDIAN);
9871 offset += 4;
9873 break;
9874 case 0x2AC5: /* Object Action Control Point */
9875 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9876 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9877 break;
9879 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9880 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9883 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9884 break;
9886 proto_tree_add_item(tree, hf_btatt_ots_action_opcode, tvb, offset, 1, ENC_NA);
9887 opcode = tvb_get_uint8(tvb, offset);
9888 offset += 1;
9890 switch (opcode) {
9891 case 0x01: /* Create */
9892 proto_tree_add_item(tree, hf_btatt_ots_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9893 offset += 4;
9895 offset = dissect_gatt_uuid(tree, pinfo, tvb, offset);
9897 break;
9898 case 0x02: /* Delete */
9899 case 0x07: /* Abort */
9900 /* none */
9902 break;
9903 case 0x03: /* Calculate Checksum */
9904 case 0x05: /* Read */
9905 case 0x06: /* Write */
9906 proto_tree_add_item(tree, hf_btatt_ots_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9907 offset += 4;
9909 proto_tree_add_item(tree, hf_btatt_ots_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9910 offset += 4;
9912 break;
9913 case 0x04: /* Execute */
9914 if (tvb_reported_length_remaining(tvb, offset) > 0) {
9915 proto_tree_add_item(tree, hf_btatt_ots_execute_data, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9916 offset += tvb_reported_length_remaining(tvb, offset);
9919 break;
9920 case 0x60: /* Response Code */
9921 proto_tree_add_item(tree, hf_btatt_ots_action_response_opcode, tvb, offset, 1, ENC_NA);
9922 offset += 1;
9924 proto_tree_add_item(tree, hf_btatt_ots_action_result_code, tvb, offset, 1, ENC_NA);
9925 offset += 1;
9927 switch (tvb_get_uint8(tvb, offset)) {
9928 case 0x01: /* Create */
9929 case 0x02: /* Delete */
9930 case 0x05: /* Read */
9931 case 0x06: /* Write */
9932 case 0x07: /* Abort */
9933 case 0x60: /* Response Code */
9934 /* none */
9936 break;
9937 case 0x03: /* Calculate Checksum */
9938 proto_tree_add_checksum(tree, tvb, offset, hf_btatt_ots_checksum, -1, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
9939 offset += 4;
9941 break;
9942 case 0x04: /* Execute */
9943 if (tvb_reported_length_remaining(tvb, offset) > 0) {
9944 proto_tree_add_item(tree, hf_btatt_ots_execute_data, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
9945 offset += tvb_reported_length_remaining(tvb, offset);
9948 break;
9951 break;
9952 case 0x2AC6: /* Object List Control Point */
9953 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9954 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9955 break;
9957 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9958 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9961 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9962 break;
9964 proto_tree_add_item(tree, hf_btatt_ots_list_opcode, tvb, offset, 1, ENC_NA);
9965 opcode = tvb_get_uint8(tvb, offset);
9966 offset += 1;
9968 switch (opcode) {
9969 case 0x01: /* First */
9970 case 0x02: /* Last */
9971 case 0x03: /* Previous */
9972 case 0x04: /* Next */
9973 case 0x07: /* Request Number of Object */
9974 case 0x08: /* Clear Marking */
9975 /* none */
9976 break;
9977 case 0x05: /* Go To */
9978 proto_tree_add_item(tree, hf_btatt_ots_object_id, tvb, offset, 6, ENC_LITTLE_ENDIAN);
9979 offset += 6;
9981 break;
9982 case 0x06: /* Order */
9983 proto_tree_add_item(tree, hf_btatt_ots_list_order, tvb, offset, 1, ENC_NA);
9984 offset += 1;
9986 break;
9987 case 0x70: /* Response Code */
9988 proto_tree_add_item(tree, hf_btatt_ots_list_response_opcode, tvb, offset, 1, ENC_NA);
9989 offset += 1;
9991 proto_tree_add_item(tree, hf_btatt_ots_list_result_code, tvb, offset, 1, ENC_NA);
9992 offset += 1;
9994 switch (tvb_get_uint8(tvb, offset - 2)) {
9995 case 0x01: /* First */
9996 case 0x02: /* Last */
9997 case 0x03: /* Previous */
9998 case 0x04: /* Next */
9999 case 0x05: /* Go To */
10000 case 0x06: /* Order */
10001 case 0x08: /* Clear Marking */
10002 case 0x70: /* Response Code */
10003 /* none */
10004 break;
10005 case 0x07: /* Request Number of Object */
10006 proto_tree_add_item(tree, hf_btatt_ots_list_total_number_of_objects, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10007 offset += 4;
10011 break;
10012 case 0x2AC7: /* Object List Filter */
10013 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
10014 if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
10015 break;
10017 if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
10018 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10021 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10022 break;
10024 proto_tree_add_item(tree, hf_btatt_ots_filter, tvb, offset, 1, ENC_NA);
10025 offset += 1;
10026 switch (tvb_get_uint8(tvb, offset - 1)) {
10027 case 0x00: /* No Filter */
10028 case 0x0A: /* Marked Objects */
10029 /* none */
10030 break;
10031 case 0x01: /* Name Starts With */
10032 case 0x02: /* Name Ends With */
10033 case 0x03: /* Name Contains*/
10034 case 0x04: /* Name is Exactly */
10035 proto_tree_add_item(tree, hf_btatt_ots_name_string, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
10036 offset += tvb_reported_length_remaining(tvb, offset);
10038 break;
10039 case 0x05: /* Object Type */
10040 offset = dissect_gatt_uuid(tree, pinfo, tvb, offset);
10042 break;
10043 case 0x06: /* Created Between */
10044 case 0x07: /* Modified Between */
10045 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, tree, att_data);
10046 offset += 7;
10048 btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, tree, att_data);
10049 offset += 7;
10051 break;
10052 case 0x08: /* Current Size Between */
10053 case 0x09: /* Allocated Size Between */
10054 proto_tree_add_item(tree, hf_btatt_ots_size_from, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10055 offset += 4;
10057 proto_tree_add_item(tree, hf_btatt_ots_size_to, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10058 offset += 4;
10060 break;
10063 break;
10064 case 0x2AC8: /* Object Changed */
10065 if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
10066 if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
10067 break;
10069 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
10070 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10073 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10074 break;
10076 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_flags, ett_btatt_value, hfx_btatt_ots_flags, ENC_NA);
10077 offset += 1;
10079 proto_tree_add_item(tree, hf_btatt_ots_object_id, tvb, offset, 6, ENC_LITTLE_ENDIAN);
10080 offset += 6;
10082 break;
10083 case 0x2AC9: /* Resolvable Private Address */
10084 if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
10085 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10086 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10089 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10090 break;
10092 proto_tree_add_item(tree, hf_btatt_resolvable_private_address, tvb, offset, 1, ENC_NA);
10093 offset += 1;
10095 break;
10096 case 0x2ACC: /* Fitness Machine Feature */
10097 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10098 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10099 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10102 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10103 break;
10105 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_fitness_machine_features, ett_btatt_value, hfx_btatt_fitness_machine_features, ENC_NA);
10106 offset += 4;
10108 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_target_setting_features, ett_btatt_value, hfx_btatt_target_setting_features, ENC_NA);
10109 offset += 4;
10111 break;
10112 case 0x2ACD: /* Treadmill Data */
10113 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10114 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10115 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10118 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10119 break;
10121 /* TODO */
10122 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10123 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10124 offset = tvb_captured_length(tvb);
10126 break;
10127 case 0x2ACE: /* Cross Trainer Data */
10128 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10129 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10130 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10133 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10134 break;
10136 /* TODO */
10137 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10138 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10139 offset = tvb_captured_length(tvb);
10141 break;
10142 case 0x2ACF: /* Step Climber Data */
10143 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10144 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10145 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10148 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10149 break;
10151 /* TODO */
10152 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10153 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10154 offset = tvb_captured_length(tvb);
10156 break;
10157 case 0x2AD0: /* Stair Climber Data */
10158 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10159 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10160 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10163 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10164 break;
10166 /* TODO */
10167 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10168 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10169 offset = tvb_captured_length(tvb);
10171 break;
10172 case 0x2AD1: /* Rower Data */
10173 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10174 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10175 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10178 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10179 break;
10181 /* TODO */
10182 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10183 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10184 offset = tvb_captured_length(tvb);
10186 break;
10187 case 0x2AD2: /* Indoor Bike Data */
10188 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10189 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10190 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10193 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10194 break;
10196 /* TODO */
10197 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10198 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10199 offset = tvb_captured_length(tvb);
10201 break;
10202 case 0x2AD3: /* Training Status */
10203 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10204 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode) ||
10205 att_data->opcode == ATT_OPCODE_HANDLE_VALUE_NOTIFICATION))
10206 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10209 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10210 break;
10212 proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_training_status_flags, ett_btatt_value, hfx_btatt_training_status_flags, ENC_NA);
10213 offset += 1;
10215 proto_tree_add_item(tree, hf_btatt_training_status_status, tvb, offset, 1, ENC_NA);
10216 offset += 1;
10218 proto_tree_add_item(tree, hf_btatt_training_status_status_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA | ENC_UTF_8);
10219 offset += tvb_captured_length_remaining(tvb, offset);
10221 break;
10222 case 0x2AD4: /* Supported Speed Range */
10223 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10224 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10225 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10228 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10229 break;
10231 proto_tree_add_item(tree, hf_btatt_supported_speed_range_minimum_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10232 offset += 2;
10234 proto_tree_add_item(tree, hf_btatt_supported_speed_range_maximum_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10235 offset += 2;
10237 proto_tree_add_item(tree, hf_btatt_supported_speed_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10238 offset += 2;
10240 break;
10241 case 0x2AD5: /* Supported Inclination Range */
10242 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10243 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10244 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10247 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10248 break;
10250 proto_tree_add_item(tree, hf_btatt_supported_inclination_range_minimum_inclination, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10251 offset += 2;
10253 proto_tree_add_item(tree, hf_btatt_supported_inclination_range_maximum_inclination, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10254 offset += 2;
10256 proto_tree_add_item(tree, hf_btatt_supported_inclination_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10257 offset += 2;
10259 break;
10260 case 0x2AD6: /* Supported Resistance Level Range */
10261 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10262 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10263 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10266 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10267 break;
10269 proto_tree_add_item(tree, hf_btatt_supported_resistance_level_range_minimum_resistance_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10270 offset += 2;
10272 proto_tree_add_item(tree, hf_btatt_supported_resistance_level_range_maximum_resistance_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10273 offset += 2;
10274 /* NOTE: can Resistance be negative? Bluetooth bug? see also hf_btatt_fitness_machine_resistance_level */
10276 proto_tree_add_item(tree, hf_btatt_supported_resistance_level_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10277 offset += 2;
10279 break;
10280 case 0x2AD7: /* Supported Heart Rate Range */
10281 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10282 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10283 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10286 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10287 break;
10289 proto_tree_add_item(tree, hf_btatt_supported_heart_rate_range_minimum_heart_rate, tvb, offset, 1, ENC_NA);
10290 offset += 1;
10292 proto_tree_add_item(tree, hf_btatt_supported_heart_rate_range_maximum_heart_rate, tvb, offset, 1, ENC_NA);
10293 offset += 1;
10295 proto_tree_add_item(tree, hf_btatt_supported_heart_rate_range_minimum_increment, tvb, offset, 1, ENC_NA);
10296 offset += 1;
10298 break;
10299 case 0x2AD8: /* Supported Power Range */
10300 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10301 if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10302 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10305 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10306 break;
10308 proto_tree_add_item(tree, hf_btatt_supported_power_range_minimum_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10309 offset += 2;
10311 proto_tree_add_item(tree, hf_btatt_supported_power_range_maximum_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10312 offset += 2;
10314 proto_tree_add_item(tree, hf_btatt_supported_power_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10315 offset += 2;
10317 break;
10318 case 0x2AD9: /* Fitness Machine Control Point */
10319 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10320 if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
10321 break;
10323 if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
10324 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10327 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10328 break;
10330 /* TODO */
10331 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10332 expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10333 offset = tvb_captured_length(tvb);
10335 break;
10336 case 0x2ADA: /* Fitness Machine Status */ {
10337 if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10338 if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10339 expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10342 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10343 break;
10345 uint32_t ftm_status_opcode;
10347 proto_tree_add_item_ret_uint(tree, hf_btatt_fitness_machine_status_opcode, tvb, offset, 1, ENC_NA, &ftm_status_opcode);
10348 offset += 1;
10350 switch (ftm_status_opcode) {
10351 case 0x02: /* Fitness Machine Stopped or Paused by the User */
10352 proto_tree_add_item(tree, hf_btatt_fitness_machine_control_information, tvb, offset, 1, ENC_NA);
10353 offset += 1;
10355 break;
10356 case 0x05: /* Target Speed Changed */
10357 proto_tree_add_item(tree, hf_btatt_fitness_machine_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10358 offset += 2;
10360 break;
10361 case 0x06: /* Target Incline Changed */
10362 proto_tree_add_item(tree, hf_btatt_fitness_machine_incline, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10363 offset += 2;
10365 break;
10366 case 0x07: /* Target Resistance Level Changed */
10367 proto_tree_add_item(tree, hf_btatt_fitness_machine_resistance_level, tvb, offset, 1, ENC_NA);
10368 offset += 1;
10369 /* NOTE: this is 8bit, but hf_btatt_supported_resistance_level_range_maximum_resistance_level is 16bit, Bluetooth bug?*/
10371 break;
10372 case 0x08: /* Target Power Changed */
10373 proto_tree_add_item(tree, hf_btatt_fitness_machine_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10374 offset += 2;
10376 break;
10377 case 0x09: /* Target Heart Rate Changed */
10378 proto_tree_add_item(tree, hf_btatt_fitness_machine_heart_rate, tvb, offset, 1, ENC_NA);
10379 offset += 1;
10381 break;
10382 case 0x0A: /* Targeted Expended Energy Changed */
10383 proto_tree_add_item(tree, hf_btatt_fitness_machine_expended_energy, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10384 offset += 2;
10386 break;
10387 case 0x0B: /* Targeted Number of Steps Changed */
10388 proto_tree_add_item(tree, hf_btatt_fitness_machine_number_of_steps, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10389 offset += 2;
10391 break;
10392 case 0x0C: /* Targeted Number of Strides Changed */
10393 proto_tree_add_item(tree, hf_btatt_fitness_machine_number_of_strides, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10394 offset += 2;
10396 break;
10397 case 0x0D: /* Targeted Distance Changed */
10398 proto_tree_add_item(tree, hf_btatt_fitness_machine_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
10399 offset += 3;
10401 break;
10402 case 0x0E: /* Targeted Training Time Changed */
10403 proto_tree_add_item(tree, hf_btatt_fitness_machine_training_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10404 offset += 2;
10406 break;
10407 case 0x0F: /* Targeted Time in Three Heart Rate Zones Changed */
10408 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_fat_burn_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10409 offset += 2;
10411 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_fitness_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10412 offset += 2;
10414 break;
10415 case 0x10: /* Targeted Time in Three Heart Rate Zones Changed */
10416 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_light_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10417 offset += 2;
10419 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_moderate_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10420 offset += 2;
10422 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_hard_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10423 offset += 2;
10425 break;
10426 case 0x11: /* Targeted Time in Five Heart Rate Zones Changed */
10427 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_very_light_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10428 offset += 2;
10430 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_light_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10431 offset += 2;
10433 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_moderate_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10434 offset += 2;
10436 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_hard_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10437 offset += 2;
10439 proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_maximum_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10440 offset += 2;
10442 break;
10443 case 0x12: /* Indoor Bike Simulation Parameters Changed */
10444 proto_tree_add_item(tree, hf_btatt_fitness_machine_wind_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10445 offset += 2;
10447 proto_tree_add_item(tree, hf_btatt_fitness_machine_grade, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10448 offset += 2;
10450 proto_tree_add_item(tree, hf_btatt_fitness_machine_coefficient_of_rolling_resistance, tvb, offset, 1, ENC_NA);
10451 offset += 1;
10453 proto_tree_add_item(tree, hf_btatt_fitness_machine_wind_resistance_coefficient, tvb, offset, 1, ENC_NA);
10454 offset += 1;
10456 break;
10457 case 0x13: /* Wheel Circumference Changed */
10458 proto_tree_add_item(tree, hf_btatt_fitness_machine_wheel_circumference, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10459 offset += 2;
10461 break;
10462 case 0x14: /* Spin Down Status */
10463 proto_tree_add_item(tree, hf_btatt_fitness_machine_spin_down_status, tvb, offset, 1, ENC_NA);
10464 offset += 1;
10466 break;
10467 case 0x15: /* Targeted Cadence Changed */
10468 proto_tree_add_item(tree, hf_btatt_fitness_machine_cadence, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10469 offset += 2;
10471 break;
10472 case 0x01: /* Reset */
10473 case 0x03: /* Fitness Machine Stopped by Safety Key */
10474 case 0x04: /* Fitness Machine Started or Resumed by the User */
10475 case 0xFF: /* Control Permission Lost */
10476 default:
10477 /* N/A */
10478 break;
10482 break;
10483 case 0x2ADB: /* Mesh Provisioning Data In */
10484 case 0x2ADC: /* Mesh Provisioning Data Out */
10485 case 0x2ADD: /* Mesh Proxy Data In */
10486 case 0x2ADE: /* Mesh Proxy Data Out */
10487 if (btmesh_proxy_handle) {
10488 btle_mesh_proxy_ctx_t *proxy_ctx;
10489 proxy_ctx = wmem_new0(pinfo->pool, btle_mesh_proxy_ctx_t);
10491 if (bluetooth_data) {
10492 proxy_ctx->interface_id = bluetooth_data->interface_id;
10493 proxy_ctx->adapter_id = bluetooth_data->adapter_id;
10494 } else {
10495 proxy_ctx->interface_id = proxy_ctx->adapter_id = 0;
10497 proxy_ctx->chandle = 0; //TODO
10498 proxy_ctx->bt_uuid = uuid.bt_uuid;
10499 proxy_ctx->access_address = 0; //TODO
10501 switch (att_data->opcode) {
10502 case ATT_OPCODE_WRITE_COMMAND:
10503 proxy_ctx->proxy_side = E_BTMESH_PROXY_SIDE_CLIENT;
10505 break;
10506 case ATT_OPCODE_HANDLE_VALUE_NOTIFICATION:
10507 proxy_ctx->proxy_side = E_BTMESH_PROXY_SIDE_SERVER;
10509 break;
10510 default:
10511 proxy_ctx->proxy_side = E_BTMESH_PROXY_SIDE_UNKNOWN;
10513 break;
10516 call_dissector_with_data(btmesh_proxy_handle, tvb_new_subset_length(tvb, offset, length),
10517 pinfo, proto_tree_get_root(tree), proxy_ctx);
10518 offset += length;
10519 } else {
10520 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10521 break;
10523 proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10524 offset = tvb_captured_length(tvb);
10527 break;
10528 case 0x2B7D: /* Volume State */
10529 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10530 break;
10532 proto_tree_add_item(tree, hf_btatt_volume_setting, tvb, offset, 1, ENC_NA);
10533 offset += 1;
10535 proto_tree_add_item(tree, hf_btatt_volume_mute, tvb, offset, 1, ENC_NA);
10536 offset += 1;
10538 proto_tree_add_item(tree, hf_btatt_volume_change_counter, tvb, offset, 1, ENC_NA);
10539 offset += 1;
10540 break;
10541 case 0x2B7E: /* Volume Control Point */
10542 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10543 break;
10545 proto_tree_add_item(tree, hf_btatt_volume_control_point_procedure, tvb, offset, 1, ENC_NA);
10546 opcode = tvb_get_uint8(tvb, offset);
10547 offset += 1;
10549 /* All procedures must have change counter */
10550 if (opcode <= 0x06) {
10551 proto_tree_add_item(tree, hf_btatt_volume_change_counter, tvb, offset, 1, ENC_NA);
10552 offset += 1;
10555 /* Set Absolute Volume also carries volume */
10556 if (opcode == 0x04) {
10557 proto_tree_add_item(tree, hf_btatt_volume_setting, tvb, offset, 1, ENC_NA);
10558 offset += 1;
10560 break;
10561 case 0x2B7F: /* Volume Flags */
10562 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10563 break;
10565 proto_tree_add_item(tree, hf_btatt_volume_flags, tvb, offset, 1, ENC_NA);
10566 offset += 1;
10567 break;
10568 case 0x2A62: /* Pulse Oximetry Control Point */ /* APPROVED: NO */
10569 case 0x2AE0: /* Average Current */
10570 case 0x2AE1: /* Average Voltage */
10571 case 0x2AE2: /* Boolean */
10572 case 0x2AE3: /* Chromatic Distance From Planckian */
10573 case 0x2AE4: /* Chromaticity Coordinates */
10574 case 0x2AE5: /* Chromaticity In CCT And Duv Values */
10575 case 0x2AE6: /* Chromaticity Tolerance */
10576 case 0x2AE7: /* CIE 13.3-1995 Color Rendering Index */
10577 case 0x2AE8: /* Coefficient */
10578 case 0x2AE9: /* Correlated Color Temperature */
10579 case 0x2AEA: /* Count 16 */
10580 case 0x2AEB: /* Count 24 */
10581 case 0x2AEC: /* Country Code */
10582 case 0x2AED: /* Date UTC */
10583 case 0x2AEE: /* Electric Current */
10584 case 0x2AEF: /* Electric Current Range */
10585 case 0x2AF0: /* Electric Current Specification */
10586 case 0x2AF1: /* Electric Current Statistics */
10587 case 0x2AF2: /* Energy */
10588 case 0x2AF3: /* Energy In A Period Of Day */
10589 case 0x2AF4: /* Event Statistics */
10590 case 0x2AF5: /* Fixed String 16 */
10591 case 0x2AF6: /* Fixed String 24 */
10592 case 0x2AF7: /* Fixed String 36 */
10593 case 0x2AF8: /* Fixed String 8 */
10594 case 0x2AF9: /* Generic Level */
10595 case 0x2AFA: /* Global Trade Item Number */
10596 case 0x2AFB: /* Illuminance */
10597 case 0x2AFC: /* Luminous Efficacy */
10598 case 0x2AFD: /* Luminous Energy */
10599 case 0x2AFE: /* Luminous Exposure */
10600 case 0x2AFF: /* Luminous Flux */
10601 case 0x2B00: /* Luminous Flux Range */
10602 case 0x2B01: /* Luminous Intensity */
10603 case 0x2B02: /* Mass Flow */
10604 case 0x2B03: /* Perceived Lightness */
10605 case 0x2B04: /* Percentage 8 */
10606 case 0x2B05: /* Power */
10607 case 0x2B06: /* Power Specification */
10608 case 0x2B07: /* Relative Runtime In A Current Range */
10609 case 0x2B08: /* Relative Runtime In A Generic Level Range */
10610 case 0x2B09: /* Relative Value In A Voltage Range */
10611 case 0x2B0A: /* Relative Value In An Illuminance Range */
10612 case 0x2B0B: /* Relative Value In A Period of Day */
10613 case 0x2B0C: /* Relative Value In A Temperature Range */
10614 case 0x2B0D: /* Temperature 8 */
10615 case 0x2B0E: /* Temperature 8 In A Period Of Day */
10616 case 0x2B0F: /* Temperature 8 Statistics */
10617 case 0x2B10: /* Temperature Range */
10618 case 0x2B11: /* Temperature Statistics */
10619 case 0x2B12: /* Time Decihour 8 */
10620 case 0x2B13: /* Time Exponential 8 */
10621 case 0x2B14: /* Time Hour 24 */
10622 case 0x2B15: /* Time Millisecond 24 */
10623 case 0x2B16: /* Time Second 16 */
10624 case 0x2B17: /* Time Second 8 */
10625 case 0x2B18: /* Voltage */
10626 case 0x2B19: /* Voltage Specification */
10627 case 0x2B1A: /* Voltage Statistics */
10628 case 0x2B1B: /* Volume Flow */
10629 case 0x2B1C: /* Chromaticity Coordinate */
10630 case 0x2B1D: /* Reconnection Configuration Feature */
10631 case 0x2B1E: /* Reconnection Configuration Settings */
10632 case 0x2B1F: /* Reconnection Configuration Control Point */
10633 /* TODO */
10634 default:
10635 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10636 break;
10638 proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10639 offset = tvb_captured_length(tvb);
10642 return old_offset + offset;
10645 static int
10646 btatt_dissect_attribute_handle(uint16_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, btatt_data_t *att_data)
10648 dissector_handle_t attribute_handler;
10649 const char* attribute_name;
10651 attribute_handler = dissector_get_uint_handle(att_handle_dissector_table, handle);
10652 if (attribute_handler == NULL)
10653 return 0;
10655 attribute_name = dissector_handle_get_dissector_name(attribute_handler); /* abbrev */
10656 DISSECTOR_ASSERT(attribute_name);
10658 /* For all registered subdissectors except BT GATT subdissectors, retrieve root tree. */
10659 if (0 != strncmp(attribute_name, "btgatt", 6))
10660 tree = proto_tree_get_parent_tree(tree);
10662 /* Note for BT GATT subdissectors:
10663 * It will implicitly call dissect_btgatt() which retrieves the BT UUID
10664 * from its protocol name and then calls dissect_attribute_value().
10667 return dissector_try_uint_new(att_handle_dissector_table, handle, tvb, pinfo, tree, true, att_data);
10670 static int
10671 dissect_btgatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
10673 proto_item *main_item;
10674 proto_tree *main_tree;
10675 proto_item *patron_item = NULL;
10676 bluetooth_uuid_t uuid;
10678 main_item = proto_tree_add_item(tree, (int) GPOINTER_TO_UINT(wmem_list_frame_data(wmem_list_tail(pinfo->layers))), tvb, 0, tvb_captured_length(tvb), ENC_NA);
10679 main_tree = proto_item_add_subtree(main_item, ett_btgatt);
10681 if (strlen(pinfo->current_proto) > 7) {
10682 uuid.size = 2;
10683 uuid.bt_uuid = (uint16_t) g_ascii_strtoull(pinfo->current_proto + strlen(pinfo->current_proto) - 7, NULL, 16);
10684 uuid.data[1] = uuid.bt_uuid & 0xFF;
10685 uuid.data[0] = (uuid.bt_uuid >> 8) & 0xFF;
10686 } else {
10687 uuid.size = 2;
10688 uuid.bt_uuid = 0;
10689 uuid.data[1] = 0;
10690 uuid.data[0] = 0;
10693 return dissect_attribute_value(main_tree, patron_item, pinfo, tvb,
10694 0, tvb_captured_length(tvb), 0, uuid, (btatt_data_t *) data);
10698 static bool
10699 is_long_attribute_value(bluetooth_uuid_t uuid)
10701 switch (uuid.bt_uuid) {
10702 case 0x2901: /* Characteristic User Description */
10703 case 0x2A00: /* Device Name */
10704 case 0x2A24: /* Model Number String */
10705 case 0x2A25: /* Serial Number String */
10706 case 0x2A26: /* Firmware Revision String */
10707 case 0x2A27: /* Hardware Revision String */
10708 case 0x2A28: /* Software Revision String */
10709 case 0x2A29: /* Manufacturer Name String */
10710 case 0x2A4B: /* Report Map */
10711 case 0x2A87: /* Email Address */
10712 case 0x2A90: /* Last Name */
10713 case 0x2AA4: /* Bond Management Control Point */
10714 case 0x2AB5: /* Location Name */
10715 case 0x2AB6: /* URI */
10716 case 0x2AB7: /* HTTP Headers */
10717 case 0x2AB9: /* HTTP Entity Body */
10718 case 0x2ABE: /* Object Name */
10719 return true;
10722 return false;
10725 static unsigned
10726 get_mtu(packet_info *pinfo, bluetooth_data_t *bluetooth_data)
10728 wmem_tree_key_t key[3];
10729 uint32_t frame_number;
10730 mtu_data_t *mtu_data;
10731 wmem_tree_t *sub_wmemtree;
10732 unsigned mtu = 23;
10734 if (bluetooth_data) {
10735 frame_number = pinfo->num;
10737 key[0].length = 1;
10738 key[0].key = &bluetooth_data->interface_id;
10739 key[1].length = 1;
10740 key[1].key = &bluetooth_data->adapter_id;
10741 key[2].length = 0;
10742 key[2].key = NULL;
10744 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(mtus, key);
10745 mtu_data = (sub_wmemtree) ? (mtu_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
10747 if (mtu_data)
10748 mtu = mtu_data->mtu;
10751 return mtu;
10754 static void
10755 save_mtu(packet_info *pinfo, bluetooth_data_t *bluetooth_data, unsigned mtu)
10757 wmem_tree_key_t key[4];
10758 uint32_t frame_number;
10759 mtu_data_t *mtu_data;
10761 frame_number = pinfo->num;
10763 key[0].length = 1;
10764 key[0].key = &bluetooth_data->interface_id;
10765 key[1].length = 1;
10766 key[1].key = &bluetooth_data->adapter_id;
10767 key[2].length = 1;
10768 key[2].key = &frame_number;
10769 key[3].length = 0;
10770 key[3].key = NULL;
10772 mtu_data = wmem_new(wmem_file_scope(), mtu_data_t);
10773 mtu_data->mtu = mtu;
10775 wmem_tree_insert32_array(mtus, key, mtu_data);
10778 static void
10779 save_value_fragment(packet_info *pinfo, tvbuff_t *tvb, int offset,
10780 uint32_t handle, unsigned data_offset, bluetooth_data_t *bluetooth_data)
10782 wmem_tree_key_t key[5];
10783 uint32_t frame_number;
10784 fragment_data_t *fragment_data;
10786 frame_number = pinfo->num;
10788 key[0].length = 1;
10789 key[0].key = &bluetooth_data->interface_id;
10790 key[1].length = 1;
10791 key[1].key = &bluetooth_data->adapter_id;
10792 key[2].length = 1;
10793 key[2].key = &handle;
10794 key[3].length = 1;
10795 key[3].key = &frame_number;
10796 key[4].length = 0;
10797 key[4].key = NULL;
10799 fragment_data = wmem_new(wmem_file_scope(), fragment_data_t);
10800 fragment_data->length = tvb_captured_length_remaining(tvb, offset);
10801 fragment_data->offset = data_offset;
10802 fragment_data->data_in_frame = frame_number;
10803 fragment_data->data = (uint8_t *) tvb_memdup(wmem_file_scope(), tvb, offset, fragment_data->length);
10805 wmem_tree_insert32_array(fragments, key, fragment_data);
10808 static uint8_t *
10809 get_value(packet_info *pinfo, uint32_t handle, bluetooth_data_t *bluetooth_data, unsigned *length)
10811 wmem_tree_key_t key[4];
10812 uint32_t frame_number;
10813 fragment_data_t *fragment_data;
10814 wmem_tree_t *sub_wmemtree;
10815 unsigned last_offset = UINT_MAX;
10816 unsigned size;
10817 bool first = true;
10818 uint8_t *data = NULL;
10820 if (bluetooth_data) {
10821 frame_number = pinfo->num;
10823 key[0].length = 1;
10824 key[0].key = &bluetooth_data->interface_id;
10825 key[1].length = 1;
10826 key[1].key = &bluetooth_data->adapter_id;
10827 key[2].length = 1;
10828 key[2].key = &handle;
10829 key[3].length = 0;
10830 key[3].key = NULL;
10832 sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(fragments, key);
10833 while (1) {
10834 fragment_data = (sub_wmemtree) ? (fragment_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
10835 if (!fragment_data || (fragment_data->offset >= last_offset))
10836 break;
10838 if (first) {
10839 size = fragment_data->offset + fragment_data->length;
10840 data = (uint8_t *) wmem_alloc(pinfo->pool, size);
10842 if (length)
10843 *length = size;
10845 first = false;
10846 } else if (fragment_data->offset + fragment_data->length != last_offset) {
10847 break;
10850 memcpy(data + fragment_data->offset, fragment_data->data, fragment_data->length);
10852 if (fragment_data->offset == 0)
10853 return data;
10854 frame_number = fragment_data->data_in_frame - 1;
10855 last_offset = fragment_data->offset;
10859 if (length)
10860 *length = 0;
10861 return NULL;
10864 static int
10865 dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
10867 proto_item *main_item;
10868 proto_tree *main_tree;
10869 proto_item *sub_item;
10870 proto_tree *sub_tree;
10871 int offset = 0;
10872 uint8_t opcode;
10873 uint8_t request_opcode;
10874 bluetooth_data_t *bluetooth_data;
10875 btatt_data_t att_data;
10876 request_data_t *request_data;
10877 uint16_t handle;
10878 bluetooth_uuid_t uuid;
10879 unsigned mtu;
10880 /* desegmentation stuff */
10881 // int deseg_offset = 0;
10882 /*end desegmentation stuff */
10883 memset(&uuid, 0, sizeof uuid);
10885 bluetooth_data = (bluetooth_data_t *) data;
10887 if (tvb_reported_length_remaining(tvb, 0) < 1)
10888 return 0;
10890 att_data.bluetooth_data = bluetooth_data;
10892 main_item = proto_tree_add_item(tree, proto_btatt, tvb, 0, -1, ENC_NA);
10893 main_tree = proto_item_add_subtree(main_item, ett_btatt);
10895 col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATT");
10897 switch (pinfo->p2p_dir) {
10898 case P2P_DIR_SENT:
10899 col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
10900 break;
10901 case P2P_DIR_RECV:
10902 col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
10903 break;
10904 default:
10905 col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection ");
10906 break;
10909 mtu = get_mtu(pinfo, bluetooth_data);
10910 if (tvb_reported_length(tvb) > mtu)
10911 expert_add_info(pinfo, main_item, &ei_btatt_mtu_exceeded);
10913 proto_tree_add_bitmask_with_flags(main_tree, tvb, offset, hf_btatt_opcode, ett_btatt_opcode, hfx_btatt_opcode, ENC_NA, BMT_NO_APPEND);
10914 opcode = tvb_get_uint8(tvb, 0);
10915 att_data.opcode = opcode;
10916 offset++;
10917 request_data = get_request(tvb, offset, pinfo, opcode, bluetooth_data);
10918 col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const(opcode, opcode_vals, "<unknown>"));
10919 switch (opcode) {
10920 case 0x01: /* Error Response */
10922 uint8_t error_code;
10923 bluetooth_uuid_t service_uuid;
10924 const value_string *error_vals = error_code_vals;
10925 int hfx_btatt_error_code = hf_btatt_error_code;
10927 proto_tree_add_bitmask_with_flags(main_tree, tvb, offset, hf_btatt_req_opcode_in_error, ett_btatt_opcode, hfx_btatt_opcode, ENC_NA, BMT_NO_APPEND);
10928 request_opcode = tvb_get_uint8(tvb, offset);
10929 offset += 1;
10931 offset = dissect_handle(main_tree, pinfo, hf_btatt_handle_in_error, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, opcode);
10932 handle = tvb_get_letohs(tvb, offset - 2);
10934 error_code = tvb_get_uint8(tvb, offset);
10936 if (error_code >= 0x80 && error_code <= 0x9F) {
10937 service_uuid = get_service_uuid_from_handle(pinfo, handle, opcode, bluetooth_data);
10939 switch (service_uuid.bt_uuid) {
10940 case GATT_SERVICE_AUTOMATION_IO:
10941 error_vals = error_code_aios_vals;
10942 hfx_btatt_error_code = hf_btatt_error_code_aios;
10944 break;
10945 case GATT_SERVICE_ALERT_NOTIFICATION_SERVICE:
10946 error_vals = error_code_ans_vals;
10947 hfx_btatt_error_code = hf_btatt_error_code_ans;
10949 break;
10950 case GATT_SERVICE_BOND_MANAGEMENT:
10951 error_vals = error_code_bms_vals;
10952 hfx_btatt_error_code = hf_btatt_error_code_bms;
10954 break;
10955 case GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING:
10956 error_vals = error_code_cgms_vals;
10957 hfx_btatt_error_code = hf_btatt_error_code_cgms;
10959 break;
10960 case GATT_SERVICE_CYCLING_POWER:
10961 error_vals = error_code_cps_vals;
10962 hfx_btatt_error_code = hf_btatt_error_code_cps;
10964 break;
10965 case GATT_SERVICE_CYCLING_SPEED_AND_CADENCE:
10966 error_vals = error_code_cscs_vals;
10967 hfx_btatt_error_code = hf_btatt_error_code_cscs;
10969 break;
10970 case GATT_SERVICE_CURRENT_TIME_SERVICE:
10971 error_vals = error_code_cts_vals;
10972 hfx_btatt_error_code = hf_btatt_error_code_cts;
10974 break;
10975 case GATT_SERVICE_ENVIRONMENTAL_SENSING:
10976 error_vals = error_code_ess_vals;
10977 hfx_btatt_error_code = hf_btatt_error_code_ess;
10979 break;
10980 case GATT_SERVICE_GLUCOSE:
10981 error_vals = error_code_gls_vals;
10982 hfx_btatt_error_code = hf_btatt_error_code_gls;
10984 break;
10985 case GATT_SERVICE_HTTP_PROXY:
10986 error_vals = error_code_hps_vals;
10987 hfx_btatt_error_code = hf_btatt_error_code_hps;
10989 break;
10990 case GATT_SERVICE_HEART_RATE:
10991 error_vals = error_code_hrs_vals;
10992 hfx_btatt_error_code = hf_btatt_error_code_hrs;
10994 break;
10995 case GATT_SERVICE_HEALTH_THERMOMETER:
10996 error_vals = error_code_hts_vals;
10997 hfx_btatt_error_code = hf_btatt_error_code_hts;
10999 break;
11000 case GATT_SERVICE_INDOOR_POSITIONING:
11001 error_vals = error_code_ips_vals;
11002 hfx_btatt_error_code = hf_btatt_error_code_ips;
11004 break;
11005 case GATT_SERVICE_OBJECT_TRANSFER:
11006 error_vals = error_code_ots_vals;
11007 hfx_btatt_error_code = hf_btatt_error_code_ots;
11009 break;
11010 case GATT_SERVICE_RUNNING_SPEED_AND_CADENCE:
11011 error_vals = error_code_rscs_vals;
11012 hfx_btatt_error_code = hf_btatt_error_code_rscs;
11014 break;
11015 case GATT_SERVICE_USER_DATA:
11016 error_vals = error_code_uds_vals;
11017 hfx_btatt_error_code = hf_btatt_error_code_uds;
11019 break;
11020 default:
11021 error_vals = error_code_vals;
11022 hfx_btatt_error_code = hf_btatt_error_code;
11025 col_append_fstr(pinfo->cinfo, COL_INFO, " - %s",
11026 val_to_str_const(error_code, error_vals, "<unknown>"));
11028 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11030 proto_tree_add_item(main_tree, hfx_btatt_error_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11031 offset++;
11033 if (request_data && (request_opcode == 0x08 || request_opcode == 0x10)) {
11034 sub_item = proto_tree_add_uint(main_tree, hf_btatt_uuid16, tvb, 0, 0, request_data->parameters.read_by_type.uuid.bt_uuid);
11035 proto_item_set_generated(sub_item);
11038 break;
11040 case 0x02: /* Exchange MTU Request */
11041 col_append_fstr(pinfo->cinfo, COL_INFO, ", Client Rx MTU: %u", tvb_get_letohs(tvb, offset));
11042 proto_tree_add_item(main_tree, hf_btatt_client_rx_mtu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11043 offset += 2;
11045 if (!pinfo->fd->visited && bluetooth_data) {
11046 union request_parameters_union request_parameters;
11048 request_parameters.mtu.mtu = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11050 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11053 break;
11055 case 0x03: /* Exchange MTU Response */
11056 col_append_fstr(pinfo->cinfo, COL_INFO, ", Server Rx MTU: %u", tvb_get_letohs(tvb, offset));
11057 proto_tree_add_item(main_tree, hf_btatt_server_rx_mtu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11058 if (!pinfo->fd->visited && request_data && bluetooth_data) {
11059 unsigned new_mtu;
11061 new_mtu = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
11062 if (new_mtu > request_data->parameters.mtu.mtu)
11063 new_mtu = request_data->parameters.mtu.mtu;
11064 save_mtu(pinfo, bluetooth_data, new_mtu);
11066 offset += 2;
11067 break;
11069 case 0x04: /* Find Information Request */
11070 col_append_fstr(pinfo->cinfo, COL_INFO, ", Handles: 0x%04x..0x%04x",
11071 tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11072 proto_tree_add_item(main_tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11073 offset += 2;
11075 proto_tree_add_item(main_tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11076 offset += 2;
11078 if (!pinfo->fd->visited && bluetooth_data) {
11079 union request_parameters_union request_parameters;
11081 request_parameters.find_information.starting_handle = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
11082 request_parameters.find_information.ending_handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11084 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11087 break;
11089 case 0x05: /* Find Information Response */
11091 uint8_t format;
11093 sub_item = proto_tree_add_item(main_tree, hf_btatt_uuid_format, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11094 format = tvb_get_uint8(tvb, offset);
11095 offset += 1;
11097 if (format == 1) {
11098 while (tvb_reported_length_remaining(tvb, offset) > 0) {
11099 sub_item = proto_tree_add_item(main_tree, hf_btatt_information_data, tvb, offset, 4, ENC_NA);
11100 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11102 offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, opcode);
11103 handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11105 proto_tree_add_item(sub_tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11106 uuid = get_bluetooth_uuid(tvb, offset, 2);
11107 offset += 2;
11109 proto_item_append_text(sub_item, ", Handle: 0x%04x, UUID: %s",
11110 handle, print_bluetooth_uuid(pinfo->pool, &uuid));
11112 save_handle(pinfo, uuid, handle, ATTRIBUTE_TYPE_OTHER, bluetooth_data);
11114 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11117 else if (format == 2) {
11118 while (tvb_reported_length_remaining(tvb, offset) > 0) {
11119 sub_item = proto_tree_add_item(main_tree, hf_btatt_information_data, tvb, offset, 4, ENC_NA);
11120 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11122 offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, opcode);
11123 handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11125 proto_tree_add_item(sub_tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
11126 uuid = get_bluetooth_uuid(tvb, offset, 16);
11127 offset += 16;
11129 proto_item_append_text(sub_item, ", Handle: 0x%04x, UUID: %s",
11130 handle, print_bluetooth_uuid(pinfo->pool, &uuid));
11132 save_handle(pinfo, uuid, handle, ATTRIBUTE_TYPE_OTHER, bluetooth_data);
11134 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11137 else {
11138 expert_add_info(pinfo, sub_item, &ei_btatt_uuid_format_unknown);
11141 break;
11143 case 0x06: /* Find By Type Value Request */
11144 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s, Handles: 0x%04x..0x%04x",
11145 val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &bluetooth_uuid_vals_ext, "<unknown>"),
11146 tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11148 proto_tree_add_item(main_tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11149 offset += 2;
11151 proto_tree_add_item(main_tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11152 offset += 2;
11154 proto_tree_add_item(main_tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11155 uuid = get_bluetooth_uuid(tvb, offset - 2, 2);
11156 offset += 2;
11158 dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), 0, uuid, &att_data);
11160 if (!pinfo->fd->visited && bluetooth_data) {
11161 union request_parameters_union request_parameters;
11163 request_parameters.read_by_type.starting_handle = tvb_get_uint16(tvb, offset - 6, ENC_LITTLE_ENDIAN);
11164 request_parameters.read_by_type.ending_handle = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
11165 request_parameters.read_by_type.uuid = uuid;
11167 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11170 offset = tvb_reported_length(tvb);
11172 break;
11174 case 0x07: /* Find By Type Value Response */
11175 while (tvb_reported_length_remaining(tvb, offset) > 0) {
11176 sub_item = proto_tree_add_none_format(main_tree, hf_btatt_handles_info, tvb, offset, 4,
11177 "Handles Info, Handle: 0x%04x, Group End Handle: 0x%04x",
11178 tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11180 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11182 offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, opcode);
11184 proto_tree_add_item(sub_tree, hf_btatt_group_end_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11185 offset += 2;
11187 if (request_data)
11188 save_handle(pinfo, request_data->parameters.read_by_type.uuid,
11189 tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN),
11190 ATTRIBUTE_TYPE_OTHER, bluetooth_data);
11193 break;
11195 case 0x08: /* Read By Type Request */
11196 case 0x10: /* Read By Group Type Request */
11197 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s, Handles: 0x%04x..0x%04x",
11198 val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &bluetooth_uuid_vals_ext, "<unknown>"),
11199 tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11201 proto_tree_add_item(main_tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11202 offset += 2;
11203 proto_tree_add_item(main_tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11204 offset += 2;
11206 if (tvb_reported_length_remaining(tvb, offset) == 2) {
11207 proto_tree_add_item(main_tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11208 offset += 2;
11210 if (!pinfo->fd->visited && bluetooth_data) {
11211 union request_parameters_union request_parameters;
11213 request_parameters.read_by_type.starting_handle = tvb_get_uint16(tvb, offset - 6, ENC_LITTLE_ENDIAN);
11214 request_parameters.read_by_type.ending_handle = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
11215 request_parameters.read_by_type.uuid = get_bluetooth_uuid(tvb, offset - 2, 2);
11217 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11219 } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
11220 sub_item = proto_tree_add_item(main_tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
11221 proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(tvb_get_letohs(tvb, offset),
11222 &bluetooth_uuid_vals_ext, "<unknown>"));
11223 offset += 16;
11225 if (!pinfo->fd->visited && bluetooth_data) {
11226 union request_parameters_union request_parameters;
11228 request_parameters.read_by_type.starting_handle = tvb_get_uint16(tvb, offset - 20, ENC_LITTLE_ENDIAN);
11229 request_parameters.read_by_type.ending_handle = tvb_get_uint16(tvb, offset - 18, ENC_LITTLE_ENDIAN);
11230 request_parameters.read_by_type.uuid = get_bluetooth_uuid(tvb, offset - 16, 16);
11232 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11234 } else {
11235 sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11236 expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
11237 offset = tvb_captured_length(tvb);
11240 break;
11242 case 0x09: /* Read By Type Response */
11244 uint8_t length = tvb_get_uint8(tvb, offset);
11246 proto_tree_add_item(main_tree, hf_btatt_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11247 offset++;
11249 if (length > 0) {
11250 col_append_fstr(pinfo->cinfo, COL_INFO, ", Attribute List Length: %u",
11251 tvb_reported_length_remaining(tvb, offset)/length);
11253 while (tvb_reported_length_remaining(tvb, offset) >= length)
11255 sub_item = proto_tree_add_none_format(main_tree, hf_btatt_attribute_data, tvb,
11256 offset, length, "Attribute Data, Handle: 0x%04x",
11257 tvb_get_letohs(tvb, offset));
11259 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11261 if (request_data) {
11262 save_handle(pinfo, request_data->parameters.read_by_type.uuid,
11263 tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN),
11264 ATTRIBUTE_TYPE_OTHER, bluetooth_data);
11267 offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, opcode);
11269 if (request_data) {
11270 offset = dissect_attribute_value(sub_tree, sub_item, pinfo, tvb, offset, length - 2, tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN), request_data->parameters.read_by_type.uuid, &att_data);
11271 } else {
11272 proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, length - 2, ENC_NA);
11273 offset += length - 2;
11278 if (request_data) {
11279 sub_item = proto_tree_add_uint(main_tree, hf_btatt_uuid16, tvb, 0, 0, request_data->parameters.read_by_type.uuid.bt_uuid);
11280 proto_item_set_generated(sub_item);
11283 break;
11285 case 0x0a: /* Read Request */
11286 offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, HANDLE_TVB, opcode);
11287 handle = tvb_get_letohs(tvb, offset - 2);
11289 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11291 if (!pinfo->fd->visited && bluetooth_data) {
11292 union request_parameters_union request_parameters;
11294 request_parameters.read_write.handle = handle;
11295 request_parameters.read_write.offset = 0;
11297 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11300 offset = dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), handle, uuid, &att_data);
11302 break;
11304 case 0x0b: /* Read Response */
11305 if (request_data) {
11306 dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, request_data->parameters.read_write.handle, opcode);
11308 col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, bluetooth_data);
11311 if (is_long_attribute_value(uuid) && tvb_captured_length(tvb) >= mtu) {
11312 sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11313 if (!pinfo->fd->visited && request_data && bluetooth_data)
11314 save_value_fragment(pinfo, tvb, offset, request_data->parameters.read_write.handle, 0, bluetooth_data);
11315 offset = tvb_captured_length(tvb);
11317 expert_add_info(pinfo, sub_item, &ei_btatt_mtu_full);
11318 } else {
11319 if (request_data)
11320 handle = request_data->parameters.read_write.handle;
11321 else
11322 handle = 0;
11324 offset = dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), handle, uuid, &att_data);
11326 break;
11328 case 0x0c: /* Read Blob Request */
11329 offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, HANDLE_TVB, opcode);
11330 handle = tvb_get_letohs(tvb, offset - 2);
11332 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11333 col_append_fstr(pinfo->cinfo, COL_INFO, ", Offset: %u", tvb_get_letohs(tvb, offset));
11335 proto_tree_add_item(main_tree, hf_btatt_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11336 offset += 2;
11338 dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, handle, uuid, &att_data);
11341 if (!pinfo->fd->visited && bluetooth_data) {
11342 union request_parameters_union request_parameters;
11344 request_parameters.read_write.handle = handle;
11345 request_parameters.read_write.offset = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11347 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11349 break;
11351 case 0x0d: /* Read Blob Response */
11352 if (request_data && request_data->opcode == (opcode - 1)) {
11353 dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, request_data->parameters.read_write.handle, opcode);
11355 col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, bluetooth_data);
11357 if (request_data->parameters.read_write.offset == 0 && !is_long_attribute_value(uuid)) {
11358 offset = dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), request_data->parameters.read_write.handle, uuid, &att_data);
11359 } else {
11360 if (!pinfo->fd->visited && bluetooth_data)
11361 save_value_fragment(pinfo, tvb, offset, request_data->parameters.read_write.handle, request_data->parameters.read_write.offset, bluetooth_data);
11363 if (tvb_captured_length(tvb) < mtu) {
11364 tvbuff_t *next_tvb;
11365 unsigned reassembled_length;
11366 uint8_t *reassembled_data;
11368 sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11369 offset = tvb_captured_length(tvb);
11371 reassembled_data = get_value(pinfo, request_data->parameters.read_write.handle, bluetooth_data, &reassembled_length);
11372 if (reassembled_data) {
11373 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
11374 next_tvb = tvb_new_child_real_data(tvb, reassembled_data, reassembled_length, reassembled_length);
11375 add_new_data_source(pinfo, next_tvb, "Reassembled ATT");
11376 dissect_attribute_value(sub_tree, NULL, pinfo, next_tvb, 0, tvb_captured_length(next_tvb), request_data->parameters.read_write.handle, uuid, &att_data);
11378 } else {
11379 sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11380 offset = tvb_captured_length(tvb);
11382 expert_add_info(pinfo, sub_item, &ei_btatt_mtu_full);
11385 } else {
11386 proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11387 offset = tvb_captured_length(tvb);
11390 break;
11392 case 0x0e: /* Multiple Read Request */
11393 case 0x20: /* Read Multiple Variable Request */
11394 if(tvb_reported_length_remaining(tvb, offset) < 4) {
11395 expert_add_info(pinfo, main_item, &ei_btatt_handle_too_few);
11396 break;
11399 col_append_str(pinfo->cinfo, COL_INFO, ", Handles: ");
11400 while (tvb_reported_length_remaining(tvb, offset) >= 2) {
11401 offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, HANDLE_TVB, opcode);
11402 handle = tvb_get_letohs(tvb, offset - 2);
11403 col_append_fstr(pinfo->cinfo, COL_INFO, "0x%04x ", handle);
11405 dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, handle, uuid, &att_data);
11408 if (!pinfo->fd->visited && bluetooth_data) {
11409 union request_parameters_union request_parameters;
11411 request_parameters.read_multiple.number_of_handles = (tvb_captured_length(tvb) - 1) / 2;
11412 request_parameters.read_multiple.handle = (uint16_t *) tvb_memdup(wmem_file_scope(),
11413 tvb, 1, request_parameters.read_multiple.number_of_handles * 2);
11415 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11417 break;
11419 case 0x0f: /* Multiple Read Response */
11420 case 0x21: /* Read Multiple Variable Response */
11421 if (request_data && request_data->opcode == (opcode - 1)) {
11422 unsigned i_handle;
11424 if (opcode == 0x0f) {
11425 for (i_handle = 0; i_handle < request_data->parameters.read_multiple.number_of_handles; i_handle += 1) {
11426 dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, request_data->parameters.read_multiple.handle[i_handle], opcode);
11427 offset = dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), request_data->parameters.read_multiple.handle[i_handle], uuid, &att_data);
11429 } else {
11430 i_handle = 0;
11431 /* Read Multiple Variable Response */
11432 for (;;) {
11433 int remain = tvb_reported_length_remaining(tvb, offset);
11434 uint16_t length;
11435 if (remain < 2)
11436 break;
11437 length = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
11438 offset+=2;
11439 remain-=2;
11440 if (remain < length)
11441 break;
11443 dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, request_data->parameters.read_multiple.handle[i_handle], opcode);
11444 dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, length, request_data->parameters.read_multiple.handle[i_handle], uuid, &att_data);
11446 i_handle++;
11447 offset += length;
11450 } else {
11451 proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11452 offset = tvb_reported_length(tvb);
11454 break;
11456 case 0x11: /* Read By Group Type Response */
11458 uint8_t length = tvb_get_uint8(tvb, offset);
11460 proto_tree_add_item(main_tree, hf_btatt_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11461 offset++;
11463 if (length > 0) {
11464 col_append_fstr(pinfo->cinfo, COL_INFO, ", Attribute List Length: %u", tvb_reported_length_remaining(tvb, offset)/length);
11466 while (tvb_reported_length_remaining(tvb, offset) >= length) {
11467 sub_item = proto_tree_add_none_format(main_tree, hf_btatt_attribute_data, tvb, offset, length,
11468 "Attribute Data, Handle: 0x%04x, Group End Handle: 0x%04x",
11469 tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11471 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11473 offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, NULL, HANDLE_TVB, opcode);
11474 handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11476 proto_tree_add_item(sub_tree, hf_btatt_group_end_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11477 offset += 2;
11479 if (request_data) {
11480 offset = dissect_attribute_value(sub_tree, sub_item, pinfo, tvb, offset, length - 4, handle, request_data->parameters.read_by_type.uuid, &att_data);
11481 } else {
11482 proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, length - 4, ENC_NA);
11483 offset += length - 4;
11488 if (request_data && request_data->opcode == (opcode - 1)) {
11489 sub_item = proto_tree_add_uint(main_tree, hf_btatt_uuid16, tvb, 0, 0, request_data->parameters.read_by_type.uuid.bt_uuid);
11490 proto_item_set_generated(sub_item);
11493 break;
11495 case 0x12: /* Write Request */
11496 case 0x1d: /* Handle Value Indication */
11497 case 0x52: /* Write Command */
11498 case 0x1b: /* Handle Value Notification */
11499 offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, HANDLE_TVB, opcode);
11500 handle = tvb_get_letohs(tvb, offset - 2);
11501 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11502 offset = dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN), uuid, &att_data);
11503 if (!pinfo->fd->visited && bluetooth_data && (opcode == 0x12 || opcode == 0x1d)) {
11504 union request_parameters_union request_parameters;
11506 request_parameters.read_write.handle = handle;
11507 request_parameters.read_write.offset = 0;
11509 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11511 break;
11513 case 0x13: /* Write Response */
11514 /* No parameters */
11516 if (request_data && request_data->opcode == (opcode - 1)) {
11517 dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, request_data->parameters.read_write.handle, opcode);
11519 dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, request_data->parameters.read_write.handle, uuid, &att_data);
11521 col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, bluetooth_data);
11524 break;
11526 case 0x16: /* Prepare Write Request */
11527 case 0x17: /* Prepare Write Response */
11528 offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, HANDLE_TVB, opcode);
11529 handle = tvb_get_letohs(tvb, offset - 2);
11531 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11532 col_append_fstr(pinfo->cinfo, COL_INFO, ", Offset: %u", tvb_get_letohs(tvb, offset));
11534 proto_tree_add_item(main_tree, hf_btatt_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11535 offset += 2;
11537 if (!pinfo->fd->visited && bluetooth_data && opcode == 0x16) {
11538 union request_parameters_union request_parameters;
11540 request_parameters.data = NULL;
11542 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11544 if (!pinfo->fd->visited && request_data && bluetooth_data && opcode == 0x16)
11545 save_value_fragment(pinfo, tvb, offset,
11546 tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN),
11547 tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN),
11548 bluetooth_data);
11550 /* XXX: How to detect there is max data in frame and it is last fragment?
11551 (Execute Write Request/Response is good candidate, but there is no one handle) */
11552 if (request_data && request_data->opcode == (opcode - 1) && tvb_captured_length(tvb) < mtu) {
11553 tvbuff_t *next_tvb;
11554 unsigned reassembled_length;
11555 uint8_t *reassembled_data;
11557 sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11559 reassembled_data = get_value(pinfo, request_data->parameters.read_write.handle, bluetooth_data, &reassembled_length);
11560 if (reassembled_data) {
11561 sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
11562 next_tvb = tvb_new_child_real_data(tvb, reassembled_data, reassembled_length, reassembled_length);
11563 add_new_data_source(pinfo, next_tvb, "Reassembled ATT");
11564 dissect_attribute_value(sub_tree, NULL, pinfo, next_tvb, 0, tvb_captured_length(next_tvb), request_data->parameters.read_write.handle, uuid, &att_data);
11566 } else {
11567 proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11570 offset = tvb_reported_length(tvb);
11572 break;
11574 case 0x18: /* Execute Write Request */
11575 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
11576 val_to_str_const(tvb_get_uint8(tvb, offset), flags_vals, "<unknown>"));
11577 proto_tree_add_item(main_tree, hf_btatt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11578 offset++;
11580 if (!pinfo->fd->visited && bluetooth_data) {
11581 union request_parameters_union request_parameters;
11583 /* NOTE: Enable request-response tracking using empty data*/
11584 request_parameters.data = NULL;
11586 save_request(pinfo, opcode, request_parameters, bluetooth_data);
11588 break;
11590 case 0x19: /* Execute Write Response */
11591 /* No parameters */
11592 break;
11594 case 0x1E: /* Handle Value Confirmation */
11595 if (request_data && request_data->opcode == (opcode - 1)) {
11596 dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, request_data->parameters.read_write.handle, opcode);
11598 col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, bluetooth_data);
11600 dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, request_data->parameters.read_write.handle, uuid, &att_data);
11602 break;
11604 case 0xd2: /* Signed Write Command */
11606 uint8_t length;
11608 offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, bluetooth_data, &uuid, HANDLE_TVB, opcode);
11609 handle = tvb_get_letohs(tvb, offset - 2);
11611 col_append_info_by_handle(pinfo, handle, opcode, bluetooth_data);
11613 length = tvb_reported_length_remaining(tvb, offset);
11614 dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, (length > 12) ? length - 12 : 0, handle, uuid, &att_data);
11615 if (length > 12) {
11616 offset += length - 12;
11619 proto_tree_add_item(main_tree, hf_btatt_sign_counter, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11620 offset+=4;
11621 proto_tree_add_item(main_tree, hf_btatt_signature, tvb, offset, 8, ENC_NA);
11622 offset+=8;
11623 break;
11625 default:
11626 break;
11629 if (request_data && request_data->opcode == (opcode - 1)) {
11630 if (request_data->request_in_frame > 0 && request_data->request_in_frame != pinfo->num) {
11631 sub_item = proto_tree_add_uint(main_tree, hf_request_in_frame, tvb, 0, 0, request_data->request_in_frame);
11632 proto_item_set_generated(sub_item);
11634 if (!pinfo->fd->visited && request_data->response_in_frame == 0 &&
11635 pinfo->num > request_data->request_in_frame)
11636 request_data->response_in_frame = pinfo->num;
11637 if (request_data->response_in_frame > 0 && request_data->response_in_frame != pinfo->num) {
11638 sub_item = proto_tree_add_uint(main_tree, hf_response_in_frame, tvb, 0, 0, request_data->response_in_frame);
11639 proto_item_set_generated(sub_item);
11643 return offset;
11646 static int
11647 dissect_btgatt_nordic_uart_tx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11649 btatt_data_t *att_data = (btatt_data_t *) data;
11651 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11652 return -1;
11654 proto_tree_add_item(tree, hf_gatt_nordic_uart_tx, tvb, 0, tvb_captured_length(tvb), ENC_ASCII | ENC_NA);
11656 return tvb_captured_length(tvb);
11659 static int
11660 dissect_btgatt_nordic_uart_rx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11662 btatt_data_t *att_data = (btatt_data_t *) data;
11664 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11665 return -1;
11667 proto_tree_add_item(tree, hf_gatt_nordic_uart_rx, tvb, 0, tvb_captured_length(tvb), ENC_ASCII | ENC_NA);
11669 return tvb_captured_length(tvb);
11672 static int
11673 dissect_btgatt_nordic_dfu_control_point(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
11675 int offset = 0;
11676 uint8_t opcode;
11677 uint8_t request_opcode;
11678 uint8_t status;
11679 btatt_data_t *att_data = (btatt_data_t *) data;
11681 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11682 return -1;
11684 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_opcode, tvb, offset, 1, ENC_NA);
11685 opcode = tvb_get_uint8(tvb, offset);
11686 offset += 1;
11688 switch (opcode) {
11689 case 0x01: /* Start DFU */
11690 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_image_type, tvb, offset, 1, ENC_NA);
11691 offset += 1;
11693 break;
11694 case 0x02: /* Initialize DFU Parameters */
11695 if (tvb_reported_length_remaining(tvb, offset) > 0) {
11696 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_init_packet, tvb, offset, 1, ENC_NA);
11697 offset += 1;
11700 break;
11701 case 0x03: /* Receive Firmware Image */
11702 case 0x04: /* Validate Firmware */
11703 case 0x05: /* Activate Image and Reset */
11704 case 0x06: /* Reset System */
11705 case 0x07: /* Report Received Image Size */
11706 /* nop */
11708 break;
11709 case 0x08: /* Packet Receipt Notification Request */
11710 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_number_of_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11711 offset += 2;
11713 break;
11714 case 0x10: /* Response Code */
11715 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_request_opcode, tvb, offset, 1, ENC_NA);
11716 request_opcode = tvb_get_uint8(tvb, offset);
11717 offset += 1;
11719 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_response_value, tvb, offset, 1, ENC_NA);
11720 status = tvb_get_uint8(tvb, offset);
11721 offset += 1;
11723 if (request_opcode == 0x07 && status == 0x01) { /* Report Received Image Size && Success */
11724 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_number_of_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11725 offset += 4;
11728 break;
11729 case 0x11: /* Packet Receipt Notification */
11730 proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_number_of_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11731 offset += 4;
11732 break;
11735 if (tvb_captured_length_remaining(tvb, offset) > 0) {
11736 proto_tree_add_expert(tree, pinfo, &ei_btatt_unexpected_data, tvb, offset, -1);
11737 offset = tvb_captured_length(tvb);
11740 return offset;
11743 static int
11744 dissect_btgatt_nordic_dfu_packet(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11746 btatt_data_t *att_data = (btatt_data_t *) data;
11748 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11749 return -1;
11751 proto_tree_add_item(tree, hf_gatt_nordic_dfu_packet, tvb, 0, tvb_captured_length(tvb), ENC_NA);
11753 return tvb_captured_length(tvb);
11756 static int
11757 dissect_btgatt_microbit_accelerometer_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11759 btatt_data_t *att_data = (btatt_data_t *) data;
11760 proto_item *sub_item;
11761 proto_tree *sub_tree;
11762 double x_axis, y_axis, z_axis;
11763 int offset = 0;
11765 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11766 return -1;
11768 x_axis = (double) (int) tvb_get_int16(tvb, offset, ENC_LITTLE_ENDIAN) / 1000.0;
11769 y_axis = (double) (int) tvb_get_int16(tvb, offset+2, ENC_LITTLE_ENDIAN) / 1000.0;
11770 z_axis = (double) (int) tvb_get_int16(tvb, offset+4, ENC_LITTLE_ENDIAN) / 1000.0;
11772 sub_item = proto_tree_add_item(tree, hf_gatt_microbit_accelerometer_data, tvb, 0, tvb_captured_length(tvb), ENC_NA);
11773 sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_accelerometer);
11775 proto_item_append_text(sub_item, " (X: %f, Y: %f, Z: %f)", x_axis, y_axis, z_axis);
11776 proto_tree_add_double(sub_tree, hf_gatt_microbit_accelerometer_x, tvb, offset, 2, x_axis);
11777 offset += 2;
11778 proto_tree_add_double(sub_tree, hf_gatt_microbit_accelerometer_y, tvb, offset, 2, y_axis);
11779 offset += 2;
11780 proto_tree_add_double(sub_tree, hf_gatt_microbit_accelerometer_z, tvb, offset, 2, z_axis);
11781 offset += 2;
11783 return offset;
11786 static int
11787 dissect_btgatt_microbit_accelerometer_period(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11789 btatt_data_t *att_data = (btatt_data_t *) data;
11790 int offset = 0;
11792 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11793 return -1;
11795 proto_tree_add_item(tree, hf_gatt_microbit_accelerometer_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11796 offset += 2;
11798 return offset;
11801 static int
11802 dissect_btgatt_microbit_magnetometer_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11804 btatt_data_t *att_data = (btatt_data_t *) data;
11805 proto_item *sub_item;
11806 proto_tree *sub_tree;
11807 double x_axis, y_axis, z_axis;
11808 int offset = 0;
11810 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11811 return -1;
11813 x_axis = (double) (int) tvb_get_int16(tvb, offset, ENC_LITTLE_ENDIAN) / 1000.0;
11814 y_axis = (double) (int) tvb_get_int16(tvb, offset+2, ENC_LITTLE_ENDIAN) / 1000.0;
11815 z_axis = (double) (int) tvb_get_int16(tvb, offset+4, ENC_LITTLE_ENDIAN) / 1000.0;
11817 sub_item = proto_tree_add_item(tree, hf_gatt_microbit_magnetometer_data, tvb, 0, tvb_captured_length(tvb), ENC_NA);
11818 sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_magnetometer);
11820 proto_item_append_text(sub_item, " (X: %f, Y: %f, Z: %f)", x_axis, y_axis, z_axis);
11821 proto_tree_add_double(sub_tree, hf_gatt_microbit_magnetometer_x, tvb, offset, 2, x_axis);
11822 offset += 2;
11823 proto_tree_add_double(sub_tree, hf_gatt_microbit_magnetometer_y, tvb, offset, 2, y_axis);
11824 offset += 2;
11825 proto_tree_add_double(sub_tree, hf_gatt_microbit_magnetometer_z, tvb, offset, 2, z_axis);
11826 offset += 2;
11828 return offset;
11831 static int
11832 dissect_btgatt_microbit_magnetometer_period(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11834 btatt_data_t *att_data = (btatt_data_t *) data;
11835 int offset = 0;
11837 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11838 return -1;
11840 proto_tree_add_item(tree, hf_gatt_microbit_magnetometer_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11841 offset += 2;
11843 return offset;
11846 static int
11847 dissect_btgatt_microbit_magnetometer_bearing(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11849 btatt_data_t *att_data = (btatt_data_t *) data;
11850 int offset = 0;
11852 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11853 return -1;
11855 proto_tree_add_item(tree, hf_gatt_microbit_magnetometer_bearing, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11856 offset += 2;
11858 return offset;
11861 static int
11862 dissect_btgatt_microbit_button_a_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11864 btatt_data_t *att_data = (btatt_data_t *) data;
11865 int offset = 0;
11867 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11868 return -1;
11870 proto_tree_add_item(tree, hf_gatt_microbit_button_a_state, tvb, offset, 1, ENC_NA);
11871 offset += 1;
11873 return offset;
11876 static int
11877 dissect_btgatt_microbit_button_b_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11879 btatt_data_t *att_data = (btatt_data_t *) data;
11880 int offset = 0;
11882 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11883 return -1;
11885 proto_tree_add_item(tree, hf_gatt_microbit_button_b_state, tvb, offset, 1, ENC_NA);
11886 offset += 1;
11888 return offset;
11891 static int
11892 dissect_btgatt_microbit_pin_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11894 btatt_data_t *att_data = (btatt_data_t *) data;
11895 proto_item *sub_item;
11896 proto_tree *sub_tree;
11897 int offset = 0;
11898 int num_pins;
11899 uint32_t number, value;
11901 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11902 return -1;
11904 num_pins = tvb_captured_length(tvb) / 2;
11905 for (int i = 0; i < num_pins; i++) {
11906 sub_item = proto_tree_add_item(tree, hf_gatt_microbit_pin_data, tvb, offset, 2, ENC_NA);
11907 sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_pin_data);
11909 proto_tree_add_item_ret_uint(sub_tree, hf_gatt_microbit_pin_number, tvb, offset, 1, ENC_NA, &number);
11910 offset++;
11912 /* The micro:bit has a 10 bit ADC but values are compressed to 8 bits with a loss of resolution. */
11913 value = tvb_get_uint8(tvb, offset) * 4;
11914 proto_tree_add_uint(sub_tree, hf_gatt_microbit_pin_value, tvb, offset, 1, value);
11915 offset++;
11917 proto_item_set_text(sub_item, "Pin %u: %u", number, value);
11920 return offset;
11923 static int dissect_btgatt_microbit_pin_ad_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11925 btatt_data_t *att_data = (btatt_data_t *) data;
11926 proto_item *sub_item;
11927 proto_tree *sub_tree;
11929 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11930 return -1;
11932 sub_item = proto_tree_add_item(tree, hf_gatt_microbit_pin_ad_config, tvb, 0, 3, ENC_LITTLE_ENDIAN);
11933 sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_pin_ad_config);
11935 proto_tree_add_bitmask_list(sub_tree, tvb, 0, 3, hfx_btgatt_microbit_ad_pins, ENC_LITTLE_ENDIAN);
11937 return tvb_captured_length(tvb);
11940 static int dissect_btgatt_microbit_pin_io_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11942 btatt_data_t *att_data = (btatt_data_t *) data;
11943 proto_item *sub_item;
11944 proto_tree *sub_tree;
11946 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11947 return -1;
11949 sub_item = proto_tree_add_item(tree, hf_gatt_microbit_pin_io_config, tvb, 0, 3, ENC_LITTLE_ENDIAN);
11950 sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_pin_io_config);
11952 proto_tree_add_bitmask_list(sub_tree, tvb, 0, 3, hfx_btgatt_microbit_io_pins, ENC_LITTLE_ENDIAN);
11954 return tvb_captured_length(tvb);
11957 static int
11958 dissect_btgatt_microbit_pwm_control(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11960 btatt_data_t *att_data = (btatt_data_t *) data;
11962 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11963 return -1;
11965 proto_tree_add_item(tree, hf_gatt_microbit_pwm_control, tvb, 0, tvb_captured_length(tvb), ENC_UTF_8);
11967 return tvb_captured_length(tvb);
11970 static int
11971 dissect_btgatt_microbit_led_matrix(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11973 btatt_data_t *att_data = (btatt_data_t *) data;
11975 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11976 return -1;
11978 proto_tree_add_item(tree, hf_gatt_microbit_led_matrix, tvb, 0, tvb_captured_length(tvb), ENC_NA);
11980 return tvb_captured_length(tvb);
11983 static int
11984 dissect_btgatt_microbit_led_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11986 btatt_data_t *att_data = (btatt_data_t *) data;
11988 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11989 return -1;
11991 proto_tree_add_item(tree, hf_gatt_microbit_led_text, tvb, 0, tvb_captured_length(tvb), ENC_NA | ENC_UTF_8);
11993 return tvb_captured_length(tvb);
11996 static int
11997 dissect_btgatt_microbit_scrolling_delay(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11999 btatt_data_t *att_data = (btatt_data_t *) data;
12000 int offset = 0;
12002 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12003 return -1;
12005 proto_tree_add_item(tree, hf_gatt_microbit_scrolling_delay, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12006 offset += 2;
12008 return offset;
12011 static int
12012 dissect_btgatt_microbit_microbit_requirements(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12014 btatt_data_t *att_data = (btatt_data_t *) data;
12016 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12017 return -1;
12019 proto_tree_add_item(tree, hf_gatt_microbit_microbit_requirements, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12021 return tvb_captured_length(tvb);
12024 static int
12025 dissect_btgatt_microbit_microbit_event(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12027 btatt_data_t *att_data = (btatt_data_t *) data;
12029 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12030 return -1;
12032 proto_tree_add_item(tree, hf_gatt_microbit_microbit_event, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12034 return tvb_captured_length(tvb);
12037 static int
12038 dissect_btgatt_microbit_client_requirements(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12040 btatt_data_t *att_data = (btatt_data_t *) data;
12042 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12043 return -1;
12045 proto_tree_add_item(tree, hf_gatt_microbit_client_requirements, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12047 return tvb_captured_length(tvb);
12050 static int
12051 dissect_btgatt_microbit_client_event(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12053 btatt_data_t *att_data = (btatt_data_t *) data;
12055 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12056 return -1;
12058 proto_tree_add_item(tree, hf_gatt_microbit_client_event, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12060 return tvb_captured_length(tvb);
12063 static int
12064 dissect_btgatt_microbit_dfu_control(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12066 btatt_data_t *att_data = (btatt_data_t *) data;
12067 int offset = 0;
12069 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12070 return -1;
12072 proto_tree_add_item(tree, hf_gatt_microbit_dfu_control, tvb, offset, 1, ENC_NA);
12073 offset += 1;
12075 return offset;
12078 static int
12079 dissect_btgatt_microbit_temperature_value(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12081 btatt_data_t *att_data = (btatt_data_t *) data;
12082 int offset = 0;
12084 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12085 return -1;
12087 proto_tree_add_item(tree, hf_gatt_microbit_temperature_value, tvb, offset, 1, ENC_NA);
12088 offset += 1;
12090 return offset;
12093 static int
12094 dissect_btgatt_microbit_temperature_period(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12096 btatt_data_t *att_data = (btatt_data_t *) data;
12097 int offset = 0;
12099 if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12100 return -1;
12102 proto_tree_add_item(tree, hf_gatt_microbit_temperature_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12103 offset += 2;
12105 return offset;
12111 void
12112 proto_register_btatt(void)
12114 module_t *module;
12115 expert_module_t *expert_btatt;
12117 //src_port will be filled with handle
12118 //dst_port will be filled with opcode
12119 reassembly_table_register(&msg_reassembly_table,
12120 &addresses_ports_reassembly_table_functions);
12121 reassembly_table_init(&msg_reassembly_table,
12122 &addresses_ports_reassembly_table_functions);
12123 static hf_register_info hf[] = {
12124 {&hf_btatt_opcode,
12125 {"Opcode", "btatt.opcode",
12126 FT_UINT8, BASE_HEX, VALS(opcode_vals), 0x0,
12127 NULL, HFILL}
12129 {&hf_btatt_opcode_authentication_signature,
12130 {"Authentication Signature", "btatt.opcode.authentication_signature",
12131 FT_BOOLEAN, 8, NULL, 0x80,
12132 NULL, HFILL}
12134 {&hf_btatt_opcode_command,
12135 {"Command", "btatt.opcode.command",
12136 FT_BOOLEAN, 8, NULL, 0x40,
12137 NULL, HFILL}
12139 {&hf_btatt_opcode_method,
12140 {"Method", "btatt.opcode.method",
12141 FT_UINT8, BASE_HEX, VALS(opcode_vals), 0x3F,
12142 NULL, HFILL}
12144 {&hf_btatt_handles_info,
12145 {"Handles Info", "btatt.handles_info",
12146 FT_NONE, BASE_NONE, NULL, 0x0,
12147 NULL, HFILL}
12149 {&hf_btatt_attribute_data,
12150 {"Attribute Data", "btatt.attribute_data",
12151 FT_NONE, BASE_NONE, NULL, 0x0,
12152 NULL, HFILL}
12154 {&hf_btatt_handle,
12155 {"Handle", "btatt.handle",
12156 FT_UINT16, BASE_HEX, NULL, 0x0,
12157 NULL, HFILL}
12159 {&hf_btatt_starting_handle,
12160 {"Starting Handle", "btatt.starting_handle",
12161 FT_UINT16, BASE_HEX, NULL, 0x0,
12162 NULL, HFILL}
12164 {&hf_btatt_ending_handle,
12165 {"Ending Handle", "btatt.ending_handle",
12166 FT_UINT16, BASE_HEX, NULL, 0x0,
12167 NULL, HFILL}
12169 {&hf_btatt_group_end_handle,
12170 {"Group End Handle", "btatt.group_end_handle",
12171 FT_UINT16, BASE_HEX, NULL, 0x0,
12172 NULL, HFILL}
12174 {&hf_btatt_value,
12175 {"Value", "btatt.value",
12176 FT_BYTES, BASE_NONE, NULL, 0x0,
12177 NULL, HFILL}
12179 {&hf_btatt_req_opcode_in_error,
12180 {"Request Opcode in Error", "btatt.req_opcode_in_error",
12181 FT_UINT8, BASE_HEX, VALS(opcode_vals), 0x0,
12182 NULL, HFILL}
12184 {&hf_btatt_handle_in_error,
12185 {"Handle in Error", "btatt.handle",
12186 FT_UINT16, BASE_HEX, NULL, 0x0,
12187 NULL, HFILL}
12189 {&hf_btatt_error_code,
12190 {"Error Code", "btatt.error_code",
12191 FT_UINT8, BASE_HEX, VALS(error_code_vals), 0x0,
12192 NULL, HFILL}
12194 {&hf_btatt_error_code_aios,
12195 {"Error Code", "btatt.error_code",
12196 FT_UINT8, BASE_HEX, VALS(error_code_aios_vals), 0x0,
12197 NULL, HFILL}
12199 {&hf_btatt_error_code_ans,
12200 {"Error Code", "btatt.error_code",
12201 FT_UINT8, BASE_HEX, VALS(error_code_ans_vals), 0x0,
12202 NULL, HFILL}
12204 {&hf_btatt_error_code_bms,
12205 {"Error Code", "btatt.error_code",
12206 FT_UINT8, BASE_HEX, VALS(error_code_bms_vals), 0x0,
12207 NULL, HFILL}
12209 {&hf_btatt_error_code_cgms,
12210 {"Error Code", "btatt.error_code",
12211 FT_UINT8, BASE_HEX, VALS(error_code_cgms_vals), 0x0,
12212 NULL, HFILL}
12214 {&hf_btatt_error_code_cps,
12215 {"Error Code", "btatt.error_code",
12216 FT_UINT8, BASE_HEX, VALS(error_code_cps_vals), 0x0,
12217 NULL, HFILL}
12219 {&hf_btatt_error_code_cscs,
12220 {"Error Code", "btatt.error_code",
12221 FT_UINT8, BASE_HEX, VALS(error_code_cscs_vals), 0x0,
12222 NULL, HFILL}
12224 {&hf_btatt_error_code_cts,
12225 {"Error Code", "btatt.error_code",
12226 FT_UINT8, BASE_HEX, VALS(error_code_cts_vals), 0x0,
12227 NULL, HFILL}
12229 {&hf_btatt_error_code_ess,
12230 {"Error Code", "btatt.error_code",
12231 FT_UINT8, BASE_HEX, VALS(error_code_ess_vals), 0x0,
12232 NULL, HFILL}
12234 {&hf_btatt_error_code_gls,
12235 {"Error Code", "btatt.error_code",
12236 FT_UINT8, BASE_HEX, VALS(error_code_gls_vals), 0x0,
12237 NULL, HFILL}
12239 {&hf_btatt_error_code_hps,
12240 {"Error Code", "btatt.error_code",
12241 FT_UINT8, BASE_HEX, VALS(error_code_hps_vals), 0x0,
12242 NULL, HFILL}
12244 {&hf_btatt_error_code_hrs,
12245 {"Error Code", "btatt.error_code",
12246 FT_UINT8, BASE_HEX, VALS(error_code_hrs_vals), 0x0,
12247 NULL, HFILL}
12249 {&hf_btatt_error_code_hts,
12250 {"Error Code", "btatt.error_code",
12251 FT_UINT8, BASE_HEX, VALS(error_code_hts_vals), 0x0,
12252 NULL, HFILL}
12254 {&hf_btatt_error_code_ips,
12255 {"Error Code", "btatt.error_code",
12256 FT_UINT8, BASE_HEX, VALS(error_code_ips_vals), 0x0,
12257 NULL, HFILL}
12259 {&hf_btatt_error_code_ots,
12260 {"Error Code", "btatt.error_code",
12261 FT_UINT8, BASE_HEX, VALS(error_code_ots_vals), 0x0,
12262 NULL, HFILL}
12264 {&hf_btatt_error_code_rscs,
12265 {"Error Code", "btatt.error_code",
12266 FT_UINT8, BASE_HEX, VALS(error_code_rscs_vals), 0x0,
12267 NULL, HFILL}
12269 {&hf_btatt_error_code_uds,
12270 {"Error Code", "btatt.error_code",
12271 FT_UINT8, BASE_HEX, VALS(error_code_uds_vals), 0x0,
12272 NULL, HFILL}
12274 {&hf_btatt_service_uuid16,
12275 {"Service UUID", "btatt.service_uuid16",
12276 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12277 NULL, HFILL}
12279 {&hf_btatt_service_uuid128,
12280 {"Service UUID", "btatt.service_uuid128",
12281 FT_BYTES, BASE_NONE, NULL, 0x0,
12282 NULL, HFILL}
12284 {&hf_btatt_characteristic_uuid16,
12285 {"Characteristic UUID", "btatt.characteristic_uuid16",
12286 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12287 NULL, HFILL}
12289 {&hf_btatt_characteristic_uuid128,
12290 {"Characteristic UUID", "btatt.characteristic_uuid128",
12291 FT_BYTES, BASE_NONE, NULL, 0x0,
12292 NULL, HFILL}
12294 {&hf_btatt_uuid16,
12295 {"UUID", "btatt.uuid16",
12296 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12297 NULL, HFILL}
12299 {&hf_btatt_uuid128,
12300 {"UUID", "btatt.uuid128",
12301 FT_BYTES, BASE_NONE, NULL, 0x0,
12302 NULL, HFILL}
12304 {&hf_btatt_client_rx_mtu,
12305 {"Client Rx MTU", "btatt.client_rx_mtu",
12306 FT_UINT16, BASE_DEC, NULL, 0x0,
12307 NULL, HFILL}
12309 {&hf_btatt_server_rx_mtu,
12310 {"Server Rx MTU", "btatt.server_rx_mtu",
12311 FT_UINT16, BASE_DEC, NULL, 0x0,
12312 NULL, HFILL}
12314 {&hf_btatt_uuid_format,
12315 {"UUID Format", "btatt.uuid_format",
12316 FT_UINT8, BASE_HEX, VALS(uuid_format_vals), 0x0,
12317 NULL, HFILL}
12319 {&hf_btatt_length,
12320 {"Length", "btatt.length",
12321 FT_UINT8, BASE_DEC, NULL, 0x0,
12322 "Length of Handle/Value Pair", HFILL}
12324 {&hf_btatt_offset,
12325 {"Offset", "btatt.offset",
12326 FT_UINT16, BASE_DEC, NULL, 0x0,
12327 NULL, HFILL}
12329 {&hf_btatt_flags,
12330 {"Flags", "btatt.flags",
12331 FT_UINT8, BASE_HEX, VALS(flags_vals), 0x0,
12332 NULL, HFILL}
12334 {&hf_btatt_sign_counter,
12335 {"Sign Counter", "btatt.sign_counter",
12336 FT_UINT32, BASE_DEC, NULL, 0x0,
12337 NULL, HFILL}
12339 {&hf_btatt_signature,
12340 {"Signature", "btatt.signature",
12341 FT_BYTES, BASE_NONE, NULL, 0x0,
12342 NULL, HFILL}
12344 {&hf_btatt_characteristic_properties,
12345 {"Characteristic Properties", "btatt.characteristic_properties",
12346 FT_UINT8, BASE_HEX, NULL, 0x0,
12347 NULL, HFILL}
12349 {&hf_btatt_characteristic_properties_extended_properties,
12350 {"Extended Properties", "btatt.characteristic_properties.extended_properties",
12351 FT_BOOLEAN, 8, NULL, 0x80,
12352 NULL, HFILL}
12354 {&hf_btatt_characteristic_properties_authenticated_signed_writes,
12355 {"Authenticated Signed Writes", "btatt.characteristic_properties.authenticated_signed_writes",
12356 FT_BOOLEAN, 8, NULL, 0x40,
12357 NULL, HFILL}
12359 {&hf_btatt_characteristic_properties_indicate,
12360 {"Indicate", "btatt.characteristic_properties.indicate",
12361 FT_BOOLEAN, 8, NULL, 0x20,
12362 NULL, HFILL}
12364 {&hf_btatt_characteristic_properties_notify,
12365 {"Notify", "btatt.characteristic_properties.notify",
12366 FT_BOOLEAN, 8, NULL, 0x10,
12367 NULL, HFILL}
12369 {&hf_btatt_characteristic_properties_write,
12370 {"Write", "btatt.characteristic_properties.write",
12371 FT_BOOLEAN, 8, NULL, 0x08,
12372 NULL, HFILL}
12374 {&hf_btatt_characteristic_properties_write_without_response,
12375 {"Write without Response", "btatt.characteristic_properties.write_without_response",
12376 FT_BOOLEAN, 8, NULL, 0x04,
12377 NULL, HFILL}
12379 {&hf_btatt_characteristic_properties_read,
12380 {"Read", "btatt.characteristic_properties.read",
12381 FT_BOOLEAN, 8, NULL, 0x02,
12382 NULL, HFILL}
12384 {&hf_btatt_characteristic_properties_broadcast,
12385 {"Broadcast", "btatt.characteristic_properties.broadcast",
12386 FT_BOOLEAN, 8, NULL, 0x01,
12387 NULL, HFILL}
12389 {&hf_btatt_characteristic_value_handle,
12390 {"Characteristic Value Handle", "btatt.handle",
12391 FT_UINT16, BASE_HEX, NULL, 0x0,
12392 NULL, HFILL}
12394 {&hf_btatt_included_service_handle,
12395 {"Included Service Handle", "btatt.handle",
12396 FT_UINT16, BASE_HEX, NULL, 0x0,
12397 NULL, HFILL}
12399 {&hf_btatt_information_data,
12400 {"Information Data", "btatt.information_data",
12401 FT_NONE, BASE_NONE, NULL, 0x0,
12402 NULL, HFILL}
12404 {&hf_btatt_characteristic_configuration_client,
12405 {"Characteristic Configuration Client", "btatt.characteristic_configuration_client",
12406 FT_UINT16, BASE_HEX, NULL, 0x0,
12407 NULL, HFILL}
12409 {&hf_btatt_characteristic_configuration_client_reserved,
12410 {"Reserved", "btatt.characteristic_configuration_client.reserved",
12411 FT_UINT16, BASE_HEX, NULL, 0xFFFC,
12412 NULL, HFILL}
12414 {&hf_btatt_characteristic_configuration_client_indication,
12415 {"Indication", "btatt.characteristic_configuration_client.indication",
12416 FT_BOOLEAN, 16, NULL, 0x0002,
12417 NULL, HFILL}
12419 {&hf_btatt_characteristic_configuration_client_notification,
12420 {"Notification", "btatt.characteristic_configuration_client.notification",
12421 FT_BOOLEAN, 16, NULL, 0x0001,
12422 NULL, HFILL}
12424 {&hf_btatt_characteristic_configuration_server,
12425 {"Characteristic Configuration Server", "btatt.characteristic_configuration_server",
12426 FT_UINT16, BASE_HEX, NULL, 0x0,
12427 NULL, HFILL}
12429 {&hf_btatt_characteristic_configuration_server_reserved,
12430 {"Reserved", "btatt.characteristic_configuration_server.reserved",
12431 FT_UINT16, BASE_HEX, NULL, 0xFFFE,
12432 NULL, HFILL}
12434 {&hf_btatt_characteristic_configuration_server_broadcast,
12435 {"Broadcast", "btatt.characteristic_configuration_server.broadcast",
12436 FT_BOOLEAN, 16, NULL, 0x0001,
12437 NULL, HFILL}
12439 {&hf_btatt_hogp_protocol_mode,
12440 {"Protocol Mode", "btatt.hogp.protocol_mode",
12441 FT_UINT8, BASE_HEX, VALS(hogp_protocol_mode_vals), 0x0,
12442 NULL, HFILL}
12444 {&hf_btatt_report_reference_report_id,
12445 {"Report ID", "btatt.report_reference.report_id",
12446 FT_UINT8, BASE_HEX, NULL, 0x0,
12447 NULL, HFILL}
12449 {&hf_btatt_report_reference_report_type,
12450 {"Report Type", "btatt.report_reference.report_type",
12451 FT_UINT8, BASE_HEX, VALS(report_reference_report_type_vals), 0x0,
12452 NULL, HFILL}
12454 {&hf_btatt_hogp_bcd_hid,
12455 {"bcdHID", "btatt.hogp.bcd_hid",
12456 FT_UINT16, BASE_HEX, NULL, 0x0,
12457 NULL, HFILL}
12459 {&hf_btatt_hogp_b_country_code,
12460 {"bCountryCode", "btatt.hogp.b_country_code",
12461 FT_UINT8, BASE_HEX, VALS(hid_country_code_vals), 0x0,
12462 NULL, HFILL}
12464 {&hf_btatt_hogp_flags,
12465 {"Flags", "btatt.hogp.flags",
12466 FT_UINT8, BASE_HEX, NULL, 0x0,
12467 NULL, HFILL}
12469 {&hf_btatt_hogp_flags_reserved,
12470 {"Reserved", "btatt.hogp.flags.reserved",
12471 FT_UINT8, BASE_HEX, NULL, 0xFC,
12472 NULL, HFILL}
12474 {&hf_btatt_hogp_flags_normally_connectable,
12475 {"Normally Connectable", "btatt.hogp.flags.normally_connectable",
12476 FT_BOOLEAN, 8, NULL, 0x02,
12477 NULL, HFILL}
12479 {&hf_btatt_hogp_flags_remote_wake,
12480 {"Remote Wake", "btatt.hogp.flags.remote_wake",
12481 FT_BOOLEAN, 8, NULL, 0x01,
12482 NULL, HFILL}
12484 {&hf_btatt_characteristic_user_description,
12485 {"Characteristic User Description", "btatt.characteristic_user_description",
12486 FT_STRING, BASE_NONE, NULL, 0x0,
12487 NULL, HFILL}
12489 {&hf_btatt_characteristic_extended_properties,
12490 {"Characteristic Extended Properties", "btatt.characteristic_extended_properties",
12491 FT_UINT16, BASE_HEX, NULL, 0x0,
12492 NULL, HFILL}
12494 {&hf_btatt_characteristic_extended_properties_reserved,
12495 {"Reserved", "btatt.characteristic_extended_properties.reserved",
12496 FT_UINT16, BASE_HEX, NULL, 0xFFFC,
12497 NULL, HFILL}
12499 {&hf_btatt_characteristic_extended_properties_writable_auxiliaries,
12500 {"Writable Auxiliaries", "btatt.characteristic_extended_properties.writable_auxiliaries",
12501 FT_UINT16, BASE_HEX, NULL, 0x0002,
12502 NULL, HFILL}
12504 {&hf_btatt_characteristic_extended_properties_reliable_write,
12505 {"Reliable Write", "btatt.characteristic_extended_properties.reliable_write",
12506 FT_UINT16, BASE_HEX, NULL, 0x0001,
12507 NULL, HFILL}
12509 {&hf_btatt_characteristic_presentation_format,
12510 {"Format", "btatt.characteristic_presentation.format",
12511 FT_UINT8, BASE_HEX, VALS(characteristic_presentation_format_vals), 0x0,
12512 NULL, HFILL}
12514 {&hf_btatt_characteristic_presentation_exponent,
12515 {"Exponent", "btatt.characteristic_presentation.exponent",
12516 FT_UINT8, BASE_DEC, NULL, 0x0,
12517 NULL, HFILL}
12519 {&hf_btatt_characteristic_presentation_unit,
12520 {"Unit", "btatt.characteristic_presentation.unit",
12521 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12522 NULL, HFILL}
12524 {&hf_btatt_characteristic_presentation_namespace,
12525 {"Namespace", "btatt.characteristic_presentation.namespace",
12526 FT_UINT8, BASE_HEX, VALS(characteristic_presentation_namespace_vals), 0x0,
12527 NULL, HFILL}
12529 {&hf_btatt_characteristic_presentation_namespace_description,
12530 {"Namespace Description", "btatt.characteristic_presentation.namespace_description",
12531 FT_UINT16, BASE_HEX, NULL, 0x0,
12532 NULL, HFILL}
12534 {&hf_btatt_characteristic_presentation_namespace_description_btsig,
12535 {"Namespace Description", "btatt.characteristic_presentation.namespace_description",
12536 FT_UINT16, BASE_HEX, VALS(characteristic_presentation_namespace_description_btsig_vals), 0x0,
12537 NULL, HFILL}
12539 {&hf_btatt_esp_trigger_logic,
12540 {"Trigger Logic", "btatt.esp.trigger_logic",
12541 FT_UINT8, BASE_HEX, VALS(esp_trigger_logic_vals), 0x0,
12542 NULL, HFILL}
12544 {&hf_btatt_esp_condition,
12545 {"Trigger Logic", "btatt.esp.condition",
12546 FT_UINT8, BASE_HEX, VALS(esp_condition_vals), 0x0,
12547 NULL, HFILL}
12549 {&hf_btatt_esp_operand,
12550 {"Operand", "btatt.esp.operand",
12551 FT_BYTES, BASE_NONE, NULL, 0x0,
12552 NULL, HFILL}
12554 {&hf_btatt_esp_flags,
12555 {"Flags", "btatt.esp.flags",
12556 FT_UINT16, BASE_HEX, NULL, 0xFFFF,
12557 NULL, HFILL}
12559 {&hf_btatt_esp_sampling_function,
12560 {"Sampling Function", "btatt.esp.sampling_function",
12561 FT_UINT8, BASE_HEX, VALS(esp_sampling_function_vals), 0x0,
12562 NULL, HFILL}
12564 {&hf_btatt_esp_measurement_period,
12565 {"Measurement Period", "btatt.esp.measurement_period",
12566 FT_UINT24, BASE_DEC, NULL, 0x0,
12567 NULL, HFILL}
12569 {&hf_btatt_esp_update_interval,
12570 {"Update Interval", "btatt.esp.update_interval",
12571 FT_UINT24, BASE_DEC, NULL, 0x0,
12572 NULL, HFILL}
12574 {&hf_btatt_esp_application,
12575 {"Application", "btatt.esp.application",
12576 FT_UINT8, BASE_HEX, VALS(esp_application_vals), 0x0,
12577 NULL, HFILL}
12579 {&hf_btatt_esp_measurement_uncertainty,
12580 {"Measurement Uncertainty", "btatt.esp.measurement_uncertainty",
12581 FT_UINT8, BASE_DEC, NULL, 0x0,
12582 NULL, HFILL}
12584 {&hf_btatt_device_name,
12585 {"Device Name", "btatt.device_name",
12586 FT_STRING, BASE_NONE, NULL, 0x0,
12587 NULL, HFILL}
12589 {&hf_btatt_appearance,
12590 {"Appearance", "btatt.appearance",
12591 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12592 NULL, HFILL}
12594 {&hf_btatt_appearance_category,
12595 {"Category", "btatt.appearance.category",
12596 FT_UINT16, BASE_DEC_HEX, VALS(appearance_category_vals), 0xFFC0,
12597 NULL, HFILL}
12599 {&hf_btatt_appearance_subcategory,
12600 {"Subcategory", "btatt.appearance.subcategory",
12601 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_generic_vals), 0x003F,
12602 NULL, HFILL}
12604 {&hf_btatt_appearance_subcategory_watch,
12605 {"Subcategory", "btatt.appearance.subcategory.watch",
12606 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_watch_vals), 0x003F,
12607 NULL, HFILL}
12609 {&hf_btatt_appearance_subcategory_thermometer,
12610 {"Subcategory", "btatt.appearance.subcategory.thermometer",
12611 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_thermometer_vals), 0x003F,
12612 NULL, HFILL}
12614 {&hf_btatt_appearance_subcategory_heart_rate,
12615 {"Subcategory", "btatt.appearance.subcategory.heart_rate",
12616 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_heart_rate_vals), 0x003F,
12617 NULL, HFILL}
12619 {&hf_btatt_appearance_subcategory_blood_pressure,
12620 {"Subcategory", "btatt.appearance.subcategory.blood_pressure",
12621 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_blood_pressure_vals), 0x003F,
12622 NULL, HFILL}
12624 {&hf_btatt_appearance_subcategory_hid,
12625 {"Subcategory", "btatt.appearance.subcategory.hid",
12626 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_hid_vals), 0x003F,
12627 NULL, HFILL}
12629 {&hf_btatt_appearance_subcategory_running_walking_sensor,
12630 {"Subcategory", "btatt.appearance.subcategory.running_walking_sensor",
12631 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_running_walking_sensor_vals), 0x003F,
12632 NULL, HFILL}
12634 {&hf_btatt_appearance_subcategory_cycling,
12635 {"Subcategory", "btatt.appearance.subcategory.cycling",
12636 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_cycling_vals), 0x003F,
12637 NULL, HFILL}
12639 {&hf_btatt_appearance_subcategory_pulse_oximeter,
12640 {"Subcategory", "btatt.appearance.subcategory.pulse_oximeter",
12641 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_pulse_oximeter_vals), 0x003F,
12642 NULL, HFILL}
12644 {&hf_btatt_appearance_subcategory_personal_mobility_device,
12645 {"Personal Mobility Device", "btatt.appearance.subcategory.personal_mobility_device",
12646 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_personal_mobility_device_vals), 0x003F,
12647 NULL, HFILL}
12649 {&hf_btatt_appearance_subcategory_insulin_pump,
12650 {"Insulin Pump", "btatt.appearance.subcategory.insulin_pump",
12651 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_insulin_pump_vals), 0x003F,
12652 NULL, HFILL}
12654 {&hf_btatt_appearance_subcategory_outdoor_sports_activity,
12655 {"Subcategory", "btatt.appearance.subcategory.outdoor_sports_activity",
12656 FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_outdoor_sports_activity_vals), 0x003F,
12657 NULL, HFILL}
12659 {&hf_btatt_peripheral_privacy_flag,
12660 {"Peripheral Privacy", "btatt.peripheral_privacy_flag",
12661 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
12662 NULL, HFILL}
12664 { &hf_btatt_reconnection_address,
12665 { "Reconnection Address", "btatt.reconnection_address",
12666 FT_ETHER, BASE_NONE, NULL, 0x0,
12667 NULL, HFILL }
12669 {&hf_btatt_minimum_connection_interval,
12670 {"Minimum Connection Interval", "btatt.minimum_connection_interval",
12671 FT_UINT16, BASE_DEC, NULL, 0x0,
12672 NULL, HFILL}
12674 {&hf_btatt_maximum_connection_interval,
12675 {"Maximum Connection Interval", "btatt.maximum_connection_interval",
12676 FT_UINT16, BASE_DEC, NULL, 0x0,
12677 NULL, HFILL}
12679 {&hf_btatt_peripheral_latency,
12680 {"Peripheral Latency", "btatt.peripheral_latency",
12681 FT_UINT16, BASE_DEC, NULL, 0x0,
12682 NULL, HFILL}
12684 {&hf_btatt_connection_supervision_timeout_multiplier,
12685 {"Connection Supervision Timeout Multiplier", "btatt.connection_supervision_timeout_multiplier",
12686 FT_UINT16, BASE_DEC, NULL, 0x0,
12687 NULL, HFILL}
12689 {&hf_btatt_alert_level,
12690 {"Alert Level", "btatt.alert_level",
12691 FT_UINT8, BASE_HEX, VALS(alert_level_vals), 0x0,
12692 NULL, HFILL}
12694 {&hf_btatt_tx_power_level,
12695 {"Tx Power Level", "btatt.tx_power_level",
12696 FT_INT8, BASE_DEC, NULL, 0x0,
12697 NULL, HFILL}
12699 {&hf_btatt_year,
12700 {"Year", "btatt.year",
12701 FT_UINT16, BASE_DEC, NULL, 0x0,
12702 NULL, HFILL}
12704 {&hf_btatt_month,
12705 {"Month", "btatt.month",
12706 FT_UINT8, BASE_DEC, NULL, 0x0,
12707 NULL, HFILL}
12709 {&hf_btatt_day,
12710 {"Day", "btatt.day",
12711 FT_UINT8, BASE_DEC, NULL, 0x0,
12712 NULL, HFILL}
12714 {&hf_btatt_hours,
12715 {"Hours", "btatt.hours",
12716 FT_UINT8, BASE_DEC, NULL, 0x0,
12717 NULL, HFILL}
12719 {&hf_btatt_minutes,
12720 {"Minutes", "btatt.minutes",
12721 FT_UINT8, BASE_DEC, NULL, 0x0,
12722 NULL, HFILL}
12724 {&hf_btatt_seconds,
12725 {"Seconds", "btatt.seconds",
12726 FT_UINT8, BASE_DEC, NULL, 0x0,
12727 NULL, HFILL}
12729 {&hf_btatt_day_of_week,
12730 {"Day of Week", "btatt.day_of_week",
12731 FT_UINT8, BASE_DEC, NULL, 0x0,
12732 NULL, HFILL}
12734 {&hf_btatt_fractions100,
12735 {"Fractions100", "btatt.fractions100",
12736 FT_UINT8, BASE_DEC, NULL, 0x0,
12737 "1/100th of a second", HFILL}
12739 {&hf_btatt_fractions256,
12740 {"Fractions256", "btatt.fractions256",
12741 FT_UINT8, BASE_DEC, NULL, 0x0,
12742 "1/256th of a second", HFILL}
12744 {&hf_btatt_dst_offset,
12745 {"Daylight Saving Time Offset", "btatt.dst_offset",
12746 FT_UINT8, BASE_HEX, VALS(dst_offset_vals), 0x0,
12747 NULL, HFILL}
12749 {&hf_btatt_model_number_string,
12750 {"Model Number String", "btatt.model_number_string",
12751 FT_STRING, BASE_NONE, NULL, 0x0,
12752 NULL, HFILL}
12754 {&hf_btatt_serial_number_string,
12755 {"Serial Number String", "btatt.serial_number_string",
12756 FT_STRING, BASE_NONE, NULL, 0x0,
12757 NULL, HFILL}
12759 {&hf_btatt_firmware_revision_string,
12760 {"Firmware Revision String", "btatt.firmware_revision_string",
12761 FT_STRING, BASE_NONE, NULL, 0x0,
12762 NULL, HFILL}
12764 {&hf_btatt_hardware_revision_string,
12765 {"Hardware Revision String", "btatt.hardware_revision_string",
12766 FT_STRING, BASE_NONE, NULL, 0x0,
12767 NULL, HFILL}
12769 {&hf_btatt_software_revision_string,
12770 {"Software Revision String", "btatt.software_revision_string",
12771 FT_STRING, BASE_NONE, NULL, 0x0,
12772 NULL, HFILL}
12774 {&hf_btatt_manufacturer_string,
12775 {"Manufacturer String", "btatt.manufacturer_string",
12776 FT_STRING, BASE_NONE, NULL, 0x0,
12777 NULL, HFILL}
12779 {&hf_btatt_system_id_manufacturer_identifier,
12780 {"Manufacturer Identifier", "btatt.system_id.manufacturer_identifier",
12781 FT_UINT40, BASE_HEX, NULL, 0x0,
12782 NULL, HFILL}
12784 {&hf_btatt_system_id_organizationally_unique_identifier,
12785 {"Organizationally Unique Identifier", "btatt.system_id.organizationally_unique_identifier",
12786 FT_UINT24, BASE_OUI, NULL, 0x0,
12787 NULL, HFILL}
12789 {&hf_btatt_timezone,
12790 {"Timezone", "btatt.timezone",
12791 FT_INT8, BASE_DEC, VALS(timezone_vals), 0x0,
12792 NULL, HFILL}
12794 {&hf_btatt_time_accuracy,
12795 {"Time Accuracy", "btatt.time_accuracy",
12796 FT_UINT8, BASE_DEC, NULL, 0x0,
12797 NULL, HFILL}
12799 {&hf_btatt_time_source,
12800 {"Time Source", "btatt.time_source",
12801 FT_UINT8, BASE_DEC, VALS(time_source_vals), 0x0,
12802 NULL, HFILL}
12804 {&hf_btatt_time_days_since_update,
12805 {"Days Since Update", "btatt.days_since_update",
12806 FT_UINT8, BASE_DEC, NULL, 0x0,
12807 NULL, HFILL}
12809 {&hf_btatt_time_hours_since_update,
12810 {"Hours Since Update", "btatt.hours_since_update",
12811 FT_UINT8, BASE_DEC, NULL, 0x0,
12812 NULL, HFILL}
12814 {&hf_btatt_time_update_control_point,
12815 {"Update Control Point", "btatt.update_control_point",
12816 FT_UINT8, BASE_HEX, VALS(time_update_control_point_vals), 0x0,
12817 NULL, HFILL}
12819 {&hf_btatt_time_current_state,
12820 {"Current State", "btatt.time_current_state",
12821 FT_UINT8, BASE_HEX, VALS(time_current_state_vals), 0x0,
12822 NULL, HFILL}
12824 {&hf_btatt_time_result,
12825 {"Result", "btatt.time_result",
12826 FT_UINT8, BASE_HEX, VALS(time_result_vals), 0x0,
12827 NULL, HFILL}
12829 {&hf_btatt_battery_level,
12830 {"Battery Level", "btatt.battery_level",
12831 FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_percent), 0x0,
12832 NULL, HFILL}
12834 {&hf_btatt_battery_power_state,
12835 {"Battery Power State", "btatt.battery_power_state",
12836 FT_UINT8, BASE_HEX, NULL, 0x0,
12837 NULL, HFILL}
12839 {&hf_btatt_battery_power_state_level,
12840 {"Level", "btatt.battery_power_state.level",
12841 FT_UINT8, BASE_HEX, VALS(battery_power_state_level_vals), 0xC0,
12842 NULL, HFILL}
12844 {&hf_btatt_battery_power_state_charging,
12845 {"Charging", "btatt.battery_power_state.charging",
12846 FT_UINT8, BASE_HEX, VALS(battery_power_state_charging_vals), 0x30,
12847 NULL, HFILL}
12849 {&hf_btatt_battery_power_state_discharging,
12850 {"Discharging", "btatt.battery_power_state.discharging",
12851 FT_UINT8, BASE_HEX, VALS(battery_power_state_discharging_vals), 0x0C,
12852 NULL, HFILL}
12854 {&hf_btatt_battery_power_state_present,
12855 {"Present", "btatt.battery_power_state.present",
12856 FT_UINT8, BASE_HEX, VALS(battery_power_state_present_vals), 0x03,
12857 NULL, HFILL}
12859 {&hf_btatt_temperature_type,
12860 {"Temperature Type", "btatt.temperature_type",
12861 FT_UINT8, BASE_HEX, VALS(temperature_type_vals), 0x0,
12862 NULL, HFILL}
12864 {&hf_btatt_measurement_interval,
12865 {"Measurement Interval", "btatt.measurement_interval",
12866 FT_UINT16, BASE_DEC, NULL, 0x0,
12867 NULL, HFILL}
12869 {&hf_btatt_time_adjust_reason,
12870 {"Adjust Reason", "btatt.adjust_reason",
12871 FT_UINT8, BASE_HEX, NULL, 0x0,
12872 NULL, HFILL}
12874 {&hf_btatt_time_adjust_reason_reserved,
12875 {"Reserved", "btatt.adjust_reason.reserved",
12876 FT_UINT8, BASE_HEX, NULL, 0xF0,
12877 NULL, HFILL}
12879 {&hf_btatt_time_adjust_reason_change_of_dst,
12880 {"Change of DST", "btatt.adjust_reason.change_of_dst",
12881 FT_BOOLEAN, 8, NULL, 0x08,
12882 NULL, HFILL}
12884 {&hf_btatt_time_adjust_reason_change_of_timezone,
12885 {"Change of Timezone", "btatt.adjust_reason.change_of_timezone",
12886 FT_BOOLEAN, 8, NULL, 0x04,
12887 NULL, HFILL}
12889 {&hf_btatt_time_adjust_reason_external_reference_time_update,
12890 {"External Reference Time Update", "btatt.adjust_reason.external_reference_time_update",
12891 FT_BOOLEAN, 8, NULL, 0x02,
12892 NULL, HFILL}
12894 {&hf_btatt_time_adjust_reason_manual_time_update,
12895 {"Manual Time Update", "btatt.adjust_reason.manual_time_update",
12896 FT_BOOLEAN, 8, NULL, 0x01,
12897 NULL, HFILL}
12899 {&hf_btatt_magnetic_declination,
12900 {"Magnetic Declination", "btatt.magnetic_declination",
12901 FT_UINT16, BASE_HEX, NULL, 0x0,
12902 NULL, HFILL}
12904 {&hf_btatt_scan_refresh,
12905 {"Scan Refresh", "btatt.scan_refresh",
12906 FT_UINT8, BASE_HEX, VALS(scan_refresh_vals), 0x0,
12907 NULL, HFILL}
12909 {&hf_btatt_body_sensor_location,
12910 {"Body Sensor Location", "btatt.body_sensor_location",
12911 FT_UINT8, BASE_HEX, VALS(body_sensor_location_vals), 0x0,
12912 NULL, HFILL}
12914 {&hf_btatt_heart_rate_control_point,
12915 {"Heart Rate Control Point", "btatt.heart_rate_control_point",
12916 FT_UINT8, BASE_HEX, VALS(heart_rate_control_point_vals), 0x0,
12917 NULL, HFILL}
12919 {&hf_btatt_alert_status,
12920 {"Alert Status", "btatt.alert.status",
12921 FT_UINT8, BASE_HEX, NULL, 0x0,
12922 NULL, HFILL}
12924 {&hf_btatt_alert_status_reserved,
12925 {"Reserved", "btatt.alert.status.reserved",
12926 FT_UINT8, BASE_HEX, NULL, 0xF8,
12927 NULL, HFILL}
12929 {&hf_btatt_alert_status_display_alert_status,
12930 {"Display Alert Status", "btatt.alert.status.display_alert_status",
12931 FT_BOOLEAN, 8, NULL, 0x04,
12932 NULL, HFILL}
12934 {&hf_btatt_alert_status_vibrate_state,
12935 {"Vibrate State", "btatt.alert.status.vibrate_state",
12936 FT_BOOLEAN, 8, NULL, 0x02,
12937 NULL, HFILL}
12939 {&hf_btatt_alert_status_ringer_state,
12940 {"Ringer State", "btatt.alert_status.ringer_state",
12941 FT_BOOLEAN, 8, NULL, 0x01,
12942 NULL, HFILL}
12944 {&hf_btatt_ringer_control_point,
12945 {"Ringer Control Point", "btatt.ringer_control_point",
12946 FT_UINT8, BASE_HEX, VALS(ringer_control_point_vals), 0x0,
12947 NULL, HFILL}
12949 {&hf_btatt_ringer_setting,
12950 {"Ringer Setting", "btatt.ringer_setting",
12951 FT_UINT8, BASE_HEX, VALS(ringer_setting_vals), 0x0,
12952 NULL, HFILL}
12954 {&hf_btatt_alert_category_id_bitmask_1,
12955 {"Alert Category ID Bitmask 1", "btatt.alert.category_id_bitmask_1",
12956 FT_UINT8, BASE_HEX, NULL, 0x0,
12957 NULL, HFILL}
12959 {&hf_btatt_alert_category_id_bitmask_1_schedule,
12960 {"Schedule", "btatt.alert.category_id_bitmask_1.schedule",
12961 FT_UINT8, BASE_HEX, NULL, 0x80,
12962 NULL, HFILL}
12964 {&hf_btatt_alert_category_id_bitmask_1_voice_mail,
12965 {"Voice Mail", "btatt.alert.category_id_bitmask_1.voice_mail",
12966 FT_UINT8, BASE_HEX, NULL, 0x40,
12967 NULL, HFILL}
12969 {&hf_btatt_alert_category_id_bitmask_1_sms_mms,
12970 {"SMS/MMS", "btatt.alert.category_id_bitmask_1.sms_mms",
12971 FT_UINT8, BASE_HEX, NULL, 0x20,
12972 NULL, HFILL}
12974 {&hf_btatt_alert_category_id_bitmask_1_missed_call,
12975 {"Missed Call", "btatt.alert.category_id_bitmask_1.missed_call",
12976 FT_UINT8, BASE_HEX, NULL, 0x10,
12977 NULL, HFILL}
12979 {&hf_btatt_alert_category_id_bitmask_1_call,
12980 {"Call", "btatt.alert.category_id_bitmask_1.call",
12981 FT_UINT8, BASE_HEX, NULL, 0x08,
12982 NULL, HFILL}
12984 {&hf_btatt_alert_category_id_bitmask_1_news,
12985 {"News", "btatt.alert.category_id_bitmask_1.news",
12986 FT_UINT8, BASE_HEX, NULL, 0x04,
12987 NULL, HFILL}
12989 {&hf_btatt_alert_category_id_bitmask_1_email,
12990 {"Email", "btatt.alert.category_id_bitmask_1.email",
12991 FT_UINT8, BASE_HEX, NULL, 0x02,
12992 NULL, HFILL}
12994 {&hf_btatt_alert_category_id_bitmask_1_simple_alert,
12995 {"Simple Alert", "btatt.alert.category_id_bitmask_1.simple_alert",
12996 FT_UINT8, BASE_HEX, NULL, 0x01,
12997 NULL, HFILL}
12999 {&hf_btatt_alert_category_id_bitmask_2,
13000 {"Alert Category ID Bitmask 2", "btatt.alert.category_id_bitmask_2",
13001 FT_UINT8, BASE_HEX, NULL, 0x0,
13002 NULL, HFILL}
13004 {&hf_btatt_alert_category_id_bitmask_2_reserved,
13005 {"Reserved", "btatt.alert.category_id_bitmask_2.reserved",
13006 FT_UINT8, BASE_HEX, NULL, 0xFC,
13007 NULL, HFILL}
13009 {&hf_btatt_alert_category_id_bitmask_2_instant_message,
13010 {"Instant Message", "btatt.alert.category_id_bitmask_2.instant_message",
13011 FT_UINT8, BASE_HEX, NULL, 0x02,
13012 NULL, HFILL}
13014 {&hf_btatt_alert_category_id_bitmask_2_high_prioritized_alert,
13015 {"High Prioritized Alert", "btatt.alert.category_id_bitmask_2.high_prioritized_alert",
13016 FT_UINT8, BASE_HEX, NULL, 0x01,
13017 NULL, HFILL}
13019 {&hf_btatt_alert_category_id,
13020 {"Alert Category ID", "btatt.alert.category_id",
13021 FT_UINT8, BASE_HEX, VALS(alert_category_id_vals), 0x0,
13022 NULL, HFILL}
13024 {&hf_btatt_alert_command_id,
13025 {"Alert Command ID", "btatt.alert.command_id",
13026 FT_UINT8, BASE_HEX, VALS(alert_command_id_vals), 0x0,
13027 NULL, HFILL}
13029 {&hf_btatt_alert_unread_count,
13030 {"Unread Count", "btatt.alert.unread_count",
13031 FT_UINT8, BASE_DEC, NULL, 0x0,
13032 NULL, HFILL}
13034 {&hf_btatt_alert_number_of_new_alert,
13035 {"Number of New Alert", "btatt.alert.number_of_new_alert",
13036 FT_UINT8, BASE_DEC, NULL, 0x0,
13037 NULL, HFILL}
13039 {&hf_btatt_alert_text_string_information,
13040 {"Text String Information", "btatt.text_string_information",
13041 FT_STRING, BASE_NONE, NULL, 0x0,
13042 NULL, HFILL}
13044 {&hf_btatt_blood_pressure_feature,
13045 {"Blood Pressure Feature", "btatt.blood_pressure.feature",
13046 FT_UINT16, BASE_HEX, NULL, 0x0,
13047 NULL, HFILL}
13049 {&hf_btatt_blood_pressure_feature_reserved,
13050 {"Reserved", "btatt.blood_pressure.feature.reserved",
13051 FT_UINT16, BASE_HEX, NULL, 0xFFC0,
13052 NULL, HFILL}
13054 {&hf_btatt_blood_pressure_feature_multiple_bond,
13055 {"Multiple Bond", "btatt.blood_pressure.feature.multiple_bond",
13056 FT_BOOLEAN, 16, NULL, 0x0020,
13057 NULL, HFILL}
13059 {&hf_btatt_blood_pressure_feature_measurement_position_detection,
13060 {"Measurement Position Detection", "btatt.blood_pressure.feature.measurement_position_detection",
13061 FT_BOOLEAN, 16, NULL, 0x0010,
13062 NULL, HFILL}
13064 {&hf_btatt_blood_pressure_feature_puls_rate_range,
13065 {"Puls Rate Range", "btatt.blood_pressure.feature.puls_rate_range",
13066 FT_BOOLEAN, 16, NULL, 0x0008,
13067 NULL, HFILL}
13069 {&hf_btatt_blood_pressure_feature_irregular_pulse_detection,
13070 {"Irregular Pulse Detection", "btatt.blood_pressure.feature.irregular_pulse_detection",
13071 FT_BOOLEAN, 16, NULL, 0x0004,
13072 NULL, HFILL}
13074 {&hf_btatt_blood_pressure_feature_cuff_fit_detection,
13075 {"Cuff Fit Detection", "btatt.blood_pressure.feature.cuff_fit_detection",
13076 FT_BOOLEAN, 16, NULL, 0x0002,
13077 NULL, HFILL}
13079 {&hf_btatt_blood_pressure_feature_body_movement_detection,
13080 {"Body Movement Detection", "btatt.blood_pressure.feature.body_movement_detection",
13081 FT_BOOLEAN, 16, NULL, 0x0001,
13082 NULL, HFILL}
13084 {&hf_btatt_hogp_hid_control_point_command,
13085 {"HID Control Point Command", "btatt.hogp.hid_control_point_command",
13086 FT_UINT8, BASE_HEX, VALS(hid_control_point_command_vals), 0x0,
13087 NULL, HFILL}
13089 {&hf_btatt_le_scan_interval,
13090 {"LE Scan Interval", "btatt.le_scan_interval",
13091 FT_UINT16, BASE_HEX, NULL, 0x0,
13092 NULL, HFILL}
13094 {&hf_btatt_le_scan_window,
13095 {"LE Scan Window", "btatt.le_scan_window",
13096 FT_UINT16, BASE_HEX, NULL, 0x0,
13097 NULL, HFILL}
13099 { &hf_btatt_pnp_id_vendor_id_source,
13100 { "Vendor ID Source", "btatt.pnp_id.vendor_id_source",
13101 FT_UINT16, BASE_HEX, VALS(pnp_id_vendor_id_source_vals), 0,
13102 NULL, HFILL }
13104 { &hf_btatt_pnp_id_vendor_id,
13105 { "Vendor ID", "btatt.pnp_id.vendor_id",
13106 FT_UINT16, BASE_HEX, NULL, 0,
13107 NULL, HFILL }
13109 { &hf_btatt_pnp_id_vendor_id_bluetooth_sig,
13110 { "Vendor ID", "btatt.pnp_id.vendor_id",
13111 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_company_id_vals_ext, 0,
13112 NULL, HFILL }
13114 { &hf_btatt_pnp_id_vendor_id_usb_forum,
13115 { "Vendor ID", "btatt.pnp_id.vendor_id",
13116 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &ext_usb_vendors_vals, 0,
13117 NULL, HFILL }
13119 { &hf_btatt_pnp_id_product_id,
13120 { "Product ID", "btatt.pnp_id.product_id",
13121 FT_UINT16, BASE_HEX, NULL, 0,
13122 NULL, HFILL }
13124 { &hf_btatt_pnp_id_product_version,
13125 { "Version", "btatt.pnp_id.product_version",
13126 FT_UINT16, BASE_HEX, NULL, 0,
13127 NULL, HFILL }
13129 {&hf_btatt_glucose_feature,
13130 {"Glucose Feature", "btatt.glucose.feature",
13131 FT_UINT16, BASE_HEX, NULL, 0x0,
13132 NULL, HFILL}
13134 {&hf_btatt_glucose_feature_reserved,
13135 {"Reserved", "btatt.glucose.feature.reserved",
13136 FT_BOOLEAN, 16, NULL, 0xF800,
13137 NULL, HFILL}
13139 {&hf_btatt_glucose_feature_multiple_bond,
13140 {"Multiple Bond", "btatt.glucose.feature.multiple_bond",
13141 FT_BOOLEAN, 16, NULL, 0x0400,
13142 NULL, HFILL}
13144 {&hf_btatt_glucose_feature_time_fault,
13145 {"Time Fault", "btatt.glucose.feature.time_fault",
13146 FT_BOOLEAN, 16, NULL, 0x0200,
13147 NULL, HFILL}
13149 {&hf_btatt_glucose_feature_general_device_fault,
13150 {"General Device Fault", "btatt.glucose.feature.general_device_fault",
13151 FT_BOOLEAN, 16, NULL, 0x0100,
13152 NULL, HFILL}
13154 {&hf_btatt_glucose_feature_sensor_read_interrupt_detection,
13155 {"Sensor Read Interrupt Detection", "btatt.glucose.feature.sensor_read_interrupt_detection",
13156 FT_BOOLEAN, 16, NULL, 0x0080,
13157 NULL, HFILL}
13159 {&hf_btatt_glucose_feature_sensor_temperature_high_low_detection,
13160 {"Sensor Temperature High-Low Detection", "btatt.glucose.feature.sensor_temperature_high_low_detection",
13161 FT_BOOLEAN, 16, NULL, 0x0040,
13162 NULL, HFILL}
13164 {&hf_btatt_glucose_feature_sensor_result_high_low_detection,
13165 {"Sensor Result High-Low Detection", "btatt.glucose.feature.sensor_result_high_low_detection",
13166 FT_BOOLEAN, 16, NULL, 0x0020,
13167 NULL, HFILL}
13169 {&hf_btatt_glucose_feature_sensor_strip_type_error_detection,
13170 {"Sensor Strip Type Error Detection", "btatt.glucose.feature.sensor_strip_type_error_detection",
13171 FT_BOOLEAN, 16, NULL, 0x0010,
13172 NULL, HFILL}
13174 {&hf_btatt_glucose_feature_sensor_strip_insertion_error_detection,
13175 {"Sensor Strip Insertion Error Detection", "btatt.glucose.feature.sensor_strip_insertion_error_detection",
13176 FT_BOOLEAN, 16, NULL, 0x0008,
13177 NULL, HFILL}
13179 {&hf_btatt_glucose_feature_sensor_sample_size,
13180 {"Sensor Sample Size", "btatt.glucose.feature.sensor_sample_size",
13181 FT_BOOLEAN, 16, NULL, 0x0004,
13182 NULL, HFILL}
13184 {&hf_btatt_glucose_feature_sensor_malfunction_detection,
13185 {"Sensor Malfunction Detection", "btatt.glucose.feature.sensor_malfunction_detection",
13186 FT_BOOLEAN, 16, NULL, 0x0002,
13187 NULL, HFILL}
13189 {&hf_btatt_glucose_feature_low_battery_detection_during_measurement,
13190 {"Low Battery Detection During Measurement", "btatt.glucose.feature.low_battery_detection_during_measurement",
13191 FT_BOOLEAN, 16, NULL, 0x0001,
13192 NULL, HFILL}
13194 {&hf_btatt_rsc_feature,
13195 {"RSC Feature", "btatt.rsc.feature",
13196 FT_UINT16, BASE_HEX, NULL, 0x0,
13197 NULL, HFILL}
13199 {&hf_btatt_rsc_feature_reserved,
13200 {"Reserved", "btatt.rsc.feature.reserved",
13201 FT_BOOLEAN, 16, NULL, 0xFF80,
13202 NULL, HFILL}
13204 {&hf_btatt_rsc_feature_multiple_sensor_locations,
13205 {"Multiple Sensor Locations", "btatt.rsc.feature.multiple_sensor_locations",
13206 FT_BOOLEAN, 16, NULL, 0x0010,
13207 NULL, HFILL}
13209 {&hf_btatt_rsc_feature_calibration_procedure,
13210 {"Calibration Procedure", "btatt.rsc.feature.calibration_procedure",
13211 FT_BOOLEAN, 16, NULL, 0x0008,
13212 NULL, HFILL}
13214 {&hf_btatt_rsc_feature_walking_or_running_status,
13215 {"Walking_or Running Status", "btatt.rsc.feature.walking_or_running_status",
13216 FT_BOOLEAN, 16, NULL, 0x0004,
13217 NULL, HFILL}
13219 {&hf_btatt_rsc_feature_total_distance_measurement,
13220 {"Total Distance Measurement", "btatt.rsc.feature.total_distance_measurement",
13221 FT_BOOLEAN, 16, NULL, 0x0002,
13222 NULL, HFILL}
13224 {&hf_btatt_rsc_feature_instantaneous_stride_length_measurement,
13225 {"Instantaneous Stride Length Measurement", "btatt.rsc.feature.instantaneous_stride_length_measurement",
13226 FT_BOOLEAN, 16, NULL, 0x0001,
13227 NULL, HFILL}
13229 {&hf_btatt_csc_feature,
13230 {"CSC Feature", "btatt.csc.feature",
13231 FT_UINT16, BASE_HEX, NULL, 0x0,
13232 NULL, HFILL}
13234 {&hf_btatt_csc_feature_reserved,
13235 {"Reserved", "btatt.csc.feature.reserved",
13236 FT_BOOLEAN, 16, NULL, 0xFFF8,
13237 NULL, HFILL}
13239 {&hf_btatt_csc_feature_multiple_sensor_locations,
13240 {"Multiple Sensor Locations", "btatt.csc.feature.multiple_sensor_locations",
13241 FT_BOOLEAN, 16, NULL, 0x0004,
13242 NULL, HFILL}
13244 {&hf_btatt_csc_feature_crank_revolution_data,
13245 {"Crank Revolution Data", "btatt.csc.feature.crank_revolution_data",
13246 FT_BOOLEAN, 16, NULL, 0x0002,
13247 NULL, HFILL}
13249 {&hf_btatt_csc_feature_wheel_revolution_data,
13250 {"Wheel Revolution Data", "btatt.csc.feature.wheel_revolution_data",
13251 FT_BOOLEAN, 16, NULL, 0x0001,
13252 NULL, HFILL}
13254 {&hf_btatt_sensor_location,
13255 {"Sensor Location", "btatt.sensor_location",
13256 FT_UINT8, BASE_HEX, VALS(sensor_location_vals), 0x0,
13257 NULL, HFILL}
13259 {&hf_btatt_elevation,
13260 {"Elevation", "btatt.elevation",
13261 FT_INT24, BASE_DEC, NULL, 0x0,
13262 NULL, HFILL}
13264 {&hf_btatt_pressure,
13265 {"Pressure", "btatt.pressure",
13266 FT_UINT32, BASE_HEX, NULL, 0x0,
13267 NULL, HFILL}
13269 {&hf_btatt_temperature,
13270 {"Temperature", "btatt.temperature",
13271 FT_INT16, BASE_DEC, NULL, 0x0,
13272 NULL, HFILL}
13274 {&hf_btatt_humidity,
13275 {"Humidity", "btatt.humidity",
13276 FT_UINT16, BASE_HEX, NULL, 0x0,
13277 NULL, HFILL}
13279 {&hf_btatt_true_wind_speed,
13280 {"True Wind Speed", "btatt.true_wind_speed",
13281 FT_UINT16, BASE_HEX, NULL, 0x0,
13282 NULL, HFILL}
13284 {&hf_btatt_true_wind_direction,
13285 {"True Wind Direction", "btatt.true_wind_direction",
13286 FT_UINT16, BASE_DEC, NULL, 0x0,
13287 NULL, HFILL}
13289 {&hf_btatt_apparent_wind_speed,
13290 {"Apparent Wind Speed", "btatt.apparent_wind_speed",
13291 FT_UINT16, BASE_HEX, NULL, 0x0,
13292 NULL, HFILL}
13294 {&hf_btatt_apparent_wind_direction,
13295 {"Apparent Wind Direction", "btatt.apparent_wind_direction",
13296 FT_UINT16, BASE_DEC, NULL, 0x0,
13297 NULL, HFILL}
13299 {&hf_btatt_gust_factor,
13300 {"Gust Factor", "btatt.gust_factor",
13301 FT_UINT8, BASE_HEX, NULL, 0x0,
13302 NULL, HFILL}
13304 {&hf_btatt_pollen_concentration,
13305 {"Pollen Concentration", "btatt.pollen_concentration",
13306 FT_INT24, BASE_DEC, NULL, 0x0,
13307 NULL, HFILL}
13309 {&hf_btatt_uv_index,
13310 {"UV Index", "btatt.uv_index",
13311 FT_UINT8, BASE_DEC, NULL, 0x0,
13312 NULL, HFILL}
13314 {&hf_btatt_irradiance,
13315 {"Irradiance", "btatt.irradiance",
13316 FT_UINT16, BASE_HEX, NULL, 0x0,
13317 NULL, HFILL}
13319 {&hf_btatt_rainfall,
13320 {"Rainfall", "btatt.rainfall",
13321 FT_UINT16, BASE_HEX, NULL, 0x0,
13322 NULL, HFILL}
13324 {&hf_btatt_wind_chill,
13325 {"Wind Chill", "btatt.wind_chill",
13326 FT_INT8, BASE_DEC, NULL, 0x0,
13327 NULL, HFILL}
13329 {&hf_btatt_heart_index,
13330 {"Heart Index", "btatt.heart_index",
13331 FT_INT8, BASE_DEC, NULL, 0x0,
13332 NULL, HFILL}
13334 {&hf_btatt_dew_point,
13335 {"Dew Point", "btatt.dew_point",
13336 FT_INT8, BASE_DEC, NULL, 0x0,
13337 NULL, HFILL}
13339 {&hf_btatt_descriptor_value_changed_flags,
13340 {"Flags", "btatt.descriptor_value_changed.flags",
13341 FT_UINT16, BASE_HEX, NULL, 0x0,
13342 NULL, HFILL}
13344 {&hf_btatt_descriptor_value_changed_flags_reserved,
13345 {"Reserved", "btatt.descriptor_value_changed.flags.reserved",
13346 FT_BOOLEAN, 16, NULL, 0xF800,
13347 NULL, HFILL}
13349 {&hf_btatt_descriptor_value_changed_flags_change_to_characteristic_user_description_descriptor,
13350 {"Change to Characteristic User Description Descriptor", "btatt.descriptor_value_changed.flags.change_to_characteristic_user_description_descriptor",
13351 FT_BOOLEAN, 16, NULL, 0x0010,
13352 NULL, HFILL}
13354 {&hf_btatt_descriptor_value_changed_flags_change_to_es_measurement_descriptor,
13355 {"Change to ES Measurement Descriptor", "btatt.descriptor_value_changed.flags.change_to_es_measurement_descriptor",
13356 FT_BOOLEAN, 16, NULL, 0x0008,
13357 NULL, HFILL}
13359 {&hf_btatt_descriptor_value_changed_flags_change_to_es_configuration_descriptor,
13360 {"Change to ES Configuration Descriptor", "btatt.descriptor_value_changed.flags.change_to_es_configuration_descriptor",
13361 FT_BOOLEAN, 16, NULL, 0x0004,
13362 NULL, HFILL}
13364 {&hf_btatt_descriptor_value_changed_flags_change_to_one_or_more_es_trigger_setting_descriptors,
13365 {"Change to One or More ES Trigger Setting Descriptors", "btatt.descriptor_value_changed.flags.change_to_one_or_more_es_trigger_setting_descriptors",
13366 FT_BOOLEAN, 16, NULL, 0x0002,
13367 NULL, HFILL}
13369 {&hf_btatt_descriptor_value_changed_flags_source_of_change,
13370 {"Source of Change", "btatt.descriptor_value_changed.flags.source_of_change",
13371 FT_BOOLEAN, 16, NULL, 0x0001,
13372 NULL, HFILL}
13374 {&hf_btatt_aerobic_heart_rate_lower_limit,
13375 {"Aerobic Heart Rate Lower Limit", "btatt.aerobic_heart_rate_lower_limit",
13376 FT_UINT8, BASE_DEC, NULL, 0x0,
13377 NULL, HFILL}
13379 {&hf_btatt_aerobic_threshold,
13380 {"Aerobic Threshold", "btatt.aerobic_threshold",
13381 FT_UINT8, BASE_DEC, NULL, 0x0,
13382 NULL, HFILL}
13384 {&hf_btatt_age,
13385 {"Age", "btatt.age",
13386 FT_UINT8, BASE_DEC, NULL, 0x0,
13387 NULL, HFILL}
13389 {&hf_btatt_anaerobic_heart_rate_lower_limit,
13390 {"Anaerobic Heart Rate Lower Limit", "btatt.anaerobic_heart_rate_lower_limit",
13391 FT_UINT8, BASE_DEC, NULL, 0x0,
13392 NULL, HFILL}
13394 {&hf_btatt_anaerobic_heart_rate_upper_limit,
13395 {"Anaerobic Heart Rate Upper Limit", "btatt.anaerobic_heart_rate_upper_limit",
13396 FT_UINT8, BASE_DEC, NULL, 0x0,
13397 NULL, HFILL}
13399 {&hf_btatt_anaerobic_threshold,
13400 {"Anaerobic Threshold", "btatt.anaerobic_threshold",
13401 FT_UINT8, BASE_DEC, NULL, 0x0,
13402 NULL, HFILL}
13404 {&hf_btatt_aerobic_heart_rate_upper_limit,
13405 {"Aerobic Heart Rate Upper Limit", "btatt.aerobic_heart_rate_upper_limit",
13406 FT_UINT8, BASE_DEC, NULL, 0x0,
13407 NULL, HFILL}
13409 {&hf_btatt_email_address,
13410 {"Email Address", "btatt.email_address",
13411 FT_STRING, BASE_NONE, NULL, 0x0,
13412 NULL, HFILL}
13414 {&hf_btatt_fat_burn_heart_rate_lower_limit,
13415 {"Fat Burn Heart Rate Lower Limit", "btatt.fat_burn_heart_rate_lower_limit",
13416 FT_UINT8, BASE_DEC, NULL, 0x0,
13417 NULL, HFILL}
13419 {&hf_btatt_fat_burn_heart_rate_upper_limit,
13420 {"Fat Burn Heart Rate Upper Limit", "btatt.fat_burn_heart_rate_upper_limit",
13421 FT_UINT8, BASE_DEC, NULL, 0x0,
13422 NULL, HFILL}
13424 {&hf_btatt_first_name,
13425 {"First Name", "btatt.first_name",
13426 FT_STRING, BASE_NONE, NULL, 0x0,
13427 NULL, HFILL}
13429 {&hf_btatt_five_zone_heart_rate_limits_very_light_light_limit,
13430 {"Very Light/Light Limit", "btatt.five_zone_heart_rate_limits.very_light_light_limit",
13431 FT_UINT8, BASE_DEC, NULL, 0x0,
13432 NULL, HFILL}
13434 {&hf_btatt_five_zone_heart_rate_limits_light_moderate_limit,
13435 {"Light/Moderate Limit,", "btatt.five_zone_heart_rate_limits.light_moderate_limit",
13436 FT_UINT8, BASE_DEC, NULL, 0x0,
13437 NULL, HFILL}
13439 {&hf_btatt_five_zone_heart_rate_limits_moderate_hard_limit,
13440 {"Moderate/Hard Limit", "btatt.five_zone_heart_rate_limits.moderate_hard_limit",
13441 FT_UINT8, BASE_DEC, NULL, 0x0,
13442 NULL, HFILL}
13444 {&hf_btatt_five_zone_heart_rate_limits_hard_maximum_limit,
13445 {"Hard/Maximum Limit", "btatt.five_zone_heart_rate_limits.hard_maximum_limit",
13446 FT_UINT8, BASE_DEC, NULL, 0x0,
13447 NULL, HFILL}
13449 {&hf_btatt_gender,
13450 {"Gender", "btatt.gender",
13451 FT_UINT8, BASE_HEX, VALS(gender_vals), 0x0,
13452 NULL, HFILL}
13454 {&hf_btatt_heart_rate_max,
13455 {"Heart Rate Max", "btatt.heart_rate_max",
13456 FT_UINT8, BASE_DEC, NULL, 0x0,
13457 NULL, HFILL}
13459 {&hf_btatt_height,
13460 {"Height", "btatt.height",
13461 FT_UINT16, BASE_DEC, NULL, 0x0,
13462 NULL, HFILL}
13464 {&hf_btatt_hip_circumference,
13465 {"Hip Circumference", "btatt.hip_circumference",
13466 FT_UINT16, BASE_DEC, NULL, 0x0,
13467 NULL, HFILL}
13469 {&hf_btatt_last_name,
13470 {"Last Name", "btatt.last_name",
13471 FT_STRING, BASE_NONE, NULL, 0x0,
13472 NULL, HFILL}
13474 {&hf_btatt_maximum_recommended_heart_rate,
13475 {"Maximum Recommended Heart Rate", "btatt.maximum_recommended_heart_rate",
13476 FT_UINT8, BASE_DEC, NULL, 0x0,
13477 NULL, HFILL}
13479 {&hf_btatt_resting_heart_rate,
13480 {"Resting Heart Rate", "btatt.resting_heart_rate",
13481 FT_UINT8, BASE_DEC, NULL, 0x0,
13482 NULL, HFILL}
13484 {&hf_btatt_sport_type_for_aerobic_and_anaerobic_thresholds,
13485 {"Sport Type for Aerobic and Anaerobic Thresholds", "btatt.sport_type_for_aerobic_and_anaerobic_thresholds",
13486 FT_UINT8, BASE_DEC, VALS(sport_type_for_aerobic_and_anaerobic_thresholds_vals), 0x0,
13487 NULL, HFILL}
13489 {&hf_btatt_three_zone_heart_rate_limits_light_moderate,
13490 {"Three zone Heart Rate Limits - Light (Fat burn) / Moderate (Aerobic) Limit", "btatt.three_zone_heart_rate_limits.light_moderate",
13491 FT_UINT8, BASE_DEC, NULL, 0x0,
13492 NULL, HFILL}
13494 {&hf_btatt_three_zone_heart_rate_limits_moderate_hard,
13495 {"Three zone Heart Rate Limits - Moderate (Aerobic) / Hard (Anaerobic) Limit", "btatt.three_zone_heart_rate_limits.moderate_hard",
13496 FT_UINT8, BASE_DEC, NULL, 0x0,
13497 NULL, HFILL}
13499 {&hf_btatt_two_zone_heart_rate_limit_fat_burn_fitness,
13500 {"Two zone Heart Rate Limit - Fat burn / Fitness Limit", "btatt.two_zone_heart_rate_limit.fat_burn_fitness",
13501 FT_UINT8, BASE_DEC, NULL, 0x0,
13502 NULL, HFILL}
13504 {&hf_btatt_vo2_max,
13505 {"VO2 Max", "btatt.vo2_max",
13506 FT_UINT8, BASE_DEC, NULL, 0x0,
13507 NULL, HFILL}
13509 {&hf_btatt_waist_circumference,
13510 {"Waist Circumference", "btatt.waist_circumference",
13511 FT_UINT16, BASE_DEC, NULL, 0x0,
13512 NULL, HFILL}
13514 {&hf_btatt_weight,
13515 {"Weight", "btatt.weight",
13516 FT_UINT16, BASE_DEC, NULL, 0x0,
13517 NULL, HFILL}
13519 {&hf_btatt_database_change_increment,
13520 {"Database Change Increment", "btatt.database_change_increment",
13521 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
13522 NULL, HFILL}
13524 {&hf_btatt_user_index,
13525 {"User Index", "btatt.user_index",
13526 FT_UINT8, BASE_DEC, NULL, 0x0,
13527 NULL, HFILL}
13529 {&hf_btatt_magnetic_flux_density_x,
13530 {"X", "btatt.hf_btatt_magnetic_flux_density.x",
13531 FT_INT16, BASE_DEC, NULL, 0x0,
13532 NULL, HFILL}
13534 {&hf_btatt_magnetic_flux_density_y,
13535 {"Y", "btatt.hf_btatt_magnetic_flux_density.y",
13536 FT_INT16, BASE_DEC, NULL, 0x0,
13537 NULL, HFILL}
13539 {&hf_btatt_magnetic_flux_density_z,
13540 {"Z", "btatt.hf_btatt_magnetic_flux_density.z",
13541 FT_INT16, BASE_DEC, NULL, 0x0,
13542 NULL, HFILL}
13544 {&hf_btatt_language,
13545 {"Language", "btatt.language",
13546 FT_STRING, BASE_NONE, NULL, 0x0,
13547 NULL, HFILL}
13549 {&hf_btatt_barometric_pressure_trend,
13550 {"Barometric Pressure Trend", "btatt.barometric_pressure_trend",
13551 FT_UINT8, BASE_DEC, VALS(barometric_pressure_trend_vals), 0x0,
13552 NULL, HFILL}
13554 {&hf_btatt_central_address_resolution,
13555 {"Central Address Resolution", "btatt.central_address_resolution",
13556 FT_UINT8, BASE_DEC, VALS(central_address_resolution_vals), 0x0,
13557 NULL, HFILL}
13559 {&hf_btatt_resolvable_private_address,
13560 {"Resolvable Private Address", "btatt.resolvable_private_address",
13561 FT_UINT8, BASE_DEC, VALS(resolvable_private_address_vals), 0x0,
13562 NULL, HFILL}
13564 {&hf_btatt_cycling_power_feature,
13565 {"Cycling Power Feature", "btatt.cycling_power_feature",
13566 FT_UINT32, BASE_HEX, NULL, 0x0,
13567 NULL, HFILL}
13569 {&hf_btatt_cycling_power_feature_reserved,
13570 {"Reserved", "btatt.cycling_power_feature.reserved",
13571 FT_UINT32, BASE_HEX, NULL, 0xFFF80000,
13572 NULL, HFILL}
13574 {&hf_btatt_cycling_power_feature_factory_calibration_date,
13575 {"Factory Calibration Date", "btatt.cycling_power_feature.factory_calibration_date",
13576 FT_BOOLEAN, 32, NULL, 0x00040000,
13577 NULL, HFILL}
13579 {&hf_btatt_cycling_power_feature_instantaneous_measurement_direction,
13580 {"Instantaneous Measurement Direction", "btatt.cycling_power_feature.instantaneous_measurement_direction",
13581 FT_BOOLEAN, 32, NULL, 0x00020000,
13582 NULL, HFILL}
13584 {&hf_btatt_cycling_power_feature_sensor_measurement_context,
13585 {"Sensor Measurement Context", "btatt.cycling_power_feature.sensor_measurement_context",
13586 FT_UINT32, BASE_HEX, VALS(cycling_power_feature_sensor_measurement_context_vals), 0x00010000,
13587 NULL, HFILL}
13589 {&hf_btatt_cycling_power_feature_span_length_adjustment,
13590 {"Span Length Adjustment", "btatt.cycling_power_feature.span_length_adjustment",
13591 FT_BOOLEAN, 32, NULL, 0x00008000,
13592 NULL, HFILL}
13594 {&hf_btatt_cycling_power_feature_chain_weight_adjustment,
13595 {"Chain Weight Adjustment", "btatt.cycling_power_feature.chain_weight_adjustment",
13596 FT_BOOLEAN, 32, NULL, 0x00004000,
13597 NULL, HFILL}
13599 {&hf_btatt_cycling_power_feature_chain_length_adjustment,
13600 {"Chain Length Adjustment", "btatt.cycling_power_feature.chain_length_adjustment",
13601 FT_BOOLEAN, 32, NULL, 0x00002000,
13602 NULL, HFILL}
13604 {&hf_btatt_cycling_power_feature_crank_length_adjustment,
13605 {"Crank Length Adjustment", "btatt.cycling_power_feature.crank_length_adjustment",
13606 FT_BOOLEAN, 32, NULL, 0x00001000,
13607 NULL, HFILL}
13609 {&hf_btatt_cycling_power_feature_multiple_sensor_locations,
13610 {"Multiple Sensor Locations", "btatt.cycling_power_feature.multiple_sensor_locations",
13611 FT_BOOLEAN, 32, NULL, 0x00000800,
13612 NULL, HFILL}
13614 {&hf_btatt_cycling_power_feature_cycling_power_measurement_characteristic_content_masking,
13615 {"Cycling Power Measurement Characteristic Content Masking", "btatt.cycling_power_feature.cycling_power_measurement_characteristic_content_masking",
13616 FT_BOOLEAN, 32, NULL, 0x00000400,
13617 NULL, HFILL}
13619 {&hf_btatt_cycling_power_feature_offset_compensation,
13620 {"Offset Compensation", "btatt.cycling_power_feature.offset_compensation",
13621 FT_BOOLEAN, 32, NULL, 0x00000200,
13622 NULL, HFILL}
13624 {&hf_btatt_cycling_power_feature_offset_compensation_indicator,
13625 {"Offset Compensation Indicator", "btatt.cycling_power_feature.offset_compensation_indicator",
13626 FT_BOOLEAN, 32, NULL, 0x00000100,
13627 NULL, HFILL}
13629 {&hf_btatt_cycling_power_feature_accumulated_energy,
13630 {"Accumulated Energy", "btatt.cycling_power_feature.accumulated_energy",
13631 FT_BOOLEAN, 32, NULL, 0x00000080,
13632 NULL, HFILL}
13634 {&hf_btatt_cycling_power_feature_top_and_bottom_dead_spot_angles,
13635 {"Top and Bottom Dead Spot Angles", "btatt.cycling_power_feature.top_and_bottom_dead_spot_angles",
13636 FT_BOOLEAN, 32, NULL, 0x00000040,
13637 NULL, HFILL}
13639 {&hf_btatt_cycling_power_feature_extreme_angles,
13640 {"Extreme Angles", "btatt.cycling_power_feature.extreme_angles",
13641 FT_BOOLEAN, 32, NULL, 0x00000020,
13642 NULL, HFILL}
13644 {&hf_btatt_cycling_power_feature_extreme_magnitudes,
13645 {"Extreme Magnitudes", "btatt.cycling_power_feature.extreme_magnitudes",
13646 FT_BOOLEAN, 32, NULL, 0x00000010,
13647 NULL, HFILL}
13649 {&hf_btatt_cycling_power_feature_crank_revolution_data,
13650 {"Crank Revolution Data", "btatt.cycling_power_feature.crank_revolution_data",
13651 FT_BOOLEAN, 32, NULL, 0x00000008,
13652 NULL, HFILL}
13654 {&hf_btatt_cycling_power_feature_wheel_revolution_data,
13655 {"Wheel Revolution Data", "btatt.cycling_power_feature.wheel_revolution_data",
13656 FT_BOOLEAN, 32, NULL, 0x00000004,
13657 NULL, HFILL}
13659 {&hf_btatt_cycling_power_feature_accumulated_torque,
13660 {"Accumulated Torque", "btatt.cycling_power_feature.accumulated_torque",
13661 FT_BOOLEAN, 32, NULL, 0x00000002,
13662 NULL, HFILL}
13664 {&hf_btatt_cycling_power_feature_pedal_power_balance,
13665 {"Pedal Power Balance", "btatt.cycling_power_feature.pedal_power_balance",
13666 FT_BOOLEAN, 32, NULL, 0x00000001,
13667 NULL, HFILL}
13669 {&hf_btatt_ln_feature,
13670 {"LN Feature", "btatt.ln_feature",
13671 FT_UINT32, BASE_HEX, NULL, 0x0,
13672 NULL, HFILL}
13674 {&hf_btatt_ln_feature_reserved,
13675 {"Reserved", "btatt.ln_feature.reserved",
13676 FT_UINT32, BASE_HEX, NULL, 0xFFE00000,
13677 NULL, HFILL}
13679 {&hf_btatt_ln_feature_position_status,
13680 {"Position Status", "btatt.ln_feature.position_status",
13681 FT_BOOLEAN, 32, NULL, 0x00100000,
13682 NULL, HFILL}
13684 {&hf_btatt_ln_feature_elevation_setting,
13685 {"Elevation Setting,", "btatt.ln_feature.elevation_setting",
13686 FT_BOOLEAN, 32, NULL, 0x00080000,
13687 NULL, HFILL}
13689 {&hf_btatt_ln_feature_fix_rate_setting,
13690 {"Fix Rate Setting", "btatt.ln_feature.fix_rate_setting",
13691 FT_BOOLEAN, 32, NULL, 0x00040000,
13692 NULL, HFILL}
13694 {&hf_btatt_ln_feature_location_and_speed_characteristic_content_masking,
13695 {"Location and Speed Characteristic Content Masking", "btatt.ln_feature.location_and_speed_characteristic_content_masking",
13696 FT_BOOLEAN, 32, NULL, 0x00020000,
13697 NULL, HFILL}
13699 {&hf_btatt_ln_feature_vertical_dilution_of_precision,
13700 {"Vertical Dilution of Precision", "btatt.ln_feature.vertical_dilution_of_precision",
13701 FT_BOOLEAN, 32, NULL, 0x00010000,
13702 NULL, HFILL}
13704 {&hf_btatt_ln_feature_horizontal_dilution_of_precision,
13705 {"Horizontal Dilution of Precision", "btatt.ln_feature.horizontal_dilution_of_precision",
13706 FT_BOOLEAN, 32, NULL, 0x00008000,
13707 NULL, HFILL}
13709 {&hf_btatt_ln_feature_estimated_vertical_position_error,
13710 {"Estimated Vertical Position Error", "btatt.ln_feature.estimated_vertical_position_error",
13711 FT_BOOLEAN, 32, NULL, 0x00004000,
13712 NULL, HFILL}
13714 {&hf_btatt_ln_feature_estimated_horizontal_position_error,
13715 {"Estimated Horizontal Position Error", "btatt.ln_feature.estimated_horizontal_position_error",
13716 FT_BOOLEAN, 32, NULL, 0x00002000,
13717 NULL, HFILL}
13719 {&hf_btatt_ln_feature_time_to_first_fix,
13720 {"Time to First Fix", "btatt.ln_feature.time_to_first_fix",
13721 FT_BOOLEAN, 32, NULL, 0x00001000,
13722 NULL, HFILL}
13724 {&hf_btatt_ln_feature_number_of_beacons_in_view,
13725 {"Number of Beacons in View", "btatt.ln_feature.number_of_beacons_in_view",
13726 FT_BOOLEAN, 32, NULL, 0x00000800,
13727 NULL, HFILL}
13729 {&hf_btatt_ln_feature_number_of_beacons_in_solution,
13730 {"Number of Beacons in Solution", "btatt.ln_feature.number_of_beacons_in_solution",
13731 FT_BOOLEAN, 32, NULL, 0x00000400,
13732 NULL, HFILL}
13734 {&hf_btatt_ln_feature_estimated_time_of_arrival,
13735 {"Estimated Time of Arrival", "btatt.ln_feature.estimated_time_of_arrival",
13736 FT_BOOLEAN, 32, NULL, 0x00000200,
13737 NULL, HFILL}
13739 {&hf_btatt_ln_feature_remaining_vertical_distance,
13740 {"Remaining Vertical Distance", "btatt.ln_feature.remaining_vertical_distance",
13741 FT_BOOLEAN, 32, NULL, 0x00000100,
13742 NULL, HFILL}
13744 {&hf_btatt_ln_feature_remaining_distance,
13745 {"Remaining Distance", "btatt.ln_feature.remaining_distance",
13746 FT_BOOLEAN, 32, NULL, 0x00000080,
13747 NULL, HFILL}
13749 {&hf_btatt_ln_feature_utc_time,
13750 {"UTC Time", "btatt.ln_feature.utc_time",
13751 FT_BOOLEAN, 32, NULL, 0x00000040,
13752 NULL, HFILL}
13754 {&hf_btatt_ln_feature_rolling_time,
13755 {"Rolling Time", "btatt.ln_feature.rolling_time",
13756 FT_BOOLEAN, 32, NULL, 0x00000020,
13757 NULL, HFILL}
13759 {&hf_btatt_ln_feature_heading,
13760 {"Heading", "btatt.ln_feature.heading",
13761 FT_BOOLEAN, 32, NULL, 0x00000010,
13762 NULL, HFILL}
13764 {&hf_btatt_ln_feature_elevation,
13765 {"Elevation", "btatt.ln_feature.elevation",
13766 FT_BOOLEAN, 32, NULL, 0x00000008,
13767 NULL, HFILL}
13769 {&hf_btatt_ln_feature_location,
13770 {"Location", "btatt.ln_feature.location",
13771 FT_BOOLEAN, 32, NULL, 0x00000004,
13772 NULL, HFILL}
13774 {&hf_btatt_ln_feature_total_distance,
13775 {"Total Distance", "btatt.ln_feature.total_distance",
13776 FT_BOOLEAN, 32, NULL, 0x00000002,
13777 NULL, HFILL}
13779 {&hf_btatt_ln_feature_instantaneous_speed,
13780 {"Instantaneous Speed", "btatt.ln_feature.instantaneous_speed",
13781 FT_BOOLEAN, 32, NULL, 0x00000001,
13782 NULL, HFILL}
13784 {&hf_btatt_body_composition_feature,
13785 {"Body Composition Feature", "btatt.body_composition_feature",
13786 FT_UINT32, BASE_HEX, NULL, 0x0,
13787 NULL, HFILL}
13789 {&hf_btatt_body_composition_feature_reserved,
13790 {"Reserved", "btatt.body_composition_feature.reserved",
13791 FT_UINT32, BASE_HEX, NULL, 0xFFFC0000,
13792 NULL, HFILL}
13794 {&hf_btatt_body_composition_feature_height_measurement_resolution,
13795 {"Height Measurement Resolution", "btatt.body_composition_feature.height_measurement_resolution",
13796 FT_UINT32, BASE_HEX, VALS(body_composition_feature_height_measurement_resolution_vals), 0x00038000,
13797 NULL, HFILL}
13799 {&hf_btatt_body_composition_feature_mass_measurement_resolution,
13800 {"Mass Measurement Resolution", "btatt.body_composition_feature.mass_measurement_resolution",
13801 FT_UINT32, BASE_HEX, VALS(body_composition_feature_mass_measurement_resolution_vals), 0x00007800,
13802 NULL, HFILL}
13804 {&hf_btatt_body_composition_feature_height,
13805 {"Height", "btatt.body_composition_feature.height",
13806 FT_BOOLEAN, 32, NULL, 0x00000400,
13807 NULL, HFILL}
13809 {&hf_btatt_body_composition_feature_weight,
13810 {"Weight", "btatt.body_composition_feature.weight",
13811 FT_BOOLEAN, 32, NULL, 0x00000200,
13812 NULL, HFILL}
13814 {&hf_btatt_body_composition_feature_impedance,
13815 {"Impedance", "btatt.body_composition_feature.impedance",
13816 FT_BOOLEAN, 32, NULL, 0x00000100,
13817 NULL, HFILL}
13819 {&hf_btatt_body_composition_feature_body_water_mass,
13820 {"Body Water Mass", "btatt.body_composition_feature.body_water_mass",
13821 FT_BOOLEAN, 32, NULL, 0x00000080,
13822 NULL, HFILL}
13824 {&hf_btatt_body_composition_feature_soft_lean_mass,
13825 {"Soft Lean Mass", "btatt.body_composition_feature.soft_lean_mass",
13826 FT_BOOLEAN, 32, NULL, 0x00000040,
13827 NULL, HFILL}
13829 {&hf_btatt_body_composition_feature_fat_free_mass,
13830 {"Fat Free Mass", "btatt.body_composition_feature.fat_free_mass",
13831 FT_BOOLEAN, 32, NULL, 0x00000020,
13832 NULL, HFILL}
13834 {&hf_btatt_body_composition_feature_muscle_mass,
13835 {"Muscle Mass", "btatt.body_composition_feature.muscle_mass",
13836 FT_BOOLEAN, 32, NULL, 0x00000010,
13837 NULL, HFILL}
13839 {&hf_btatt_body_composition_feature_muscle_percentage,
13840 {"Muscle Percentage", "btatt.body_composition_feature.muscle_percentage",
13841 FT_BOOLEAN, 32, NULL, 0x00000008,
13842 NULL, HFILL}
13844 {&hf_btatt_body_composition_feature_basal_metabolism,
13845 {"Basal Metabolism", "btatt.body_composition_feature.basal_metabolism",
13846 FT_BOOLEAN, 32, NULL, 0x00000004,
13847 NULL, HFILL}
13849 {&hf_btatt_body_composition_feature_multiple_users,
13850 {"Multiple Users", "btatt.body_composition_feature.multiple_users",
13851 FT_BOOLEAN, 32, NULL, 0x00000002,
13852 NULL, HFILL}
13854 {&hf_btatt_body_composition_feature_timestamp,
13855 {"Timestamp", "btatt.body_composition_feature.timestamp",
13856 FT_BOOLEAN, 32, NULL, 0x00000001,
13857 NULL, HFILL}
13859 {&hf_btatt_weight_scale_feature,
13860 {"Weight Scale Feature", "btatt.weight_scale_feature",
13861 FT_UINT32, BASE_HEX, NULL, 0x0,
13862 NULL, HFILL}
13864 {&hf_btatt_weight_scale_feature_reserved,
13865 {"Reserved", "btatt.weight_scale_feature.reserved",
13866 FT_UINT32, BASE_HEX, NULL, 0xFFFFFC00,
13867 NULL, HFILL}
13869 {&hf_btatt_weight_scale_feature_height_measurement_resolution,
13870 {"Height Measurement Resolution", "btatt.weight_scale_feature.height_measurement_resolution",
13871 FT_UINT32, BASE_HEX, VALS(weight_scale_feature_height_measurement_resolution_vals), 0x00000380,
13872 NULL, HFILL}
13874 {&hf_btatt_weight_scale_feature_weight_measurement_resolution,
13875 {"Mass Measurement Resolution", "btatt.weight_scale_feature.weight_measurement_resolution",
13876 FT_UINT32, BASE_HEX, VALS(weight_scale_feature_weight_measurement_resolution_vals), 0x00000078,
13877 NULL, HFILL}
13879 {&hf_btatt_weight_scale_feature_bmi,
13880 {"BMI", "btatt.weight_scale_feature.bmi",
13881 FT_BOOLEAN, 32, NULL, 0x00000004,
13882 NULL, HFILL}
13884 {&hf_btatt_weight_scale_feature_multiple_users,
13885 {"Multiple Users", "btatt.weight_scale_feature.multiple_users",
13886 FT_BOOLEAN, 32, NULL, 0x00000002,
13887 NULL, HFILL}
13889 {&hf_btatt_weight_scale_feature_timestamp,
13890 {"Timestamp", "btatt.weight_scale_feature.timestamp",
13891 FT_BOOLEAN, 32, NULL, 0x00000001,
13892 NULL, HFILL}
13894 {&hf_btatt_glucose_measurement_flags,
13895 {"Flags", "btatt.glucose_measurement.flags",
13896 FT_UINT8, BASE_HEX, NULL, 0x0,
13897 NULL, HFILL}
13899 {&hf_btatt_glucose_measurement_flags_reserved,
13900 {"Reserved", "btatt.glucose_measurement.flags.reserved",
13901 FT_UINT8, BASE_HEX, NULL, 0xE0,
13902 NULL, HFILL}
13904 {&hf_btatt_glucose_measurement_flags_context_information_follows,
13905 {"Context Information Follows", "btatt.glucose_measurement.flags.context_information_follows",
13906 FT_BOOLEAN, 8, NULL, 0x10,
13907 NULL, HFILL}
13909 {&hf_btatt_glucose_measurement_flags_sensor_status_annunciation_present,
13910 {"Sensor Status Annunciation Present", "btatt.glucose_measurement.flags.sensor_status_annunciation_present",
13911 FT_BOOLEAN, 8, NULL, 0x08,
13912 NULL, HFILL}
13914 {&hf_btatt_glucose_measurement_flags_glucose_concentration_units,
13915 {"Glucose Concentration Units", "btatt.glucose_measurement.flags.glucose_concentration_units",
13916 FT_UINT8, BASE_HEX, VALS(glucose_measurement_flags_glucose_concentration_units_vals), 0x04,
13917 NULL, HFILL}
13919 {&hf_btatt_glucose_measurement_flags_glucose_concentration_type_and_sample_location_present,
13920 {"Glucose Concentration, Type and Sample Location Present", "btatt.glucose_measurement.flags.glucose_concentration_type_and_sample_location_present",
13921 FT_BOOLEAN, 8, NULL, 0x02,
13922 NULL, HFILL}
13924 {&hf_btatt_glucose_measurement_flags_time_offset_present,
13925 {"Time Offset Present", "btatt.glucose_measurement.flags.time_offset_present",
13926 FT_BOOLEAN, 8, NULL, 0x01,
13927 NULL, HFILL}
13929 {&hf_btatt_glucose_measurement_sequence_number,
13930 {"Sequence Number", "btatt.glucose_measurement.sequence_number",
13931 FT_UINT16, BASE_DEC, NULL, 0x0,
13932 NULL, HFILL}
13934 {&hf_btatt_glucose_measurement_base_time,
13935 {"Base Time", "btatt.glucose_measurement.base_time",
13936 FT_NONE, BASE_NONE, NULL, 0x0,
13937 NULL, HFILL}
13939 {&hf_btatt_glucose_measurement_time_offset,
13940 {"Time Offset", "btatt.glucose_measurement.time_offset",
13941 FT_INT16, BASE_DEC, NULL, 0x0,
13942 NULL, HFILL}
13944 {&hf_btatt_glucose_measurement_glucose_concentration_kg_per_l,
13945 {"Glucose Concentration [kg/l]", "btatt.glucose_measurement.glucose_concentration.kg_per_l",
13946 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
13947 NULL, HFILL}
13949 {&hf_btatt_glucose_measurement_glucose_concentration_mol_per_l,
13950 {"Glucose Concentration [mol/l]", "btatt.glucose_measurement.glucose_concentration.mol_per_l",
13951 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
13952 NULL, HFILL}
13954 {&hf_btatt_glucose_measurement_type_and_sample_location,
13955 {"Type and Sample Location", "btatt.glucose_measurement.type_and_sample_location",
13956 FT_UINT8, BASE_HEX, NULL, 0x0,
13957 NULL, HFILL}
13959 {&hf_btatt_glucose_measurement_type_and_sample_location_type,
13960 {"Type", "btatt.glucose_measurement.type_and_sample_location.type",
13961 FT_UINT8, BASE_HEX, VALS(glucose_measurement_type_and_sample_location_type_vals), 0x0F,
13962 NULL, HFILL}
13964 {&hf_btatt_glucose_measurement_type_and_sample_location_sample_location,
13965 {"Sample Location", "btatt.glucose_measurement.type_and_sample_location.sample_location",
13966 FT_UINT8, BASE_HEX, VALS(glucose_measurement_type_and_sample_location_sample_location_vals), 0xF0,
13967 NULL, HFILL}
13969 {&hf_btatt_glucose_measurement_sensor_status_annunciation,
13970 {"Sensor Status Annunciation", "btatt.glucose_measurement.sensor_status_annunciation",
13971 FT_UINT16, BASE_HEX, NULL, 0x0,
13972 NULL, HFILL}
13974 {&hf_btatt_glucose_measurement_sensor_status_annunciation_reserved,
13975 {"Reserved", "btatt.glucose_measurement.sensor_status_annunciation.reserved",
13976 FT_UINT16, BASE_HEX, NULL, 0xF000,
13977 NULL, HFILL}
13979 {&hf_btatt_glucose_measurement_sensor_status_annunciation_time_fault,
13980 {"Time fault has occurred in the sensor and time may be inaccurate", "btatt.glucose_measurement.sensor_status_annunciation.time_fault",
13981 FT_BOOLEAN, 16, NULL, 0x0800,
13982 NULL, HFILL}
13984 {&hf_btatt_glucose_measurement_sensor_status_annunciation_general_fault,
13985 {"General device fault has occurred in the sensor", "btatt.glucose_measurement.sensor_status_annunciation.general_fault",
13986 FT_BOOLEAN, 16, NULL, 0x0400,
13987 NULL, HFILL}
13989 {&hf_btatt_glucose_measurement_sensor_status_annunciation_read_interrupted,
13990 {"Sensor read interrupted because strip was pulled too soon at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.read_interrupted",
13991 FT_BOOLEAN, 16, NULL, 0x0200,
13992 NULL, HFILL}
13994 {&hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_low,
13995 {"Sensor temperature too low for valid test/result at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.temperature_too_low",
13996 FT_BOOLEAN, 16, NULL, 0x0100,
13997 NULL, HFILL}
13999 {&hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_high,
14000 {"Sensor temperature too high for valid test/result at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.temperature_too_high",
14001 FT_BOOLEAN, 16, NULL, 0x0080,
14002 NULL, HFILL}
14004 {&hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_low,
14005 {"Sensor result lower than the device can process", "btatt.glucose_measurement.sensor_status_annunciation.result_too_low",
14006 FT_BOOLEAN, 16, NULL, 0x0040,
14007 NULL, HFILL}
14009 {&hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_high,
14010 {"Sensor result higher than the device can process", "btatt.glucose_measurement.sensor_status_annunciation.result_too_high",
14011 FT_BOOLEAN, 16, NULL, 0x0020,
14012 NULL, HFILL}
14014 {&hf_btatt_glucose_measurement_sensor_status_annunciation_strip_type_incorrect,
14015 {"Strip type incorrect for device", "btatt.glucose_measurement.sensor_status_annunciation.strip_type_incorrect",
14016 FT_BOOLEAN, 16, NULL, 0x0010,
14017 NULL, HFILL}
14019 {&hf_btatt_glucose_measurement_sensor_status_annunciation_strip_insertion_error,
14020 {"Strip insertion error", "btatt.glucose_measurement.sensor_status_annunciation.strip_insertion_error",
14021 FT_BOOLEAN, 16, NULL, 0x0008,
14022 NULL, HFILL}
14024 {&hf_btatt_glucose_measurement_sensor_status_annunciation_size_insufficient,
14025 {"Sample size for blood or control solution insufficient at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.size_insufficient",
14026 FT_BOOLEAN, 16, NULL, 0x0004,
14027 NULL, HFILL}
14029 {&hf_btatt_glucose_measurement_sensor_status_annunciation_fault,
14030 {"Sensor malfunction or faulting at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.fault",
14031 FT_BOOLEAN, 16, NULL, 0x0002,
14032 NULL, HFILL}
14034 {&hf_btatt_glucose_measurement_sensor_status_annunciation_battery_low,
14035 {"Device battery low at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.battery_low",
14036 FT_BOOLEAN, 16, NULL, 0x0001,
14037 NULL, HFILL}
14039 {&hf_btatt_bond_management_feature,
14040 {"Bond Management Feature", "btatt.bond_management_feature",
14041 FT_UINT24, BASE_HEX, NULL, 0x0,
14042 NULL, HFILL}
14044 {&hf_btatt_bond_management_feature_feature_extension,
14045 {"Feature Extension", "btatt.bond_management_feature.feature_extension",
14046 FT_BOOLEAN, 24, NULL, 0x800000,
14047 NULL, HFILL}
14049 {&hf_btatt_bond_management_feature_reserved,
14050 {"Reserved", "btatt.bond_management_feature.reserved",
14051 FT_UINT24, BASE_HEX, NULL, 0x780000,
14052 NULL, HFILL}
14054 {&hf_btatt_bond_management_feature_identify_yourself,
14055 {"Identify Yourself", "btatt.bond_management_feature.identify_yourself",
14056 FT_BOOLEAN, 24, NULL, 0x040000,
14057 NULL, HFILL}
14059 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_9,
14060 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.9",
14061 FT_BOOLEAN, 24, NULL, 0x020000,
14062 NULL, HFILL}
14064 {&hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_le_transport_only_server,
14065 {"Remove all but the active bond on server (LE transport only)", "btatt.bond_management_feature.remove_all_but_the_active_bond_on_le_transport_only_server",
14066 FT_BOOLEAN, 24, NULL, 0x010000,
14067 NULL, HFILL}
14069 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_8,
14070 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.8",
14071 FT_BOOLEAN, 24, NULL, 0x008000,
14072 NULL, HFILL}
14074 {&hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_transport_only_server,
14075 {"Remove all but the active bond on server (BR/EDR transport only)", "btatt.bond_management_feature.remove_all_but_the_active_bond_on_br_edr_transport_only_server",
14076 FT_BOOLEAN, 24, NULL, 0x004000,
14077 NULL, HFILL}
14079 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_7,
14080 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.7",
14081 FT_BOOLEAN, 24, NULL, 0x002000,
14082 NULL, HFILL}
14084 {&hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_and_le_server,
14085 {"Remove all but the active bond on server (BR/EDR and LE)", "btatt.bond_management_feature.remove_all_but_the_active_bond_on_br_edr_and_le_server",
14086 FT_BOOLEAN, 24, NULL, 0x001000,
14087 NULL, HFILL}
14089 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_6,
14090 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.6",
14091 FT_BOOLEAN, 24, NULL, 0x000800,
14092 NULL, HFILL}
14094 {&hf_btatt_bond_management_feature_remove_all_bonds_on_le_transport_only_server,
14095 {"Remove all bonds on server (LE transport only)", "btatt.bond_management_feature.remove_all_bonds_on_le_transport_only_server",
14096 FT_BOOLEAN, 24, NULL, 0x000400,
14097 NULL, HFILL}
14099 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_5,
14100 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.5",
14101 FT_BOOLEAN, 24, NULL, 0x000200,
14102 NULL, HFILL}
14104 {&hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_transport_only_server,
14105 {"Remove all bonds on server (BR/EDR transport only)", "btatt.bond_management_feature.remove_all_bonds_on_br_edr_transport_only_server",
14106 FT_BOOLEAN, 24, NULL, 0x000100,
14107 NULL, HFILL}
14109 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_4,
14110 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.4",
14111 FT_BOOLEAN, 24, NULL, 0x000080,
14112 NULL, HFILL}
14114 {&hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_and_le_server,
14115 {"Remove all bonds on server (BR/EDR and LE)", "btatt.bond_management_feature.remove_all_bonds_on_br_edr_and_le_server",
14116 FT_BOOLEAN, 24, NULL, 0x000040,
14117 NULL, HFILL}
14119 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_3,
14120 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.3",
14121 FT_BOOLEAN, 24, NULL, 0x000020,
14122 NULL, HFILL}
14124 {&hf_btatt_bond_management_feature_delete_bond_of_current_le_transport_only_connection,
14125 {"Delete bond of current connection (LE transport only)", "btatt.bond_management_feature.delete_bond_of_current_le_transport_only_connection",
14126 FT_BOOLEAN, 24, NULL, 0x000010,
14127 NULL, HFILL}
14129 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_2,
14130 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.2",
14131 FT_BOOLEAN, 24, NULL, 0x000008,
14132 NULL, HFILL}
14134 {&hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_transport_only_connection,
14135 {"Delete bond of current connection (BR/EDR transport only)", "btatt.bond_management_feature.delete_bond_of_current_br_edr_transport_only_connection",
14136 FT_BOOLEAN, 24, NULL, 0x000004,
14137 NULL, HFILL}
14139 {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_1,
14140 {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.1",
14141 FT_BOOLEAN, 24, NULL, 0x000002,
14142 NULL, HFILL}
14144 {&hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_and_le_connection,
14145 {"Delete Bond of current connection (BR/EDR and LE)", "btatt.bond_management_feature.delete_bond_of_current_br_edr_and_le_connection",
14146 FT_BOOLEAN, 24, NULL, 0x000001,
14147 NULL, HFILL}
14149 {&hf_btatt_bond_management_feature_nth,
14150 {"Extended Features", "btatt.bond_management_feature.nth",
14151 FT_UINT8, BASE_HEX, NULL, 0x0,
14152 NULL, HFILL}
14154 {&hf_btatt_bond_management_feature_nth_feature_extension,
14155 {"Feature Extension", "btatt.bond_management_feature.nth.feature_extension",
14156 FT_BOOLEAN, 8, NULL, 0x80,
14157 NULL, HFILL}
14159 {&hf_btatt_bond_management_feature_nth_reserved,
14160 {"Reserved", "btatt.bond_management_feature.nth.reserved",
14161 FT_UINT8, BASE_HEX, NULL, 0x7F,
14162 NULL, HFILL}
14164 {&hf_btatt_bond_management_control_point_opcode,
14165 {"Opcode", "btatt.bond_management_control_point.opcode",
14166 FT_UINT8, BASE_HEX, VALS(bond_management_control_point_opcode_vals), 0x0,
14167 NULL, HFILL}
14169 {&hf_btatt_bond_management_control_point_authorization_code,
14170 {"Authorization Code", "btatt.bond_management_control_point.authorization_code",
14171 FT_STRING, BASE_NONE, NULL, 0x0,
14172 NULL, HFILL}
14174 {&hf_btatt_temperature_measurement_flags,
14175 {"Sensor Status Annunciation", "btatt.temperature_measurement.flags",
14176 FT_UINT8, BASE_HEX, NULL, 0x0,
14177 NULL, HFILL}
14179 {&hf_btatt_temperature_measurement_flags_reserved,
14180 {"Reserved", "btatt.temperature_measurement.flags.reserved",
14181 FT_UINT8, BASE_HEX, NULL, 0xF8,
14182 NULL, HFILL}
14184 {&hf_btatt_temperature_measurement_flags_temperature_type,
14185 {"Temperature Type", "btatt.temperature_measurement.flags.temperature_type",
14186 FT_BOOLEAN, 8, NULL, 0x04,
14187 NULL, HFILL}
14189 {&hf_btatt_temperature_measurement_flags_timestamp,
14190 {"Timestamp", "btatt.temperature_measurement.flags.timestamp",
14191 FT_BOOLEAN, 8, NULL, 0x02,
14192 NULL, HFILL}
14194 {&hf_btatt_temperature_measurement_flags_temperature_unit,
14195 {"Temperature Unit", "btatt.temperature_measurement.flags.temperature_unit",
14196 FT_UINT8, BASE_HEX, VALS(temperature_measurement_flags_temperature_unit_vals), 0x01,
14197 NULL, HFILL}
14199 {&hf_btatt_temperature_measurement_value_celsius,
14200 {"Value [Celsius]", "btatt.temperature_measurement.value.celsius",
14201 FT_IEEE_11073_FLOAT, BASE_NONE, NULL, 0x00,
14202 NULL, HFILL}
14204 {&hf_btatt_temperature_measurement_value_fahrenheit,
14205 {"Value [Fahrenheit]", "btatt.temperature_measurement.value.fahrenheit",
14206 FT_IEEE_11073_FLOAT, BASE_NONE, NULL, 0x00,
14207 NULL, HFILL}
14209 {&hf_btatt_temperature_measurement_timestamp,
14210 {"Timestamp", "btatt.temperature_measurement.timestamp",
14211 FT_NONE, BASE_NONE, NULL, 0x0,
14212 NULL, HFILL}
14214 {&hf_btatt_glucose_measurement_context_flags,
14215 {"Glucose Measurement Context", "btatt.glucose_measurement_context.flags",
14216 FT_UINT8, BASE_HEX, NULL, 0x0,
14217 NULL, HFILL}
14219 {&hf_btatt_glucose_measurement_context_flags_extended_flags,
14220 {"Extended Flags", "btatt.glucose_measurement_context.flags.extended_flags",
14221 FT_BOOLEAN, 8, NULL, 0x80,
14222 NULL, HFILL}
14224 {&hf_btatt_glucose_measurement_context_flags_hba1c,
14225 {"HbA1c", "btatt.glucose_measurement_context.flags.hba1c",
14226 FT_BOOLEAN, 8, NULL, 0x40,
14227 NULL, HFILL}
14229 {&hf_btatt_glucose_measurement_context_flags_medication_value_units,
14230 {"Medication Value Units", "btatt.glucose_measurement_context.flags.medication_value_units",
14231 FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_flags_medication_value_units_vals), 0x20,
14232 NULL, HFILL}
14234 {&hf_btatt_glucose_measurement_context_flags_medication_id_and_medication,
14235 {"Medication ID And Medication", "btatt.glucose_measurement_context.flags.medication_id_and_medication",
14236 FT_BOOLEAN, 8, NULL, 0x10,
14237 NULL, HFILL}
14239 {&hf_btatt_glucose_measurement_context_flags_exercise_duration_and_exercise_intensity,
14240 {"Exercise Duration And Exercise Intensity", "btatt.glucose_measurement_context.flags.exercise_duration_and_exercise_intensity",
14241 FT_BOOLEAN, 8, NULL, 0x08,
14242 NULL, HFILL}
14244 {&hf_btatt_glucose_measurement_context_flags_tester_health,
14245 {"Tester Health", "btatt.glucose_measurement_context.flags.tester_health",
14246 FT_BOOLEAN, 8, NULL, 0x04,
14247 NULL, HFILL}
14249 {&hf_btatt_glucose_measurement_context_flags_meal,
14250 {"Meal", "btatt.glucose_measurement_context.flags.meal",
14251 FT_BOOLEAN, 8, NULL, 0x02,
14252 NULL, HFILL}
14254 {&hf_btatt_glucose_measurement_context_flags_carbohydrate_id_and_carbohydrate,
14255 {"Carbohydrate ID And Carbohydrate", "btatt.glucose_measurement_context.flags.carbohydrate_id_and_carbohydrate",
14256 FT_BOOLEAN, 8, NULL, 0x01,
14257 NULL, HFILL}
14259 {&hf_btatt_glucose_measurement_context_sequence_number,
14260 {"Sequence Number", "btatt.glucose_measurement_context.sequence_number",
14261 FT_UINT16, BASE_DEC, NULL, 0x0,
14262 NULL, HFILL}
14264 {&hf_btatt_glucose_measurement_context_extended_flags,
14265 {"Extended Flags", "btatt.glucose_measurement_context.extended_flags",
14266 FT_UINT8, BASE_HEX, NULL, 0x0,
14267 NULL, HFILL}
14269 {&hf_btatt_glucose_measurement_context_extended_flags_reserved,
14270 {"Reserved", "btatt.glucose_measurement_context.extended_flags.reserved",
14271 FT_UINT8, BASE_HEX, NULL, 0xFF,
14272 NULL, HFILL}
14274 {&hf_btatt_glucose_measurement_context_carbohydrate_id,
14275 {"Carbohydrate ID", "btatt.glucose_measurement_context.carbohydrate_id",
14276 FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_carbohydrate_id_vals), 0x0,
14277 NULL, HFILL}
14279 {&hf_btatt_glucose_measurement_context_carbohydrate_kg,
14280 {"Carbohydrate [kg]", "btatt.glucose_measurement_context.carbohydrate.kg",
14281 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14282 NULL, HFILL}
14284 {&hf_btatt_glucose_measurement_context_meal,
14285 {"Meal", "btatt.glucose_measurement_context.meal",
14286 FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_meal_vals), 0x0,
14287 NULL, HFILL}
14289 {&hf_btatt_glucose_measurement_context_tester_health,
14290 {"Tester and Health", "btatt.glucose_measurement_context.tester_and_health",
14291 FT_UINT8, BASE_HEX, NULL, 0x0,
14292 NULL, HFILL}
14294 {&hf_btatt_glucose_measurement_context_tester,
14295 {"Tester", "btatt.glucose_measurement_context.tester_and_health.tester",
14296 FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_tester_vals), 0xF0,
14297 NULL, HFILL}
14299 {&hf_btatt_glucose_measurement_context_health,
14300 {"Health", "btatt.glucose_measurement_context.tester_and_health.health",
14301 FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_health_vals), 0x0F,
14302 NULL, HFILL}
14304 {&hf_btatt_glucose_measurement_context_exercise_duration,
14305 {"Exercise Duration", "btatt.glucose_measurement_context.exercise_duration",
14306 FT_UINT16, BASE_DEC, NULL, 0x0,
14307 NULL, HFILL}
14309 {&hf_btatt_glucose_measurement_context_exercise_intensity,
14310 {"Exercise Intensity", "btatt.glucose_measurement_context.exercise_intensity",
14311 FT_UINT8, BASE_DEC, NULL, 0x0,
14312 NULL, HFILL}
14314 {&hf_btatt_glucose_measurement_context_medication_id,
14315 {"Medication ID", "btatt.glucose_measurement_context.medication_id",
14316 FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_medication_id_vals), 0x0,
14317 NULL, HFILL}
14319 {&hf_btatt_glucose_measurement_context_medication_l,
14320 {"Medication [l]", "btatt.glucose_measurement_context.medication.l",
14321 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14322 NULL, HFILL}
14324 {&hf_btatt_glucose_measurement_context_medication_kg,
14325 {"Medication [kg]", "btatt.glucose_measurement_context.medication.kg",
14326 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14327 NULL, HFILL}
14329 {&hf_btatt_glucose_measurement_context_hba1c,
14330 {"HbA1c", "btatt.glucose_measurement_context.hba1c",
14331 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14332 NULL, HFILL}
14334 {&hf_btatt_blood_pressure_measurement_flags,
14335 {"Flags", "btatt.blood_pressure_measurement.flags",
14336 FT_UINT8, BASE_HEX, NULL, 0x0,
14337 NULL, HFILL}
14339 {&hf_btatt_blood_pressure_measurement_flags_reserved,
14340 {"Reserved", "btatt.blood_pressure_measurement.flags.reserved",
14341 FT_UINT8, BASE_HEX, NULL, 0xE0,
14342 NULL, HFILL}
14344 {&hf_btatt_blood_pressure_measurement_flags_measurement_status,
14345 {"Measurement Status", "btatt.blood_pressure_measurement.flags.measurement_status",
14346 FT_BOOLEAN, 8, NULL, 0x10,
14347 NULL, HFILL}
14349 {&hf_btatt_blood_pressure_measurement_flags_user_id,
14350 {"User ID", "btatt.blood_pressure_measurement.flags.user_id",
14351 FT_BOOLEAN, 8, NULL, 0x08,
14352 NULL, HFILL}
14354 {&hf_btatt_blood_pressure_measurement_flags_pulse_rate,
14355 {"Pulse Rate", "btatt.blood_pressure_measurement.flags.pulse_rate",
14356 FT_BOOLEAN, 8, NULL, 0x04,
14357 NULL, HFILL}
14359 {&hf_btatt_blood_pressure_measurement_flags_timestamp,
14360 {"Timestamp", "btatt.blood_pressure_measurement.flags.timestamp",
14361 FT_BOOLEAN, 8, NULL, 0x02,
14362 NULL, HFILL}
14364 {&hf_btatt_blood_pressure_measurement_flags_unit,
14365 {"Unit", "btatt.blood_pressure_measurement.flags.unit",
14366 FT_UINT8, BASE_HEX, VALS(blood_pressure_measurement_unit_vals), 0x01,
14367 NULL, HFILL}
14369 {&hf_btatt_blood_pressure_measurement_compound_value_systolic_kpa,
14370 {"Systolic [kPa]", "btatt.blood_pressure_measurement.compound_value.systolic.kpa",
14371 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14372 NULL, HFILL}
14374 {&hf_btatt_blood_pressure_measurement_compound_value_diastolic_kpa,
14375 {"Diastolic [kPa]", "btatt.blood_pressure_measurement.compound_value.diastolic.kpa",
14376 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14377 NULL, HFILL}
14379 {&hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_kpa,
14380 {"Arterial Pressure [kPa]", "btatt.blood_pressure_measurement.compound_value.arterial_pressure.kpa",
14381 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14382 NULL, HFILL}
14384 {&hf_btatt_blood_pressure_measurement_compound_value_systolic_mmhg,
14385 {"Systolic [mmHg]", "btatt.blood_pressure_measurement.compound_value.systolic.mmhg",
14386 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14387 NULL, HFILL}
14389 {&hf_btatt_blood_pressure_measurement_compound_value_diastolic_mmhg,
14390 {"Diastolic [mmHg]", "btatt.blood_pressure_measurement.compound_value.diastolic.mmhg",
14391 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14392 NULL, HFILL}
14394 {&hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_mmhg,
14395 {"Arterial Pressure [mmHg]", "btatt.blood_pressure_measurement.compound_value.arterial_pressure.mmhg",
14396 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14397 NULL, HFILL}
14399 {&hf_btatt_blood_pressure_measurement_timestamp,
14400 {"Timestamp", "btatt.blood_pressure_measurement.compound_value.timestamp",
14401 FT_NONE, BASE_NONE, NULL, 0x0,
14402 NULL, HFILL}
14404 {&hf_btatt_blood_pressure_measurement_pulse_rate,
14405 {"Pulse Rate", "btatt.blood_pressure_measurement.pulse_rate",
14406 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14407 NULL, HFILL}
14409 {&hf_btatt_blood_pressure_measurement_user_id,
14410 {"User ID", "btatt.blood_pressure_measurement.user_id",
14411 FT_UINT8, BASE_HEX, NULL, 0x0,
14412 NULL, HFILL}
14414 {&hf_btatt_blood_pressure_measurement_status,
14415 {"Measurement Status", "btatt.blood_pressure_measurement.status",
14416 FT_UINT16, BASE_HEX, NULL, 0x0,
14417 NULL, HFILL}
14419 {&hf_btatt_blood_pressure_measurement_status_reserved,
14420 {"Reserved", "btatt.blood_pressure_measurement.status.reserved",
14421 FT_UINT16, BASE_HEX, NULL, 0xFFC0,
14422 NULL, HFILL}
14424 {&hf_btatt_blood_pressure_measurement_status_improper_measurement_position,
14425 {"Improper Measurement Position", "btatt.blood_pressure_measurement.status.improper_measurement_position",
14426 FT_BOOLEAN, 16, NULL, 0x0020,
14427 NULL, HFILL}
14429 {&hf_btatt_blood_pressure_measurement_status_pulse_rate_range_detection,
14430 {"Pulse_Rate Range Detection", "btatt.blood_pressure_measurement.status.pulse_rate_range_detection",
14431 FT_UINT16, BASE_HEX, VALS(blood_pressure_measurement_status_pulse_rate_range_detection_vals), 0x0018,
14432 NULL, HFILL}
14434 {&hf_btatt_blood_pressure_measurement_status_irregular_pulse,
14435 {"Irregular Pulse", "btatt.blood_pressure_measurement.status.irregular_pulse",
14436 FT_BOOLEAN, 16, NULL, 0x0004,
14437 NULL, HFILL}
14439 {&hf_btatt_blood_pressure_measurement_status_cuff_fit_too_loose,
14440 {"Cuff Fit too Loose", "btatt.blood_pressure_measurement.status.cuff_fit_too_loose",
14441 FT_BOOLEAN, 16, NULL, 0x0002,
14442 NULL, HFILL}
14444 {&hf_btatt_blood_pressure_measurement_status_body_movement,
14445 {"Body Movement", "btatt.blood_pressure_measurement.status.body_movement",
14446 FT_BOOLEAN, 16, NULL, 0x0001,
14447 NULL, HFILL}
14449 {&hf_btatt_heart_rate_measurement_flags,
14450 {"Flags", "btatt.heart_rate_measurement.flags",
14451 FT_UINT8, BASE_HEX, NULL, 0x0,
14452 NULL, HFILL}
14454 {&hf_btatt_heart_rate_measurement_flags_reserved,
14455 {"Reserved", "btatt.heart_rate_measurement.flags.reserved",
14456 FT_UINT8, BASE_HEX, NULL, 0xE0,
14457 NULL, HFILL}
14459 {&hf_btatt_heart_rate_measurement_flags_rr_interval,
14460 {"RR Interval", "btatt.heart_rate_measurement.flags.rr_interval",
14461 FT_BOOLEAN, 8, NULL, 0x10,
14462 NULL, HFILL}
14464 {&hf_btatt_heart_rate_measurement_flags_energy_expended,
14465 {"Energy Expended", "btatt.heart_rate_measurement.flags.energy_expended",
14466 FT_BOOLEAN, 8, NULL, 0x08,
14467 NULL, HFILL}
14469 {&hf_btatt_heart_rate_measurement_flags_sensor_contact_status_support,
14470 {"Sensor Support", "btatt.heart_rate_measurement.flags.sensor_contact_status.support",
14471 FT_BOOLEAN, 8, NULL, 0x04,
14472 NULL, HFILL}
14474 {&hf_btatt_heart_rate_measurement_flags_sensor_contact_status_contact,
14475 {"Sensor Contact", "btatt.heart_rate_measurement.flags.sensor_contact_status.contact",
14476 FT_BOOLEAN, 8, NULL, 0x02,
14477 NULL, HFILL}
14479 {&hf_btatt_heart_rate_measurement_flags_value_16,
14480 {"Value is UINT16", "btatt.heart_rate_measurement.flags.value_16",
14481 FT_BOOLEAN, 8, NULL, 0x01,
14482 NULL, HFILL}
14484 {&hf_btatt_heart_rate_measurement_value_8,
14485 {"Value", "btatt.heart_rate_measurement.value.8",
14486 FT_UINT8, BASE_DEC, NULL, 0x0,
14487 NULL, HFILL}
14489 {&hf_btatt_heart_rate_measurement_value_16,
14490 {"Value", "btatt.heart_rate_measurement.value.16",
14491 FT_UINT16, BASE_DEC, NULL, 0x0,
14492 NULL, HFILL}
14494 {&hf_btatt_heart_rate_measurement_energy_expended,
14495 {"Energy Expended", "btatt.heart_rate_measurement.energy_expended",
14496 FT_UINT16, BASE_DEC, NULL, 0x0,
14497 NULL, HFILL}
14499 {&hf_btatt_heart_rate_measurement_rr_intervals,
14500 {"RR Intervals", "btatt.heart_rate_measurement.rr_intervals",
14501 FT_NONE, BASE_NONE, NULL, 0x0,
14502 NULL, HFILL}
14504 {&hf_btatt_heart_rate_measurement_rr_interval,
14505 {"RR Interval", "btatt.heart_rate_measurement.rr_interval",
14506 FT_UINT16, BASE_DEC, NULL, 0x0,
14507 NULL, HFILL}
14509 {&hf_btatt_record_access_control_point_opcode,
14510 {"Opcode", "btatt.record_access_control_point.opcode",
14511 FT_UINT8, BASE_DEC, VALS(record_access_control_point_opcode_vals), 0x0,
14512 NULL, HFILL}
14514 {&hf_btatt_record_access_control_point_operator,
14515 {"Operator", "btatt.record_access_control_point.operator",
14516 FT_UINT8, BASE_DEC, VALS(record_access_control_point_operator_vals), 0x0,
14517 NULL, HFILL}
14519 {&hf_btatt_record_access_control_point_operand,
14520 {"Operand", "btatt.record_access_control_point.operand",
14521 FT_NONE, BASE_NONE, NULL, 0x0,
14522 NULL, HFILL}
14524 {&hf_btatt_record_access_control_point_operand_filter_type,
14525 {"Filter Type", "btatt.record_access_control_point.operand.filter_type",
14526 FT_UINT8, BASE_DEC, VALS(record_access_control_point_operand_filter_type_vals), 0x0,
14527 NULL, HFILL}
14529 {&hf_btatt_record_access_control_point_operand_min_time_offset,
14530 {"Min Time Offset", "btatt.record_access_control_point_operand.min_time_offset",
14531 FT_UINT16, BASE_DEC, NULL, 0x0,
14532 NULL, HFILL}
14534 {&hf_btatt_record_access_control_point_operand_max_time_offset,
14535 {"Max Time Offset", "btatt.record_access_control_point_operand.max_time_offset",
14536 FT_UINT16, BASE_DEC, NULL, 0x0,
14537 NULL, HFILL}
14539 {&hf_btatt_record_access_control_point_operand_number_of_records,
14540 {"Number of Records", "btatt.record_access_control_point_operand.number_of_records",
14541 FT_UINT16, BASE_DEC, NULL, 0x0,
14542 NULL, HFILL}
14544 {&hf_btatt_record_access_control_point_request_opcode,
14545 {"Request Opcode", "btatt.record_access_control_point.request_opcode",
14546 FT_UINT8, BASE_DEC, VALS(record_access_control_point_opcode_vals), 0x0,
14547 NULL, HFILL}
14549 {&hf_btatt_record_access_control_point_response_code,
14550 {"Response Opcode", "btatt.record_access_control_point.response_code",
14551 FT_UINT8, BASE_DEC, VALS(record_access_control_point_response_code_vals), 0x0,
14552 NULL, HFILL}
14554 {&hf_btatt_value_trigger_setting_condition,
14555 {"Condition", "btatt.value_trigger_setting.condition",
14556 FT_UINT8, BASE_DEC, VALS(value_trigger_setting_condition_vals), 0x0,
14557 NULL, HFILL}
14559 {&hf_btatt_value_trigger_setting_analog,
14560 {"Analog", "btatt.value_trigger_setting.analog",
14561 FT_UINT16, BASE_DEC, NULL, 0x0,
14562 NULL, HFILL}
14564 {&hf_btatt_value_trigger_setting_analog_one,
14565 {"Analog One", "btatt.value_trigger_setting.analog_one",
14566 FT_UINT16, BASE_DEC, NULL, 0x0,
14567 NULL, HFILL}
14569 {&hf_btatt_value_trigger_setting_analog_two,
14570 {"Analog Two", "btatt.value_trigger_setting.analog_two",
14571 FT_UINT16, BASE_DEC, NULL, 0x0,
14572 NULL, HFILL}
14574 {&hf_btatt_digital,
14575 {"Digital", "btatt.digital",
14576 FT_UINT8, BASE_DEC, VALS(digital_vals), 0x0,
14577 NULL, HFILL}
14579 {&hf_btatt_digital_output,
14580 {"Digital Output", "btatt.digital_output",
14581 FT_BYTES, BASE_NONE, NULL, 0x0,
14582 NULL, HFILL}
14584 {&hf_btatt_analog,
14585 {"Analog", "btatt.analog",
14586 FT_UINT16, BASE_HEX, NULL, 0x0,
14587 NULL, HFILL}
14589 {&hf_btatt_analog_output,
14590 {"Analog Output", "btatt.analog_output",
14591 FT_UINT16, BASE_HEX, NULL, 0x0,
14592 NULL, HFILL}
14594 {&hf_btatt_location_name,
14595 {"Location Name", "btatt.location_name",
14596 FT_STRING, BASE_NONE, NULL, 0x0,
14597 NULL, HFILL}
14599 {&hf_btatt_uncertainty,
14600 {"Uncertainty", "btatt.uncertainty",
14601 FT_UINT8, BASE_HEX, NULL, 0x0,
14602 NULL, HFILL}
14604 {&hf_btatt_uncertainty_reserved,
14605 {"Reserved", "btatt.uncertainty.reserved",
14606 FT_UINT8, BASE_HEX, NULL, 0x80,
14607 NULL, HFILL}
14609 {&hf_btatt_uncertainty_precision,
14610 {"Precision", "btatt.uncertainty.precision",
14611 FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_precision_vals), 0x70,
14612 NULL, HFILL}
14614 {&hf_btatt_uncertainty_update_time,
14615 {"Update Time", "btatt.uncertainty.update_time",
14616 FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_update_time_vals), 0x0E,
14617 NULL, HFILL}
14619 {&hf_btatt_uncertainty_stationary,
14620 {"Stationary", "btatt.uncertainty.stationary",
14621 FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_stationary_vals), 0x01,
14622 NULL, HFILL}
14624 {&hf_btatt_latitude,
14625 {"Latitude", "btatt.latitude",
14626 FT_INT32, BASE_DEC, NULL, 0x0,
14627 NULL, HFILL}
14629 {&hf_btatt_longitude,
14630 {"Longitude", "btatt.longitude",
14631 FT_INT32, BASE_DEC, NULL, 0x0,
14632 NULL, HFILL}
14634 {&hf_btatt_local_north_coordinate,
14635 {"Local North Coordinate", "btatt.local_north_coordinate",
14636 FT_INT16, BASE_DEC, NULL, 0x0,
14637 NULL, HFILL}
14639 {&hf_btatt_local_east_coordinate,
14640 {"Local East Coordinate", "btatt.local_east_coordinate",
14641 FT_INT16, BASE_DEC, NULL, 0x0,
14642 NULL, HFILL}
14644 {&hf_btatt_floor_number,
14645 {"Floor Number", "btatt.floor_number",
14646 FT_UINT8, BASE_DEC, NULL, 0x0,
14647 NULL, HFILL}
14649 {&hf_btatt_altitude,
14650 {"Altitude", "btatt.altitude",
14651 FT_UINT16, BASE_DEC, NULL, 0x0,
14652 NULL, HFILL}
14654 {&hf_btatt_indoor_positioning_configuration,
14655 {"Indoor Positioning Configuration", "btatt.indoor_positioning_configuration",
14656 FT_UINT8, BASE_HEX, NULL, 0x0,
14657 NULL, HFILL}
14659 {&hf_btatt_indoor_positioning_configuration_reserved,
14660 {"Reserved", "btatt.indoor_positioning_configuration.reserved",
14661 FT_UINT8, BASE_HEX, NULL, 0x80,
14662 NULL, HFILL}
14664 {&hf_btatt_indoor_positioning_configuration_location_name,
14665 {"Location Name", "btatt.indoor_positioning_configuration.location_name",
14666 FT_BOOLEAN, 8, NULL, 0x40,
14667 NULL, HFILL}
14669 {&hf_btatt_indoor_positioning_configuration_uncertainty,
14670 {"Uncertainty", "btatt.indoor_positioning_configuration.uncertainty",
14671 FT_BOOLEAN, 8, NULL, 0x20,
14672 NULL, HFILL}
14674 {&hf_btatt_indoor_positioning_configuration_floor_number,
14675 {"Floor Number", "btatt.indoor_positioning_configuration.floor_number",
14676 FT_BOOLEAN, 8, NULL, 0x10,
14677 NULL, HFILL}
14679 {&hf_btatt_indoor_positioning_configuration_altitude,
14680 {"Altitude", "btatt.indoor_positioning_configuration.altitude",
14681 FT_BOOLEAN, 8, NULL, 0x08,
14682 NULL, HFILL}
14684 {&hf_btatt_indoor_positioning_configuration_tx_power,
14685 {"Tx Power", "btatt.indoor_positioning_configuration.tx_power",
14686 FT_BOOLEAN, 8, NULL, 0x04,
14687 NULL, HFILL}
14689 {&hf_btatt_indoor_positioning_configuration_coordinate_system,
14690 {"Coordinate System", "btatt.indoor_positioning_configuration.coordinate_system",
14691 FT_UINT8, BASE_HEX, VALS(btatt_ips_coordinate_system), 0x02,
14692 NULL, HFILL}
14694 {&hf_btatt_indoor_positioning_configuration_coordinates,
14695 {"Coordinates", "btatt.indoor_positioning_configuration.coordinates",
14696 FT_BOOLEAN, 8, NULL, 0x01,
14697 NULL, HFILL}
14699 {&hf_btatt_number_of_digitals,
14700 {"Number of Digitals", "btatt.number_of_digitals",
14701 FT_UINT8, BASE_DEC, NULL, 0x0,
14702 NULL, HFILL}
14704 {&hf_btatt_time_trigger_setting_condition,
14705 {"Condition", "btatt.time_trigger_setting.condition",
14706 FT_UINT8, BASE_HEX, VALS(time_trigger_setting_condition_vals), 0x0,
14707 NULL, HFILL}
14709 {&hf_btatt_time_trigger_setting_value,
14710 {"Value", "btatt.time_trigger_setting.value",
14711 FT_UINT8, BASE_DEC, NULL, 0x0,
14712 NULL, HFILL}
14714 {&hf_btatt_time_trigger_setting_value_count,
14715 {"Count", "btatt.time_trigger_setting.count",
14716 FT_UINT16, BASE_DEC, NULL, 0x0,
14717 NULL, HFILL}
14719 {&hf_btatt_time_trigger_setting_value_time_interval,
14720 {"Time Interval", "btatt.time_trigger_setting.time_interval",
14721 FT_UINT24, BASE_DEC, NULL, 0x0,
14722 NULL, HFILL}
14724 {&hf_btatt_rsc_measurement_flags,
14725 {"Flags", "btatt.rsc_measurement.flags",
14726 FT_UINT8, BASE_HEX, NULL, 0x0,
14727 NULL, HFILL}
14729 {&hf_btatt_rsc_measurement_flags_reserved,
14730 {"Reserved", "btatt.rsc_measurement.flags.reserved",
14731 FT_UINT8, BASE_HEX, NULL, 0xF8,
14732 NULL, HFILL}
14734 {&hf_btatt_rsc_measurement_flags_type_of_movement,
14735 {"Type of Movement", "btatt.rsc_measurement.flags.type_of_movement",
14736 FT_UINT8, BASE_HEX, VALS(rsc_measurement_flags_type_of_movement_vals), 0x04,
14737 NULL, HFILL}
14739 {&hf_btatt_rsc_measurement_flags_total_distance_present,
14740 {"Total Distance Present", "btatt.rsc_measurement.flags.total_distance_present",
14741 FT_BOOLEAN, 8, NULL, 0x02,
14742 NULL, HFILL}
14744 {&hf_btatt_rsc_measurement_flags_instantaneous_stride_length_present,
14745 {"Instantaneous Stride Length Present", "btatt.rsc_measurement.flags.instantaneous_stride_length_present",
14746 FT_BOOLEAN, 8, NULL, 0x01,
14747 NULL, HFILL}
14749 {&hf_btatt_rsc_measurement_instantaneous_speed,
14750 {"Instantaneous Speed", "btatt.rsc_measurement.instantaneous_speed",
14751 FT_UINT16, BASE_DEC, NULL, 0x0,
14752 NULL, HFILL}
14754 {&hf_btatt_rsc_measurement_instantaneous_cadence,
14755 {"Instantaneous Cadence", "btatt.rsc_measurement.instantaneous_cadence",
14756 FT_UINT8, BASE_DEC, NULL, 0x0,
14757 NULL, HFILL}
14759 {&hf_btatt_rsc_measurement_instantaneous_stride_length,
14760 {"Instantaneous Stride Length", "btatt.rsc_measurement.instantaneous_stride_length",
14761 FT_UINT16, BASE_DEC, NULL, 0x0,
14762 NULL, HFILL}
14764 {&hf_btatt_rsc_measurement_total_distance,
14765 {"Total Distance", "btatt.rsc_measurement.total_distance",
14766 FT_UINT32, BASE_DEC, NULL, 0x0,
14767 NULL, HFILL}
14769 {&hf_btatt_sc_control_point_opcode,
14770 {"Opcode", "btatt.sc_control_point.opcode",
14771 FT_UINT8, BASE_HEX, VALS(sc_control_point_opcode_vals), 0x0,
14772 NULL, HFILL}
14774 {&hf_btatt_sc_control_point_request_opcode,
14775 {"Request Opcode", "btatt.sc_control_point.request_opcode",
14776 FT_UINT8, BASE_HEX, VALS(sc_control_point_opcode_vals), 0x0,
14777 NULL, HFILL}
14779 {&hf_btatt_sc_control_point_cumulative_value,
14780 {"Cumulative Value", "btatt.sc_control_point.cumulative_value",
14781 FT_UINT32, BASE_DEC, NULL, 0x0,
14782 NULL, HFILL}
14784 {&hf_btatt_sc_control_point_response_value,
14785 {"Response Value", "btatt.sc_control_point.response_value",
14786 FT_UINT8, BASE_HEX, VALS(sc_control_point_response_value_vals), 0x0,
14787 NULL, HFILL}
14789 {&hf_btatt_cycling_power_measurement_flags,
14790 {"Flags", "btatt.cycling_power_measurement.flags",
14791 FT_UINT16, BASE_HEX, NULL, 0x0,
14792 NULL, HFILL}
14794 {&hf_btatt_cycling_power_measurement_flags_reserved,
14795 {"Reserved", "btatt.cycling_power_measurement.flags.reserved",
14796 FT_UINT16, BASE_HEX, NULL, 0xE000,
14797 NULL, HFILL}
14799 {&hf_btatt_cycling_power_measurement_flags_offset_compensation_indicator,
14800 {"Offset Compensation Indicator", "btatt.cycling_power_measurement.flags.offset_compensation_indicator",
14801 FT_BOOLEAN, 16, NULL, 0x1000,
14802 NULL, HFILL}
14804 {&hf_btatt_cycling_power_measurement_flags_accumulated_energy,
14805 {"Accumulated Energy", "btatt.cycling_power_measurement.flags.accumulated_energy",
14806 FT_BOOLEAN, 16, NULL, 0x0800,
14807 NULL, HFILL}
14809 {&hf_btatt_cycling_power_measurement_flags_bottom_dead_spot_angle,
14810 {"Bottom Dead Spot Angle", "btatt.cycling_power_measurement.flags.bottom_dead_spot_angle",
14811 FT_BOOLEAN, 16, NULL, 0x0400,
14812 NULL, HFILL}
14814 {&hf_btatt_cycling_power_measurement_flags_top_dead_spot_angle,
14815 {"Top Dead Spot Angle", "btatt.cycling_power_measurement.flags.top_dead_spot_angle",
14816 FT_BOOLEAN, 16, NULL, 0x0200,
14817 NULL, HFILL}
14819 {&hf_btatt_cycling_power_measurement_flags_extreme_angles,
14820 {"Extreme_angles", "btatt.cycling_power_measurement.flags.extreme_angles",
14821 FT_BOOLEAN, 16, NULL, 0x0100,
14822 NULL, HFILL}
14824 {&hf_btatt_cycling_power_measurement_flags_extreme_torque_magnitudes,
14825 {"Extreme Torque Magnitudes", "btatt.cycling_power_measurement.flags.extreme_torque_magnitudes",
14826 FT_BOOLEAN, 16, NULL, 0x0080,
14827 NULL, HFILL}
14829 {&hf_btatt_cycling_power_measurement_flags_extreme_force_magnitudes,
14830 {"Extreme Force Magnitudes", "btatt.cycling_power_measurement.flags.extreme_force_magnitudes",
14831 FT_BOOLEAN, 16, NULL, 0x0040,
14832 NULL, HFILL}
14834 {&hf_btatt_cycling_power_measurement_flags_crank_revolution_data,
14835 {"Crank Revolution Data", "btatt.cycling_power_measurement.flags.crank_revolution_data",
14836 FT_BOOLEAN, 16, NULL, 0x0020,
14837 NULL, HFILL}
14839 {&hf_btatt_cycling_power_measurement_flags_wheel_revolution_data,
14840 {"Wheel Revolution Data", "btatt.cycling_power_measurement.flags.wheel_revolution_data",
14841 FT_BOOLEAN, 16, NULL, 0x0010,
14842 NULL, HFILL}
14844 {&hf_btatt_cycling_power_measurement_flags_accumulated_torque_source,
14845 {"accumulated_torque_source", "btatt.cycling_power_measurement.flags.accumulated_torque_source",
14846 FT_UINT16, BASE_HEX, VALS(cycling_power_measurement_flags_accumulated_torque_source_vals), 0x0008,
14847 NULL, HFILL}
14849 {&hf_btatt_cycling_power_measurement_flags_accumulated_torque,
14850 {"Accumulated Torque", "btatt.cycling_power_measurement.flags.accumulated_torque",
14851 FT_BOOLEAN, 16, NULL, 0x0004,
14852 NULL, HFILL}
14854 {&hf_btatt_cycling_power_measurement_flags_pedal_power_balance_reference,
14855 {"Pedal Power Balance Reference", "btatt.cycling_power_measurement.flags.pedal_power_balance_reference",
14856 FT_BOOLEAN, 16, NULL, 0x0002,
14857 NULL, HFILL}
14859 {&hf_btatt_cycling_power_measurement_flags_pedal_power_balance,
14860 {"Pedal Power Balance", "btatt.cycling_power_measurement.flags.pedal_power_balance",
14861 FT_BOOLEAN, 16, NULL, 0x0001,
14862 NULL, HFILL}
14864 {&hf_btatt_cycling_power_measurement_instantaneous_power,
14865 {"Instantaneous Power", "btatt.cycling_power_measurement.instantaneous_power",
14866 FT_INT16, BASE_DEC, NULL, 0x0,
14867 NULL, HFILL}
14869 {&hf_btatt_cycling_power_measurement_pedal_power_balance,
14870 {"Pedal Power Balance", "btatt.cycling_power_measurement.pedal_power_balance",
14871 FT_UINT8, BASE_DEC, NULL, 0x0,
14872 NULL, HFILL}
14874 {&hf_btatt_cycling_power_measurement_accumulated_torque,
14875 {"Accumulated Torque", "btatt.cycling_power_measurement.accumulated_torque",
14876 FT_UINT16, BASE_DEC, NULL, 0x0,
14877 NULL, HFILL}
14879 {&hf_btatt_cycling_power_measurement_wheel_revolution_data_cumulative_wheel_revolutions,
14880 {"Wheel Revolution Data Cumulative Wheel Revolutions", "btatt.cycling_power_measurement.wheel_revolution_data_cumulative_wheel_revolutions",
14881 FT_UINT32, BASE_DEC, NULL, 0x0,
14882 NULL, HFILL}
14884 {&hf_btatt_cycling_power_measurement_wheel_revolution_data_last_wheel_event_time,
14885 {"Wheel Revolution Data Last Wheel Event Time", "btatt.cycling_power_measurement.wheel_revolution_data_last_wheel_event_time",
14886 FT_UINT16, BASE_DEC, NULL, 0x0,
14887 NULL, HFILL}
14889 {&hf_btatt_cycling_power_measurement_crank_revolution_data_cumulative_crank_revolutions,
14890 {"Crank Revolution Data Cumulative Crank Revolutions", "btatt.cycling_power_measurement.crank_revolution_data_cumulative_crank_revolutions",
14891 FT_UINT16, BASE_DEC, NULL, 0x0,
14892 NULL, HFILL}
14894 {&hf_btatt_cycling_power_measurement_crank_revolution_data_last_crank_event_time,
14895 {"Crank Revolution Data Last Crank Event Time", "btatt.cycling_power_measurement.crank_revolution_data_last_crank_event_time",
14896 FT_UINT16, BASE_DEC, NULL, 0x0,
14897 NULL, HFILL}
14899 {&hf_btatt_cycling_power_measurement_extreme_force_magnitudes_maximum_force_magnitude,
14900 {"Extreme Force Magnitudes Maximum Force Magnitude", "btatt.cycling_power_measurement.extreme_force_magnitudes_maximum_force_magnitude",
14901 FT_INT16, BASE_DEC, NULL, 0x0,
14902 NULL, HFILL}
14904 {&hf_btatt_cycling_power_measurement_extreme_force_magnitudes_minimum_force_magnitude,
14905 {"Extreme Force Magnitudes Minimum Force Magnitude", "btatt.cycling_power_measurement.extreme_force_magnitudes_minimum_force_magnitude",
14906 FT_INT16, BASE_DEC, NULL, 0x0,
14907 NULL, HFILL}
14909 {&hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_maximum_torque_magnitude,
14910 {"Extreme Torque Magnitudes Maximum Torque Magnitude", "btatt.cycling_power_measurement.extreme_torque_magnitudes_maximum_torque_magnitude",
14911 FT_INT16, BASE_DEC, NULL, 0x0,
14912 NULL, HFILL}
14914 {&hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_minimum_torque_magnitude,
14915 {"Extreme Torque Magnitudes Minimum Torque Magnitude", "btatt.cycling_power_measurement.extreme_torque_magnitudes_minimum_torque_magnitude",
14916 FT_INT16, BASE_DEC, NULL, 0x0,
14917 NULL, HFILL}
14919 {&hf_btatt_cycling_power_measurement_extreme_angles,
14920 {"Extreme Angles", "btatt.cycling_power_measurement.extreme_angles",
14921 FT_UINT24, BASE_HEX, NULL, 0x0,
14922 NULL, HFILL}
14924 {&hf_btatt_cycling_power_measurement_extreme_angles_maximum,
14925 {"Maximum", "btatt.cycling_power_measurement.extreme_angles.maximum",
14926 FT_UINT24, BASE_DEC, NULL, 0xFFF000,
14927 NULL, HFILL}
14929 {&hf_btatt_cycling_power_measurement_extreme_angles_minimum,
14930 {"Minimum", "btatt.cycling_power_measurement.extreme_angles.minimum",
14931 FT_UINT24, BASE_DEC, NULL, 0x000FFF,
14932 NULL, HFILL}
14934 {&hf_btatt_cycling_power_measurement_top_dead_spot_angle,
14935 {"Top Dead Spot Angle", "btatt.cycling_power_measurement.top_dead_spot_angle",
14936 FT_UINT16, BASE_DEC, NULL, 0x0,
14937 NULL, HFILL}
14939 {&hf_btatt_cycling_power_measurement_bottom_dead_spot_angle,
14940 {"Bottom Dead Spot Angle", "btatt.cycling_power_measurement.bottom_dead_spot_angle",
14941 FT_UINT16, BASE_DEC, NULL, 0x0,
14942 NULL, HFILL}
14944 {&hf_btatt_cycling_power_measurement_accumulated_energy,
14945 {"Accumulated Energy", "btatt.cycling_power_measurement.accumulated_energy",
14946 FT_UINT16, BASE_DEC, NULL, 0x0,
14947 NULL, HFILL}
14949 {&hf_btatt_csc_measurement_flags,
14950 {"Flags", "btatt.csc_measurement.flags",
14951 FT_UINT8, BASE_HEX, NULL, 0x0,
14952 NULL, HFILL}
14954 {&hf_btatt_csc_measurement_flags_reserved,
14955 {"Reserved", "btatt.csc_measurement.flags.reserved",
14956 FT_UINT8, BASE_HEX, NULL, 0xFC,
14957 NULL, HFILL}
14959 {&hf_btatt_csc_measurement_flags_crank_revolution_data,
14960 {"Crank Revolution Data", "btatt.csc_measurement.flags.crank_revolution_data",
14961 FT_BOOLEAN, 8, NULL, 0x02,
14962 NULL, HFILL}
14964 {&hf_btatt_csc_measurement_flags_wheel_revolution_data,
14965 {"Wheel Revolution Data", "btatt.csc_measurement.flags.wheel_revolution_data",
14966 FT_BOOLEAN, 8, NULL, 0x01,
14967 NULL, HFILL}
14969 {&hf_btatt_csc_measurement_cumulative_wheel_revolutions,
14970 {"Cumulative Wheel Revolutions", "btatt.csc_measurement.cumulative_wheel_revolutions",
14971 FT_UINT32, BASE_DEC, NULL, 0x0,
14972 NULL, HFILL}
14974 {&hf_btatt_csc_measurement_cumulative_crank_revolutions,
14975 {"Cumulative Crank Revolutions", "btatt.csc_measurement.cumulative_crank_revolutions",
14976 FT_UINT16, BASE_DEC, NULL, 0x0,
14977 NULL, HFILL}
14979 {&hf_btatt_csc_measurement_last_event_time,
14980 {"Last Event Time", "btatt.csc_measurement.last_event_time",
14981 FT_UINT16, BASE_DEC, NULL, 0x0,
14982 NULL, HFILL}
14984 {&hf_btatt_cycling_power_vector_flags,
14985 {"Flags", "btatt.csc_measurement.flags",
14986 FT_UINT8, BASE_HEX, NULL, 0x0,
14987 NULL, HFILL}
14989 {&hf_btatt_cycling_power_vector_flags_reserved,
14990 {"Reserved", "btatt.csc_measurement.flags.reserved",
14991 FT_UINT8, BASE_HEX, NULL, 0xC0,
14992 NULL, HFILL}
14994 {&hf_btatt_cycling_power_vector_flags_instantaneous_measurement_direction,
14995 {"Instantaneous Measurement Direction", "btatt.cycling_power_vector.flags.instantaneous_measurement_direction",
14996 FT_UINT8, BASE_HEX, VALS(cycling_power_vector_flags_instantaneous_measurement_direction_vals), 0x30,
14997 NULL, HFILL}
14999 {&hf_btatt_cycling_power_vector_flags_instantaneous_torque_magnitude_array,
15000 {"Instantaneous Torque Magnitude Array", "btatt.cycling_power_vector.flags.instantaneous_torque_magnitude_array",
15001 FT_BOOLEAN, 8, NULL, 0x08,
15002 NULL, HFILL}
15004 {&hf_btatt_cycling_power_vector_flags_instantaneous_force_magnitude_array,
15005 {"Instantaneous Force Magnitude Array", "btatt.cycling_power_vector.flags.instantaneous_force_magnitude_array",
15006 FT_BOOLEAN, 8, NULL, 0x04,
15007 NULL, HFILL}
15009 {&hf_btatt_cycling_power_vector_flags_first_crank_measurement_angle,
15010 {"First Crank Measurement Angle", "btatt.cycling_power_vector.flags.first_crank_measurement_angle",
15011 FT_BOOLEAN, 8, NULL, 0x02,
15012 NULL, HFILL}
15014 {&hf_btatt_cycling_power_vector_flags_crank_revolution_data,
15015 {"Crank Revolution Data", "btatt.cycling_power_vector.flags.crank_revolution_data",
15016 FT_BOOLEAN, 8, NULL, 0x01,
15017 NULL, HFILL}
15020 {&hf_btatt_cycling_power_vector_crank_revolution_data_cumulative_crank_revolutions,
15021 {"cumulative_crank_revolutions", "btatt.csc_measurement.cumulative_crank_revolutions",
15022 FT_UINT16, BASE_DEC, NULL, 0x0,
15023 NULL, HFILL}
15025 {&hf_btatt_cycling_power_vector_crank_revolution_data_last_crank_event_time,
15026 {"Last Crank Event Time", "btatt.csc_measurement.last_crank_event_time",
15027 FT_UINT16, BASE_DEC, NULL, 0x0,
15028 NULL, HFILL}
15030 {&hf_btatt_cycling_power_vector_first_crank_measurement_angle,
15031 {"First Crank Measurement Angle", "btatt.csc_measurement.first_crank_measurement_angle",
15032 FT_UINT16, BASE_DEC, NULL, 0x0,
15033 NULL, HFILL}
15036 {&hf_btatt_cycling_power_vector_instantaneous_force_magnitude_array,
15037 {"Instantaneous Force Magnitude Array", "btatt.csc_measurement.instantaneous_force_magnitude_array",
15038 FT_INT16, BASE_DEC, NULL, 0x0,
15039 NULL, HFILL}
15041 {&hf_btatt_cycling_power_vector_instantaneous_torque_magnitude_array,
15042 {"Instantaneous Torque Magnitude Array", "btatt.csc_measurement.instantaneous_torque_magnitude_array",
15043 FT_INT16, BASE_DEC, NULL, 0x0,
15044 NULL, HFILL}
15046 {&hf_btatt_cycling_power_control_point_opcode,
15047 {"Opcode", "btatt.cycling_power_control_point.opcode",
15048 FT_UINT8, BASE_HEX, VALS(cycling_power_control_point_opcode), 0x0,
15049 NULL, HFILL}
15051 {&hf_btatt_cycling_power_control_point_cumulative_value,
15052 {"Cumulative Value", "btatt.cycling_power_control_point.cumulative_value",
15053 FT_UINT32, BASE_DEC, NULL, 0x0,
15054 NULL, HFILL}
15056 {&hf_btatt_cycling_power_control_point_sensor_location,
15057 {"Sensor Location", "btatt.cycling_power_control_point.sensor_location",
15058 FT_UINT8, BASE_DEC, NULL, 0x0,
15059 NULL, HFILL}
15061 {&hf_btatt_cycling_power_control_point_crank_length,
15062 {"Crank Length", "btatt.cycling_power_control_point.crank_length",
15063 FT_UINT16, BASE_DEC, NULL, 0x0,
15064 NULL, HFILL}
15066 {&hf_btatt_cycling_power_control_point_chain_length,
15067 {"Chain Length", "btatt.cycling_power_control_point.chain_length",
15068 FT_UINT16, BASE_DEC, NULL, 0x0,
15069 NULL, HFILL}
15071 {&hf_btatt_cycling_power_control_point_chain_weight,
15072 {"Chain Weight", "btatt.cycling_power_control_point.chain_weight",
15073 FT_UINT16, BASE_DEC, NULL, 0x0,
15074 NULL, HFILL}
15076 {&hf_btatt_cycling_power_control_point_span_length,
15077 {"Span Length", "btatt.cycling_power_control_point.span_length",
15078 FT_UINT16, BASE_DEC, NULL, 0x0,
15079 NULL, HFILL}
15081 {&hf_btatt_cycling_power_control_point_content_mask,
15082 {"Content Mask", "btatt.cycling_power_control_point.content_mask",
15083 FT_UINT16, BASE_HEX, NULL, 0x0,
15084 NULL, HFILL}
15086 {&hf_btatt_cycling_power_control_point_content_mask_reserved,
15087 {"Reserved", "btatt.cycling_power_control_point.content_mask.reserved",
15088 FT_UINT16, BASE_HEX, NULL, 0xFE00,
15089 NULL, HFILL}
15091 {&hf_btatt_cycling_power_control_point_content_mask_accumulated_energy,
15092 {"Accumulated Energy", "btatt.cycling_power_control_point.content_mask.accumulated_energy",
15093 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0100,
15094 NULL, HFILL}
15096 {&hf_btatt_cycling_power_control_point_content_mask_bottom_dead_spot_angle,
15097 {"Bottom Dead Spot Angle", "btatt.cycling_power_control_point.content_mask.bottom_dead_spot_angle",
15098 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0080,
15099 NULL, HFILL}
15101 {&hf_btatt_cycling_power_control_point_content_mask_top_dead_spot_angle,
15102 {"Top Dead Spot Angle", "btatt.cycling_power_control_point.content_mask.top_dead_spot_angle",
15103 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0040,
15104 NULL, HFILL}
15106 {&hf_btatt_cycling_power_control_point_content_mask_extreme_angles,
15107 {"Extreme Angles", "btatt.cycling_power_control_point.content_mask.extreme_angles",
15108 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0020,
15109 NULL, HFILL}
15111 {&hf_btatt_cycling_power_control_point_content_mask_extreme_magnitudes,
15112 {"Extreme Magnitudes", "btatt.cycling_power_control_point.content_mask.extreme_magnitudes",
15113 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0010,
15114 NULL, HFILL}
15116 {&hf_btatt_cycling_power_control_point_content_mask_crank_revolution_data,
15117 {"Crank Revolution Data", "btatt.cycling_power_control_point.content_mask.crank_revolution_data",
15118 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0008,
15119 NULL, HFILL}
15121 {&hf_btatt_cycling_power_control_point_content_mask_wheel_revolution_data,
15122 {"Wheel Revolution Data", "btatt.cycling_power_control_point.content_mask.wheel_revolution_data",
15123 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0004,
15124 NULL, HFILL}
15126 {&hf_btatt_cycling_power_control_point_content_mask_accumulated_torque,
15127 {"Accumulated Torque", "btatt.cycling_power_control_point.content_mask.accumulated_torque",
15128 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0002,
15129 NULL, HFILL}
15131 {&hf_btatt_cycling_power_control_point_content_mask_pedal_power_balance,
15132 {"Pedal Power Balance", "btatt.cycling_power_control_point.content_mask.pedal_power_balance",
15133 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0001,
15134 NULL, HFILL}
15136 {&hf_btatt_cycling_power_control_point_request_opcode,
15137 {"Request Opcode", "btatt.cycling_power_control_point.request_opcode",
15138 FT_UINT8, BASE_HEX, VALS(cycling_power_control_point_opcode), 0x0,
15139 NULL, HFILL}
15141 {&hf_btatt_cycling_power_control_point_response_value,
15142 {"Response Value", "btatt.cycling_power_control_point.response_value",
15143 FT_UINT8, BASE_HEX, VALS(cycling_power_control_point_response_value), 0x0,
15144 NULL, HFILL}
15146 {&hf_btatt_cycling_power_control_point_start_offset_compensation,
15147 {"Start Offset Compensation", "btatt.cycling_power_control_point.start_offset_compensation",
15148 FT_INT16, BASE_DEC, NULL, 0x0,
15149 NULL, HFILL}
15151 {&hf_btatt_cycling_power_control_point_sampling_rate,
15152 {"Sampling Rate", "btatt.cycling_power_control_point.sampling_rate",
15153 FT_UINT8, BASE_DEC, NULL, 0x0,
15154 NULL, HFILL}
15156 {&hf_btatt_cycling_power_control_point_factory_calibration_date,
15157 {"Factory Calibration Date", "btatt.cycling_power_control_point.factory_calibration_date",
15158 FT_NONE, BASE_NONE, NULL, 0x0,
15159 NULL, HFILL}
15161 {&hf_btatt_location_and_speed_flags,
15162 {"Flags", "btatt.location_and_speed.flags",
15163 FT_UINT16, BASE_HEX, NULL, 0x0,
15164 NULL, HFILL}
15166 {&hf_btatt_location_and_speed_flags_reserved,
15167 {"Reserved", "btatt.location_and_speed.flags.reserved",
15168 FT_UINT16, BASE_HEX, NULL, 0xC000,
15169 NULL, HFILL}
15171 {&hf_btatt_location_and_speed_flags_heading_source,
15172 {"Heading Source", "btatt.location_and_speed.flags.heading_source",
15173 FT_BOOLEAN, 16, TFS(&flags_heading_source_tfs), 0x3000,
15174 NULL, HFILL}
15176 {&hf_btatt_location_and_speed_flags_elevation_source,
15177 {"Elevation Source", "btatt.location_and_speed.flags.elevation_source",
15178 FT_UINT16, BASE_HEX, VALS(location_and_speed_flags_elevation_source_vals), 0x0C00,
15179 NULL, HFILL}
15181 {&hf_btatt_location_and_speed_flags_speed_and_distance_format,
15182 {"Speed_and Distance Format", "btatt.location_and_speed.flags.speed_and_distance_format",
15183 FT_BOOLEAN, 16, TFS(&location_and_speed_flags_speed_and_distance_format_tfs), 0x0200,
15184 NULL, HFILL}
15186 {&hf_btatt_location_and_speed_flags_position_status,
15187 {"Position Status", "btatt.location_and_speed.flags.position_status",
15188 FT_UINT16, BASE_HEX, VALS(flags_position_status_vals), 0x0180,
15189 NULL, HFILL}
15191 {&hf_btatt_location_and_speed_flags_utc_time,
15192 {"UTC Time Present", "btatt.location_and_speed.flags.utc_time",
15193 FT_BOOLEAN, 16, NULL, 0x0040,
15194 NULL, HFILL}
15196 {&hf_btatt_location_and_speed_flags_rolling_time,
15197 {"Rolling Time", "btatt.location_and_speed.flags.rolling_time",
15198 FT_BOOLEAN, 16, NULL, 0x0020,
15199 NULL, HFILL}
15201 {&hf_btatt_location_and_speed_flags_heading,
15202 {"Heading", "btatt.location_and_speed.flags.heading",
15203 FT_BOOLEAN, 16, NULL, 0x0010,
15204 NULL, HFILL}
15206 {&hf_btatt_location_and_speed_flags_elevation,
15207 {"Elevation", "btatt.location_and_speed.flags.elevation",
15208 FT_BOOLEAN, 16, NULL, 0x0008,
15209 NULL, HFILL}
15211 {&hf_btatt_location_and_speed_flags_location,
15212 {"Location", "btatt.location_and_speed.flags.location",
15213 FT_BOOLEAN, 16, NULL, 0x0004,
15214 NULL, HFILL}
15216 {&hf_btatt_location_and_speed_flags_total_distance,
15217 {"Total Distance Present", "btatt.location_and_speed.flags.total_distance",
15218 FT_BOOLEAN, 16, NULL, 0x0002,
15219 NULL, HFILL}
15221 {&hf_btatt_location_and_speed_flags_instantaneous_speed,
15222 {"Instantaneous Speed", "btatt.location_and_speed.flags.instantaneous_speed",
15223 FT_BOOLEAN, 16, NULL, 0x0001,
15224 NULL, HFILL}
15226 {&hf_btatt_location_and_speed_instantaneous_speed,
15227 {"Instantaneous Speed", "btatt.location_and_speed.instantaneous_speed",
15228 FT_UINT16, BASE_DEC, NULL, 0x0,
15229 NULL, HFILL}
15231 {&hf_btatt_location_and_speed_total_distance,
15232 {"Total Distance", "btatt.location_and_speed.total_distance",
15233 FT_UINT24, BASE_DEC, NULL, 0x0,
15234 NULL, HFILL}
15236 {&hf_btatt_location_and_speed_location_longitude,
15237 {"Location Longitude", "btatt.location_and_speed.location.longitude",
15238 FT_INT32, BASE_DEC, NULL, 0x0,
15239 NULL, HFILL}
15241 {&hf_btatt_location_and_speed_location_latitude,
15242 {"Location Latitude", "btatt.location_and_speed.location.latitude",
15243 FT_INT32, BASE_DEC, NULL, 0x0,
15244 NULL, HFILL}
15246 {&hf_btatt_location_and_speed_elevation,
15247 {"Elevation", "btatt.location_and_speed.elevation",
15248 FT_INT24, BASE_DEC, NULL, 0x0,
15249 NULL, HFILL}
15251 {&hf_btatt_location_and_speed_heading,
15252 {"Heading", "btatt.location_and_speed.heading",
15253 FT_UINT16, BASE_DEC, NULL, 0x0,
15254 NULL, HFILL}
15256 {&hf_btatt_location_and_speed_rolling_time,
15257 {"Rolling Time", "btatt.location_and_speed.rolling_time",
15258 FT_UINT8, BASE_DEC, NULL, 0x0,
15259 NULL, HFILL}
15261 {&hf_btatt_location_and_speed_utc_time,
15262 {"UTC Time", "btatt.location_and_speed.utc_time",
15263 FT_NONE, BASE_NONE, NULL, 0x0,
15264 NULL, HFILL}
15266 {&hf_btatt_navigation_flags,
15267 {"Flags", "btatt.navigation.flags",
15268 FT_UINT16, BASE_HEX, NULL, 0x0,
15269 NULL, HFILL}
15271 {&hf_btatt_navigation_flags_reserved,
15272 {"Reserved", "btatt.navigation.flags.reserved",
15273 FT_UINT16, BASE_HEX, NULL, 0xFE00,
15274 NULL, HFILL}
15276 {&hf_btatt_navigation_flags_destination_reached,
15277 {"Destination Reached", "btatt.navigation.flags.destination_reached",
15278 FT_BOOLEAN, 16, NULL, 0x0100,
15279 NULL, HFILL}
15281 {&hf_btatt_navigation_flags_waypoint_reached,
15282 {"Waypoint Reached", "btatt.navigation.flags.waypoint_reached",
15283 FT_BOOLEAN, 16, NULL, 0x0080,
15284 NULL, HFILL}
15286 {&hf_btatt_navigation_flags_navigation_indicator_type,
15287 {"Navigation Indicator Type", "btatt.navigation.flags.navigation_indicator_type",
15288 FT_BOOLEAN, 16, TFS(&navigation_indicator_type_tfs), 0x0040,
15289 NULL, HFILL}
15291 {&hf_btatt_navigation_flags_heading_source,
15292 {"Heading Source", "btatt.navigation.flags.heading_source",
15293 FT_BOOLEAN, 16, TFS(&flags_heading_source_tfs), 0x0020,
15294 NULL, HFILL}
15296 {&hf_btatt_navigation_flags_position_status,
15297 {"Position Status", "btatt.navigation.flags.position_status",
15298 FT_UINT16, BASE_HEX, VALS(flags_position_status_vals), 0x0018,
15299 NULL, HFILL}
15301 {&hf_btatt_navigation_flags_estimated_time_of_arrival,
15302 {"Estimated Time of Arrival", "btatt.navigation.flags.estimated_time_of_arrival",
15303 FT_BOOLEAN, 16, NULL, 0x0004,
15304 NULL, HFILL}
15306 {&hf_btatt_navigation_flags_remaining_vertical_distance,
15307 {"Remaining Vertical Distance", "btatt.navigation.flags.remaining_vertical_distance",
15308 FT_BOOLEAN, 16, NULL, 0x0002,
15309 NULL, HFILL}
15311 {&hf_btatt_navigation_flags_remaining_distance,
15312 {"Remaining Distance", "btatt.navigation.flags.remaining_distance",
15313 FT_BOOLEAN, 16, NULL, 0x0001,
15314 NULL, HFILL}
15316 {&hf_btatt_navigation_bearing,
15317 {"Bearing", "btatt.navigation.bearing",
15318 FT_UINT16, BASE_DEC, NULL, 0x0,
15319 NULL, HFILL}
15321 {&hf_btatt_navigation_heading,
15322 {"Heading", "btatt.navigation.heading",
15323 FT_UINT16, BASE_DEC, NULL, 0x0,
15324 NULL, HFILL}
15326 {&hf_btatt_navigation_remaining_distance,
15327 {"Remaining Distance", "btatt.navigation.remaining_distance",
15328 FT_UINT24, BASE_DEC, NULL, 0x0,
15329 NULL, HFILL}
15331 {&hf_btatt_navigation_remaining_vertical_distance,
15332 {"Remaining Vertical Distance", "btatt.navigation.remaining_vertical_distance",
15333 FT_INT24, BASE_DEC, NULL, 0x0,
15334 NULL, HFILL}
15336 {&hf_btatt_navigation_estimated_time_of_arrival,
15337 {"Estimated Time of Arrival", "btatt.navigation.estimated_time_of_arrival",
15338 FT_NONE, BASE_NONE, NULL, 0x0,
15339 NULL, HFILL}
15341 {&hf_btatt_position_quality_flags,
15342 {"Flags", "btatt.position_quality.flags",
15343 FT_UINT16, BASE_HEX, NULL, 0x0,
15344 NULL, HFILL}
15346 {&hf_btatt_position_quality_flags_reserved,
15347 {"Reserved", "btatt.position_quality.flags.reserved",
15348 FT_UINT16, BASE_HEX, NULL, 0xFE00,
15349 NULL, HFILL}
15351 {&hf_btatt_position_quality_flags_position_status,
15352 {"Position Status", "btatt.position_quality.flags.position_status",
15353 FT_UINT16, BASE_HEX, VALS(flags_position_status_vals), 0x0180,
15354 NULL, HFILL}
15356 {&hf_btatt_position_quality_flags_vdop,
15357 {"VDOP", "btatt.position_quality.flags.vdop",
15358 FT_BOOLEAN, 16, NULL, 0x0040,
15359 NULL, HFILL}
15361 {&hf_btatt_position_quality_flags_hdop,
15362 {"HDOP", "btatt.position_quality.flags.hdop",
15363 FT_BOOLEAN, 16, NULL, 0x0020,
15364 NULL, HFILL}
15366 {&hf_btatt_position_quality_flags_evpe,
15367 {"EVPE", "btatt.position_quality.flags.evpe",
15368 FT_BOOLEAN, 16, NULL, 0x0010,
15369 NULL, HFILL}
15371 {&hf_btatt_position_quality_flags_ehpe,
15372 {"EHPE", "btatt.position_quality.flags.ehpe",
15373 FT_BOOLEAN, 16, NULL, 0x0008,
15374 NULL, HFILL}
15376 {&hf_btatt_position_quality_flags_time_to_first_fix,
15377 {"Time to First Fix", "btatt.position_quality.flags.time_to_first_fix",
15378 FT_BOOLEAN, 16, NULL, 0x0004,
15379 NULL, HFILL}
15381 {&hf_btatt_position_quality_flags_number_of_beacons_in_view,
15382 {"Number of Beacons in View", "btatt.position_quality.flags.number_of_beacons_in_view",
15383 FT_BOOLEAN, 16, NULL, 0x0002,
15384 NULL, HFILL}
15386 {&hf_btatt_position_quality_flags_number_of_beacons_in_solution,
15387 {"Number of Beacons_in Solution", "btatt.position_quality.flags.number_of_beacons_in_solution",
15388 FT_BOOLEAN, 16, NULL, 0x0001,
15389 NULL, HFILL}
15391 {&hf_btatt_position_quality_number_of_beacons_in_solution,
15392 {"number_of_beacons_in_solution", "btatt.position_quality.number_of_beacons_in_solution",
15393 FT_UINT8, BASE_DEC, NULL, 0x0,
15394 NULL, HFILL}
15396 {&hf_btatt_position_quality_number_of_beacons_in_view,
15397 {"number_of_beacons_in_view", "btatt.position_quality.number_of_beacons_in_view",
15398 FT_UINT8, BASE_DEC, NULL, 0x0,
15399 NULL, HFILL}
15401 {&hf_btatt_position_quality_time_to_first_fix,
15402 {"time_to_first_fix", "btatt.position_quality.time_to_first_fix",
15403 FT_UINT16, BASE_DEC, NULL, 0x0,
15404 NULL, HFILL}
15406 {&hf_btatt_position_quality_ehpe,
15407 {"EHPE", "btatt.position_quality.ehpe",
15408 FT_UINT32, BASE_DEC, NULL, 0x0,
15409 NULL, HFILL}
15411 {&hf_btatt_position_quality_evpe,
15412 {"EVPE", "btatt.position_quality.evpe",
15413 FT_UINT32, BASE_DEC, NULL, 0x0,
15414 NULL, HFILL}
15416 {&hf_btatt_position_quality_hdop,
15417 {"HDOP", "btatt.position_quality.hdop",
15418 FT_UINT8, BASE_DEC, NULL, 0x0,
15419 NULL, HFILL}
15421 {&hf_btatt_position_quality_vdop,
15422 {"VDOP", "btatt.position_quality.vdop",
15423 FT_UINT8, BASE_DEC, NULL, 0x0,
15424 NULL, HFILL}
15426 {&hf_btatt_ln_control_point_opcode,
15427 {"Opcode", "btatt.ln_control_point.opcode",
15428 FT_UINT8, BASE_HEX, VALS(ln_control_point_opcode), 0x0,
15429 NULL, HFILL}
15431 {&hf_btatt_ln_control_point_cumulative_value,
15432 {"Cumulative Value", "btatt.ln_control_point.cumulative_value",
15433 FT_UINT24, BASE_DEC, NULL, 0x0,
15434 NULL, HFILL}
15436 {&hf_btatt_ln_control_point_content_mask,
15437 {"Content Mask", "btatt.ln_control_point.content_mask",
15438 FT_UINT16, BASE_HEX, NULL, 0x0,
15439 NULL, HFILL}
15441 {&hf_btatt_ln_control_point_content_mask_reserved,
15442 {"Reserved", "btatt.ln_control_point.content_mask.reserved",
15443 FT_UINT16, BASE_HEX, NULL, 0xFF80,
15444 NULL, HFILL}
15446 {&hf_btatt_ln_control_point_content_mask_utc_time,
15447 {"UTC Time", "btatt.ln_control_point.content_mask.utc_time",
15448 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0040,
15449 NULL, HFILL}
15451 {&hf_btatt_ln_control_point_content_mask_rolling_time,
15452 {"Rolling Time", "btatt.ln_control_point.content_mask.rolling_time",
15453 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0020,
15454 NULL, HFILL}
15456 {&hf_btatt_ln_control_point_content_mask_heading,
15457 {"Heading", "btatt.ln_control_point.content_mask.heading",
15458 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0010,
15459 NULL, HFILL}
15461 {&hf_btatt_ln_control_point_content_mask_elevation,
15462 {"Elevation", "btatt.ln_control_point.content_mask.elevation",
15463 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0008,
15464 NULL, HFILL}
15466 {&hf_btatt_ln_control_point_content_mask_location,
15467 {"Location", "btatt.ln_control_point.content_mask.location",
15468 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0004,
15469 NULL, HFILL}
15471 {&hf_btatt_ln_control_point_content_mask_total_distance,
15472 {"Total Distance", "btatt.ln_control_point.content_mask.total_distance",
15473 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0002,
15474 NULL, HFILL}
15476 {&hf_btatt_ln_control_point_content_mask_instantaneous_speed,
15477 {"Instantaneous Speed", "btatt.ln_control_point.content_mask.instantaneous_speed",
15478 FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0001,
15479 NULL, HFILL}
15481 {&hf_btatt_ln_control_point_navigation_control,
15482 {"Navigation Control", "btatt.ln_control_point.navigation_control",
15483 FT_UINT8, BASE_HEX, VALS(ln_control_point_navigation_control_vals), 0x0,
15484 NULL, HFILL}
15486 {&hf_btatt_ln_control_point_route_number,
15487 {"Route Number", "btatt.ln_control_point.route_number",
15488 FT_UINT16, BASE_DEC, NULL, 0x0,
15489 NULL, HFILL}
15491 {&hf_btatt_ln_control_point_fix_rate,
15492 {"Fix Rate", "btatt.ln_control_point.fix_rate",
15493 FT_UINT8, BASE_DEC, NULL, 0x0,
15494 NULL, HFILL}
15496 {&hf_btatt_ln_control_point_elevation,
15497 {"Elevation", "btatt.ln_control_point.elevation",
15498 FT_INT24, BASE_DEC, NULL, 0x0,
15499 NULL, HFILL}
15501 {&hf_btatt_ln_control_point_request_opcode,
15502 {"Request Opcode", "btatt.ln_control_point.request_opcode",
15503 FT_UINT8, BASE_HEX, VALS(ln_control_point_opcode), 0x0,
15504 NULL, HFILL}
15506 {&hf_btatt_ln_control_point_response_value,
15507 {"Response Value", "btatt.ln_control_point.response_value",
15508 FT_UINT8, BASE_HEX, VALS(ln_control_point_response_value), 0x0,
15509 NULL, HFILL}
15511 {&hf_btatt_ln_control_point_response_value_number_of_routes,
15512 {"Number of Routes", "btatt.ln_control_point.number_of_routes",
15513 FT_UINT16, BASE_DEC, NULL, 0x0,
15514 NULL, HFILL}
15516 {&hf_btatt_ln_control_point_response_value_name_of_route,
15517 {"Name_of Route", "btatt.ln_control_point.name_of_route",
15518 FT_STRING, BASE_NONE, NULL, 0x0,
15519 NULL, HFILL}
15521 {&hf_btatt_body_composition_measurement_flags,
15522 {"Flags", "btatt.body_composition_measurement.flags",
15523 FT_UINT16, BASE_HEX, NULL, 0x0,
15524 NULL, HFILL}
15526 {&hf_btatt_body_composition_measurement_flags_reserved,
15527 {"Reserved", "btatt.body_composition_measurement.flags.reserved",
15528 FT_UINT16, BASE_HEX, NULL, 0xE000,
15529 NULL, HFILL}
15531 {&hf_btatt_body_composition_measurement_flags_multiple_packet_measurement,
15532 {"Multiple Packet Measurement", "btatt.body_composition_measurement.flags.multiple_packet_measurement",
15533 FT_BOOLEAN, 16, NULL, 0x1000,
15534 NULL, HFILL}
15536 {&hf_btatt_body_composition_measurement_flags_height,
15537 {"Height", "btatt.body_composition_measurement.flags.height",
15538 FT_BOOLEAN, 16, NULL, 0x0800,
15539 NULL, HFILL}
15541 {&hf_btatt_body_composition_measurement_flags_weight,
15542 {"Weight", "btatt.body_composition_measurement.flags.weight",
15543 FT_BOOLEAN, 16, NULL, 0x0400,
15544 NULL, HFILL}
15546 {&hf_btatt_body_composition_measurement_flags_impedance,
15547 {"Impedance", "btatt.body_composition_measurement.flags.impedance",
15548 FT_BOOLEAN, 16, NULL, 0x0200,
15549 NULL, HFILL}
15551 {&hf_btatt_body_composition_measurement_flags_body_water_mass,
15552 {"Body Water Mass", "btatt.body_composition_measurement.flags.body_water_mass",
15553 FT_BOOLEAN, 16, NULL, 0x0100,
15554 NULL, HFILL}
15556 {&hf_btatt_body_composition_measurement_flags_soft_lean_mass,
15557 {"Soft Lean Mass", "btatt.body_composition_measurement.flags.soft_lean_mass",
15558 FT_BOOLEAN, 16, NULL, 0x0080,
15559 NULL, HFILL}
15561 {&hf_btatt_body_composition_measurement_flags_fat_free_mass,
15562 {"Fat Free Mass", "btatt.body_composition_measurement.flags.fat_free_mass",
15563 FT_BOOLEAN, 16, NULL, 0x0040,
15564 NULL, HFILL}
15566 {&hf_btatt_body_composition_measurement_flags_muscle_mass,
15567 {"Muscle Mass", "btatt.body_composition_measurement.flags.muscle_mass",
15568 FT_BOOLEAN, 16, NULL, 0x0020,
15569 NULL, HFILL}
15571 {&hf_btatt_body_composition_measurement_flags_muscle_percentage,
15572 {"Muscle Percentage", "btatt.body_composition_measurement.flags.muscle_percentage",
15573 FT_BOOLEAN, 16, NULL, 0x0010,
15574 NULL, HFILL}
15576 {&hf_btatt_body_composition_measurement_flags_basal_metabolism,
15577 {"Basal Metabolism", "btatt.body_composition_measurement.flags.basal_metabolism",
15578 FT_BOOLEAN, 16, NULL, 0x0008,
15579 NULL, HFILL}
15581 {&hf_btatt_body_composition_measurement_flags_user_id,
15582 {"User ID", "btatt.body_composition_measurement.flags.user_id",
15583 FT_BOOLEAN, 16, NULL, 0x0004,
15584 NULL, HFILL}
15586 {&hf_btatt_body_composition_measurement_flags_timestamp,
15587 {"Timestamp", "btatt.body_composition_measurement.flags.timestamp",
15588 FT_BOOLEAN, 16, NULL, 0x0002,
15589 NULL, HFILL}
15591 {&hf_btatt_body_composition_measurement_flags_measurement_units,
15592 {"Measurement Units", "btatt.body_composition_measurement.flags.measurement_units",
15593 FT_UINT16, BASE_HEX, VALS(body_composition_measurement_flags_measurement_units_vals), 0x0001,
15594 NULL, HFILL}
15596 {&hf_btatt_body_composition_measurement_body_fat_percentage,
15597 {"Body Fat Percentage", "btatt.body_composition_measurement.body_fat_percentage",
15598 FT_UINT16, BASE_DEC, NULL, 0x0,
15599 NULL, HFILL}
15601 {&hf_btatt_body_composition_measurement_timestamp,
15602 {"Timestamp", "btatt.body_composition_measurement.timestamp",
15603 FT_NONE, BASE_NONE, NULL, 0x0,
15604 NULL, HFILL}
15606 {&hf_btatt_body_composition_measurement_user_id,
15607 {"User ID", "btatt.body_composition_measurement.user_id",
15608 FT_UINT8, BASE_DEC, NULL, 0x0,
15609 NULL, HFILL}
15611 {&hf_btatt_body_composition_measurement_basal_metabolism,
15612 {"Basal Metabolism", "btatt.body_composition_measurement.basal_metabolism",
15613 FT_UINT16, BASE_DEC, NULL, 0x0,
15614 NULL, HFILL}
15616 {&hf_btatt_body_composition_measurement_muscle_percentage,
15617 {"Muscle Percentage", "btatt.body_composition_measurement.muscle_percentage",
15618 FT_UINT16, BASE_DEC, NULL, 0x0,
15619 NULL, HFILL}
15621 {&hf_btatt_body_composition_measurement_muscle_mass_lb,
15622 {"Muscle Mass [lb]", "btatt.body_composition_measurement.muscle_mass.lb",
15623 FT_UINT16, BASE_DEC, NULL, 0x0,
15624 NULL, HFILL}
15626 {&hf_btatt_body_composition_measurement_muscle_mass_kg,
15627 {"Muscle Mass [kg]", "btatt.body_composition_measurement.muscle_mass.kg",
15628 FT_UINT16, BASE_DEC, NULL, 0x0,
15629 NULL, HFILL}
15631 {&hf_btatt_body_composition_measurement_fat_free_mass_lb,
15632 {"Fat Free Mass [lb]", "btatt.body_composition_measurement.fat_free_mass.lb",
15633 FT_UINT16, BASE_DEC, NULL, 0x0,
15634 NULL, HFILL}
15636 {&hf_btatt_body_composition_measurement_fat_free_mass_kg,
15637 {"Fat Free Mass [kg]", "btatt.body_composition_measurement.fat_free_mass.kg",
15638 FT_UINT16, BASE_DEC, NULL, 0x0,
15639 NULL, HFILL}
15641 {&hf_btatt_body_composition_measurement_soft_lean_mass_lb,
15642 {"Soft Lean Mass [lb]", "btatt.body_composition_measurement.soft_lean_mass.lb",
15643 FT_UINT16, BASE_DEC, NULL, 0x0,
15644 NULL, HFILL}
15646 {&hf_btatt_body_composition_measurement_soft_lean_mass_kg,
15647 {"Soft Lean Mass [kg]", "btatt.body_composition_measurement.soft_lean_mass.kg",
15648 FT_UINT16, BASE_DEC, NULL, 0x0,
15649 NULL, HFILL}
15651 {&hf_btatt_body_composition_measurement_body_water_mass_lb,
15652 {"Body Water Mass [lb]", "btatt.body_composition_measurement.body_water_mass.lb",
15653 FT_UINT16, BASE_DEC, NULL, 0x0,
15654 NULL, HFILL}
15656 {&hf_btatt_body_composition_measurement_body_water_mass_kg,
15657 {"Body Water Mass [kg]", "btatt.body_composition_measurement.body_water_mass.kg",
15658 FT_UINT16, BASE_DEC, NULL, 0x0,
15659 NULL, HFILL}
15661 {&hf_btatt_body_composition_measurement_impedance,
15662 {"Impedance", "btatt.body_composition_measurement.impedance",
15663 FT_UINT16, BASE_DEC, NULL, 0x0,
15664 NULL, HFILL}
15666 {&hf_btatt_body_composition_measurement_weight_lb,
15667 {"Weight [lb]", "btatt.body_composition_measurement.weight.lb",
15668 FT_UINT16, BASE_DEC, NULL, 0x0,
15669 NULL, HFILL}
15671 {&hf_btatt_body_composition_measurement_weight_kg,
15672 {"Weight [kg]", "btatt.body_composition_measurement.weight.kg",
15673 FT_UINT16, BASE_DEC, NULL, 0x0,
15674 NULL, HFILL}
15676 {&hf_btatt_body_composition_measurement_height_inches,
15677 {"Height [inches]", "btatt.body_composition_measurement.height.inches",
15678 FT_UINT16, BASE_DEC, NULL, 0x0,
15679 NULL, HFILL}
15681 {&hf_btatt_body_composition_measurement_height_meter,
15682 {"Height [meter]", "btatt.body_composition_measurement.height.meter",
15683 FT_UINT16, BASE_DEC, NULL, 0x0,
15684 NULL, HFILL}
15686 {&hf_btatt_weight_measurement_flags,
15687 {"Flags", "btatt.weight_measurement.flags",
15688 FT_UINT8, BASE_HEX, NULL, 0x0,
15689 NULL, HFILL}
15691 {&hf_btatt_weight_measurement_flags_reserved,
15692 {"Reserved", "btatt.weight_measurement.flags.reserved",
15693 FT_UINT8, BASE_HEX, NULL, 0xF0,
15694 NULL, HFILL}
15696 {&hf_btatt_weight_measurement_flags_bmi_and_height,
15697 {"BMI and Height", "btatt.weight_measurement.flags.bmi_and_height",
15698 FT_BOOLEAN, 8, NULL, 0x08,
15699 NULL, HFILL}
15701 {&hf_btatt_weight_measurement_flags_user_id,
15702 {"User ID", "btatt.weight_measurement.flags.user_id",
15703 FT_BOOLEAN, 8, NULL, 0x04,
15704 NULL, HFILL}
15706 {&hf_btatt_weight_measurement_flags_timestamp,
15707 {"Timestamp", "btatt.weight_measurement.flags.timestamp",
15708 FT_BOOLEAN, 8, NULL, 0x02,
15709 NULL, HFILL}
15711 {&hf_btatt_weight_measurement_flags_measurement_units,
15712 {"Measurement Units", "btatt.weight_measurement.flags.measurement_units",
15713 FT_BOOLEAN, 8, TFS(&weight_measurement_flags_measurement_units_tfs), 0x01,
15714 NULL, HFILL}
15716 {&hf_btatt_weight_measurement_weight_lb,
15717 {"Weight [lb]", "btatt.weight_measurement.weight.lb",
15718 FT_UINT16, BASE_DEC, NULL, 0x0,
15719 NULL, HFILL}
15721 {&hf_btatt_weight_measurement_weight_kg,
15722 {"Weight [kg]", "btatt.weight_measurement.weight.kg",
15723 FT_UINT16, BASE_DEC, NULL, 0x0,
15724 NULL, HFILL}
15726 {&hf_btatt_weight_measurement_timestamp,
15727 {"Timestamp", "btatt.weight_measurement.timestamp",
15728 FT_NONE, BASE_NONE, NULL, 0x0,
15729 NULL, HFILL}
15731 {&hf_btatt_weight_measurement_user_id,
15732 {"User ID", "btatt.weight_measurement.user_id",
15733 FT_UINT8, BASE_DEC, NULL, 0x0,
15734 NULL, HFILL}
15736 {&hf_btatt_weight_measurement_bmi,
15737 {"BMI", "btatt.weight_measurement.bmi",
15738 FT_UINT16, BASE_DEC, NULL, 0x0,
15739 NULL, HFILL}
15741 {&hf_btatt_weight_measurement_height_in,
15742 {"Height [in]", "btatt.weight_measurement.height.in",
15743 FT_UINT16, BASE_DEC, NULL, 0x0,
15744 NULL, HFILL}
15746 {&hf_btatt_weight_measurement_height_m,
15747 {"Height [m]", "btatt.weight_measurement.height.m",
15748 FT_UINT16, BASE_DEC, NULL, 0x0,
15749 NULL, HFILL}
15751 {&hf_btatt_user_control_point_opcode,
15752 {"Opcode", "btatt.user_control_point.opcode",
15753 FT_UINT8, BASE_HEX, VALS(user_control_point_opcode_vals), 0x0,
15754 NULL, HFILL}
15756 {&hf_btatt_user_control_point_request_opcode,
15757 {"Request Opcode", "btatt.user_control_point.request_opcode",
15758 FT_UINT8, BASE_HEX, VALS(user_control_point_opcode_vals), 0x0,
15759 NULL, HFILL}
15761 {&hf_btatt_user_control_point_response_value,
15762 {"Response Value", "btatt.user_control_point.response_value",
15763 FT_UINT8, BASE_HEX, VALS(user_control_point_response_value_vals), 0x0,
15764 NULL, HFILL}
15766 {&hf_btatt_user_control_point_consent_code,
15767 {"Consent Code", "btatt.user_control_point.consent_code",
15768 FT_UINT16, BASE_HEX, NULL, 0x0,
15769 NULL, HFILL}
15771 {&hf_btatt_cgm_measurement_size,
15772 {"Size", "btatt.cgm_measurement.size",
15773 FT_UINT16, BASE_DEC, NULL, 0x0,
15774 NULL, HFILL}
15776 {&hf_btatt_cgm_measurement_flags,
15777 {"Flags", "btatt.cgm_measurement.flags",
15778 FT_UINT8, BASE_HEX, NULL, 0x0,
15779 NULL, HFILL}
15781 {&hf_btatt_cgm_measurement_flags_cgm_trend_information,
15782 {"CGM Trend Information", "btatt.cgm_measurement.flags.cgm_trend_information",
15783 FT_BOOLEAN, 8, NULL, 0x80,
15784 NULL, HFILL}
15786 {&hf_btatt_cgm_measurement_flags_cgm_quality,
15787 {"CGM Quality", "btatt.cgm_measurement.flags.cgm_quality",
15788 FT_BOOLEAN, 8, NULL, 0x40,
15789 NULL, HFILL}
15791 {&hf_btatt_cgm_measurement_flags_reserved,
15792 {"Reserved", "btatt.cgm_measurement.flags.reserved",
15793 FT_UINT8, BASE_HEX, NULL, 0x38,
15794 NULL, HFILL}
15796 {&hf_btatt_cgm_measurement_flags_sensor_status_annunciation_warning,
15797 {"Sensor Status Annunciation - Warning", "btatt.cgm_measurement.flags.sensor_status_annunciation.warning",
15798 FT_BOOLEAN, 8, NULL, 0x04,
15799 NULL, HFILL}
15801 {&hf_btatt_cgm_measurement_flags_sensor_status_annunciation_cal_temp,
15802 {"Sensor Status Annunciation - Cal/Temp", "btatt.cgm_measurement.flags.sensor_status_annunciation.cal_temp",
15803 FT_BOOLEAN, 8, NULL, 0x02,
15804 NULL, HFILL}
15806 {&hf_btatt_cgm_measurement_flags_sensor_status_annunciation_status,
15807 {"Sensor Status Annunciation - Status", "btatt.cgm_measurement.flags.sensor_status_annunciation.status",
15808 FT_BOOLEAN, 8, NULL, 0x01,
15809 NULL, HFILL}
15811 {&hf_btatt_cgm_measurement_glucose_concentration,
15812 {"Glucose Concentration", "btatt.cgm_measurement.glucose_concentration",
15813 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
15814 NULL, HFILL}
15816 {&hf_btatt_cgm_measurement_time_offset,
15817 {"Time Offset", "btatt.cgm_measurement.time_offset",
15818 FT_UINT16, BASE_DEC, NULL, 0x0,
15819 NULL, HFILL}
15821 {&hf_btatt_cgm_sensor_status_annunciation,
15822 {"Sensor Status Annunciation", "btatt.cgm.sensor_status_annunciation",
15823 FT_NONE, BASE_NONE, NULL, 0x0,
15824 NULL, HFILL}
15826 {&hf_btatt_cgm_sensor_status_annunciation_status,
15827 {"Status", "btatt.cgm.sensor_status_annunciation.status",
15828 FT_UINT8, BASE_HEX, NULL, 0x0,
15829 NULL, HFILL}
15831 {&hf_btatt_cgm_sensor_status_annunciation_status_reserved,
15832 {"Reserved", "btatt.cgm.sensor_status_annunciation.status.reserved",
15833 FT_UINT8, BASE_HEX, NULL, 0xC0,
15834 NULL, HFILL}
15836 {&hf_btatt_cgm_sensor_status_annunciation_status_general_device_fault_has_occurred_in_the_sensor,
15837 {"General Device Fault has Occurred in the Sensor", "btatt.cgm.sensor_status_annunciation.status.general_device_fault_has_occurred_in_the_sensor",
15838 FT_BOOLEAN, 8, NULL, 0x20,
15839 NULL, HFILL}
15841 {&hf_btatt_cgm_sensor_status_annunciation_status_device_specific_alert,
15842 {"Device Specific Alert", "btatt.cgm.sensor_status_annunciation.status.device_specific_alert",
15843 FT_BOOLEAN, 8, NULL, 0x10,
15844 NULL, HFILL}
15846 {&hf_btatt_cgm_sensor_status_annunciation_status_sensor_malfunction,
15847 {"Sensor Malfunction", "btatt.cgm.sensor_status_annunciation.status.sensor_malfunction",
15848 FT_BOOLEAN, 8, NULL, 0x08,
15849 NULL, HFILL}
15851 {&hf_btatt_cgm_sensor_status_annunciation_status_sensor_type_incorrect_for_device,
15852 {"Sensor Type Incorrect for Device", "btatt.cgm.sensor_status_annunciation.status.sensor_type_incorrect_for_device",
15853 FT_BOOLEAN, 8, NULL, 0x04,
15854 NULL, HFILL}
15856 {&hf_btatt_cgm_sensor_status_annunciation_status_device_battery_low,
15857 {"Device Battery Low", "btatt.cgm.sensor_status_annunciation.status.device_battery_low",
15858 FT_BOOLEAN, 8, NULL, 0x02,
15859 NULL, HFILL}
15861 {&hf_btatt_cgm_sensor_status_annunciation_status_session_stopped,
15862 {"Session Stopped", "btatt.cgm.sensor_status_annunciation.status.session_stopped",
15863 FT_BOOLEAN, 8, NULL, 0x01,
15864 NULL, HFILL}
15866 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp,
15867 {"Cal/Temp", "btatt.cgm.sensor_status_annunciation.cal_temp",
15868 FT_UINT8, BASE_HEX, NULL, 0x0,
15869 NULL, HFILL}
15871 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_reserved,
15872 {"Reserved", "btatt.cgm.sensor_status_annunciation.cal_temp.reserved",
15873 FT_UINT8, BASE_HEX, NULL, 0xC0,
15874 NULL, HFILL}
15876 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_low_for_valid_test_result_at_time_of_measurement,
15877 {"Sensor Temperature too Low for Valid Test Result at Time of Measurement", "btatt.cgm.sensor_status_annunciation.cal_temp.sensor_temperature_too_low_for_valid_test_result_at_time_of_measurement",
15878 FT_BOOLEAN, 8, NULL, 0x20,
15879 NULL, HFILL}
15881 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_high_for_valid_test_result_at_time_of_measurement,
15882 {"Sensor Temperature too High for Valid Test Result at Time of Measurement", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.sensor_temperature_too_high_for_valid_test_result_at_time_of_measurement",
15883 FT_BOOLEAN, 8, NULL, 0x10,
15884 NULL, HFILL}
15886 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_required,
15887 {"Calibration Required", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.calibration_required",
15888 FT_BOOLEAN, 8, NULL, 0x08,
15889 NULL, HFILL}
15891 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_recommended,
15892 {"Calibration Recommended", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.calibration_recommended",
15893 FT_BOOLEAN, 8, NULL, 0x04,
15894 NULL, HFILL}
15896 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_not_allowed,
15897 {"Calibration not Allowed", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.calibration_not_allowed",
15898 FT_BOOLEAN, 8, NULL, 0x02,
15899 NULL, HFILL}
15901 {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_time_synchronization_between_sensor_and_collector_required,
15902 {"Time Synchronization between Sensor and Collector Required", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.time_synchronization_between_sensor_and_collector_required",
15903 FT_BOOLEAN, 8, NULL, 0x01,
15904 NULL, HFILL}
15906 {&hf_btatt_cgm_sensor_status_annunciation_warning,
15907 {"Warning", "btatt.cgm.sensor_status_annunciation.warning",
15908 FT_UINT8, BASE_HEX, NULL, 0x0,
15909 NULL, HFILL}
15911 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_device_can_process,
15912 {"Sensor Result Higher than the Device Can Process", "btatt.cgm.sensor_status_annunciation.warning.sensor_result_higher_than_the_device_can_process",
15913 FT_BOOLEAN, 8, NULL, 0x80,
15914 NULL, HFILL}
15916 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_device_can_process,
15917 {"Sensor Result Lower than the Device Can Process", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_lower_than_the_device_can_process",
15918 FT_BOOLEAN, 8, NULL, 0x40,
15919 NULL, HFILL}
15921 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_increase_exceeded,
15922 {"Sensor Rate of Increase Exceeded", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_rate_of_increase_exceeded",
15923 FT_BOOLEAN, 8, NULL, 0x20,
15924 NULL, HFILL}
15926 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_decrease_exceeded,
15927 {"Sensor Rate of Decrease Exceeded", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_rate_of_decrease_exceeded",
15928 FT_BOOLEAN, 8, NULL, 0x10,
15929 NULL, HFILL}
15931 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_hyper_level,
15932 {"Sensor Result Higher than the Hyper Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_higher_than_the_hyper_level",
15933 FT_BOOLEAN, 8, NULL, 0x08,
15934 NULL, HFILL}
15936 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_hypo_level,
15937 {"Sensor Result Lower than the Hypo Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_lower_than_the_hypo_level",
15938 FT_BOOLEAN, 8, NULL, 0x04,
15939 NULL, HFILL}
15941 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_patient_high_level,
15942 {"Sensor Result Higher than the Patient High Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_higher_than_the_patient_high_level",
15943 FT_BOOLEAN, 8, NULL, 0x02,
15944 NULL, HFILL}
15946 {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_patient_low_level,
15947 {"Sensor Result Lower than the Patient Low Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_lower_than_the_patient_low_level",
15948 FT_BOOLEAN, 8, NULL, 0x01,
15949 NULL, HFILL}
15951 {&hf_btatt_cgm_measurement_trend_information,
15952 {"Trend Information", "btatt.cgm_measurement.trend_information",
15953 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
15954 NULL, HFILL}
15956 {&hf_btatt_cgm_measurement_quality,
15957 {"Quality", "btatt.cgm_measurement.quality",
15958 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
15959 NULL, HFILL}
15961 {&hf_btatt_cgm_e2e_crc,
15962 {"E2E-CRC", "btatt.cgm.e2e_crc",
15963 FT_UINT16, BASE_HEX, NULL, 0x0,
15964 NULL, HFILL}
15966 {&hf_btatt_cgm_feature_feature,
15967 {"Feature", "btatt.cgm_feature.feature",
15968 FT_UINT24, BASE_HEX, NULL, 0x0,
15969 NULL, HFILL}
15971 {&hf_btatt_cgm_feature_feature_reserved,
15972 {"Reserved", "btatt.cgm_feature.feature.reserved",
15973 FT_UINT24, BASE_HEX, NULL, 0xFE0000,
15974 NULL, HFILL}
15976 {&hf_btatt_cgm_feature_feature_quality,
15977 {"Quality", "btatt.cgm_feature.feature.quality",
15978 FT_BOOLEAN, 24, NULL, 0x010000,
15979 NULL, HFILL}
15981 {&hf_btatt_cgm_feature_feature_trend_information,
15982 {"Trend Information", "btatt.cgm_feature.feature.trend_information",
15983 FT_BOOLEAN, 24, NULL, 0x008000,
15984 NULL, HFILL}
15986 {&hf_btatt_cgm_feature_feature_multiple_sessions,
15987 {"Multiple Sessions", "btatt.cgm_feature.feature.multiple_sessions",
15988 FT_BOOLEAN, 24, NULL, 0x004000,
15989 NULL, HFILL}
15991 {&hf_btatt_cgm_feature_feature_multiple_bond,
15992 {"Multiple Bond", "btatt.cgm_feature.feature.multiple_bond",
15993 FT_BOOLEAN, 24, NULL, 0x002000,
15994 NULL, HFILL}
15996 {&hf_btatt_cgm_feature_feature_e2e_crc,
15997 {"E2E-CRC", "btatt.cgm_feature.feature.e2e_crc",
15998 FT_BOOLEAN, 24, NULL, 0x001000,
15999 NULL, HFILL}
16001 {&hf_btatt_cgm_feature_feature_general_device_fault,
16002 {"General Device Fault", "btatt.cgm_feature.feature.general_device_fault",
16003 FT_BOOLEAN, 24, NULL, 0x000800,
16004 NULL, HFILL}
16006 {&hf_btatt_cgm_feature_feature_sensor_type_error_detection,
16007 {"Sensor Type Error Detection", "btatt.cgm_feature.feature.sensor_type_error_detection",
16008 FT_BOOLEAN, 24, NULL, 0x000400,
16009 NULL, HFILL}
16011 {&hf_btatt_cgm_feature_feature_low_battery_detection,
16012 {"Low Battery Detection", "btatt.cgm_feature.feature.low_battery_detection",
16013 FT_BOOLEAN, 24, NULL, 0x000200,
16014 NULL, HFILL}
16016 {&hf_btatt_cgm_feature_feature_sensor_result_high_low_detection,
16017 {"Sensor Result High-Low Detection", "btatt.cgm_feature.feature.sensor_result_high_low_detection",
16018 FT_BOOLEAN, 24, NULL, 0x000100,
16019 NULL, HFILL}
16021 {&hf_btatt_cgm_feature_feature_sensor_temperature_high_low_detection,
16022 {"Sensor Temperature High-Low Detection", "btatt.cgm_feature.feature.sensor_temperature_high_low_detection",
16023 FT_BOOLEAN, 24, NULL, 0x000080,
16024 NULL, HFILL}
16026 {&hf_btatt_cgm_feature_feature_sensor_malfunction_detection,
16027 {"Sensor Malfunction Detection", "btatt.cgm_feature.feature.sensor_malfunction_detection",
16028 FT_BOOLEAN, 24, NULL, 0x000040,
16029 NULL, HFILL}
16031 {&hf_btatt_cgm_feature_feature_device_specific_alert,
16032 {"Device Specific Alert", "btatt.cgm_feature.feature.device_specific_alert",
16033 FT_BOOLEAN, 24, NULL, 0x000020,
16034 NULL, HFILL}
16036 {&hf_btatt_cgm_feature_feature_rate_of_increase_decrease_alerts,
16037 {"Rate of Increase Decrease Alerts", "btatt.cgm_feature.feature.rate_of_increase_decrease_alerts",
16038 FT_BOOLEAN, 24, NULL, 0x000010,
16039 NULL, HFILL}
16041 {&hf_btatt_cgm_feature_feature_hyper_alerts,
16042 {"Hyper Alerts", "btatt.cgm_feature.feature.hyper_alerts",
16043 FT_BOOLEAN, 24, NULL, 0x000008,
16044 NULL, HFILL}
16046 {&hf_btatt_cgm_feature_feature_hypo_alerts,
16047 {"Hypo Alerts", "btatt.cgm_feature.feature.hypo_alerts",
16048 FT_BOOLEAN, 24, NULL, 0x000004,
16049 NULL, HFILL}
16051 {&hf_btatt_cgm_feature_feature_patient_high_low_alerts,
16052 {"Patient High-Low Alerts", "btatt.cgm_feature.feature.patient_high_low_alerts",
16053 FT_BOOLEAN, 24, NULL, 0x000002,
16054 NULL, HFILL}
16056 {&hf_btatt_cgm_feature_feature_calibration,
16057 {"Calibration", "btatt.cgm_feature.feature.calibration",
16058 FT_BOOLEAN, 24, NULL, 0x000001,
16059 NULL, HFILL}
16061 {&hf_btatt_cgm_type_and_sample_location,
16062 {"Type and Sample Location", "btatt.cgm.type_and_sample_location",
16063 FT_UINT8, BASE_HEX, NULL, 0x0,
16064 NULL, HFILL}
16066 {&hf_btatt_cgm_type,
16067 {"Type and Sample Location", "btatt.cgm.type_and_sample_location.type",
16068 FT_UINT8, BASE_HEX, VALS(cgm_feature_type_vals), 0xF0,
16069 NULL, HFILL}
16071 {&hf_btatt_cgm_sample_location,
16072 {"Sample Location", "btatt.cgm.type_and_sample_location.sample_location",
16073 FT_UINT8, BASE_HEX, VALS(cgm_feature_sample_location_vals), 0x0F,
16074 NULL, HFILL}
16076 {&hf_btatt_cgm_time_offset,
16077 {"Time Offset", "btatt.cgm.time_offset",
16078 FT_UINT16, BASE_DEC, NULL, 0x0,
16079 NULL, HFILL}
16081 {&hf_btatt_cgm_status,
16082 {"Status", "btatt.cgm.status",
16083 FT_UINT24, BASE_HEX, NULL, 0x0,
16084 NULL, HFILL}
16086 {&hf_btatt_cgm_session_start_time,
16087 {"Session Start Time", "btatt.cgm.session_start_time",
16088 FT_NONE, BASE_NONE, NULL, 0x0,
16089 NULL, HFILL}
16091 {&hf_btatt_cgm_session_run_time,
16092 {"Session Run Time", "btatt.cgm.session_run_time",
16093 FT_UINT16, BASE_DEC, NULL, 0x0,
16094 NULL, HFILL}
16096 {&hf_btatt_cgm_specific_ops_control_point_opcode,
16097 {"Opcode", "btatt.cgm_specific_ops_control_point.opcode",
16098 FT_UINT8, BASE_HEX, VALS(cgm_specific_ops_control_point_opcode_vals), 0x0,
16099 NULL, HFILL}
16101 {&hf_btatt_cgm_specific_ops_control_point_operand,
16102 {"Operand", "btatt.cgm_specific_ops_control_point.operand",
16103 FT_NONE, BASE_NONE, NULL, 0x0,
16104 NULL, HFILL}
16106 {&hf_btatt_cgm_specific_ops_control_point_operand_communication_interval,
16107 {"Communication Interval", "btatt.cgm_specific_ops_control_point.operand.communication_interval",
16108 FT_UINT8, BASE_DEC, NULL, 0x0,
16109 NULL, HFILL}
16111 {&hf_btatt_cgm_specific_ops_control_point_calibration_glucose_concentration,
16112 {"Calibration Glucose Concentration", "btatt.cgm_specific_ops_control_point.operand.calibration_glucose_concentration",
16113 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16114 NULL, HFILL}
16116 {&hf_btatt_cgm_specific_ops_control_point_calibration_time,
16117 {"Calibration Time", "btatt.cgm_specific_ops_control_point.operand.calibration_time",
16118 FT_UINT16, BASE_DEC, NULL, 0x0,
16119 NULL, HFILL}
16121 {&hf_btatt_cgm_specific_ops_control_point_next_calibration_time,
16122 {"Next Calibration Time", "btatt.cgm_specific_ops_control_point.operand.next_calibration_time",
16123 FT_UINT16, BASE_DEC, NULL, 0x0,
16124 NULL, HFILL}
16126 {&hf_btatt_cgm_specific_ops_control_point_calibration_data_record_number,
16127 {"Calibration Data Record Number", "btatt.cgm_specific_ops_control_point.operand.calibration_data_record_number",
16128 FT_UINT16, BASE_DEC, NULL, 0x0,
16129 NULL, HFILL}
16131 {&hf_btatt_cgm_specific_ops_control_point_calibration_status,
16132 {"Calibration Status", "btatt.cgm_specific_ops_control_point.operand.calibration_status",
16133 FT_UINT8, BASE_DEC, NULL, 0x0,
16134 NULL, HFILL}
16136 {&hf_btatt_cgm_specific_ops_control_point_calibration_status_reserved,
16137 {"Reserved", "btatt.cgm_specific_ops_control_point.operand.calibration_status.reserved",
16138 FT_UINT8, BASE_DEC, NULL, 0xF8,
16139 NULL, HFILL}
16141 {&hf_btatt_cgm_specific_ops_control_point_calibration_status_pending,
16142 {"Pending", "btatt.cgm_specific_ops_control_point.operand.calibration_status.pending",
16143 FT_BOOLEAN, 8, NULL, 0x04,
16144 NULL, HFILL}
16146 {&hf_btatt_cgm_specific_ops_control_point_calibration_status_out_of_range,
16147 {"Out of Range", "btatt.cgm_specific_ops_control_point.operand.calibration_status.out_of_range",
16148 FT_BOOLEAN, 8, NULL, 0x02,
16149 NULL, HFILL}
16151 {&hf_btatt_cgm_specific_ops_control_point_calibration_status_rejected,
16152 {"Rejected", "btatt.cgm_specific_ops_control_point.operand.calibration_status.rejected",
16153 FT_BOOLEAN, 8, NULL, 0x01,
16154 NULL, HFILL}
16156 {&hf_btatt_cgm_specific_ops_control_point_operand_calibration_data_record_number,
16157 {"Calibration Data Record Number", "btatt.cgm_specific_ops_control_point.operand.calibration_data_record_number",
16158 FT_UINT16, BASE_DEC, NULL, 0x0,
16159 NULL, HFILL}
16161 {&hf_btatt_cgm_specific_ops_control_point_operand_alert_level,
16162 {"Alert Level [mg/dL]", "btatt.cgm_specific_ops_control_point.operand.alert_level",
16163 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16164 NULL, HFILL}
16166 {&hf_btatt_cgm_specific_ops_control_point_operand_alert_level_rate,
16167 {"Alert Level Rate [mg/dL/min]", "btatt.cgm_specific_ops_control_point.operand.alert_level_rate",
16168 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16169 NULL, HFILL}
16171 {&hf_btatt_cgm_specific_ops_control_point_request_opcode,
16172 {"Request Opcode", "btatt.cgm_specific_ops_control_point.request_opcode",
16173 FT_UINT8, BASE_HEX, VALS(cgm_specific_ops_control_point_opcode_vals), 0x0,
16174 NULL, HFILL}
16176 {&hf_btatt_cgm_specific_ops_control_point_response_code,
16177 {"Response Code", "btatt.cgm_specific_ops_control_point.response_code",
16178 FT_UINT8, BASE_HEX, VALS(cgm_specific_ops_control_point_response_code_vals), 0x0,
16179 NULL, HFILL}
16181 {&hf_btatt_uri,
16182 {"URI", "btatt.uri",
16183 FT_STRING, BASE_NONE, NULL, 0x0,
16184 NULL, HFILL}
16186 {&hf_btatt_http_headers,
16187 {"HTTP Headers", "btatt.http_headers",
16188 FT_STRING, BASE_NONE, NULL, 0x0,
16189 NULL, HFILL}
16191 {&hf_btatt_http_status_code,
16192 {"HTTP Status Code", "btatt.http_status_code",
16193 FT_UINT16, BASE_DEC, VALS(vals_http_status_code), 0x0,
16194 NULL, HFILL}
16196 {&hf_btatt_http_data_status,
16197 {"HTTP Data Status", "btatt.http_data_status",
16198 FT_UINT8, BASE_HEX, NULL, 0x0,
16199 NULL, HFILL}
16201 {&hf_btatt_http_data_status_headers_received,
16202 {"Headers Received", "btatt.http_data_status.headers_received",
16203 FT_BOOLEAN, 8, NULL, 0x01,
16204 NULL, HFILL}
16206 {&hf_btatt_http_data_status_headers_truncated,
16207 {"Headers Truncated", "btatt.http_data_status.headers_truncated",
16208 FT_BOOLEAN, 8, NULL, 0x02,
16209 NULL, HFILL}
16211 {&hf_btatt_http_data_status_body_received,
16212 {"Body Received", "btatt.http_data_status.body_received",
16213 FT_BOOLEAN, 8, NULL, 0x04,
16214 NULL, HFILL}
16216 {&hf_btatt_http_data_status_body_truncated,
16217 {"Body Truncated", "btatt.http_data_status.body_truncated",
16218 FT_BOOLEAN, 8, NULL, 0x08,
16219 NULL, HFILL}
16221 {&hf_btatt_http_data_status_reserved,
16222 {"Reserved", "btatt.http_data_status.reserved",
16223 FT_UINT8, BASE_HEX, NULL, 0xF0,
16224 NULL, HFILL}
16226 {&hf_btatt_http_entity_body,
16227 {"HTTP Entity Body", "btatt.http_entity_body",
16228 FT_STRING, BASE_NONE, NULL, 0x0,
16229 NULL, HFILL}
16231 {&hf_btatt_http_control_point_opcode,
16232 {"Opcode", "btatt.control_point.opcode",
16233 FT_UINT8, BASE_HEX, VALS(http_control_point_opcode_vals), 0x0,
16234 NULL, HFILL}
16236 {&hf_btatt_https_security,
16237 {"HTTPS Security", "btatt.https_security",
16238 FT_UINT8, BASE_HEX, VALS(https_security_vals), 0x0,
16239 NULL, HFILL}
16241 {&hf_btatt_tds_opcode,
16242 {"Opcode", "btatt.tds.opcode",
16243 FT_UINT8, BASE_HEX, VALS(tds_opcode_vals), 0x0,
16244 NULL, HFILL}
16246 {&hf_btatt_tds_organization_id,
16247 {"Organization ID", "btatt.tds.organization_id",
16248 FT_UINT8, BASE_HEX, VALS(tds_organization_id_vals), 0x0,
16249 NULL, HFILL}
16251 {&hf_btatt_tds_result_code,
16252 {"Result Code", "btatt.tds.result_code",
16253 FT_UINT8, BASE_HEX, VALS(tds_result_code_vals), 0x0,
16254 NULL, HFILL}
16256 {&hf_btatt_tds_data,
16257 {"Data", "btatt.tds.data",
16258 FT_BYTES, BASE_NONE, NULL, 0x0,
16259 NULL, HFILL}
16261 {&hf_btatt_ots_feature_oacp,
16262 {"OACP Features", "btatt.ots.oacp",
16263 FT_UINT32, BASE_HEX, NULL, 0x0,
16264 NULL, HFILL}
16266 {&hf_btatt_ots_feature_oacp_reserved,
16267 {"Reserved", "btatt.ots.oacp.reserved",
16268 FT_BOOLEAN, 32, NULL, 0xFFFFFC00,
16269 NULL, HFILL}
16271 {&hf_btatt_ots_feature_oacp_abort,
16272 {"Abort", "btatt.ots.oacp.abort",
16273 FT_BOOLEAN, 32, NULL, 0x00000200,
16274 NULL, HFILL}
16276 {&hf_btatt_ots_feature_oacp_patching_of_object,
16277 {"Patching of Object", "btatt.ots.oacp.patching_of_object",
16278 FT_BOOLEAN, 32, NULL, 0x00000100,
16279 NULL, HFILL}
16281 {&hf_btatt_ots_feature_oacp_truncation_of_objects,
16282 {"Truncation of Objects", "btatt.ots.oacp.truncation_of_objects",
16283 FT_BOOLEAN, 32, NULL, 0x00000080,
16284 NULL, HFILL}
16286 {&hf_btatt_ots_feature_oacp_appending_additional_data_to_object,
16287 {"Appending Additional Data to Object", "btatt.ots.oacp.appending_additional_data_to_object",
16288 FT_BOOLEAN, 32, NULL, 0x00000040,
16289 NULL, HFILL}
16291 {&hf_btatt_ots_feature_oacp_write,
16292 {"Write", "btatt.ots.oacp.write",
16293 FT_BOOLEAN, 32, NULL, 0x00000020,
16294 NULL, HFILL}
16296 {&hf_btatt_ots_feature_oacp_read,
16297 {"Read", "btatt.ots.oacp.read",
16298 FT_BOOLEAN, 32, NULL, 0x00000010,
16299 NULL, HFILL}
16301 {&hf_btatt_ots_feature_oacp_execute,
16302 {"Execute", "btatt.ots.oacp.execute",
16303 FT_BOOLEAN, 32, NULL, 0x00000008,
16304 NULL, HFILL}
16306 {&hf_btatt_ots_feature_oacp_calculate_checksum,
16307 {"Calculate Checksum", "btatt.ots.oacp.calculate_checksum",
16308 FT_BOOLEAN, 32, NULL, 0x00000004,
16309 NULL, HFILL}
16311 {&hf_btatt_ots_feature_oacp_delete,
16312 {"Delete", "btatt.ots.oacp.delete",
16313 FT_BOOLEAN, 32, NULL, 0x00000002,
16314 NULL, HFILL}
16316 {&hf_btatt_ots_feature_oacp_create,
16317 {"Create", "btatt.ots.oacp.create",
16318 FT_BOOLEAN, 32, NULL, 0x00000001,
16319 NULL, HFILL}
16321 {&hf_btatt_ots_feature_olcp,
16322 {"OLCP Features", "btatt.ots.olcp",
16323 FT_UINT32, BASE_HEX, NULL, 0x0,
16324 NULL, HFILL}
16326 {&hf_btatt_ots_feature_olcp_reserved,
16327 {"Reserved", "btatt.ots.olcp.reserved",
16328 FT_BOOLEAN, 32, NULL, 0xFFFFFFF0,
16329 NULL, HFILL}
16331 {&hf_btatt_ots_feature_olcp_clear_marking,
16332 {"Clear Marking", "btatt.ots.olcp.clear_marking",
16333 FT_BOOLEAN, 32, NULL, 0x00000008,
16334 NULL, HFILL}
16336 {&hf_btatt_ots_feature_olcp_request_number_of_objects,
16337 {"Request Number of Objects", "btatt.ots.olcp.request_number_of_objects",
16338 FT_BOOLEAN, 32, NULL, 0x00000004,
16339 NULL, HFILL}
16341 {&hf_btatt_ots_feature_olcp_order,
16342 {"Order", "btatt.ots.olcp.order",
16343 FT_BOOLEAN, 32, NULL, 0x00000002,
16344 NULL, HFILL}
16346 {&hf_btatt_ots_feature_olcp_go_to,
16347 {"Go To", "btatt.ots.olcp.go_to",
16348 FT_BOOLEAN, 32, NULL, 0x00000001,
16349 NULL, HFILL}
16351 {&hf_btatt_ots_object_name,
16352 {"Object Name", "btatt.ots.object_name",
16353 FT_STRING, BASE_NONE, NULL, 0x0,
16354 NULL, HFILL}
16356 {&hf_btatt_ots_current_size,
16357 {"Current Size", "btatt.ots.current_size",
16358 FT_UINT32, BASE_DEC, NULL, 0x0,
16359 NULL, HFILL}
16361 {&hf_btatt_ots_allocated_size,
16362 {"Allocated Size", "btatt.ots.allocated_size",
16363 FT_UINT32, BASE_DEC, NULL, 0x0,
16364 NULL, HFILL}
16366 {&hf_btatt_ots_object_id,
16367 {"Object ID", "btatt.ots.object_id",
16368 FT_UINT48, BASE_HEX, NULL, 0x0,
16369 NULL, HFILL}
16371 {&hf_btatt_ots_properties,
16372 {"Properties", "btatt.ots.properties",
16373 FT_UINT32, BASE_HEX, NULL, 0x0,
16374 NULL, HFILL}
16376 {&hf_btatt_ots_properties_reserved,
16377 {"Reserved", "btatt.ots.properties.reserved",
16378 FT_BOOLEAN, 32, NULL, 0xFFFFFF00,
16379 NULL, HFILL}
16381 {&hf_btatt_ots_properties_mark,
16382 {"Mark", "btatt.ots.properties.mark",
16383 FT_BOOLEAN, 32, NULL, 0x00000080,
16384 NULL, HFILL}
16386 {&hf_btatt_ots_properties_patch,
16387 {"Patch", "btatt.ots.properties.patch",
16388 FT_BOOLEAN, 32, NULL, 0x00000040,
16389 NULL, HFILL}
16391 {&hf_btatt_ots_properties_truncate,
16392 {"Truncate", "btatt.ots.properties.truncate",
16393 FT_BOOLEAN, 32, NULL, 0x00000020,
16394 NULL, HFILL}
16396 {&hf_btatt_ots_properties_append,
16397 {"Append", "btatt.ots.properties.append",
16398 FT_BOOLEAN, 32, NULL, 0x00000010,
16399 NULL, HFILL}
16401 {&hf_btatt_ots_properties_write,
16402 {"Write", "btatt.ots.properties.write",
16403 FT_BOOLEAN, 32, NULL, 0x00000008,
16404 NULL, HFILL}
16406 {&hf_btatt_ots_properties_read,
16407 {"Read", "btatt.ots.properties.read",
16408 FT_BOOLEAN, 32, NULL, 0x00000004,
16409 NULL, HFILL}
16411 {&hf_btatt_ots_properties_execute,
16412 {"Execute", "btatt.ots.properties.execute",
16413 FT_BOOLEAN, 32, NULL, 0x00000002,
16414 NULL, HFILL}
16416 {&hf_btatt_ots_properties_delete,
16417 {"Delete", "btatt.ots.properties.delete",
16418 FT_BOOLEAN, 32, NULL, 0x00000001,
16419 NULL, HFILL}
16421 {&hf_btatt_ots_flags,
16422 {"Properties", "btatt.ots.flags",
16423 FT_UINT8, BASE_HEX, NULL, 0x0,
16424 NULL, HFILL}
16426 {&hf_btatt_ots_flags_reserved,
16427 {"Reserved", "btatt.ots.flags.reserved",
16428 FT_BOOLEAN, 8, NULL, 0xE0,
16429 NULL, HFILL}
16431 {&hf_btatt_ots_flags_object_deletion,
16432 {"Object Deletion", "btatt.ots.flags.object_deletion",
16433 FT_BOOLEAN, 8, NULL, 0x10,
16434 NULL, HFILL}
16436 {&hf_btatt_ots_flags_object_creation,
16437 {"Object Creation", "btatt.ots.flags.object_creation",
16438 FT_BOOLEAN, 8, NULL, 0x08,
16439 NULL, HFILL}
16441 {&hf_btatt_ots_flags_change_occurred_to_the_object_metadata,
16442 {"Change Occurred to the Object Metadata", "btatt.ots.flags.change_occurred_to_the_object_metadata",
16443 FT_BOOLEAN, 8, NULL, 0x04,
16444 NULL, HFILL}
16446 {&hf_btatt_ots_flags_change_occurred_to_the_object_contents,
16447 {"Change Occurred to the Object Contents", "btatt.ots.flags.change_occurred_to_the_object_contents",
16448 FT_BOOLEAN, 8, NULL, 0x02,
16449 NULL, HFILL}
16451 {&hf_btatt_ots_flags_source_of_change,
16452 {"Source of Change", "btatt.ots.flags.source_of_change",
16453 FT_BOOLEAN, 8, TFS(&tfs_client_server), 0x01,
16454 NULL, HFILL}
16456 {&hf_btatt_ots_action_opcode,
16457 {"Opcode", "btatt.ots.action.opcode",
16458 FT_UINT8, BASE_HEX, VALS(ots_action_opcode_vals), 0x0,
16459 NULL, HFILL}
16461 {&hf_btatt_ots_size,
16462 {"Size", "btatt.ots.size",
16463 FT_UINT32, BASE_DEC, NULL, 0x0,
16464 NULL, HFILL}
16466 {&hf_btatt_ots_offset,
16467 {"Offset", "btatt.ots.offset",
16468 FT_UINT32, BASE_DEC, NULL, 0x0,
16469 NULL, HFILL}
16471 {&hf_btatt_ots_length,
16472 {"Length", "btatt.ots.length",
16473 FT_UINT32, BASE_DEC, NULL, 0x0,
16474 NULL, HFILL}
16476 {&hf_btatt_ots_execute_data,
16477 {"Execute Data", "btatt.ots.execute_data",
16478 FT_BYTES, BASE_NONE, NULL, 0x0,
16479 NULL, HFILL}
16481 {&hf_btatt_ots_action_response_opcode,
16482 {"Response Opcode", "btatt.ots.action.response_opcode",
16483 FT_UINT8, BASE_HEX, VALS(ots_action_opcode_vals), 0x0,
16484 NULL, HFILL}
16486 {&hf_btatt_ots_action_result_code,
16487 {"Result Code", "btatt.ots.action.result_code",
16488 FT_UINT8, BASE_HEX, VALS(ots_action_result_code_vals), 0x0,
16489 NULL, HFILL}
16491 {&hf_btatt_ots_checksum,
16492 {"Checksum", "btatt.ots.checksum",
16493 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
16494 NULL, HFILL}
16496 {&hf_btatt_ots_list_opcode,
16497 {"Opcode", "btatt.ots.list.opcode",
16498 FT_UINT8, BASE_HEX, VALS(ots_list_opcode_vals), 0x0,
16499 NULL, HFILL}
16501 {&hf_btatt_ots_list_order,
16502 {"Order", "btatt.ots.list.order",
16503 FT_UINT8, BASE_HEX, VALS(ots_list_order_vals), 0x0,
16504 NULL, HFILL}
16506 {&hf_btatt_ots_list_response_opcode,
16507 {"Response Opcode", "btatt.ots.list.response_opcode",
16508 FT_UINT8, BASE_HEX, VALS(ots_list_opcode_vals), 0x0,
16509 NULL, HFILL}
16511 {&hf_btatt_ots_list_result_code,
16512 {"Result Code", "btatt.ots.list.result_code",
16513 FT_UINT8, BASE_HEX, VALS(ots_list_result_code_vals), 0x0,
16514 NULL, HFILL}
16516 {&hf_btatt_ots_list_total_number_of_objects,
16517 {"Total Number of Objects", "btatt.ots.list.total_number_of_objects",
16518 FT_UINT32, BASE_DEC, NULL, 0x0,
16519 NULL, HFILL}
16521 {&hf_btatt_ots_filter,
16522 {"Filter", "btatt.ots.filter",
16523 FT_UINT8, BASE_HEX, VALS(ots_filter_vals), 0x0,
16524 NULL, HFILL}
16526 {&hf_btatt_ots_size_from,
16527 {"Size From", "btatt.ots.size_from",
16528 FT_UINT32, BASE_DEC, NULL, 0x0,
16529 NULL, HFILL}
16531 {&hf_btatt_ots_size_to,
16532 {"Size To", "btatt.ots.size_to",
16533 FT_UINT32, BASE_DEC, NULL, 0x0,
16534 NULL, HFILL}
16536 {&hf_btatt_ots_name_string,
16537 {"Name String", "btatt.ots.name_string",
16538 FT_STRING, BASE_NONE, NULL, 0x0,
16539 NULL, HFILL}
16541 {&hf_btatt_ots_object_first_created,
16542 {"First Created", "btatt.ots.first_created",
16543 FT_NONE, BASE_NONE, NULL, 0x0,
16544 NULL, HFILL}
16546 {&hf_btatt_ots_object_last_modified,
16547 {"Last Modified", "btatt.ots.last_modified",
16548 FT_NONE, BASE_NONE, NULL, 0x0,
16549 NULL, HFILL}
16551 {&hf_btatt_plx_spot_check_measurement_flags,
16552 {"Flags", "btatt.plxs.spot_check_measurement.flags",
16553 FT_UINT8, BASE_HEX, NULL, 0x0,
16554 NULL, HFILL}
16556 {&hf_btatt_plx_spot_check_measurement_flags_reserved,
16557 {"Reserved", "btatt.plxs.spot_check_measurement.flags.reserved",
16558 FT_UINT8, BASE_HEX, NULL, 0xE0,
16559 NULL, HFILL}
16561 {&hf_btatt_plx_spot_check_measurement_flags_device_clock_is_not_set,
16562 {"Device Clock is not Set", "btatt.plxs.spot_check_measurement.flags.device_clock_is_not_set",
16563 FT_BOOLEAN, 8, NULL, 0x10,
16564 NULL, HFILL}
16566 {&hf_btatt_plx_spot_check_measurement_flags_pulse_amplitude_index,
16567 {"Pulse Amplitude Index", "btatt.plxs.spot_check_measurement.flags.pulse_amplitude_index",
16568 FT_BOOLEAN, 8, NULL, 0x08,
16569 NULL, HFILL}
16571 {&hf_btatt_plx_spot_check_measurement_flags_device_and_sensor_status,
16572 {"Device and Sensor Status", "btatt.plxs.spot_check_measurement.flags.device_and_sensor_status",
16573 FT_BOOLEAN, 8, NULL, 0x04,
16574 NULL, HFILL}
16576 {&hf_btatt_plx_spot_check_measurement_flags_measurement_status,
16577 {"Measurement Status", "btatt.plxs.spot_check_measurement.flags.measurement_status",
16578 FT_BOOLEAN, 8, NULL, 0x02,
16579 NULL, HFILL}
16581 {&hf_btatt_plx_spot_check_measurement_flags_timestamp,
16582 {"Timestamp", "btatt.plxs.spot_check_measurement.flags.timestamp",
16583 FT_BOOLEAN, 8, NULL, 0x01,
16584 NULL, HFILL}
16586 {&hf_btatt_plx_spo2,
16587 {"SpO2", "btatt.plxs.spot_check_measurement.spo2",
16588 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16589 NULL, HFILL}
16591 {&hf_btatt_plx_pulse_rate,
16592 {"Pulse Rate", "btatt.plxs.spot_check_measurement.pulse_rate",
16593 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16594 NULL, HFILL}
16596 {&hf_btatt_plx_spot_check_measurement_timestamp,
16597 {"Timestamp", "btatt.plxs.spot_check_measurement.timestamp",
16598 FT_NONE, BASE_NONE, NULL, 0x0,
16599 NULL, HFILL}
16601 {&hf_btatt_plx_measurement_status,
16602 {"Measurement Status", "btatt.plxs.spot_check_measurement.measurement_status",
16603 FT_UINT16, BASE_HEX, NULL, 0x0,
16604 NULL, HFILL}
16606 {&hf_btatt_plx_measurement_status_invalid_measurement_detected,
16607 {"Invalid Measurement Detected", "btatt.plxs.spot_check_measurement.measurement_status.invalid_measurement_detected",
16608 FT_BOOLEAN, 16, NULL, 0x8000,
16609 NULL, HFILL}
16611 {&hf_btatt_plx_measurement_status_questionable_measurement_detected,
16612 {"Questionable Measurement Detected", "btatt.plxs.spot_check_measurement.measurement_status.questionable_measurement_detected",
16613 FT_BOOLEAN, 16, NULL, 0x4000,
16614 NULL, HFILL}
16616 {&hf_btatt_plx_measurement_status_measurement_unavailable,
16617 {"Measurement Unavailable", "btatt.plxs.spot_check_measurement.measurement_status.measurement_unavailable",
16618 FT_BOOLEAN, 16, NULL, 0x2000,
16619 NULL, HFILL}
16621 {&hf_btatt_plx_measurement_status_calibration_ongoing,
16622 {"Calibration Ongoing", "btatt.plxs.spot_check_measurement.measurement_status.calibration_ongoing",
16623 FT_BOOLEAN, 16, NULL, 0x1000,
16624 NULL, HFILL}
16626 {&hf_btatt_plx_measurement_status_data_for_testing,
16627 {"Data for Testing", "btatt.plxs.spot_check_measurement.measurement_status.data_for_testing",
16628 FT_BOOLEAN, 16, NULL, 0x0800,
16629 NULL, HFILL}
16631 {&hf_btatt_plx_measurement_status_data_for_demonstration,
16632 {"Data for Demonstration", "btatt.plxs.spot_check_measurement.measurement_status.data_for_demonstration",
16633 FT_BOOLEAN, 16, NULL, 0x0400,
16634 NULL, HFILL}
16636 {&hf_btatt_plx_measurement_status_data_from_measurement_storage,
16637 {"Data from Measurement Storage", "btatt.plxs.spot_check_measurement.measurement_status.data_from_measurement_storage",
16638 FT_BOOLEAN, 16, NULL, 0x0200,
16639 NULL, HFILL}
16641 {&hf_btatt_plx_measurement_status_fully_qualified_data,
16642 {"Fully Qualified Data", "btatt.plxs.spot_check_measurement.measurement_status.fully_qualified_data",
16643 FT_BOOLEAN, 16, NULL, 0x0100,
16644 NULL, HFILL}
16646 {&hf_btatt_plx_measurement_status_validated_data,
16647 {"Validated Data", "btatt.plxs.spot_check_measurement.measurement_status.validated_data",
16648 FT_BOOLEAN, 16, NULL, 0x0080,
16649 NULL, HFILL}
16651 {&hf_btatt_plx_measurement_status_early_estimated_data,
16652 {"Early Estimated Data", "btatt.plxs.spot_check_measurement.measurement_status.early_estimated_data",
16653 FT_BOOLEAN, 16, NULL, 0x0040,
16654 NULL, HFILL}
16656 {&hf_btatt_plx_measurement_status_measurement_ongoing,
16657 {"Measurement Ongoing", "btatt.plxs.spot_check_measurement.measurement_status.measurement_ongoing",
16658 FT_BOOLEAN, 16, NULL, 0x0020,
16659 NULL, HFILL}
16661 {&hf_btatt_plx_measurement_status_reserved,
16662 {"Reserved", "btatt.plxs.spot_check_measurement.measurement_status.reserved",
16663 FT_BOOLEAN, 16, NULL, 0x001F,
16664 NULL, HFILL}
16666 {&hf_btatt_plx_device_and_sensor_status,
16667 {"Device and Sensor Status", "btatt.plxs.spot_check_measurement.device_and_sensor_status",
16668 FT_UINT24, BASE_HEX, NULL, 0x0,
16669 NULL, HFILL}
16671 {&hf_btatt_plx_device_and_sensor_status_reserved,
16672 {"Reserved", "btatt.plxs.spot_check_measurement.device_and_sensor_status.reserved",
16673 FT_UINT24, BASE_HEX, NULL, 0xFF0000,
16674 NULL, HFILL}
16676 {&hf_btatt_plx_device_and_sensor_status_sensor_disconnected,
16677 {"Sensor Disconnected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.sensor_disconnected",
16678 FT_BOOLEAN, 24, NULL, 0x008000,
16679 NULL, HFILL}
16681 {&hf_btatt_plx_device_and_sensor_status_sensor_malfunctioning,
16682 {"Sensor Malfunctioning", "btatt.plxs.spot_check_measurement.device_and_sensor_status.sensor_malfunctioning",
16683 FT_BOOLEAN, 24, NULL, 0x004000,
16684 NULL, HFILL}
16686 {&hf_btatt_plx_device_and_sensor_status_sensor_displaced,
16687 {"Sensor Displaced", "btatt.plxs.spot_check_measurement.device_and_sensor_status.sensor_displaced",
16688 FT_BOOLEAN, 24, NULL, 0x002000,
16689 NULL, HFILL}
16691 {&hf_btatt_plx_device_and_sensor_status_unknown_sensor_connected,
16692 {"Unknown Sensor Connected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.unknown_sensor_connected",
16693 FT_BOOLEAN, 24, NULL, 0x001000,
16694 NULL, HFILL}
16696 {&hf_btatt_plx_device_and_sensor_status_sensor_unconnected_to_user,
16697 {"Unconnected to User", "btatt.plxs.spot_check_measurement.device_and_sensor_status.unconnected_to_user",
16698 FT_BOOLEAN, 24, NULL, 0x000800,
16699 NULL, HFILL}
16701 {&hf_btatt_plx_device_and_sensor_status_sensor_interference_detected,
16702 {"Interference Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.interference_detected",
16703 FT_BOOLEAN, 24, NULL, 0x000400,
16704 NULL, HFILL}
16706 {&hf_btatt_plx_device_and_sensor_status_signal_analysis_ongoing,
16707 {"Signal Analysis Ongoing", "btatt.plxs.spot_check_measurement.device_and_sensor_status.signal_analysis_ongoing",
16708 FT_BOOLEAN, 24, NULL, 0x000200,
16709 NULL, HFILL}
16711 {&hf_btatt_plx_device_and_sensor_status_questionable_pulse_detected,
16712 {"Questionable Pulse Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.questionable_pulse_detected",
16713 FT_BOOLEAN, 24, NULL, 0x000100,
16714 NULL, HFILL}
16716 {&hf_btatt_plx_device_and_sensor_status_non_pulsatile_signal_detected,
16717 {"Non Pulsatile Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.non_pulsatile_signal_detected",
16718 FT_BOOLEAN, 24, NULL, 0x000080,
16719 NULL, HFILL}
16721 {&hf_btatt_plx_device_and_sensor_status_erratic_signal_detected,
16722 {"Erratic Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.erratic_signal_detected",
16723 FT_BOOLEAN, 24, NULL, 0x000040,
16724 NULL, HFILL}
16726 {&hf_btatt_plx_device_and_sensor_status_low_perfusion_detected,
16727 {"Low Perfusion Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.low_perfusion_detected",
16728 FT_BOOLEAN, 24, NULL, 0x000020,
16729 NULL, HFILL}
16731 {&hf_btatt_plx_device_and_sensor_status_poor_signal_detected,
16732 {"Poor Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.poor_signal_detected",
16733 FT_BOOLEAN, 24, NULL, 0x000010,
16734 NULL, HFILL}
16736 {&hf_btatt_plx_device_and_sensor_status_inadequate_signal_detected,
16737 {"Inadequate Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.inadequate_signal_detected",
16738 FT_BOOLEAN, 24, NULL, 0x000008,
16739 NULL, HFILL}
16741 {&hf_btatt_plx_device_and_sensor_status_signal_processing_irregularity_detected,
16742 {"Signal Processing Irregularity Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.signal_processing_irregularity_detected",
16743 FT_BOOLEAN, 24, NULL, 0x000004,
16744 NULL, HFILL}
16746 {&hf_btatt_plx_device_and_sensor_status_equipment_malfunction_detected,
16747 {"Equipment Malfunction Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.equipment_malfunction_detected",
16748 FT_BOOLEAN, 24, NULL, 0x000002,
16749 NULL, HFILL}
16751 {&hf_btatt_plx_device_and_sensor_status_extended_display_update_ongoing,
16752 {"Extended Display Update Ongoing", "btatt.plxs.spot_check_measurement.device_and_sensor_status.extended_display_update_ongoing",
16753 FT_BOOLEAN, 24, NULL, 0x000001,
16754 NULL, HFILL}
16756 {&hf_btatt_plx_pulse_amplitude_index,
16757 {"Pulse Amplitude Index", "btatt.plxs.spot_check_measurement.pulse_amplitude_index",
16758 FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16759 NULL, HFILL}
16761 {&hf_btatt_plx_spo2pr_spot_check,
16762 {"SpO2PR Spot Check", "btatt.plxs.spo2pr_spot_check",
16763 FT_NONE, BASE_NONE, NULL, 0x0,
16764 NULL, HFILL}
16766 {&hf_btatt_plx_spo2pr_normal,
16767 {"SpO2PR Normal", "btatt.plxs.spo2pr_normal",
16768 FT_NONE, BASE_NONE, NULL, 0x0,
16769 NULL, HFILL}
16771 {&hf_btatt_plx_spo2pr_fast,
16772 {"SpO2PR Fast", "btatt.plxs.spo2pr_fast",
16773 FT_NONE, BASE_NONE, NULL, 0x0,
16774 NULL, HFILL}
16776 {&hf_btatt_plx_spo2pr_slow,
16777 {"SpO2PR Slow", "btatt.plxs.spo2pr_slow",
16778 FT_NONE, BASE_NONE, NULL, 0x0,
16779 NULL, HFILL}
16781 {&hf_btatt_plx_continuous_measurement_flags,
16782 {"Flags", "btatt.plxs.continuous_measurement.flags",
16783 FT_UINT8, BASE_HEX, NULL, 0x0,
16784 NULL, HFILL}
16786 {&hf_btatt_plx_continuous_measurement_flags_reserved,
16787 {"Reserved", "btatt.plxs.continuous_measurement.flags.reserved",
16788 FT_UINT8, BASE_HEX, NULL, 0xE0,
16789 NULL, HFILL}
16791 {&hf_btatt_plx_continuous_measurement_flags_pulse_amplitude_index,
16792 {"Pulse Amplitude Index", "btatt.plxs.continuous_measurement.flags.pulse_amplitude_index",
16793 FT_BOOLEAN, 8, NULL, 0x10,
16794 NULL, HFILL}
16796 {&hf_btatt_plx_continuous_measurement_flags_device_and_sensor_status,
16797 {"Device and Sensor Status", "btatt.plxs.continuous_measurement.flags.device_and_sensor_status",
16798 FT_BOOLEAN, 8, NULL, 0x08,
16799 NULL, HFILL}
16801 {&hf_btatt_plx_continuous_measurement_flags_measurement_status,
16802 {"Measurement Status", "btatt.plxs.continuous_measurement.flags.measurement_status",
16803 FT_BOOLEAN, 8, NULL, 0x04,
16804 NULL, HFILL}
16806 {&hf_btatt_plx_continuous_measurement_flags_spo2pr_slow,
16807 {"SpO2PR-Slow", "btatt.plxs.continuous_measurement.flags.spo2pr_slow",
16808 FT_BOOLEAN, 8, NULL, 0x02,
16809 NULL, HFILL}
16811 {&hf_btatt_plx_continuous_measurement_flags_spo2pr_fast,
16812 {"SpO2PR-Fast", "btatt.plxs.continuous_measurement.flags.spo2pr_fast",
16813 FT_BOOLEAN, 8, NULL, 0x01,
16814 NULL, HFILL}
16817 {&hf_btatt_plx_features_supported_features,
16818 {"Supported Features", "btatt.plxs.features.supported_features",
16819 FT_UINT16, BASE_HEX, NULL, 0x0,
16820 NULL, HFILL}
16822 {&hf_btatt_plx_features_supported_features_reserved,
16823 {"Reserved", "btatt.plxs.features.supported_features.reserved",
16824 FT_UINT16, BASE_HEX, NULL, 0xFF00,
16825 NULL, HFILL}
16827 {&hf_btatt_plx_features_supported_features_multiple_bonds,
16828 {"Multiple Bonds", "btatt.plxs.features.supported_features.multiple_bonds",
16829 FT_BOOLEAN, 16, NULL, 0x0080,
16830 NULL, HFILL}
16832 {&hf_btatt_plx_features_supported_features_pulse_amplitude_index,
16833 {"Pulse Amplitude Index", "btatt.plxs.features.supported_features.pulse_amplitude_index",
16834 FT_BOOLEAN, 16, NULL, 0x0040,
16835 NULL, HFILL}
16837 {&hf_btatt_plx_features_supported_features_spo2pr_slow,
16838 {"SpO2PR-Slow", "btatt.plxs.features.supported_features.spo2pr_slow",
16839 FT_BOOLEAN, 16, NULL, 0x0020,
16840 NULL, HFILL}
16842 {&hf_btatt_plx_features_supported_features_spo2pr_fast,
16843 {"SpO2PR-Fast", "btatt.plxs.features.supported_features.spo2pr_fast",
16844 FT_BOOLEAN, 16, NULL, 0x0010,
16845 NULL, HFILL}
16847 {&hf_btatt_plx_features_supported_features_timestamp_storage_for_spot_check,
16848 {"Timestamp Storage for Spot-Check", "btatt.plxs.features.supported_features.timestamp_storage_for_spot_check",
16849 FT_BOOLEAN, 16, NULL, 0x0008,
16850 NULL, HFILL}
16852 {&hf_btatt_plx_features_supported_features_measurement_storage_for_spot_check,
16853 {"Measurement Storage for Spot-Check", "btatt.plxs.features.supported_features.measurement_storage_for_spot_check",
16854 FT_BOOLEAN, 16, NULL, 0x0004,
16855 NULL, HFILL}
16857 {&hf_btatt_plx_features_supported_features_device_and_sensor_status,
16858 {"Device and Sensor Status", "btatt.plxs.features.supported_features.device_and_sensor_status",
16859 FT_BOOLEAN, 16, NULL, 0x0002,
16860 NULL, HFILL}
16862 {&hf_btatt_plx_features_supported_features_measurement_status,
16863 {"Measurement Status", "btatt.plxs.features.supported_features.measurement_status",
16864 FT_BOOLEAN, 16, NULL, 0x0001,
16865 NULL, HFILL}
16867 {&hf_btatt_valid_range_lower_inclusive_value,
16868 {"Lower Inclusive Value", "btatt.valid_range.lower_inclusive_value",
16869 FT_NONE, BASE_NONE, NULL, 0x0,
16870 NULL, HFILL}
16872 {&hf_btatt_valid_range_upper_inclusive_value,
16873 {"Upper Inclusive Value", "btatt.valid_range.upper_inclusive_value",
16874 FT_NONE, BASE_NONE, NULL, 0x0,
16875 NULL, HFILL}
16877 {&hf_btatt_regulatory_certification_data_list_count,
16878 {"Count", "btatt.regulatory_certification_data_list.count",
16879 FT_UINT16, BASE_DEC, NULL, 0x0,
16880 NULL, HFILL}
16882 {&hf_btatt_regulatory_certification_data_list_length,
16883 {"Length", "btatt.regulatory_certification_data_list.length",
16884 FT_UINT16, BASE_DEC, NULL, 0x0,
16885 NULL, HFILL}
16887 {&hf_btatt_regulatory_certification_data_list_item,
16888 {"Item", "btatt.regulatory_certification_data_list.item",
16889 FT_NONE, BASE_NONE, NULL, 0x0,
16890 NULL, HFILL}
16892 {&hf_btatt_regulatory_certification_data_list_item_body,
16893 {"Authorizing Body", "btatt.regulatory_certification_data_list.item.authorization_body",
16894 FT_UINT8, BASE_DEC, NULL, 0x0,
16895 NULL, HFILL}
16897 {&hf_btatt_regulatory_certification_data_list_item_body_structure_type,
16898 {"Authorizing Body Structure Type", "btatt.regulatory_certification_data_list.item.authorization_body_structure_type",
16899 FT_UINT8, BASE_DEC, VALS(regulatory_certification_data_list_item_body_structure_type_vals), 0x0,
16900 NULL, HFILL}
16902 {&hf_btatt_regulatory_certification_data_list_item_body_structure_length,
16903 {"Authorizing Body Structure Length", "btatt.regulatory_certification_data_list.item.length",
16904 FT_UINT16, BASE_DEC, NULL, 0x0,
16905 NULL, HFILL}
16907 {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data,
16908 {"Authorizing Body Data", "btatt.regulatory_certification_data_list.item.authorizing_body_data",
16909 FT_NONE, BASE_NONE, NULL, 0x0,
16910 NULL, HFILL}
16912 {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_major_ig_version,
16913 {"Major IG Version", "btatt.regulatory_certification_data_list.item.authorizing_body_data.major_ig_version",
16914 FT_UINT8, BASE_DEC, NULL, 0x0,
16915 NULL, HFILL}
16917 {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_minor_ig_version,
16918 {"Minor IG Version", "btatt.regulatory_certification_data_list.item.authorizing_body_data.minor_ig_version",
16919 FT_UINT8, BASE_DEC, NULL, 0x0,
16920 NULL, HFILL}
16922 {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_count,
16923 {"Certification Data List LCount", "btatt.regulatory_certification_data_list.item.certified_device_class_list.count",
16924 FT_UINT16, BASE_DEC, NULL, 0x0,
16925 NULL, HFILL}
16927 {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_length,
16928 {"Certification Data List Length", "btatt.regulatory_certification_data_list.item.certified_device_class_list.length",
16929 FT_UINT16, BASE_DEC, NULL, 0x0,
16930 NULL, HFILL}
16932 {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list,
16933 {"Certification Data List", "btatt.regulatory_certification_data_list.item.certified_device_class_list",
16934 FT_NONE, BASE_NONE, NULL, 0x0,
16935 NULL, HFILL}
16937 {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certified_device_class,
16938 {"Certified Device Class", "btatt.regulatory_certification_data_list.item.certified_device_class_list.entry",
16939 FT_UINT16, BASE_DEC, NULL, 0x0,
16940 NULL, HFILL}
16942 {&hf_btatt_regulatory_certification_data_list_item_regulation_bit_field_type,
16943 {"Regulation Bit Field Type", "btatt.regulatory_certification_data_list.item.regulation_bit_field_type",
16944 FT_UINT16, BASE_HEX, NULL, 0xFFFF,
16945 NULL, HFILL}
16947 {&hf_btatt_regulatory_certification_data_list_item_data,
16948 {"Data", "btatt.regulatory_certification_data_list.item.data",
16949 FT_NONE, BASE_NONE, NULL, 0x0,
16950 NULL, HFILL}
16952 {&hf_btatt_timezone_information,
16953 {"Timezone Information", "btatt.timezone_information",
16954 FT_UINT8, BASE_HEX, NULL, 0x0,
16955 NULL, HFILL}
16957 {&hf_btatt_timezone_information_information,
16958 {"Information", "btatt.timezone_information.information",
16959 FT_UINT8, BASE_DEC, VALS(timezone_information_vals), 0x7F,
16960 NULL, HFILL}
16962 {&hf_btatt_timezone_information_information_type,
16963 {"Type", "btatt.timezone_information.information_type",
16964 FT_BOOLEAN, 8, TFS(&timezone_information_type_tfs), 0x80,
16965 NULL, HFILL}
16967 {&hf_btatt_temperature_celsius,
16968 {"Temperature Celsius", "btatt.temperature_celsius",
16969 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
16970 NULL, HFILL}
16972 {&hf_btatt_temperature_fahrenheit,
16973 {"Temperature Fahrenheit", "btatt.temperature_fahrenheit",
16974 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
16975 NULL, HFILL}
16977 {&hf_btatt_removable,
16978 {"Removable", "btatt.removable",
16979 FT_UINT8, BASE_HEX, NULL, 0x0,
16980 NULL, HFILL}
16982 {&hf_btatt_removable_reserved,
16983 {"Reserved", "btatt.removable.reserved",
16984 FT_UINT8, BASE_HEX, NULL, 0xFC,
16985 NULL, HFILL}
16987 {&hf_btatt_removable_removable,
16988 {"Removable", "btatt.removable.removable",
16989 FT_UINT8, BASE_HEX, VALS(removable_removable_vals), 0x03,
16990 NULL, HFILL}
16992 {&hf_btatt_service_required,
16993 {"Service Required", "btatt.service_required",
16994 FT_UINT8, BASE_HEX, NULL, 0x0,
16995 NULL, HFILL}
16997 {&hf_btatt_service_required_reserved,
16998 {"Reserved", "btatt.service_required.reserved",
16999 FT_UINT8, BASE_HEX, NULL, 0xFC,
17000 NULL, HFILL}
17002 {&hf_btatt_service_required_service_required,
17003 {"Service Required", "btatt.service_required.service_required",
17004 FT_UINT8, BASE_HEX, VALS(service_required_service_required_vals), 0x03,
17005 NULL, HFILL}
17007 {&hf_btatt_scientific_temperature_celsius,
17008 {"Scientific Temperature Celsius", "btatt.scientific_temperature_celsius",
17009 FT_DOUBLE, BASE_NONE, NULL, 0x0,
17010 NULL, HFILL}
17012 {&hf_btatt_string,
17013 {"String", "btatt.string",
17014 FT_STRING, BASE_NONE, NULL, 0x0,
17015 NULL, HFILL}
17017 {&hf_btatt_network_availability,
17018 {"Network Availability", "btatt.network_availability",
17019 FT_UINT8, BASE_HEX, VALS(network_availability_vals), 0x0,
17020 NULL, HFILL}
17022 {&hf_btatt_fitness_machine_features,
17023 {"Fitness Machine Features", "btatt.fitness_machine_features",
17024 FT_UINT32, BASE_HEX, NULL, 0x0,
17025 NULL, HFILL}
17027 {&hf_btatt_fitness_machine_features_reserved,
17028 {"Reserved", "btatt.fitness_machine_features.reserved",
17029 FT_UINT32, BASE_HEX, NULL, 0xFFFE0000,
17030 NULL, HFILL}
17032 {&hf_btatt_fitness_machine_features_user_data_retention,
17033 {"User Data Retention", "btatt.fitness_machine_features.user_data_retention",
17034 FT_BOOLEAN, 32, NULL, 0x00010000,
17035 NULL, HFILL}
17037 {&hf_btatt_fitness_machine_features_force_on_belt_and_power_output,
17038 {"Force on Belt_and Power Output", "btatt.fitness_machine_features.force_on_belt_and_power_output",
17039 FT_BOOLEAN, 32, NULL, 0x00008000,
17040 NULL, HFILL}
17042 {&hf_btatt_fitness_machine_features_power_measurement,
17043 {"Power Measurement", "btatt.fitness_machine_features.power_measurement",
17044 FT_BOOLEAN, 32, NULL, 0x00004000,
17045 NULL, HFILL}
17047 {&hf_btatt_fitness_machine_features_remaining_time,
17048 {"Remaining Time", "btatt.fitness_machine_features.remaining_time",
17049 FT_BOOLEAN, 32, NULL, 0x00002000,
17050 NULL, HFILL}
17052 {&hf_btatt_fitness_machine_features_elapsed_time,
17053 {"Elapsed Time", "btatt.fitness_machine_features.elapsed_time",
17054 FT_BOOLEAN, 32, NULL, 0x00001000,
17055 NULL, HFILL}
17057 {&hf_btatt_fitness_machine_features_metabolic_equivalent,
17058 {"Metabolic Equivalent", "btatt.fitness_machine_features.metabolic_equivalent",
17059 FT_BOOLEAN, 32, NULL, 0x00000800,
17060 NULL, HFILL}
17062 {&hf_btatt_fitness_machine_features_heart_rate_measurement,
17063 {"Heart Rate Measurement", "btatt.fitness_machine_features.heart_rate_measurement",
17064 FT_BOOLEAN, 32, NULL, 0x00000400,
17065 NULL, HFILL}
17067 {&hf_btatt_fitness_machine_features_expended_energy,
17068 {"Expended Energy", "btatt.fitness_machine_features.expended_energy",
17069 FT_BOOLEAN, 32, NULL, 0x00000200,
17070 NULL, HFILL}
17072 {&hf_btatt_fitness_machine_features_stride_count,
17073 {"Stride Count", "btatt.fitness_machine_features.stride_count",
17074 FT_BOOLEAN, 32, NULL, 0x00000100,
17075 NULL, HFILL}
17077 {&hf_btatt_fitness_machine_features_resistance_level,
17078 {"Resistance Level", "btatt.fitness_machine_features.resistance_level",
17079 FT_BOOLEAN, 32, NULL, 0x00000080,
17080 NULL, HFILL}
17082 {&hf_btatt_fitness_machine_features_step_count,
17083 {"Step Count", "btatt.fitness_machine_features.step_count",
17084 FT_BOOLEAN, 32, NULL, 0x00000040,
17085 NULL, HFILL}
17087 {&hf_btatt_fitness_machine_features_pace,
17088 {"Pace", "btatt.fitness_machine_features.pace",
17089 FT_BOOLEAN, 32, NULL, 0x00000020,
17090 NULL, HFILL}
17092 {&hf_btatt_fitness_machine_features_elevation_gain,
17093 {"Elevation Gain", "btatt.fitness_machine_features.elevation_gain",
17094 FT_BOOLEAN, 32, NULL, 0x00000010,
17095 NULL, HFILL}
17097 {&hf_btatt_fitness_machine_features_inclination,
17098 {"Inclination", "btatt.fitness_machine_features.inclination",
17099 FT_BOOLEAN, 32, NULL, 0x00000008,
17100 NULL, HFILL}
17102 {&hf_btatt_fitness_machine_features_total_distance,
17103 {"Total Distance", "btatt.fitness_machine_features.total_distance",
17104 FT_BOOLEAN, 32, NULL, 0x00000004,
17105 NULL, HFILL}
17107 {&hf_btatt_fitness_machine_features_cadence,
17108 {"Cadence", "btatt.fitness_machine_features.cadence",
17109 FT_BOOLEAN, 32, NULL, 0x00000002,
17110 NULL, HFILL}
17112 {&hf_btatt_fitness_machine_features_average_speed,
17113 {"Average Speed", "btatt.fitness_machine_features.average_speed",
17114 FT_BOOLEAN, 32, NULL, 0x00000001,
17115 NULL, HFILL}
17117 {&hf_btatt_target_setting_features,
17118 {"Target Setting Features", "btatt.target_setting_features",
17119 FT_UINT32, BASE_HEX, NULL, 0x0,
17120 NULL, HFILL}
17122 {&hf_btatt_target_setting_features_reserved,
17123 {"Reserved", "btatt.target_setting_features.reserved",
17124 FT_UINT32, BASE_HEX, NULL, 0xFFFE0000,
17125 NULL, HFILL}
17127 {&hf_btatt_target_setting_features_targeted_cadence_configuration,
17128 {"Targeted Cadence Configuration", "btatt.target_setting_features.targeted_cadence_configuration",
17129 FT_BOOLEAN, 32, NULL, 0x00010000,
17130 NULL, HFILL}
17132 {&hf_btatt_target_setting_features_spin_down_control,
17133 {"Spin Down Control", "btatt.target_setting_features.spin_down_control",
17134 FT_BOOLEAN, 32, NULL, 0x00008000,
17135 NULL, HFILL}
17137 {&hf_btatt_target_setting_features_wheel_circumference_configuration,
17138 {"Wheel Circumference Configuration", "btatt.target_setting_features.wheel_circumference_configuration",
17139 FT_BOOLEAN, 32, NULL, 0x00004000,
17140 NULL, HFILL}
17142 {&hf_btatt_target_setting_features_indoor_bike_simulation_parameters,
17143 {"Indoor Bike Simulation Parameters", "btatt.target_setting_features.indoor_bike_simulation_parameters",
17144 FT_BOOLEAN, 32, NULL, 0x00002000,
17145 NULL, HFILL}
17147 {&hf_btatt_target_setting_features_targeted_time_in_five_heart_rate_zones_configuration,
17148 {"Targeted Time in Five Heart Rate Zones Configuration", "btatt.target_setting_features.targeted_time_in_five_heart_rate_zones_configuration",
17149 FT_BOOLEAN, 32, NULL, 0x00001000,
17150 NULL, HFILL}
17152 {&hf_btatt_target_setting_features_targeted_time_in_three_heart_rate_zones_configuration,
17153 {"Targeted Time in Three Heart Rate Zones Configuration", "btatt.target_setting_features.targeted_time_in_three_heart_rate_zones_configuration",
17154 FT_BOOLEAN, 32, NULL, 0x00000800,
17155 NULL, HFILL}
17157 {&hf_btatt_target_setting_features_targeted_time_in_two_heart_rate_zones_configuration,
17158 {"Targeted Time in Two Heart Rate Zones Configuration", "btatt.target_setting_features.targeted_time_in_two_heart_rate_zones_configuration",
17159 FT_BOOLEAN, 32, NULL, 0x00000400,
17160 NULL, HFILL}
17162 {&hf_btatt_target_setting_features_targeted_training_time_configuration,
17163 {"Targeted Training Time Configuration", "btatt.target_setting_features.targeted_training_time_configuration",
17164 FT_BOOLEAN, 32, NULL, 0x00000200,
17165 NULL, HFILL}
17167 {&hf_btatt_target_setting_features_targeted_distance_configuration,
17168 {"Targeted Distance Configuration", "btatt.target_setting_features.targeted_distance_configuration",
17169 FT_BOOLEAN, 32, NULL, 0x00000100,
17170 NULL, HFILL}
17172 {&hf_btatt_target_setting_features_targeted_stride_number_configuration,
17173 {"Targeted Stride Number Configuration", "btatt.target_setting_features.targeted_stride_number_configuration",
17174 FT_BOOLEAN, 32, NULL, 0x00000080,
17175 NULL, HFILL}
17177 {&hf_btatt_target_setting_features_targeted_step_number_configuration,
17178 {"Targeted Step Number Configuration", "btatt.target_setting_features.targeted_step_number_configuration",
17179 FT_BOOLEAN, 32, NULL, 0x00000040,
17180 NULL, HFILL}
17182 {&hf_btatt_target_setting_features_targeted_expended_energy_configuration,
17183 {"Targeted Expended Energy Configuration", "btatt.target_setting_features.targeted_expended_energy_configuration",
17184 FT_BOOLEAN, 32, NULL, 0x00000020,
17185 NULL, HFILL}
17187 {&hf_btatt_target_setting_features_heart_rate_target_setting,
17188 {"Heart Rate Target Setting", "btatt.target_setting_features.heart_rate_target_setting",
17189 FT_BOOLEAN, 32, NULL, 0x00000010,
17190 NULL, HFILL}
17192 {&hf_btatt_target_setting_features_power_target_setting,
17193 {"Power Target Setting", "btatt.target_setting_features.power_target_setting",
17194 FT_BOOLEAN, 32, NULL, 0x00000008,
17195 NULL, HFILL}
17197 {&hf_btatt_target_setting_features_resistance_target_setting,
17198 {"Resistance Target Setting", "btatt.target_setting_features.resistance_target_setting",
17199 FT_BOOLEAN, 32, NULL, 0x00000004,
17200 NULL, HFILL}
17202 {&hf_btatt_target_setting_features_inclination_target_setting,
17203 {"Inclination Target Setting", "btatt.target_setting_features.inclination_target_setting",
17204 FT_BOOLEAN, 32, NULL, 0x00000002,
17205 NULL, HFILL}
17207 {&hf_btatt_target_setting_features_speed_target_setting,
17208 {"Speed Target Setting", "btatt.target_setting_features.speed_target_setting",
17209 FT_BOOLEAN, 32, NULL, 0x00000001,
17210 NULL, HFILL}
17212 {&hf_btatt_training_status_flags,
17213 {"Training Status Flags", "btatt.training_status",
17214 FT_UINT8, BASE_HEX, NULL, 0x0,
17215 NULL, HFILL}
17217 {&hf_btatt_training_status_flags_reserved,
17218 {"Reserved", "btatt.training_status.reserved",
17219 FT_UINT8, BASE_HEX, NULL, 0xFC,
17220 NULL, HFILL}
17222 {&hf_btatt_training_status_flags_extended_string,
17223 {"Extended String", "btatt.training_status.extended_string",
17224 FT_BOOLEAN, 8, NULL, 0x02,
17225 NULL, HFILL}
17227 {&hf_btatt_training_status_flags_training_status_string,
17228 {"Training Status String", "btatt.training_status.training_status_string",
17229 FT_BOOLEAN, 8, NULL, 0x01,
17230 NULL, HFILL}
17232 {&hf_btatt_training_status_status,
17233 {"Status", "btatt.training_status.status",
17234 FT_UINT8, BASE_HEX, VALS(training_status_status_vals), 0x0,
17235 NULL, HFILL}
17237 {&hf_btatt_training_status_status_string,
17238 {"Status String", "btatt.training_status.status_string",
17239 FT_STRING, BASE_NONE, NULL, 0x0,
17240 NULL, HFILL}
17242 {&hf_btatt_supported_speed_range_minimum_speed,
17243 {"Minimum Speed", "btatt.supported_speed_range.minimum_speed",
17244 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17245 NULL, HFILL}
17247 {&hf_btatt_supported_speed_range_maximum_speed,
17248 {"Maximum Speed", "btatt.supported_speed_range.maximum_speed",
17249 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17250 NULL, HFILL}
17252 {&hf_btatt_supported_speed_range_minimum_increment,
17253 {"Minimum Increment", "btatt.supported_speed_range.minimum_increment",
17254 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17255 NULL, HFILL}
17257 {&hf_btatt_supported_inclination_range_minimum_inclination,
17258 {"Minimum Inclination", "btatt.supported_inclination_range.minimum_inclination",
17259 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_percentage), 0x0,
17260 NULL, HFILL}
17262 {&hf_btatt_supported_inclination_range_maximum_inclination,
17263 {"Maximum Inclination", "btatt.supported_inclination_range.maximum_inclination",
17264 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_percentage), 0x0,
17265 NULL, HFILL}
17267 {&hf_btatt_supported_inclination_range_minimum_increment,
17268 {"Minimum Increment", "btatt.supported_inclination_range.minimum_increment",
17269 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_percentage), 0x0,
17270 NULL, HFILL}
17272 {&hf_btatt_supported_resistance_level_range_minimum_resistance_level,
17273 {"Minimum Resistance Level", "btatt.supported_resistance_level_range.minimum_resistance_level",
17274 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
17275 NULL, HFILL}
17277 {&hf_btatt_supported_resistance_level_range_maximum_resistance_level,
17278 {"Maximum Resistance Level", "btatt.supported_resistance_level_range.maximum_resistance_level",
17279 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
17280 NULL, HFILL}
17282 {&hf_btatt_supported_resistance_level_range_minimum_increment,
17283 {"Minimum Increment", "btatt.supported_resistance_level_range.minimum_increment",
17284 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_unitless), 0x0,
17285 NULL, HFILL}
17287 {&hf_btatt_supported_heart_rate_range_minimum_heart_rate,
17288 {"Minimum Heart Rate", "btatt.supported_heart_rate_range.minimum_heart_rate",
17289 FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17290 NULL, HFILL}
17292 {&hf_btatt_supported_heart_rate_range_maximum_heart_rate,
17293 {"Maximum Heart Rate", "btatt.supported_heart_rate_range.maximum_heart_rate",
17294 FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17295 NULL, HFILL}
17297 {&hf_btatt_supported_heart_rate_range_minimum_increment,
17298 {"Minimum Increment", "btatt.supported_heart_rate_range.minimum_increment",
17299 FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17300 NULL, HFILL}
17302 {&hf_btatt_supported_power_range_minimum_power,
17303 {"Minimum Power", "btatt.supported_power_range.minimum_power",
17304 FT_INT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17305 NULL, HFILL}
17307 {&hf_btatt_supported_power_range_maximum_power,
17308 {"Maximum Power", "btatt.supported_power_range.maximum_power",
17309 FT_INT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17310 NULL, HFILL}
17312 {&hf_btatt_supported_power_range_minimum_increment,
17313 {"Minimum Increment", "btatt.supported_power_range.minimum_increment",
17314 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17315 NULL, HFILL}
17317 {&hf_btatt_fitness_machine_status_opcode,
17318 {"Opcode", "btatt.fitness_machine_status.opcode",
17319 FT_UINT8, BASE_HEX, VALS(fitness_machine_status_opcode_vals), 0x0,
17320 NULL, HFILL}
17322 {&hf_btatt_fitness_machine_control_information,
17323 {"Control Information", "btatt.fitness_machine.control_information",
17324 FT_UINT8, BASE_HEX, VALS(fitness_machine_control_information_vals), 0x0,
17325 NULL, HFILL}
17327 {&hf_btatt_fitness_machine_spin_down_status,
17328 {"Spin Down Status", "btatt.fitness_machine.spin_down_status",
17329 FT_UINT8, BASE_HEX, VALS(fitness_machine_spin_down_status_vals), 0x0,
17330 NULL, HFILL}
17332 {&hf_btatt_fitness_machine_speed,
17333 {"Speed", "btatt.fitness_machine.speed",
17334 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17335 NULL, HFILL}
17337 {&hf_btatt_fitness_machine_incline,
17338 {"Inclination", "btatt.fitness_machine.inclination",
17339 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_percentage), 0x0,
17340 NULL, HFILL}
17342 {&hf_btatt_fitness_machine_resistance_level,
17343 {"Resistance Level", "btatt.fitness_machine.resistance_level",
17344 FT_UINT8, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_unitless), 0x0,
17345 NULL, HFILL}
17347 {&hf_btatt_fitness_machine_power,
17348 {"Power", "btatt.fitness_machine.power",
17349 FT_INT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17350 NULL, HFILL}
17352 {&hf_btatt_fitness_machine_heart_rate,
17353 {"Heart Rate", "btatt.fitness_machine.heart_rate",
17354 FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17355 NULL, HFILL}
17357 {&hf_btatt_fitness_machine_expended_energy,
17358 {"Expended Energy", "btatt.fitness_machine.expended_energy",
17359 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_calorie), 0x0,
17360 NULL, HFILL}
17362 {&hf_btatt_fitness_machine_number_of_steps,
17363 {"Number of Steps", "btatt.fitness_machine.number_of_steps",
17364 FT_UINT16, BASE_DEC, NULL, 0x0,
17365 NULL, HFILL}
17367 {&hf_btatt_fitness_machine_number_of_strides,
17368 {"Number of Strides", "btatt.fitness_machine.number_of_strides",
17369 FT_UINT16, BASE_DEC, NULL, 0x0,
17370 NULL, HFILL}
17372 {&hf_btatt_fitness_machine_distance,
17373 {"Distance", "btatt.fitness_machine.distance",
17374 FT_UINT24, BASE_DEC | BASE_UNIT_STRING, UNS(&units_meters), 0x0,
17375 NULL, HFILL}
17377 {&hf_btatt_fitness_machine_training_time,
17378 {"Training Time", "btatt.fitness_machine.training_time",
17379 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17380 NULL, HFILL}
17382 {&hf_btatt_fitness_machine_wheel_circumference,
17383 {"Wheel Circumference", "btatt.fitness_machine.wheel_circumference",
17384 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_milimeters), 0x0,
17385 NULL, HFILL}
17387 {&hf_btatt_fitness_machine_cadence,
17388 {"Cadence", "btatt.fitness_machine.cadence",
17389 FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_half_half_minute), 0x0,
17390 NULL, HFILL}
17392 {&hf_btatt_fitness_machine_wind_speed,
17393 {"Wind Speed", "btatt.fitness_machine.wind_speed",
17394 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_thousandth_meters_per_seconds), 0x0,
17395 NULL, HFILL}
17397 {&hf_btatt_fitness_machine_grade,
17398 {"Grade", "btatt.fitness_machine.grade",
17399 FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_hundredth_percentage), 0x0,
17400 NULL, HFILL}
17402 {&hf_btatt_fitness_machine_coefficient_of_rolling_resistance,
17403 {"Coefficient_of Rolling Resistance", "btatt.fitness_machine.coefficient_of_rolling_resistance",
17404 FT_UINT8, BASE_CUSTOM, CF_FUNC(base_unsigned_one_ten_thousandth_unitless), 0x0,
17405 NULL, HFILL}
17407 {&hf_btatt_fitness_machine_wind_resistance_coefficient,
17408 {"Wind Resistance Coefficient", "btatt.fitness_machine.wind_resistance_coefficient",
17409 FT_UINT8, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_kg_per_meter), 0x0,
17410 NULL, HFILL}
17412 {&hf_btatt_fitness_machine_targeted_time_in_fat_burn_zone,
17413 {"Targeted Time in Fat Burn Zone", "btatt.fitness_machine.targeted_time_in_fat_burn_zone",
17414 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17415 NULL, HFILL}
17417 {&hf_btatt_fitness_machine_targeted_time_in_fitness_zone,
17418 {"Targeted Time in Fitness Zone", "btatt.fitness_machine.targeted_time_in_fitness_zone",
17419 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17420 NULL, HFILL}
17422 {&hf_btatt_fitness_machine_targeted_time_in_very_light_zone,
17423 {"Targeted Time in Very Light Zone", "btatt.fitness_machine.targeted_time_in_very_light_zone",
17424 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17425 NULL, HFILL}
17427 {&hf_btatt_fitness_machine_targeted_time_in_light_zone,
17428 {"Targeted Time in Light Zone", "btatt.fitness_machine.targeted_time_in_light_zone",
17429 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17430 NULL, HFILL}
17432 {&hf_btatt_fitness_machine_targeted_time_in_moderate_zone,
17433 {"Targeted Time in Moderate Zone", "btatt.fitness_machine.targeted_time_in_moderate_zone",
17434 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17435 NULL, HFILL}
17437 {&hf_btatt_fitness_machine_targeted_time_in_hard_zone,
17438 {"Targeted Time in Hard Zone", "btatt.fitness_machine.targeted_time_in_hard_zone",
17439 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17440 NULL, HFILL}
17442 {&hf_btatt_fitness_machine_targeted_time_in_maximum_zone,
17443 {"Targeted Time in Maximum Zone", "btatt.fitness_machine.targeted_time_in_maximum_zone",
17444 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17445 NULL, HFILL}
17447 {&hf_btatt_volume_setting,
17448 {"Volume Setting", "btatt.volume_control.volume_setting",
17449 FT_UINT8, BASE_DEC, NULL, 0x0,
17450 NULL, HFILL}
17452 {&hf_btatt_volume_mute,
17453 {"Mute", "btatt.volume_control.mute",
17454 FT_UINT8, BASE_DEC, NULL, 0x0,
17455 NULL, HFILL}
17457 {&hf_btatt_volume_change_counter,
17458 {"Change counter", "btatt.volume_control.change_counter",
17459 FT_UINT8, BASE_DEC, NULL, 0x0,
17460 NULL, HFILL}
17462 {&hf_btatt_volume_control_point_procedure,
17463 {"Volume Control Point Procedure", "btatt.volume_control.procedure",
17464 FT_UINT8, BASE_HEX, VALS(ots_volume_control_point_procedure_vals), 0x0,
17465 NULL, HFILL}
17467 {&hf_btatt_volume_flags,
17468 {"Flags", "btatt.volume_control.volume_flags",
17469 FT_UINT8, BASE_DEC, NULL, 0x0,
17470 NULL, HFILL}
17472 {&hf_request_in_frame,
17473 {"Request in Frame", "btatt.request_in_frame",
17474 FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0x0,
17475 NULL, HFILL}
17477 {&hf_response_in_frame,
17478 {"Response in Frame", "btatt.response_in_frame",
17479 FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
17480 NULL, HFILL}
17482 /* Reassembly fields. */
17483 { &hf_btatt_fragments,
17484 { "Message fragments", "btatt.fragments",
17485 FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17486 { &hf_btatt_fragment,
17487 { "Message fragment", "btatt.fragment",
17488 FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17489 { &hf_btatt_fragment_overlap,
17490 { "Message fragment overlap", "btatt.fragment.overlap",
17491 FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17492 { &hf_btatt_fragment_overlap_conflicts,
17493 { "Message fragment overlapping with conflicting data", "btatt.fragment.overlap.conflicts",
17494 FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17495 { &hf_btatt_fragment_multiple_tails,
17496 { "Message has multiple tail fragments", "btatt.fragment.multiple_tails",
17497 FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17498 { &hf_btatt_fragment_too_long_fragment,
17499 { "Message fragment too long", "btatt.fragment.too_long_fragment",
17500 FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17501 { &hf_btatt_fragment_error,
17502 { "Message defragmentation error", "btatt.fragment.error",
17503 FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17504 { &hf_btatt_fragment_count,
17505 { "Message fragment count", "btatt.fragment.count",
17506 FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
17507 { &hf_btatt_reassembled_in,
17508 { "Reassembled in", "btatt.reassembled.in",
17509 FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17510 { &hf_btatt_reassembled_length,
17511 { "Reassembled msg length", "btatt.reassembled.length",
17512 FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
17513 { &hf_btatt_reassembled_data,
17514 { "Reassembled msg ata", "btatt.reassembled.data",
17515 FT_BYTES, SEP_SPACE, NULL, 0x00, NULL, HFILL }},
17518 /* Setup protocol subtree array */
17519 static int *ett[] = {
17520 &ett_btatt,
17521 &ett_btatt_list,
17522 &ett_btatt_value,
17523 &ett_btatt_opcode,
17524 &ett_btatt_handle,
17525 &ett_btatt_characteristic_properties,
17526 /* reassembly subtree */
17527 &ett_btatt_fragment,
17528 &ett_btatt_fragments,
17531 static ei_register_info ei[] = {
17532 { &ei_btatt_uuid_format_unknown, { "btatt.uuid_format.unknown", PI_PROTOCOL, PI_WARN, "Unknown format", EXPFILL }},
17533 { &ei_btatt_handle_too_few, { "btatt.handle.too_few", PI_PROTOCOL, PI_WARN, "Too few handles, should be 2 or more", EXPFILL }},
17534 { &ei_btatt_mtu_exceeded, { "btatt.mtu.exceeded", PI_PROTOCOL, PI_WARN, "Packet size exceed current ATT_MTU", EXPFILL }},
17535 { &ei_btatt_mtu_full, { "btatt.mtu.full", PI_PROTOCOL, PI_NOTE, "Reached ATT_MTU. Attribute value may be longer.", EXPFILL }},
17536 { &ei_btatt_consent_out_of_bounds, { "btatt.consent.out_of_bounds", PI_PROTOCOL, PI_WARN, "Consent Code is out of bounds (0 to 9999)", EXPFILL }},
17537 { &ei_btatt_cgm_size_too_small, { "btatt.cgm_measurement.size.too_small", PI_PROTOCOL, PI_WARN, "Size too small (6 or greater)", EXPFILL }},
17538 { &ei_btatt_opcode_invalid_request, { "btatt.opcode.invalid_request" , PI_PROTOCOL, PI_WARN, "Invalid request", EXPFILL }},
17539 { &ei_btatt_opcode_invalid_response,{ "btatt.opcode.invalid_response", PI_PROTOCOL, PI_WARN, "Invalid response", EXPFILL }},
17540 { &ei_btatt_invalid_usage, { "btatt.invalid_usage", PI_PROTOCOL, PI_WARN, "Invalid usage of this characteristic with this opcode", EXPFILL }},
17541 { &ei_btatt_invalid_length, { "btatt.invalid_length", PI_PROTOCOL, PI_WARN, "Invalid length", EXPFILL }},
17542 { &ei_btatt_bad_data, { "btatt.bad_data", PI_PROTOCOL, PI_WARN, "Bad Data", EXPFILL }},
17543 { &ei_btatt_unexpected_data, { "btatt.unexpected_data", PI_PROTOCOL, PI_WARN, "Unexpected Data", EXPFILL }},
17544 { &ei_btatt_undecoded, { "btatt.undecoded", PI_UNDECODED, PI_NOTE, "Undecoded", EXPFILL }},
17547 static build_valid_func btatt_handle_da_build_value[1] = {btatt_handle_value};
17548 static decode_as_value_t btatt_handle_da_values = {btatt_handle_prompt, 1, btatt_handle_da_build_value};
17549 static decode_as_t btatt_handle_da = {"btatt", "btatt.handle",
17550 1, 0, &btatt_handle_da_values, NULL, NULL,
17551 decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL};
17553 /* Register the protocol name and description */
17554 proto_btatt = proto_register_protocol("Bluetooth Attribute Protocol", "BT ATT", "btatt");
17556 btatt_handle = register_dissector("btatt", dissect_btatt, proto_btatt);
17558 att_handle_dissector_table = register_dissector_table("btatt.handle", "BT ATT Handle", proto_btatt, FT_UINT16, BASE_HEX);
17559 att_service_dissector_table = register_dissector_table("btatt.service", "BT ATT Service", proto_btatt, FT_UINT16, BASE_HEX);
17561 /* Required function calls to register the header fields and subtrees used */
17562 proto_register_field_array(proto_btatt, hf, array_length(hf));
17563 proto_register_subtree_array(ett, array_length(ett));
17564 expert_btatt = expert_register_protocol(proto_btatt);
17565 expert_register_field_array(expert_btatt, ei, array_length(ei));
17567 mtus = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17568 requests = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17569 fragments = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17570 handle_to_uuid = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17572 module = prefs_register_protocol_subtree("Bluetooth", proto_btatt, NULL);
17573 prefs_register_static_text_preference(module, "att.version",
17574 "Bluetooth Protocol ATT version from Core 4.0",
17575 "Version of protocol supported by this dissector.");
17577 register_decode_as(&btatt_handle_da);
17579 btatt_tap_handles = register_tap("btatt.handles");
17582 void
17583 proto_reg_handoff_btatt(void)
17585 int i_array;
17586 GString *uuid_str = g_string_new("");
17588 http_handle = find_dissector_add_dependency("http", proto_btatt);
17589 usb_hid_boot_keyboard_input_report_handle = find_dissector_add_dependency("usbhid.boot_report.keyboard.input", proto_btatt);
17590 usb_hid_boot_keyboard_output_report_handle = find_dissector_add_dependency("usbhid.boot_report.keyboard.output", proto_btatt);
17591 usb_hid_boot_mouse_input_report_handle = find_dissector_add_dependency("usbhid.boot_report.mouse.input", proto_btatt);
17592 btmesh_proxy_handle = find_dissector_add_dependency("btmesh.proxy", proto_btatt);
17594 dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_ATT, btatt_handle);
17595 dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_EATT, btatt_handle);
17596 dissector_add_uint("btl2cap.cid", BTL2CAP_FIXED_CID_ATT, btatt_handle);
17598 for (i_array = 0; bluetooth_uuid_vals[i_array].strptr != NULL; i_array += 1) {
17599 char *name;
17600 char *short_name;
17601 char *abbrev;
17602 dissector_handle_t handle_tmp;
17603 int proto_tmp;
17605 if (bluetooth_uuid_vals[i_array].value < 0x1800) {
17606 continue;
17609 // Skip Units (0x27xx) and Members (0xFxxx)
17610 if (((bluetooth_uuid_vals[i_array].value & 0xFF00) == 0x2700) ||
17611 ((bluetooth_uuid_vals[i_array].value & 0xF000) == 0xF000))
17613 continue;
17616 g_string_printf(uuid_str, "0x%04x", bluetooth_uuid_vals[i_array].value);
17617 name = wmem_strconcat(wmem_epan_scope(), "Bluetooth GATT Attribute ",
17618 bluetooth_uuid_vals[i_array].strptr, " (UUID ", uuid_str->str, ")", NULL);
17619 short_name = wmem_strconcat(wmem_epan_scope(), "BT GATT ",
17620 bluetooth_uuid_vals[i_array].strptr, " (UUID ", uuid_str->str, ")", NULL);
17621 abbrev = wmem_strconcat(wmem_epan_scope(), "btgatt.uuid", uuid_str->str, NULL);
17623 proto_tmp = proto_register_protocol(name, short_name, abbrev);
17624 handle_tmp = register_dissector(abbrev, dissect_btgatt, proto_tmp);
17626 dissector_add_for_decode_as("btatt.handle", handle_tmp);
17628 g_string_free(uuid_str, TRUE);
17631 void
17632 proto_register_btgatt(void)
17634 static hf_register_info hf[] = {
17635 {&hf_gatt_nordic_uart_tx,
17636 {"UART Tx", "btgatt.nordic.uart_tx",
17637 FT_STRING, BASE_NONE, NULL, 0x0,
17638 NULL, HFILL}
17640 {&hf_gatt_nordic_uart_rx,
17641 {"UART Rx", "btgatt.nordic.uart_rx",
17642 FT_STRING, BASE_NONE, NULL, 0x0,
17643 NULL, HFILL}
17645 {&hf_gatt_nordic_dfu_packet,
17646 {"Packet", "btgatt.nordic.dfu.packet",
17647 FT_BYTES, BASE_NONE, NULL, 0x0,
17648 NULL, HFILL}
17650 {&hf_gatt_nordic_dfu_control_point_opcode,
17651 {"Opcode", "btgatt.nordic.dfu.control_point.opcode",
17652 FT_UINT8, BASE_DEC, VALS(nordic_dfu_control_point_opcode_vals), 0x0,
17653 NULL, HFILL}
17655 {&hf_gatt_nordic_dfu_control_point_init_packet,
17656 {"Init Packet", "btgatt.nordic.dfu.control_point.init_packet",
17657 FT_UINT8, BASE_HEX, VALS(nordic_dfu_control_point_init_packet_vals), 0x0,
17658 NULL, HFILL}
17660 {&hf_gatt_nordic_dfu_control_point_image_type,
17661 {"Image Type", "btgatt.nordic.dfu.control_point.image_type",
17662 FT_UINT8, BASE_HEX, VALS(nordic_dfu_control_point_image_type_vals), 0x0,
17663 NULL, HFILL}
17665 {&hf_gatt_nordic_dfu_control_point_number_of_bytes,
17666 {"Number of Bytes of Firmware Image Received", "btgatt.nordic.dfu.control_point.number_of_bytes",
17667 FT_UINT32, BASE_DEC, NULL, 0x0,
17668 NULL, HFILL}
17670 {&hf_gatt_nordic_dfu_control_point_number_of_packets,
17671 {"Number of Packets", "btgatt.nordic.dfu.control_point.number_of_packets",
17672 FT_UINT16, BASE_DEC, NULL, 0x0,
17673 NULL, HFILL}
17675 {&hf_gatt_nordic_dfu_control_point_request_opcode,
17676 {"Request Opcode", "btgatt.nordic.dfu.control_point.request_opcode",
17677 FT_UINT8, BASE_DEC, VALS(nordic_dfu_control_point_opcode_vals), 0x0,
17678 NULL, HFILL}
17680 {&hf_gatt_nordic_dfu_control_point_response_value,
17681 {"Response Value", "btgatt.nordic.dfu.control_point.response_value",
17682 FT_UINT8, BASE_DEC, VALS(nordic_dfu_control_point_response_value_vals), 0x0,
17683 NULL, HFILL}
17685 {&hf_gatt_microbit_accelerometer_data,
17686 {"Accelerometer Data", "btgatt.microbit.accelerometer.data",
17687 FT_BYTES, BASE_NONE, NULL, 0x0,
17688 NULL, HFILL}
17690 {&hf_gatt_microbit_accelerometer_x,
17691 {"X axis", "btgatt.microbit.accelerometer.x",
17692 FT_DOUBLE, BASE_NONE, NULL, 0x0,
17693 "Accelerometer X axis", HFILL}
17695 {&hf_gatt_microbit_accelerometer_y,
17696 {"Y axis", "btgatt.microbit.accelerometer.y",
17697 FT_DOUBLE, BASE_NONE, NULL, 0x0,
17698 "Accelerometer Y axis", HFILL}
17700 {&hf_gatt_microbit_accelerometer_z,
17701 {"Z axis", "btgatt.microbit.accelerometer.z",
17702 FT_DOUBLE, BASE_NONE, NULL, 0x0,
17703 "Accelerometer Z axis", HFILL}
17705 {&hf_gatt_microbit_accelerometer_period,
17706 {"Accelerometer Period", "btgatt.microbit.accelerometer.period",
17707 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
17708 NULL, HFILL}
17710 {&hf_gatt_microbit_magnetometer_data,
17711 {"Magnetometer Data", "btgatt.microbit.magnetometer.data",
17712 FT_BYTES, BASE_NONE, NULL, 0x0,
17713 NULL, HFILL}
17715 {&hf_gatt_microbit_magnetometer_x,
17716 {"X axis", "btgatt.microbit.magnetometer.x",
17717 FT_DOUBLE, BASE_NONE, NULL, 0x0,
17718 "Magnetometer X axis", HFILL}
17720 {&hf_gatt_microbit_magnetometer_y,
17721 {"Y axis", "btgatt.microbit.magnetometer.y",
17722 FT_DOUBLE, BASE_NONE, NULL, 0x0,
17723 "Magnetometer Y axis", HFILL}
17725 {&hf_gatt_microbit_magnetometer_z,
17726 {"Z axis", "btgatt.microbit.magnetometer.z",
17727 FT_DOUBLE, BASE_NONE, NULL, 0x0,
17728 "Magnetometer Z axis", HFILL}
17730 {&hf_gatt_microbit_magnetometer_period,
17731 {"Magnetometer Period", "btgatt.microbit.magnetometer.period",
17732 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
17733 NULL, HFILL}
17735 {&hf_gatt_microbit_magnetometer_bearing,
17736 {"Magnetometer Bearing", "btgatt.microbit.magnetometer.bearing",
17737 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_degree_bearing), 0x0,
17738 NULL, HFILL}
17740 {&hf_gatt_microbit_button_a_state,
17741 {"Button A", "btgatt.microbit.button.a",
17742 FT_UINT8, BASE_DEC, VALS(btgatt_microbit_button_state_vals), 0x0,
17743 NULL, HFILL}
17745 {&hf_gatt_microbit_button_b_state,
17746 {"Button B", "btgatt.microbit.button.b",
17747 FT_UINT8, BASE_DEC, VALS(btgatt_microbit_button_state_vals), 0x0,
17748 NULL, HFILL}
17750 {&hf_gatt_microbit_pin_data,
17751 {"Pin Data", "btgatt.microbit.pin_data",
17752 FT_BYTES, BASE_NONE, NULL, 0x0,
17753 NULL, HFILL}
17755 {&hf_gatt_microbit_pin_number,
17756 {"Pin Number", "btgatt.microbit.pin_data.number",
17757 FT_UINT8, BASE_DEC, NULL, 0x0,
17758 NULL, HFILL}
17760 {&hf_gatt_microbit_pin_value,
17761 {"Pin Value", "btgatt.microbit.pin_data.value",
17762 FT_UINT8, BASE_DEC, NULL, 0x0,
17763 NULL, HFILL}
17765 {&hf_gatt_microbit_pin_ad_config,
17766 {"Pin AD Configuration", "btgatt.microbit.pin_ad_config.value",
17767 FT_UINT24, BASE_HEX, NULL, 0x0,
17768 NULL, HFILL}
17770 {&hf_gatt_microbit_ad_pin0,
17771 {"Pin 0", "btgatt.microbit.pin_ad_config.pin0",
17772 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00001,
17773 NULL, HFILL}
17775 {&hf_gatt_microbit_ad_pin1,
17776 {"Pin 1", "btgatt.microbit.pin_ad_config.pin1",
17777 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00002,
17778 NULL, HFILL}
17780 {&hf_gatt_microbit_ad_pin2,
17781 {"Pin 2", "btgatt.microbit.pin_ad_config.pin2",
17782 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00004,
17783 NULL, HFILL}
17785 {&hf_gatt_microbit_ad_pin3,
17786 {"Pin 3", "btgatt.microbit.pin_ad_config.pin3",
17787 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00008,
17788 NULL, HFILL}
17790 {&hf_gatt_microbit_ad_pin4,
17791 {"Pin 4", "btgatt.microbit.pin_ad_config.pin4",
17792 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00010,
17793 NULL, HFILL}
17795 {&hf_gatt_microbit_ad_pin5,
17796 {"Pin 5", "btgatt.microbit.pin_ad_config.pin5",
17797 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00020,
17798 NULL, HFILL}
17800 {&hf_gatt_microbit_ad_pin6,
17801 {"Pin 6", "btgatt.microbit.pin_ad_config.pin6",
17802 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00040,
17803 NULL, HFILL}
17805 {&hf_gatt_microbit_ad_pin7,
17806 {"Pin 7", "btgatt.microbit.pin_ad_config.pin7",
17807 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00080,
17808 NULL, HFILL}
17810 {&hf_gatt_microbit_ad_pin8,
17811 {"Pin 8", "btgatt.microbit.pin_ad_config.pin8",
17812 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00100,
17813 NULL, HFILL}
17815 {&hf_gatt_microbit_ad_pin9,
17816 {"Pin 9", "btgatt.microbit.pin_ad_config.pin9",
17817 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00200,
17818 NULL, HFILL}
17820 {&hf_gatt_microbit_ad_pin10,
17821 {"Pin 10", "btgatt.microbit.pin_ad_config.pin10",
17822 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00400,
17823 NULL, HFILL}
17825 {&hf_gatt_microbit_ad_pin11,
17826 {"Pin 11", "btgatt.microbit.pin_ad_config.pin11",
17827 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00800,
17828 NULL, HFILL}
17830 {&hf_gatt_microbit_ad_pin12,
17831 {"Pin 12", "btgatt.microbit.pin_ad_config.pin12",
17832 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x01000,
17833 NULL, HFILL}
17835 {&hf_gatt_microbit_ad_pin13,
17836 {"Pin 13", "btgatt.microbit.pin_ad_config.pin13",
17837 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x02000,
17838 NULL, HFILL}
17840 {&hf_gatt_microbit_ad_pin14,
17841 {"Pin 14", "btgatt.microbit.pin_ad_config.pin14",
17842 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x04000,
17843 NULL, HFILL}
17845 {&hf_gatt_microbit_ad_pin15,
17846 {"Pin 15", "btgatt.microbit.pin_ad_config.pin15",
17847 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x08000,
17848 NULL, HFILL}
17850 {&hf_gatt_microbit_ad_pin16,
17851 {"Pin 16", "btgatt.microbit.pin_ad_config.pin16",
17852 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x10000,
17853 NULL, HFILL}
17855 {&hf_gatt_microbit_ad_pin17,
17856 {"Pin 17", "btgatt.microbit.pin_ad_config.pin17",
17857 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x20000,
17858 NULL, HFILL}
17860 {&hf_gatt_microbit_ad_pin18,
17861 {"Pin 18", "btgatt.microbit.pin_ad_config.pin18",
17862 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x40000,
17863 NULL, HFILL}
17865 {&hf_gatt_microbit_ad_pin19,
17866 {"Pin 19", "btgatt.microbit.pin_ad_config.pin19",
17867 FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x80000,
17868 NULL, HFILL}
17870 {&hf_gatt_microbit_pin_io_config,
17871 {"Pin IO Configuration", "btgatt.microbit.pin_io_config.value",
17872 FT_UINT24, BASE_HEX, NULL, 0x0,
17873 NULL, HFILL}
17875 {&hf_gatt_microbit_io_pin0,
17876 {"Pin 0", "btgatt.microbit.pin_io_config.pin0",
17877 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00001,
17878 NULL, HFILL}
17880 {&hf_gatt_microbit_io_pin1,
17881 {"Pin 1", "btgatt.microbit.pin_io_config.pin1",
17882 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00002,
17883 NULL, HFILL}
17885 {&hf_gatt_microbit_io_pin2,
17886 {"Pin 2", "btgatt.microbit.pin_io_config.pin2",
17887 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00004,
17888 NULL, HFILL}
17890 {&hf_gatt_microbit_io_pin3,
17891 {"Pin 3", "btgatt.microbit.pin_io_config.pin3",
17892 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00008,
17893 NULL, HFILL}
17895 {&hf_gatt_microbit_io_pin4,
17896 {"Pin 4", "btgatt.microbit.pin_io_config.pin4",
17897 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00010,
17898 NULL, HFILL}
17900 {&hf_gatt_microbit_io_pin5,
17901 {"Pin 5", "btgatt.microbit.pin_io_config.pin5",
17902 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00020,
17903 NULL, HFILL}
17905 {&hf_gatt_microbit_io_pin6,
17906 {"Pin 6", "btgatt.microbit.pin_io_config.pin6",
17907 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00040,
17908 NULL, HFILL}
17910 {&hf_gatt_microbit_io_pin7,
17911 {"Pin 7", "btgatt.microbit.pin_io_config.pin7",
17912 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00080,
17913 NULL, HFILL}
17915 {&hf_gatt_microbit_io_pin8,
17916 {"Pin 8", "btgatt.microbit.pin_io_config.pin8",
17917 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00100,
17918 NULL, HFILL}
17920 {&hf_gatt_microbit_io_pin9,
17921 {"Pin 9", "btgatt.microbit.pin_io_config.pin9",
17922 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00200,
17923 NULL, HFILL}
17925 {&hf_gatt_microbit_io_pin10,
17926 {"Pin 10", "btgatt.microbit.pin_io_config.pin10",
17927 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00400,
17928 NULL, HFILL}
17930 {&hf_gatt_microbit_io_pin11,
17931 {"Pin 11", "btgatt.microbit.pin_io_config.pin11",
17932 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00800,
17933 NULL, HFILL}
17935 {&hf_gatt_microbit_io_pin12,
17936 {"Pin 12", "btgatt.microbit.pin_io_config.pin12",
17937 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x01000,
17938 NULL, HFILL}
17940 {&hf_gatt_microbit_io_pin13,
17941 {"Pin 13", "btgatt.microbit.pin_io_config.pin13",
17942 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x02000,
17943 NULL, HFILL}
17945 {&hf_gatt_microbit_io_pin14,
17946 {"Pin 14", "btgatt.microbit.pin_io_config.pin14",
17947 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x04000,
17948 NULL, HFILL}
17950 {&hf_gatt_microbit_io_pin15,
17951 {"Pin 15", "btgatt.microbit.pin_io_config.pin15",
17952 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x08000,
17953 NULL, HFILL}
17955 {&hf_gatt_microbit_io_pin16,
17956 {"Pin 16", "btgatt.microbit.pin_io_config.pin16",
17957 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x10000,
17958 NULL, HFILL}
17960 {&hf_gatt_microbit_io_pin17,
17961 {"Pin 17", "btgatt.microbit.pin_io_config.pin17",
17962 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x20000,
17963 NULL, HFILL}
17965 {&hf_gatt_microbit_io_pin18,
17966 {"Pin 18", "btgatt.microbit.pin_io_config.pin18",
17967 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x40000,
17968 NULL, HFILL}
17970 {&hf_gatt_microbit_io_pin19,
17971 {"Pin 19", "btgatt.microbit.pin_io_config.pin19",
17972 FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x80000,
17973 NULL, HFILL}
17975 {&hf_gatt_microbit_pwm_control,
17976 {"PWM Control", "btgatt.microbit.pwm_control",
17977 FT_BYTES, BASE_NONE, NULL, 0x0,
17978 NULL, HFILL}
17980 {&hf_gatt_microbit_led_matrix,
17981 {"LED Matrix", "btgatt.microbit.led_matrix",
17982 FT_BYTES, BASE_NONE, NULL, 0x0,
17983 NULL, HFILL}
17985 {&hf_gatt_microbit_led_text,
17986 {"LED Text", "btgatt.microbit.led_text",
17987 FT_STRING, BASE_NONE, NULL, 0x0,
17988 NULL, HFILL}
17990 {&hf_gatt_microbit_scrolling_delay,
17991 {"Scrolling Delay", "btgatt.microbit.scrolling_delay",
17992 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
17993 NULL, HFILL}
17995 {&hf_gatt_microbit_microbit_requirements,
17996 {"MicroBit Requirements", "btgatt.microbit.microbit_requirements",
17997 FT_BYTES, BASE_NONE, NULL, 0x0,
17998 NULL, HFILL}
18000 {&hf_gatt_microbit_microbit_event,
18001 {"MicroBit Event", "btgatt.microbit.microbit_event",
18002 FT_BYTES, BASE_NONE, NULL, 0x0,
18003 NULL, HFILL}
18005 {&hf_gatt_microbit_client_requirements,
18006 {"Client Requirements", "btgatt.microbit.client_requirements",
18007 FT_BYTES, BASE_NONE, NULL, 0x0,
18008 NULL, HFILL}
18010 {&hf_gatt_microbit_client_event,
18011 {"Client Event", "btgatt.microbit.client_event",
18012 FT_BYTES, BASE_NONE, NULL, 0x0,
18013 NULL, HFILL}
18015 {&hf_gatt_microbit_dfu_control,
18016 {"DFU Control", "btgatt.microbit.dfu_control",
18017 FT_UINT8, BASE_DEC, NULL, 0x0,
18018 NULL, HFILL}
18020 {&hf_gatt_microbit_temperature_value,
18021 {"Temperature", "btgatt.microbit.temperature.value",
18022 FT_INT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_degree_celsius), 0x0,
18023 NULL, HFILL}
18025 {&hf_gatt_microbit_temperature_period,
18026 {"Temperature Period", "btgatt.microbit.temperature.period",
18027 FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
18028 NULL, HFILL}
18033 static int *ett[] = {
18034 &ett_btgatt,
18035 &ett_btgatt_microbit_accelerometer,
18036 &ett_btgatt_microbit_magnetometer,
18037 &ett_btgatt_microbit_pin_data,
18038 &ett_btgatt_microbit_pin_ad_config,
18039 &ett_btgatt_microbit_pin_io_config,
18042 proto_btgatt = proto_register_protocol("Bluetooth GATT Attribute Protocol", "BT GATT", "btgatt");
18044 btgatt_handle = register_dissector("btgatt", dissect_btgatt, proto_btgatt);
18046 proto_register_field_array(proto_btgatt, hf, array_length(hf));
18047 proto_register_subtree_array(ett, array_length(ett));
18050 void
18051 proto_reg_handoff_btgatt(void)
18053 const struct uuid_dissectors_t {
18054 const char * const uuid;
18055 char * const short_name;
18057 int (* const dissect_func)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
18058 } uuid_dissectors[] = {
18059 { "6e400001-b5a3-f393-e0a9-e50e24dcca9e", "Nordic UART Service", NULL },
18060 { "6e400002-b5a3-f393-e0a9-e50e24dcca9e", "Nordic UART Tx", dissect_btgatt_nordic_uart_tx },
18061 { "6e400003-b5a3-f393-e0a9-e50e24dcca9e", "Nordic UART Rx", dissect_btgatt_nordic_uart_rx },
18062 { "00001530-1212-efde-1523-785feabcd123", "Nordic DFU Service", NULL },
18063 { "00001531-1212-efde-1523-785feabcd123", "Nordic DFU Control Point", dissect_btgatt_nordic_dfu_control_point },
18064 { "00001532-1212-efde-1523-785feabcd123", "Nordic DFU Packet", dissect_btgatt_nordic_dfu_packet },
18066 /* BBC micro:bit profile - https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html */
18067 { "e95d0753-251d-470a-a062-fa1922dfa9a8", "micro:bit Accelerometer Service", NULL },
18068 { "e95dca4b-251d-470a-a062-fa1922dfa9a8", "micro:bit Accelerometer Data", dissect_btgatt_microbit_accelerometer_data },
18069 { "e95dfb24-251d-470a-a062-fa1922dfa9a8", "micro:bit Accelerometer Period", dissect_btgatt_microbit_accelerometer_period },
18070 { "e95df2d8-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Service", NULL },
18071 { "e95dfb11-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Data", dissect_btgatt_microbit_magnetometer_data },
18072 { "e95d386c-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Period", dissect_btgatt_microbit_magnetometer_period },
18073 { "e95d9715-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Bearing", dissect_btgatt_microbit_magnetometer_bearing },
18074 { "e95d9882-251d-470a-a062-fa1922dfa9a8", "micro:bit Button Service", NULL },
18075 { "e95dda90-251d-470a-a062-fa1922dfa9a8", "micro:bit Button A State", dissect_btgatt_microbit_button_a_state },
18076 { "e95dda91-251d-470a-a062-fa1922dfa9a8", "micro:bit Button B State", dissect_btgatt_microbit_button_b_state },
18077 { "e95d127b-251d-470a-a062-fa1922dfa9a8", "micro:bit IO Pin Service", NULL },
18078 { "e95d8d00-251d-470a-a062-fa1922dfa9a8", "micro:bit Pin Data", dissect_btgatt_microbit_pin_data },
18079 { "e95d5899-251d-470a-a062-fa1922dfa9a8", "micro:bit Pin AD Configuration", dissect_btgatt_microbit_pin_ad_config },
18080 { "e95db9fe-251d-470a-a062-fa1922dfa9a8", "micro:bit Pin IO Configuration", dissect_btgatt_microbit_pin_io_config },
18081 { "e95dd822-251d-470a-a062-fa1922dfa9a8", "micro:bit PWM Control", dissect_btgatt_microbit_pwm_control },
18082 { "e95dd91d-251d-470a-a062-fa1922dfa9a8", "micro:bit LED Service", NULL },
18083 { "e95d7b77-251d-470a-a062-fa1922dfa9a8", "micro:bit LED Matrix State", dissect_btgatt_microbit_led_matrix },
18084 { "e95d93ee-251d-470a-a062-fa1922dfa9a8", "micro:bit LED Text", dissect_btgatt_microbit_led_text },
18085 { "e95d0d2d-251d-470a-a062-fa1922dfa9a8", "micro:bit Scrolling Delay", dissect_btgatt_microbit_scrolling_delay },
18086 { "e95d93af-251d-470a-a062-fa1922dfa9a8", "micro:bit Event Service", NULL },
18087 { "e95db84c-251d-470a-a062-fa1922dfa9a8", "micro:bit MicroBit Requirements", dissect_btgatt_microbit_microbit_requirements },
18088 { "e95d9775-251d-470a-a062-fa1922dfa9a8", "micro:bit MicroBit Event", dissect_btgatt_microbit_microbit_event },
18089 { "e95d23c4-251d-470a-a062-fa1922dfa9a8", "micro:bit Client Requirements", dissect_btgatt_microbit_client_requirements },
18090 { "e95d5404-251d-470a-a062-fa1922dfa9a8", "micro:bit Client Event", dissect_btgatt_microbit_client_event },
18091 { "e95d93b0-251d-470a-a062-fa1922dfa9a8", "micro:bit DFU Control Service", NULL },
18092 { "e95d93b1-251d-470a-a062-fa1922dfa9a8", "micro:bit DFU Control", dissect_btgatt_microbit_dfu_control },
18093 { "e95d6100-251d-470a-a062-fa1922dfa9a8", "micro:bit Temperature Service", NULL },
18094 { "e95d9250-251d-470a-a062-fa1922dfa9a8", "micro:bit Temperature", dissect_btgatt_microbit_temperature_value },
18095 { "e95d1b25-251d-470a-a062-fa1922dfa9a8", "micro:bit Temperature Period", dissect_btgatt_microbit_temperature_period },
18097 { NULL, NULL, NULL },
18100 for (int i = 0; uuid_dissectors[i].uuid; i++) {
18101 wmem_tree_insert_string(bluetooth_uuids, uuid_dissectors[i].uuid, uuid_dissectors[i].short_name, 0);
18103 if (uuid_dissectors[i].dissect_func) {
18104 dissector_handle_t handle = create_dissector_handle_with_name_and_description(
18105 uuid_dissectors[i].dissect_func, proto_btgatt,
18106 NULL, uuid_dissectors[i].short_name);
18107 dissector_add_string("bluetooth.uuid", uuid_dissectors[i].uuid, handle);
18113 * Editor modelines - https://www.wireshark.org/tools/modelines.html
18115 * Local variables:
18116 * c-basic-offset: 4
18117 * tab-width: 8
18118 * indent-tabs-mode: nil
18119 * End:
18121 * vi: set shiftwidth=4 tabstop=8 expandtab:
18122 * :indentSize=4:tabSize=8:noTabs=true: