Coverage Report

Created: 2025-12-27 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-btatt.c
Line
Count
Source
1
/* packet-btatt.c
2
 * Routines for Bluetooth Attribute Protocol dissection
3
 *
4
 * Copyright 2012, Allan M. Madsen <allan.m@madsen.dk>
5
 * Copyright 2015, Michal Labedzki for Tieto Corporation
6
 *  - dissect GATT level attributes
7
 *
8
 * Wireshark - Network traffic analyzer
9
 * By Gerald Combs <gerald@wireshark.org>
10
 * Copyright 1998 Gerald Combs
11
 *
12
 * SPDX-License-Identifier: GPL-2.0-or-later
13
 */
14
15
#include "config.h"
16
17
#include <glib/gprintf.h>
18
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>
28
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"
36
37
14.4k
#define HANDLE_TVB -1
38
39
/* packet reassembly */
40
static reassembly_table msg_reassembly_table;
41
/* end packet reassembly */
42
43
/* Initialize the protocol and registered fields */
44
static int proto_btatt;
45
static int proto_btgatt;
46
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;
1195
1196
static int hf_request_in_frame;
1197
static int hf_response_in_frame;
1198
1199
static int btatt_tap_handles = -1;
1200
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
1206
};
1207
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
1218
};
1219
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
1225
};
1226
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
1231
};
1232
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
1238
};
1239
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
1245
};
1246
1247
static int * const hfx_btatt_appearance[] = {
1248
    &hf_btatt_appearance_category,
1249
    &hf_btatt_appearance_subcategory,
1250
    NULL
1251
};
1252
1253
static int * const hfx_btatt_appearance_watch[] = {
1254
    &hf_btatt_appearance_category,
1255
    &hf_btatt_appearance_subcategory_watch,
1256
    NULL
1257
};
1258
1259
static int * const hfx_btatt_appearance_thermometer[] = {
1260
    &hf_btatt_appearance_category,
1261
    &hf_btatt_appearance_subcategory_thermometer,
1262
    NULL
1263
};
1264
1265
static int * const hfx_btatt_appearance_heart_rate[] = {
1266
    &hf_btatt_appearance_category,
1267
    &hf_btatt_appearance_subcategory_heart_rate,
1268
    NULL
1269
};
1270
1271
static int * const hfx_btatt_appearance_blood_pressure[] = {
1272
    &hf_btatt_appearance_category,
1273
    &hf_btatt_appearance_subcategory_blood_pressure,
1274
    NULL
1275
};
1276
1277
static int * const hfx_btatt_appearance_hid[] = {
1278
    &hf_btatt_appearance_category,
1279
    &hf_btatt_appearance_subcategory_hid,
1280
    NULL
1281
};
1282
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
1287
};
1288
1289
static int * const hfx_btatt_appearance_cycling[] = {
1290
    &hf_btatt_appearance_category,
1291
    &hf_btatt_appearance_subcategory_cycling,
1292
    NULL
1293
};
1294
1295
static int * const hfx_btatt_appearance_pulse_oximeter[] = {
1296
    &hf_btatt_appearance_category,
1297
    &hf_btatt_appearance_subcategory_pulse_oximeter,
1298
    NULL
1299
};
1300
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
1305
};
1306
1307
static int * const hfx_btatt_appearance_insulin_pump[] = {
1308
    &hf_btatt_appearance_category,
1309
    &hf_btatt_appearance_subcategory_insulin_pump,
1310
    NULL
1311
};
1312
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
1317
};
1318
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
1326
};
1327
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
1334
};
1335
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
1346
};
1347
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
1353
};
1354
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
1364
};
1365
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
1380
};
1381
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
1390
};
1391
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
1398
};
1399
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
1408
};
1409
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
1432
};
1433
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
1458
};
1459
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
1476
};
1477
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
1486
};
1487
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
1496
};
1497
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
1502
};
1503
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
1519
};
1520
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
1544
};
1545
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
1550
};
1551
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
1558
};
1559
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
1570
};
1571
1572
static int * const hfx_btatt_glucose_measurement_context_extended_flags[] = {
1573
    &hf_btatt_glucose_measurement_context_extended_flags_reserved,
1574
    NULL
1575
};
1576
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
1581
};
1582
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
1591
};
1592
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
1601
};
1602
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
1611
};
1612
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
1619
};
1620
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
1631
};
1632
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
1639
};
1640
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
1657
};
1658
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
1663
};
1664
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
1670
};
1671
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
1680
};
1681
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
1694
};
1695
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
1710
};
1711
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
1723
};
1724
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
1736
};
1737
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
1748
};
1749
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
1766
};
1767
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
1775
};
1776
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
1785
};
1786
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
1796
};
1797
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
1807
};
1808
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
1819
};
1820
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
1841
};
1842
1843
static int * const hfx_btatt_cgm_type_and_sample_location[] = {
1844
    &hf_btatt_cgm_type,
1845
    &hf_btatt_cgm_sample_location,
1846
    NULL
1847
};
1848
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
1855
};
1856
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
1864
};
1865
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
1879
};
1880
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
1888
};
1889
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
1901
};
1902
1903
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
1912
};
1913
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
1922
};
1923
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
1938
};
1939
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
1959
};
1960
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
1969
};
1970
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
1982
};
1983
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
2006
};
2007
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
2030
};
2031
2032
static int * const hfx_btatt_timezone_information[] = {
2033
    &hf_btatt_timezone_information_information,
2034
    &hf_btatt_timezone_information_information_type,
2035
    NULL
2036
};
2037
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
2044
};
2045
2046
static int * const hfx_btatt_removable[] = {
2047
    &hf_btatt_removable_reserved,
2048
    &hf_btatt_removable_removable,
2049
    NULL
2050
};
2051
2052
static int * const hfx_btatt_service_required[] = {
2053
    &hf_btatt_service_required_reserved,
2054
    &hf_btatt_service_required_service_required,
2055
    NULL
2056
};
2057
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
2078
};
2079
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
2100
};
2101
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
2107
};
2108
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;
2124
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;
2138
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;
2143
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;
2151
2152
static dissector_table_t att_handle_dissector_table;
2153
static dissector_table_t att_service_dissector_table;
2154
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;
2166
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"};
2187
2188
extern value_string_ext ext_usb_vendors_vals;
2189
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}
2223
};
2224
2225
0
#define GATT_SERVICE_GENERIC_ACCESS_PROFILE         0x1800
2226
2
#define GATT_SERVICE_GENERIC_ATTRIBUTE_PROFILE      0x1801
2227
0
#define GATT_SERVICE_IMMEDIATE_ALERT                0x1802
2228
0
#define GATT_SERVICE_LINK_LOSS                      0x1803
2229
0
#define GATT_SERVICE_TX_POWER                       0x1804
2230
3
#define GATT_SERVICE_CURRENT_TIME_SERVICE           0x1805
2231
0
#define GATT_SERVICE_REFERENCE_TIME_UPDATE_SERVICE  0x1806
2232
0
#define GATT_SERVICE_NEXT_DST_CHANGE_SERVICE        0x1807
2233
7
#define GATT_SERVICE_GLUCOSE                        0x1808
2234
0
#define GATT_SERVICE_HEALTH_THERMOMETER             0x1809
2235
20
#define GATT_SERVICE_DEVICE_INFORMATION             0x180A
2236
7
#define GATT_SERVICE_HEART_RATE                     0x180D
2237
0
#define GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE     0x180E
2238
0
#define GATT_SERVICE_BATTERY_SERVICE                0x180F
2239
4
#define GATT_SERVICE_BLOOD_PRESSURE                 0x1810
2240
4
#define GATT_SERVICE_ALERT_NOTIFICATION_SERVICE     0x1811
2241
574
#define GATT_SERVICE_HUMAN_INTERFACE_DEVICE         0x1812
2242
3
#define GATT_SERVICE_SCAN_PARAMETERS                0x1813
2243
4
#define GATT_SERVICE_RUNNING_SPEED_AND_CADENCE      0x1814
2244
0
#define GATT_SERVICE_AUTOMATION_IO                  0x1815
2245
5
#define GATT_SERVICE_CYCLING_SPEED_AND_CADENCE      0x1816
2246
1
#define GATT_SERVICE_CYCLING_POWER                  0x1818
2247
2
#define GATT_SERVICE_LOCATION_AND_NAVIGATION        0x1819
2248
2
#define GATT_SERVICE_ENVIRONMENTAL_SENSING          0x181A
2249
0
#define GATT_SERVICE_BODY_COMPOSITION               0x181B
2250
4
#define GATT_SERVICE_USER_DATA                      0x181C
2251
1
#define GATT_SERVICE_WEIGHT_SCALE                   0x181D
2252
0
#define GATT_SERVICE_BOND_MANAGEMENT                0x181E
2253
5
#define GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING  0x181F
2254
#define GATT_SERVICE_INTERNET_PROTOCOL_SUPPORT      0x1820
2255
9
#define GATT_SERVICE_INDOOR_POSITIONING             0x1821
2256
2
#define GATT_SERVICE_PULSE_OXIMETER                 0x1822
2257
4
#define GATT_SERVICE_HTTP_PROXY                     0x1823
2258
0
#define GATT_SERVICE_TRANSPORT_DISCOVERY            0x1824
2259
3
#define GATT_SERVICE_OBJECT_TRANSFER                0x1825
2260
0
#define GATT_SERVICE_FITNESS_MACHINE                0x1826
2261
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}
2317
};
2318
2319
static const value_string error_code_aios_vals[] = {
2320
    {0x80, "Trigger Condition Value not Supported"},
2321
    {0x0, NULL}
2322
};
2323
2324
static const value_string error_code_ans_vals[] = {
2325
    {0xA0, "Command not Supported"},
2326
    {0x0, NULL}
2327
};
2328
2329
static const value_string error_code_bms_vals[] = {
2330
    {0x80, "Opcode not Supported"},
2331
    {0x81, "Operation Failed"},
2332
    {0x0, NULL}
2333
};
2334
2335
static const value_string error_code_cgms_vals[] = {
2336
    {0x80, "Missing CRC"},
2337
    {0x81, "Invalid CRC"},
2338
    {0x0, NULL}
2339
};
2340
2341
static const value_string error_code_cps_vals[] = {
2342
    {0x80, "Inappropriate Connection Parameters"},
2343
    {0x0, NULL}
2344
};
2345
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}
2350
};
2351
2352
static const value_string error_code_cts_vals[] = {
2353
    {0x80, "Data Field Ignored"},
2354
    {0x0, NULL}
2355
};
2356
2357
static const value_string error_code_ess_vals[] = {
2358
    {0x80, "Write Request Rejected"},
2359
    {0x81, "Condition not Supported"},
2360
    {0x0, NULL}
2361
};
2362
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}
2367
};
2368
2369
static const value_string error_code_hps_vals[] = {
2370
    {0x81, "Invalid Request"},
2371
    {0x82, "Network not Available"},
2372
    {0x0, NULL}
2373
};
2374
2375
static const value_string error_code_hrs_vals[] = {
2376
    {0x80, "Control Point not Supported"},
2377
    {0x0, NULL}
2378
};
2379
2380
static const value_string error_code_hts_vals[] = {
2381
    {0x80, "Out of Range"},
2382
    {0x0, NULL}
2383
};
2384
2385
static const value_string error_code_ips_vals[] = {
2386
    {0x80, "Invalid Value"},
2387
    {0x0, NULL}
2388
};
2389
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}
2396
};
2397
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}
2402
};
2403
2404
static const value_string error_code_uds_vals[] = {
2405
    {0x80, "User Data Access not Permitted"},
2406
    {0x0, NULL}
2407
};
2408
2409
static const value_string uuid_format_vals[] = {
2410
    {0x01, "16-bit UUIDs"},
2411
    {0x02, "128-bit UUIDs"},
2412
    {0x0, NULL}
2413
};
2414
2415
static const value_string flags_vals[] = {
2416
    {0x00, "Cancel All"},
2417
    {0x01, "Immediately Write All"},
2418
    {0x0, NULL}
2419
};
2420
2421
static const value_string hogp_protocol_mode_vals[] = {
2422
    {0x00, "Boot Protocol Mode"},
2423
    {0x01, "Report Protocol Mode"},
2424
    {0x0, NULL}
2425
};
2426
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}
2432
};
2433
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}
2463
};
2464
2465
static const value_string characteristic_presentation_namespace_vals[] = {
2466
    {0x01, "Bluetooth SIG"},
2467
    {0x0, NULL}
2468
};
2469
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}
2745
};
2746
static value_string_ext characteristic_presentation_namespace_description_btsig_vals_ext = VALUE_STRING_EXT_INIT(characteristic_presentation_namespace_description_btsig_vals);
2747
2748
2749
static const value_string esp_trigger_logic_vals[] = {
2750
    {0x00, "Boolean AND"},
2751
    {0x01, "Boolean OR"},
2752
    {0x0, NULL}
2753
};
2754
2755
static const value_string esp_condition_vals[] = {
2756
    {0x00, "Trigger inactive"},
2757
    {0x01, "Use a fixed time interval between"},
2758
    {0x02, "No less than the specified time between"},
2759
    {0x03, "When value changes compared to"},
2760
    {0x04, "While less than the specified value"},
2761
    {0x05, "While less than or equal to the specified"},
2762
    {0x06, "While greater than the specified value"},
2763
    {0x07, "While greater than or equal to the"},
2764
    {0x08, "While equal to the specified value"},
2765
    {0x09, "While not equal to the specified value"},
2766
    {0x0, NULL}
2767
};
2768
2769
static const value_string esp_sampling_function_vals[] = {
2770
    {0x00, "Unspecified"},
2771
    {0x01, "Instantaneous"},
2772
    {0x02, "Arithmetic Mean"},
2773
    {0x03, "RMS"},
2774
    {0x04, "Maximum"},
2775
    {0x05, "Minimum"},
2776
    {0x06, "Accumulated"},
2777
    {0x07, "Count"},
2778
    {0x0, NULL}
2779
};
2780
2781
static const value_string esp_application_vals[] = {
2782
    {0x00, "Unspecified"},
2783
    {0x01, "Air"},
2784
    {0x02, "Water"},
2785
    {0x03, "Barometric"},
2786
    {0x04, "Soil"},
2787
    {0x05, "Infrared"},
2788
    {0x06, "Map Database"},
2789
    {0x07, "Barometric Elevation Source"},
2790
    {0x08, "GPS only Elevation Source"},
2791
    {0x09, "GPS and Map database Elevation Source"},
2792
    {0x0A, "Vertical datum Elevation Source"},
2793
    {0x0B, "Onshore"},
2794
    {0x0C, "Onboard vessel or vehicle"},
2795
    {0x0D, "Front"},
2796
    {0x0E, "Back/Rear"},
2797
    {0x0F, "Upper"},
2798
    {0x10, "Lower"},
2799
    {0x11, "Primary"},
2800
    {0x12, "Secondary"},
2801
    {0x13, "Outdoor"},
2802
    {0x14, "Indoor"},
2803
    {0x15, "Top"},
2804
    {0x16, "Bottom"},
2805
    {0x17, "Main"},
2806
    {0x18, "Backup"},
2807
    {0x19, "Auxiliary"},
2808
    {0x1A, "Supplementary"},
2809
    {0x1B, "Inside"},
2810
    {0x1C, "Outside"},
2811
    {0x1D, "Left"},
2812
    {0x1E, "Right"},
2813
    {0x1F, "Internal"},
2814
    {0x20, "External"},
2815
    {0x21, "Solar"},
2816
    {0x0, NULL}
2817
};
2818
2819
static const value_string appearance_category_vals[] = {
2820
    {0x01, "Phone"},
2821
    {0x02, "Computer"},
2822
    {0x03, "Watch"},
2823
    {0x04, "Clock"},
2824
    {0x05, "Display"},
2825
    {0x06, "Remote Control"},
2826
    {0x07, "Eye Glasses"},
2827
    {0x08, "Tag"},
2828
    {0x09, "Keyring"},
2829
    {0x0A, "Media Player"},
2830
    {0x0B, "Barcode Scanner"},
2831
    {0x0C, "Thermometer"},
2832
    {0x0D, "Heart Rate Sensor"},
2833
    {0x0E, "Blood Pressure"},
2834
    {0x0F, "Human Interface Device"},
2835
    {0x10, "Glucose Meter"},
2836
    {0x11, "Running Walking Sensor"},
2837
    {0x12, "Cycling"},
2838
    {0x31, "Pulse Oximeter"},
2839
    {0x32, "Weight Scale"},
2840
    {0x33, "Personal Mobility Device"},
2841
    {0x34, "Continuous Glucose Monitor"},
2842
    {0x35, "Insulin Pump"},
2843
    {0x36, "Medication Delivery"},
2844
    {0x51, "Outdoor Sports Activity"},
2845
    {0x0, NULL}
2846
};
2847
2848
static const value_string appearance_subcategory_generic_vals[] = {
2849
    {0x00, "Generic"},
2850
    {0x0, NULL}
2851
};
2852
2853
static const value_string appearance_subcategory_watch_vals[] = {
2854
    {0x00, "Generic"},
2855
    {0x01, "Sports Watch"},
2856
    {0x0, NULL}
2857
};
2858
2859
static const value_string appearance_subcategory_thermometer_vals[] = {
2860
    {0x00, "Generic"},
2861
    {0x01, "Ear"},
2862
    {0x0, NULL}
2863
};
2864
2865
static const value_string appearance_subcategory_heart_rate_vals[] = {
2866
    {0x00, "Generic"},
2867
    {0x01, "Heart Rate Belt"},
2868
    {0x0, NULL}
2869
};
2870
2871
static const value_string appearance_subcategory_blood_pressure_vals[] = {
2872
    {0x00, "Generic"},
2873
    {0x01, "Arm"},
2874
    {0x02, "Wrist"},
2875
    {0x0, NULL}
2876
};
2877
2878
static const value_string appearance_subcategory_hid_vals[] = {
2879
    {0x00, "Generic"},
2880
    {0x01, "Keyboard"},
2881
    {0x02, "Mouse"},
2882
    {0x03, "Joystick"},
2883
    {0x04, "Gamepad"},
2884
    {0x05, "Digitizer Tablet"},
2885
    {0x06, "Card Reader"},
2886
    {0x07, "Digital Pen"},
2887
    {0x08, "Barcode"},
2888
    {0x0, NULL}
2889
};
2890
2891
static const value_string appearance_subcategory_running_walking_sensor_vals[] = {
2892
    {0x00, "Generic"},
2893
    {0x01, "In-Shoe"},
2894
    {0x02, "On-Shoe"},
2895
    {0x03, "On-Hip"},
2896
    {0x0, NULL}
2897
};
2898
2899
static const value_string appearance_subcategory_cycling_vals[] = {
2900
    {0x00, "Generic"},
2901
    {0x01, "Cycling Computer"},
2902
    {0x02, "Speed Sensor"},
2903
    {0x03, "Cadence Sensor"},
2904
    {0x04, "Power Sensor"},
2905
    {0x05, "Speed and Cadence Sensor"},
2906
    {0x0, NULL}
2907
};
2908
2909
static const value_string appearance_subcategory_pulse_oximeter_vals[] = {
2910
    {0x00, "Generic"},
2911
    {0x01, "Fingertip"},
2912
    {0x02, "Wrist Worn"},
2913
    {0x0, NULL}
2914
};
2915
2916
static const value_string appearance_subcategory_personal_mobility_device_vals[] = {
2917
    {0x00, "Generic"},
2918
    {0x01, "Powered Wheelchair"},
2919
    {0x02, "Mobility Scooter"},
2920
    {0x0, NULL}
2921
};
2922
2923
static const value_string appearance_subcategory_insulin_pump_vals[] = {
2924
    {0x00, "Generic"},
2925
    {0x01, "Insulin Pump / Durable Pump"},
2926
    {0x04, "Insulin Pump / Patch Pump"},
2927
    {0x08, "Insulin Pen"},
2928
    {0x0, NULL}
2929
};
2930
2931
static const value_string appearance_subcategory_outdoor_sports_activity_vals[] = {
2932
    {0x00, "Generic"},
2933
    {0x01, "Location Display Device"},
2934
    {0x02, "Location and Navigation Display Device"},
2935
    {0x03, "Location Pod"},
2936
    {0x04, "Location and Navigation Pod"},
2937
    {0x0, NULL}
2938
};
2939
2940
static const value_string alert_level_vals[] = {
2941
    {0x00, "No Alert"},
2942
    {0x01, "Mild Alert"},
2943
    {0x02, "High Alert"},
2944
    {0x0, NULL}
2945
};
2946
2947
static const value_string dst_offset_vals[] = {
2948
    {0x00, "Standard Time"},
2949
    {0x02, "Half an Hour Daylight Time (+0.5h)"},
2950
    {0x04, "Daylight Time (+1h)"},
2951
    {0x08, "Double Daylight Time (+2h)"},
2952
    {0xFF, "DST is not known"},
2953
    {0x0, NULL}
2954
};
2955
2956
static const value_string timezone_vals[] = {
2957
    {-128, "Time zone offset is not known"},
2958
    {-48, "UTC-12:00"},
2959
    {-44, "UTC-11:00"},
2960
    {-40, "UTC-10:00"},
2961
    {-38, "UTC-9:30"},
2962
    {-36, "UTC-9:00"},
2963
    {-32, "UTC-8:00"},
2964
    {-28, "UTC-7:00"},
2965
    {-24, "UTC-6:00"},
2966
    {-20, "UTC-5:00"},
2967
    {-18, "UTC-4:30"},
2968
    {-16, "UTC-4:00"},
2969
    {-14, "UTC-3:30"},
2970
    {-12, "UTC-3:00"},
2971
    {-8,  "UTC-2:00"},
2972
    {-4,  "UTC-1:00"},
2973
    {0,   "UTC+0:00"},
2974
    {4,   "UTC+1:00"},
2975
    {8,   "UTC+2:00"},
2976
    {12,  "UTC+3:00"},
2977
    {14,  "UTC+3:30"},
2978
    {16,  "UTC+4:00"},
2979
    {18,  "UTC+4:30"},
2980
    {20,  "UTC+5:00"},
2981
    {22,  "UTC+5:30"},
2982
    {23,  "UTC+5:45"},
2983
    {24,  "UTC+6:00"},
2984
    {26,  "UTC+6:30"},
2985
    {28,  "UTC+7:00"},
2986
    {32,  "UTC+8:00"},
2987
    {35,  "UTC+8:45"},
2988
    {36,  "UTC+9:00"},
2989
    {38,  "UTC+9:30"},
2990
    {40,  "UTC+10:00"},
2991
    {42,  "UTC+10:30"},
2992
    {44,  "UTC+11:00"},
2993
    {46,  "UTC+11:30"},
2994
    {48,  "UTC+12:00"},
2995
    {51,  "UTC+12:45"},
2996
    {52,  "UTC+13:00"},
2997
    {56,  "UTC+14:00"},
2998
    {0x0, NULL}
2999
};
3000
3001
static const value_string time_source_vals[] = {
3002
    {0x00, "Unknown"},
3003
    {0x01, "Network Time Protocol"},
3004
    {0x02, "GPS"},
3005
    {0x03, "Radio Time Signal"},
3006
    {0x04, "Manual"},
3007
    {0x05, "Atomic Clock"},
3008
    {0x06, "Cellular Network"},
3009
    {0x0, NULL}
3010
};
3011
3012
static const value_string time_update_control_point_vals[] = {
3013
    {0x01, "Get Reference Update"},
3014
    {0x02, "Cancel Reference Update"},
3015
    {0x0, NULL}
3016
};
3017
3018
static const value_string time_current_state_vals[] = {
3019
    {0x00, "Idle"},
3020
    {0x01, "Update Pending"},
3021
    {0x0, NULL}
3022
};
3023
3024
static const value_string time_result_vals[] = {
3025
    {0x00, "Successful"},
3026
    {0x01, "Canceled"},
3027
    {0x02, "No Connection To Reference"},
3028
    {0x03, "Reference responded with an error"},
3029
    {0x04, "Timeout"},
3030
    {0x05, "Update not attempted after reset"},
3031
    {0x0, NULL}
3032
};
3033
3034
static const value_string temperature_type_vals[] = {
3035
    {0x01, "Armpit"},
3036
    {0x02, "Body (general)"},
3037
    {0x03, "Ear (usually ear lobe)"},
3038
    {0x04, "Finger"},
3039
    {0x05, "Gastro-intestinal Tract"},
3040
    {0x06, "Mouth"},
3041
    {0x07, "Rectum"},
3042
    {0x08, "Toe"},
3043
    {0x09, "Tympanum (ear drum)"},
3044
    {0x0, NULL}
3045
};
3046
3047
static const value_string scan_refresh_vals[] = {
3048
    {0x00, "Server Requires Refresh"},
3049
    {0x0, NULL}
3050
};
3051
3052
static const value_string body_sensor_location_vals[] = {
3053
    {0x00, "Other"},
3054
    {0x01, "Chest"},
3055
    {0x02, "Wrist"},
3056
    {0x03, "Finger"},
3057
    {0x04, "Hand"},
3058
    {0x05, "Ear Lobe"},
3059
    {0x06, "Foot"},
3060
    {0x0, NULL}
3061
};
3062
3063
static const value_string heart_rate_control_point_vals[] = {
3064
    {0x01, "Reset Energy Expended"},
3065
    {0x0, NULL}
3066
};
3067
3068
static const value_string ringer_control_point_vals[] = {
3069
    {0x01, "Silent Mode"},
3070
    {0x02, "Mute Once"},
3071
    {0x03, "Cancel Silent Mode"},
3072
    {0x0, NULL}
3073
};
3074
3075
static const value_string ringer_setting_vals[] = {
3076
    {0x00, "Ringer Silent"},
3077
    {0x01, "Ringer Normal"},
3078
    {0x0, NULL}
3079
};
3080
3081
static const value_string alert_category_id_vals[] = {
3082
    {0x00, "Simple Alert: General text alert or non-text alert"},
3083
    {0x01, "Email: Alert when Email messages arrives"},
3084
    {0x02, "News: News feeds such as RSS, Atom"},
3085
    {0x03, "Call: Incoming call"},
3086
    {0x04, "Missed call: Missed Call"},
3087
    {0x05, "SMS/MMS: SMS/MMS message arrives"},
3088
    {0x06, "Voice mail: Voice mail"},
3089
    {0x07, "Schedule: Alert occurred on calendar, planner"},
3090
    {0x08, "High Prioritized Alert: Alert that should be handled as high priority"},
3091
    {0x09, "Instant Message: Alert for incoming instant messages"},
3092
    {0xFB, "Defined by service specification"},
3093
    {0xFC, "Defined by service specification"},
3094
    {0xFD, "Defined by service specification"},
3095
    {0xFE, "Defined by service specification"},
3096
    {0xFF, "Defined by service specification"},
3097
    {0x0, NULL}
3098
};
3099
3100
static const value_string alert_command_id_vals[] = {
3101
    {0x00, "Enable New Incoming Alert Notification"},
3102
    {0x01, "Enable Unread Category Status Notification"},
3103
    {0x02, "Disable New Incoming Alert Notification"},
3104
    {0x03, "Disable Unread Category Status Notification"},
3105
    {0x04, "Notify New Incoming Alert immediately"},
3106
    {0x05, "Notify Unread Category Status immediately"},
3107
    {0x0, NULL}
3108
};
3109
3110
static const value_string hid_control_point_command_vals[] = {
3111
    {0x00, "Suspend"},
3112
    {0x01, "Exit Suspend"},
3113
    {0x0, NULL}
3114
};
3115
3116
static const value_string pnp_id_vendor_id_source_vals[] = {
3117
    {0x01,   "Bluetooth SIG"},
3118
    {0x02,   "USB Implementer's Forum"},
3119
    {0x0, NULL}
3120
};
3121
3122
static const value_string sensor_location_vals[] = {
3123
    {0x00,   "Other"},
3124
    {0x01,   "Top of shoe"},
3125
    {0x02,   "In shoe"},
3126
    {0x03,   "Hip"},
3127
    {0x04,   "Front Wheel"},
3128
    {0x05,   "Left Crank"},
3129
    {0x06,   "Right Crank"},
3130
    {0x07,   "Left Pedal"},
3131
    {0x08,   "Right Pedal"},
3132
    {0x09,   "Front Hub"},
3133
    {0x0A,   "Rear Dropout"},
3134
    {0x0B,   "Chainstay"},
3135
    {0x0C,   "Rear Wheel"},
3136
    {0x0D,   "Rear Hub"},
3137
    {0x0E,   "Chest"},
3138
    {0x0, NULL}
3139
};
3140
3141
static const value_string gender_vals[] = {
3142
    {0x00,   "Male"},
3143
    {0x01,   "Female"},
3144
    {0x02,   "Unspecified"},
3145
    {0x0, NULL}
3146
};
3147
3148
static const value_string sport_type_for_aerobic_and_anaerobic_thresholds_vals[] = {
3149
    {0x00,   "Unspecified"},
3150
    {0x01,   "Running (Treadmill)"},
3151
    {0x02,   "Cycling (Ergometer)"},
3152
    {0x03,   "Rowing (Ergometer)"},
3153
    {0x04,   "Cross Training (Elliptical)"},
3154
    {0x05,   "Climbing"},
3155
    {0x06,   "Skiing"},
3156
    {0x07,   "Skating"},
3157
    {0x08,   "Arm exercising"},
3158
    {0x09,   "Lower body exercising"},
3159
    {0x0A,   "Upper body exercising"},
3160
    {0x0B,   "Whole body exercising"},
3161
    {0x0, NULL}
3162
};
3163
3164
static const value_string barometric_pressure_trend_vals[] = {
3165
    {0x00,   "Unknown"},
3166
    {0x01,   "Continuously falling"},
3167
    {0x02,   "Continuously rising"},
3168
    {0x03,   "Falling, then steady"},
3169
    {0x04,   "Rising, then steady"},
3170
    {0x05,   "Falling before a lesser rise"},
3171
    {0x06,   "Falling before a greater rise"},
3172
    {0x07,   "Rising before a greater fall"},
3173
    {0x08,   "Rising before a lesser fall"},
3174
    {0x09,   "Steady"},
3175
    {0x0, NULL}
3176
};
3177
3178
static const value_string central_address_resolution_vals[] = {
3179
    {0x00,   "Not Supported"},
3180
    {0x01,   "Supported"},
3181
    {0x0, NULL}
3182
};
3183
3184
static const value_string resolvable_private_address_vals[] = {
3185
    {0x00,   "Only Resolvable Private Addresses will be used as local addresses after bonding"},
3186
    {0x0, NULL}
3187
};
3188
3189
static const value_string cycling_power_feature_sensor_measurement_context_vals[] = {
3190
    {0x00,   "Force Based"},
3191
    {0x01,   "Torque Based"},
3192
    {0x0, NULL}
3193
};
3194
3195
static const value_string body_composition_feature_mass_measurement_resolution_vals[] = {
3196
    {0x00,   "Not Specified"},
3197
    {0x01,   "Resolution of 0.5 kg or 1 lb"},
3198
    {0x02,   "Resolution of 0.2 kg or 0.5 lb"},
3199
    {0x03,   "Resolution of 0.1 kg or 0.2 lb"},
3200
    {0x04,   "Resolution of 0.05 kg or 0.1 lb"},
3201
    {0x05,   "Resolution of 0.02 kg or 0.05 lb"},
3202
    {0x06,   "Resolution of 0.01 kg or 0.02 lb"},
3203
    {0x07,   "Resolution of 0.005 kg or 0.01 lb"},
3204
    {0x0, NULL}
3205
};
3206
3207
static const value_string body_composition_feature_height_measurement_resolution_vals[] = {
3208
    {0x00,   "Not Specified"},
3209
    {0x01,   "Resolution of 0.01 meter or 1 inch"},
3210
    {0x02,   "Resolution of 0.005 meter or 0.5 inch"},
3211
    {0x03,   "Resolution of 0.001 meter or 0.1 inch"},
3212
    {0x0, NULL}
3213
};
3214
3215
static const value_string weight_scale_feature_height_measurement_resolution_vals[] = {
3216
    {0x00,   "Not Specified"},
3217
    {0x01,   "Resolution of 0.01 meter or 1 inch"},
3218
    {0x02,   "Resolution of 0.005 meter or 0.5 inch"},
3219
    {0x03,   "Resolution of 0.001 meter or 0.1 inch"},
3220
    {0x0, NULL}
3221
};
3222
3223
static const value_string weight_scale_feature_weight_measurement_resolution_vals[] = {
3224
    {0x00,   "Not Specified"},
3225
    {0x01,   "Resolution of 0.5 kg or 1 lb"},
3226
    {0x02,   "Resolution of 0.2 kg or 0.5 lb"},
3227
    {0x03,   "Resolution of 0.1 kg or 0.2 lb"},
3228
    {0x04,   "Resolution of 0.05 kg or 0.1 lb"},
3229
    {0x05,   "Resolution of 0.02 kg or 0.05 lb"},
3230
    {0x06,   "Resolution of 0.01 kg or 0.02 lb"},
3231
    {0x07,   "Resolution of 0.005 kg or 0.01 lb"},
3232
    {0x0, NULL}
3233
};
3234
3235
static const value_string glucose_measurement_flags_glucose_concentration_units_vals[] = {
3236
    {0x00,   "kg/L"},
3237
    {0x01,   "mol/L"},
3238
    {0x0, NULL}
3239
};
3240
3241
static const value_string glucose_measurement_type_and_sample_location_type_vals[] = {
3242
    {0x01,   "Capillary Whole Blood"},
3243
    {0x02,   "Capillary Plasma"},
3244
    {0x03,   "Venous Whole Blood"},
3245
    {0x04,   "Venous Plasma"},
3246
    {0x05,   "Arterial Whole Blood"},
3247
    {0x06,   "Arterial Plasma"},
3248
    {0x07,   "Undetermined Whole Blood"},
3249
    {0x08,   "Undetermined Plasma"},
3250
    {0x09,   "Interstitial Fluid"},
3251
    {0x0A,   "Control Solution"},
3252
    {0x0, NULL}
3253
};
3254
3255
static const value_string glucose_measurement_type_and_sample_location_sample_location_vals[] = {
3256
    {0x01,   "Finger"},
3257
    {0x02,   "Alternate Site Test"},
3258
    {0x03,   "Earlobe"},
3259
    {0x04,   "Control Solution"},
3260
    {0x0F,   "Sample Location Value Not Available"},
3261
    {0x0, NULL}
3262
};
3263
3264
static const value_string bond_management_control_point_opcode_vals[] = {
3265
    {0x01,   "Delete bond of requesting device (BR/EDR and LE)"},
3266
    {0x02,   "Delete bond of requesting device (BR/EDR transport only)"},
3267
    {0x03,   "Delete bond of requesting device (LE transport only)"},
3268
    {0x04,   "Delete all bonds on server (BR/EDR and LE)"},
3269
    {0x05,   "Delete all bonds on server (BR/EDR transport only)"},
3270
    {0x06,   "Delete all bonds on server (LE transport only)"},
3271
    {0x07,   "Delete all but the active bond on server (BR/EDR and LE)"},
3272
    {0x08,   "Delete all but the active bond on server (BR/EDR transport only)"},
3273
    {0x09,   "Delete all but the active bond on server (LE transport only)"},
3274
    {0x0, NULL}
3275
};
3276
3277
static const value_string temperature_measurement_flags_temperature_unit_vals[] = {
3278
    {0x00,   "Celsius"},
3279
    {0x01,   "Fahrenheit"},
3280
    {0x0, NULL}
3281
};
3282
3283
static const value_string glucose_measurement_context_flags_medication_value_units_vals[] = {
3284
    {0x00,   "Kilograms"},
3285
    {0x01,   "Liters"},
3286
    {0x0, NULL}
3287
};
3288
3289
static const value_string glucose_measurement_context_carbohydrate_id_vals[] = {
3290
    {0x01,   "Breakfast"},
3291
    {0x02,   "Lunch"},
3292
    {0x03,   "Dinner"},
3293
    {0x04,   "Snack"},
3294
    {0x05,   "Drink"},
3295
    {0x06,   "Supper"},
3296
    {0x07,   "Brunch"},
3297
    {0x0, NULL}
3298
};
3299
3300
static const value_string glucose_measurement_context_meal_vals[] = {
3301
    {0x01,   "Preprandial (before meal)"},
3302
    {0x02,   "Postprandial (after meal)"},
3303
    {0x03,   "Fasting"},
3304
    {0x04,   "Casual (snacks, drinks, etc.)"},
3305
    {0x05,   "Bedtime"},
3306
    {0x0, NULL}
3307
};
3308
3309
static const value_string glucose_measurement_context_tester_vals[] = {
3310
    { 1,   "Self"},
3311
    { 2,   "Health Care Professional"},
3312
    { 3,   "Lab Test"} ,
3313
    {15,   "Tester Value not Available"},
3314
    {0x0, NULL}
3315
};
3316
3317
static const value_string glucose_measurement_context_health_vals[] = {
3318
    { 1,   "Minor Health Issues"},
3319
    { 2,   "Major Health Issues"},
3320
    { 3,   "During Menses"},
3321
    { 4,   "Under Stress"},
3322
    { 5,   "No Health Issues"},
3323
    {15,   "Health Value not Available"},
3324
    {0x0, NULL}
3325
};
3326
3327
static const value_string glucose_measurement_context_medication_id_vals[] = {
3328
    { 1,   "Rapid Acting Insulin"},
3329
    { 2,   "Short Acting Insulin"},
3330
    { 3,   "Intermediate Acting Insulin"},
3331
    { 4,   "Long Acting Insulin"},
3332
    { 5,   "Pre-mixed Insulin"},
3333
    {0x0, NULL}
3334
};
3335
3336
static const value_string blood_pressure_measurement_unit_vals[] = {
3337
    { 0,   "mmHg"},
3338
    { 1,   "kPa"},
3339
    {0x0, NULL}
3340
};
3341
3342
static const value_string blood_pressure_measurement_status_pulse_rate_range_detection_vals[] = {
3343
    { 0,   "Pulse rate is within the range"},
3344
    { 1,   "Pulse rate exceeds upper limit"},
3345
    { 2,   "Pulse rate is less than lower limit"},
3346
    { 3,   "Reserved"},
3347
    {0x0, NULL}
3348
};
3349
3350
static const value_string record_access_control_point_opcode_vals[] = {
3351
    { 0,   "Reserved"},
3352
    { 1,   "Report Stored Records"},
3353
    { 2,   "Delete Stored Records"},
3354
    { 3,   "Abort Operation"},
3355
    { 4,   "Report Number of Stored Records"},
3356
    { 5,   "Number of Stored Records Response"},
3357
    { 6,   "Response Code"},
3358
    {0x0, NULL}
3359
};
3360
3361
static const value_string record_access_control_point_operator_vals[] = {
3362
    { 0,   "Null"},
3363
    { 1,   "All Records"},
3364
    { 2,   "Less than or equal to"},
3365
    { 3,   "Greater than or equal to"},
3366
    { 4,   "Within range of (inclusive)"},
3367
    { 5,   "First record(i.e. oldest record)"},
3368
    { 6,   "Last record (i.e. most recent record)"},
3369
    {0x0, NULL}
3370
};
3371
3372
static const value_string record_access_control_point_operand_filter_type_vals[] = {
3373
    { 0x00,   "Reserved"},
3374
    { 0x01,   "Sequence Number"},
3375
    { 0x02,   "User Facing Time (Base Time + Offset Time)"},
3376
    {0x0, NULL}
3377
};
3378
3379
static const value_string record_access_control_point_response_code_vals[] = {
3380
    { 0x00,   "Reserved"},
3381
    { 0x01,   "Success"},
3382
    { 0x02,   "Op Code not supported"},
3383
    { 0x03,   "Invalid Operator"},
3384
    { 0x04,   "Operator not supported"},
3385
    { 0x05,   "Invalid Operand"},
3386
    { 0x06,   "No records found"},
3387
    { 0x07,   "Abort unsuccessful"},
3388
    { 0x08,   "Procedure not completed"},
3389
    { 0x09,   "Operand not supported"},
3390
    {0x0, NULL}
3391
};
3392
3393
static const value_string value_trigger_setting_condition_vals[] = {
3394
    { 0x00,   "None"},
3395
    { 0x01,   "Analog - Crossed a boundary"},
3396
    { 0x02,   "Analog - On the boundary"},
3397
    { 0x03,   "Analog - Exceeds a boundary"},
3398
    { 0x04,   "Bitmask"},
3399
    { 0x05,   "Analog Interval - Inside or outside the boundaries"},
3400
    { 0x06,   "Analog Interval - On the boundaries"},
3401
    { 0x07,   "No value trigger"},
3402
    {0x0, NULL}
3403
};
3404
3405
3406
static const value_string digital_vals[] = {
3407
    { 0x00,   "Inactive"},
3408
    { 0x01,   "Active"},
3409
    { 0x02,   "Tri-state"},
3410
    { 0x03,   "Output-state"},
3411
    {0x0, NULL}
3412
};
3413
3414
3415
const value_string btatt_ips_uncertainty_stationary_vals[] = {
3416
    { 0x00,   "Stationary"},
3417
    { 0x01,   "Mobile"},
3418
    {0x0, NULL}
3419
};
3420
3421
3422
const value_string btatt_ips_uncertainty_update_time_vals[] = {
3423
    { 0x00,   "Up to 3s"},
3424
    { 0x01,   "Up to 4s"},
3425
    { 0x02,   "Up to 6s"},
3426
    { 0x03,   "Up to 12s"},
3427
    { 0x04,   "Up to 28s"},
3428
    { 0x05,   "Up to 89s"},
3429
    { 0x06,   "Up to 426s"},
3430
    { 0x07,   "3541s"},
3431
    {0x0, NULL}
3432
};
3433
3434
3435
const value_string btatt_ips_uncertainty_precision_vals[] = {
3436
    { 0x00,   "Less than 0.1m"},
3437
    { 0x01,   "0.1-1m"},
3438
    { 0x02,   "1-2m"},
3439
    { 0x03,   "2-5m"},
3440
    { 0x04,   "5-10m"},
3441
    { 0x05,   "10-50m"},
3442
    { 0x06,   "Greater than 50m"},
3443
    { 0x07,   "N/A"},
3444
    {0x0, NULL}
3445
};
3446
3447
3448
const value_string btatt_ips_coordinate_system[] = {
3449
    { 0x00,   "WGS84 Coordinate System"},
3450
    { 0x01,   "Local Coordinate System"},
3451
    {0x0, NULL}
3452
};
3453
3454
3455
static const value_string time_trigger_setting_condition_vals[] = {
3456
    { 0x00,   "No time-based triggering used"},
3457
    { 0x01,   "Indicates or notifies unconditionally after a settable time"},
3458
    { 0x02,   "Not indicated or notified more often than a settable time"},
3459
    { 0x03,   "Changed more often than"},
3460
    {0x0, NULL}
3461
};
3462
3463
3464
static const value_string rsc_measurement_flags_type_of_movement_vals[] = {
3465
    { 0x00,   "Walking"},
3466
    { 0x01,   "Running"},
3467
    {0x0, NULL}
3468
};
3469
3470
static const value_string sc_control_point_opcode_vals[] = {
3471
    { 0x01,   "Set Cumulative Value"},
3472
    { 0x02,   "Start Sensor Calibration"},
3473
    { 0x03,   "Update Sensor Location"},
3474
    { 0x04,   "Request Supported Sensor Locations"},
3475
    { 0x10,   "Response Code"},
3476
    {0x0, NULL}
3477
};
3478
3479
static const value_string sc_control_point_response_value_vals[] = {
3480
    { 0x01,   "Success"},
3481
    { 0x02,   "Opcode not Supported"},
3482
    { 0x03,   "Invalid Parameter"},
3483
    { 0x04,   "Operation Failed"},
3484
    {0x0, NULL}
3485
};
3486
3487
static const value_string cycling_power_measurement_flags_accumulated_torque_source_vals[] = {
3488
    { 0x00,   "Wheel Based"},
3489
    { 0x01,   "Crank Based"},
3490
    {0x0, NULL}
3491
};
3492
3493
static const value_string cycling_power_vector_flags_instantaneous_measurement_direction_vals[] = {
3494
    { 0x00,   "Unknown"},
3495
    { 0x01,   "Tangential Component"},
3496
    { 0x02,   "Radial Component"},
3497
    { 0x03,   "Lateral Component"},
3498
    {0x0, NULL}
3499
};
3500
3501
static const value_string cycling_power_control_point_opcode[] = {
3502
    { 0x01,   "Set Cumulative Value"},
3503
    { 0x02,   "Update Sensor Location"},
3504
    { 0x03,   "Request Supported Sensor Locations"},
3505
    { 0x04,   "Set Crank Length"},
3506
    { 0x05,   "Request Crank Length"},
3507
    { 0x06,   "Set Chain Length"},
3508
    { 0x07,   "Request Chain Length"},
3509
    { 0x08,   "Set Chain Weight"},
3510
    { 0x09,   "Request Chain Weight"},
3511
    { 0x0A,   "Set Span Length"},
3512
    { 0x0B,   "Request Span Length"},
3513
    { 0x0C,   "Start Offset Compensation"},
3514
    { 0x0D,   "Mask Cycling Power Measurement Characteristic Content"},
3515
    { 0x0E,   "Request Sampling Rate"},
3516
    { 0x0F,   "Request Factory Calibration Date"},
3517
    { 0x20,   "Response Code"},
3518
    {0x0, NULL}
3519
};
3520
3521
static const value_string cycling_power_control_point_response_value[] = {
3522
    { 0x01,   "Success"},
3523
    { 0x02,   "Opcode not Supported"},
3524
    { 0x03,   "Invalid Parameter"},
3525
    { 0x04,   "Operation Failed"},
3526
    {0x0, NULL}
3527
};
3528
3529
static const value_string location_and_speed_flags_elevation_source_vals[] = {
3530
    { 0x00,   "Positioning System"},
3531
    { 0x01,   "Barometric Air Pressure"},
3532
    { 0x02,   "Database Service (or similar)"},
3533
    { 0x03,   "Other"},
3534
    {0x0, NULL}
3535
};
3536
3537
static const value_string flags_position_status_vals[] = {
3538
    { 0x00,   "No Position"},
3539
    { 0x01,   "Position Ok"},
3540
    { 0x02,   "Estimated Position"},
3541
    { 0x03,   "Last Known Position"},
3542
    {0x0, NULL}
3543
};
3544
3545
static const value_string ln_control_point_opcode[] = {
3546
    { 0x01,   "Set Cumulative Value"},
3547
    { 0x02,   "Mask Location and Speed Characteristic Content"},
3548
    { 0x03,   "Navigation Control"},
3549
    { 0x04,   "Request Number of Routes"},
3550
    { 0x05,   "Request Name of Route"},
3551
    { 0x06,   "Select Route"},
3552
    { 0x07,   "Set Fix Rate"},
3553
    { 0x08,   "Set Elevation"},
3554
    { 0x20,   "Response Code"},
3555
    {0x0, NULL}
3556
};
3557
3558
static const value_string ln_control_point_navigation_control_vals[] = {
3559
    { 0x00,   "Stop Notification of the Navigation characteristic. Stop Navigation."},
3560
    { 0x01,   "Start Notification of the Navigation characteristic. Start Navigation to the first waypoint on a route."},
3561
    { 0x02,   "Stop Notification of the Navigation characteristic. Pause Navigation keeping the next waypoint on the route in the memory for continuing the navigation later."},
3562
    { 0x03,   "Start Notification of the Navigation characteristic. Continue Navigation from the point where navigation was paused to the next waypoint on the route."},
3563
    { 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."},
3564
    { 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."},
3565
    {0x0, NULL}
3566
};
3567
3568
static const value_string ln_control_point_response_value[] = {
3569
    { 0x01,   "Success"},
3570
    { 0x02,   "Opcode not Supported"},
3571
    { 0x03,   "Invalid Parameter"},
3572
    { 0x04,   "Operation Failed"},
3573
    {0x0, NULL}
3574
};
3575
3576
static const value_string body_composition_measurement_flags_measurement_units_vals[] = {
3577
    { 0,   "SI (kg & m)"},
3578
    { 1,   "Imperial (lb & in)"},
3579
    {0x0, NULL}
3580
};
3581
3582
static const value_string user_control_point_opcode_vals[] = {
3583
    { 0x01,   "Register New User"},
3584
    { 0x02,   "Consent"},
3585
    { 0x03,   "Delete User Data"},
3586
    { 0x20,   "Response Code"},
3587
    {0x0, NULL}
3588
};
3589
3590
static const value_string user_control_point_response_value_vals[] = {
3591
    { 0x01,   "Success"},
3592
    { 0x02,   "Opcode not Supported"},
3593
    { 0x03,   "Invalid Parameter"},
3594
    { 0x04,   "Operation Failed"},
3595
    { 0x05,   "User not Authorized"},
3596
    {0x0, NULL}
3597
};
3598
3599
static const value_string cgm_feature_type_vals[] = {
3600
    { 0x01,   "Capillary Whole Blood"},
3601
    { 0x02,   "Capillary Plasma"},
3602
    { 0x03,   "Venous Whole Blood"},
3603
    { 0x04,   "Venous Plasma"},
3604
    { 0x05,   "Arterial Whole Blood"},
3605
    { 0x06,   "Arterial Plasma"},
3606
    { 0x07,   "Undetermined Whole Blood"},
3607
    { 0x08,   "Undetermined Plasma"},
3608
    { 0x09,   "Interstitial Fluid (ISF)"},
3609
    { 0x0A,   "Control Solution"},
3610
    {0x0, NULL}
3611
};
3612
3613
static const value_string cgm_feature_sample_location_vals[] = {
3614
    { 0x01,   "Finger"},
3615
    { 0x02,   "Alternate Site Test (AST)"},
3616
    { 0x03,   "Earlobe"},
3617
    { 0x04,   "Control Solution"},
3618
    { 0x05,   "Subcutaneous Tissue"},
3619
    { 0x0F,   "Sample Location Value not Available"},
3620
    {0x0, NULL}
3621
};
3622
3623
static const value_string cgm_specific_ops_control_point_opcode_vals[] = {
3624
    { 0x01,   "Set CGM Communication Interval"},
3625
    { 0x02,   "Get CGM Communication Interval"},
3626
    { 0x03,   "CGM Communication Interval response"},
3627
    { 0x04,   "Set Glucose Calibration Value"},
3628
    { 0x05,   "Get Glucose Calibration Value"},
3629
    { 0x06,   "Glucose Calibration Value response"},
3630
    { 0x07,   "Set Patient High Alert Level"},
3631
    { 0x08,   "Get Patient High Alert Level"},
3632
    { 0x09,   "Patient High Alert Level Response"},
3633
    { 0x0A,   "Set Patient Low Alert Level"},
3634
    { 0x0B,   "Get Patient Low Alert Level"},
3635
    { 0x0C,   "Patient Low Alert Level Response"},
3636
    { 0x0D,   "Set Hypo Alert Level"},
3637
    { 0x0E,   "Get Hypo Alert Level"},
3638
    { 0x0F,   "Hypo Alert Level Response"},
3639
    { 0x10,   "Set Hyper Alert Level"},
3640
    { 0x11,   "Get Hyper Alert Level"},
3641
    { 0x12,   "Hyper Alert Level Response"},
3642
    { 0x13,   "Set Rate of Decrease Alert Level"},
3643
    { 0x14,   "Get Rate of Decrease Alert Level"},
3644
    { 0x15,   "Rate of Decrease Alert Level Response"},
3645
    { 0x16,   "Set Rate of Increase Alert Level"},
3646
    { 0x17,   "Get Rate of Increase Alert Level"},
3647
    { 0x18,   "Rate of Increase Alert Level Response"},
3648
    { 0x19,   "Reset Device Specific Alert"},
3649
    { 0x1A,   "Start the Session"},
3650
    { 0x1B,   "Stop the Session"},
3651
    { 0x1C,   "Response Code"},
3652
    {0x0, NULL}
3653
};
3654
3655
static const value_string cgm_specific_ops_control_point_response_code_vals[] = {
3656
    { 0x01,   "Success"},
3657
    { 0x02,   "Op Code not Supported"},
3658
    { 0x03,   "Invalid Operand"},
3659
    { 0x04,   "Procedure not Completed"},
3660
    { 0x05,   "Parameter Out of Range"},
3661
    {0x0, NULL}
3662
};
3663
3664
static const value_string nordic_dfu_control_point_opcode_vals[] = {
3665
    { 0x01,   "Start DFU"},
3666
    { 0x02,   "Initialize DFU Parameters"},
3667
    { 0x03,   "Receive Firmware Image"},
3668
    { 0x04,   "Validate Firmware"},
3669
    { 0x05,   "Activate Image and Reset"},
3670
    { 0x06,   "Reset System"},
3671
    { 0x07,   "Report Received Image Size"},
3672
    { 0x08,   "Packet Receipt Notification Request"},
3673
    { 0x10,   "Response Code"},
3674
    { 0x11,   "Packet Receipt Notification"},
3675
    {0x0, NULL}
3676
};
3677
3678
static const value_string nordic_dfu_control_point_image_type_vals[] = {
3679
    { 0x00,   "No Image"},
3680
    { 0x01,   "SoftDevice"},
3681
    { 0x02,   "Bootloader"},
3682
    { 0x03,   "Bootloader+SoftDevice"},
3683
    { 0x04,   "Application"},
3684
    { 0x05,   "Other Image Combination - currently not supported"},
3685
    { 0x06,   "Other Image Combination - currently not supported"},
3686
    { 0x07,   "Other Image Combination - currently not supported"},
3687
    {0x0, NULL}
3688
};
3689
3690
static const value_string nordic_dfu_control_point_init_packet_vals[] = {
3691
    { 0x00,   "Receive Init Packet"},
3692
    { 0x01,   "Init Packet Complete"},
3693
    {0x0, NULL}
3694
};
3695
3696
static const value_string nordic_dfu_control_point_response_value_vals[] = {
3697
    { 0x01,   "Success"},
3698
    { 0x02,   "Invalid State"},
3699
    { 0x03,   "Not Supported"},
3700
    { 0x04,   "Data Size Exceeds Limit"},
3701
    { 0x05,   "CRC Error"},
3702
    { 0x06,   "Operation Failed"},
3703
    {0x0, NULL}
3704
};
3705
3706
static const value_string https_security_vals[] = {
3707
    { 0x00,   "False"},
3708
    { 0x01,   "True"},
3709
    {0x0, NULL}
3710
};
3711
3712
static const value_string http_control_point_opcode_vals[] = {
3713
    { 0x01,   "HTTP GET Request"},
3714
    { 0x02,   "HTTP HEAD Request"},
3715
    { 0x03,   "HTTP POST Request"},
3716
    { 0x04,   "HTTP PUT Request"},
3717
    { 0x05,   "HTTP DELETE Request"},
3718
    { 0x06,   "HTTPS GET Request"},
3719
    { 0x07,   "HTTPS HEAD Request"},
3720
    { 0x08,   "HTTPS POST Request"},
3721
    { 0x09,   "HTTPS PUT Request"},
3722
    { 0x0A,   "HTTPS DELETE Request"},
3723
    { 0x0B,   "HTTP Request Cancel"},
3724
    {0x0, NULL}
3725
};
3726
3727
const value_string tds_organization_id_vals[] = {
3728
    { 0x00, "RFU" },
3729
    { 0x01, "Bluetooth SIG" },
3730
    {0, NULL }
3731
};
3732
3733
static const value_string tds_opcode_vals[] = {
3734
    { 0x00, "RFU" },
3735
    { 0x01, "Activate Transport" },
3736
    {0, NULL }
3737
};
3738
3739
static const value_string tds_result_code_vals[] = {
3740
    { 0x00, "Success" },
3741
    { 0x01, "Opcode not Supported" },
3742
    { 0x02, "Invalid Parameter" },
3743
    { 0x03, "Unsupported Organization ID" },
3744
    { 0x04, "Operation Failed" },
3745
    {0, NULL }
3746
};
3747
3748
static const value_string timezone_information_vals[] = {
3749
    { 0x00, "Signification Unknown" },
3750
    { 0x01, "Manually Set Time Zone" },
3751
    { 0x02, "Time Zone at Place of Departure" },
3752
    { 0x03, "Time Zone at Destination" },
3753
    { 0x04, "Time Zone at Home" },
3754
    {0, NULL }
3755
};
3756
3757
static const value_string ots_action_opcode_vals[] = {
3758
    { 0x00, "Reserved" },
3759
    { 0x01, "Create" },
3760
    { 0x02, "Delete" },
3761
    { 0x03, "Calculate Checksum" },
3762
    { 0x04, "Execute" },
3763
    { 0x05, "Read" },
3764
    { 0x06, "Write" },
3765
    { 0x07, "Abort" },
3766
    { 0x60, "Response Code" },
3767
    {0, NULL }
3768
};
3769
3770
static const value_string ots_action_result_code_vals[] = {
3771
    { 0x00, "Reserved" },
3772
    { 0x01, "Success" },
3773
    { 0x02, "Opcode not Supported" },
3774
    { 0x03, "Invalid Parameter" },
3775
    { 0x04, "Insufficient Resources" },
3776
    { 0x05, "Invalid Object" },
3777
    { 0x06, "Channel Unavailable" },
3778
    { 0x07, "Unsupported Type" },
3779
    { 0x08, "Procedure not Permitted" },
3780
    { 0x09, "Object Locked" },
3781
    { 0x0A, "Operation Failed" },
3782
    {0, NULL }
3783
};
3784
3785
static const value_string ots_list_opcode_vals[] = {
3786
    { 0x00, "Reserved" },
3787
    { 0x01, "First" },
3788
    { 0x02, "Last" },
3789
    { 0x03, "Previous" },
3790
    { 0x04, "Next" },
3791
    { 0x05, "Go To" },
3792
    { 0x06, "Order" },
3793
    { 0x07, "Request Number of Objects" },
3794
    { 0x08, "Clear Marking" },
3795
    { 0x70, "Response Code" },
3796
    {0, NULL }
3797
};
3798
3799
static const value_string ots_list_order_vals[] = {
3800
    { 0x00, "Reserved" },
3801
    { 0x01, "Name, Ascending" },
3802
    { 0x02, "Type, Ascending" },
3803
    { 0x03, "Current Size Ascending" },
3804
    { 0x04, "First-created Timestamp, Ascending" },
3805
    { 0x05, "Last-modified Timestamp, Ascending" },
3806
    { 0x11, "Name, Descending" },
3807
    { 0x12, "Type, Descending" },
3808
    { 0x13, "Current Size Descending" },
3809
    { 0x14, "First-created Timestamp, Descending" },
3810
    { 0x15, "Last-modified Timestamp, Descending" },
3811
    {0, NULL }
3812
};
3813
3814
static const value_string ots_list_result_code_vals[] = {
3815
    { 0x00, "Reserved" },
3816
    { 0x01, "Success" },
3817
    { 0x02, "Opcode not Supported" },
3818
    { 0x03, "Invalid Parameter" },
3819
    { 0x04, "Operation Failed" },
3820
    { 0x05, "Out of Bounds" },
3821
    { 0x06, "Too Many Objects" },
3822
    { 0x07, "No Object" },
3823
    { 0x08, "Object ID not Found" },
3824
    {0, NULL }
3825
};
3826
3827
static const value_string ots_filter_vals[] = {
3828
    { 0x00, "No Filter" },
3829
    { 0x01, "Name Starts With" },
3830
    { 0x02, "Name Ends With" },
3831
    { 0x03, "Name Contains" },
3832
    { 0x04, "Name is Exactly" },
3833
    { 0x05, "Object Type" },
3834
    { 0x06, "Created Between" },
3835
    { 0x07, "Modified Between" },
3836
    { 0x08, "Current Size Between" },
3837
    { 0x09, "Allocated Size Between" },
3838
    { 0x0A, "Marked Objects" },
3839
    {0, NULL }
3840
};
3841
3842
static const value_string regulatory_certification_data_list_item_body_structure_type_vals[] = {
3843
    { 0x01, "Authorizing Body" },
3844
    { 0x02, "Continua Regulatory" },
3845
    {0, NULL }
3846
};
3847
3848
static const value_string btgatt_microbit_button_state_vals[] = {
3849
    { 0x00, "Not Pressed" },
3850
    { 0x01, "Pressed" },
3851
    { 0x02, "Long Press" },
3852
    {0, NULL }
3853
};
3854
3855
static const value_string battery_power_state_present_vals[] = {
3856
    { 0x00, "Unknown" },
3857
    { 0x01, "Not Supported" },
3858
    { 0x02, "Not Present" },
3859
    { 0x03, "Present" },
3860
    {0, NULL }
3861
};
3862
3863
static const value_string battery_power_state_discharging_vals[] = {
3864
    { 0x00, "Unknown" },
3865
    { 0x01, "Not Supported" },
3866
    { 0x02, "Not Discharging" },
3867
    { 0x03, "Discharging" },
3868
    {0, NULL }
3869
};
3870
3871
static const value_string battery_power_state_charging_vals[] = {
3872
    { 0x00, "Unknown" },
3873
    { 0x01, "Not Chargeable" },
3874
    { 0x02, "Not Charging " },
3875
    { 0x03, "Charging" },
3876
    {0, NULL }
3877
};
3878
3879
static const value_string battery_power_state_level_vals[] = {
3880
    { 0x00, "Unknown" },
3881
    { 0x01, "Not Supported" },
3882
    { 0x02, "Good Level" },
3883
    { 0x03, "Critically Low Level" },
3884
    {0, NULL }
3885
};
3886
3887
static const value_string removable_removable_vals[] = {
3888
    { 0x00, "Unknown" },
3889
    { 0x01, "Not Removable" },
3890
    { 0x02, "Removable" },
3891
    {0, NULL }
3892
};
3893
3894
static const value_string service_required_service_required_vals[] = {
3895
    { 0x00, "Unknown" },
3896
    { 0x01, "No Service Required" },
3897
    { 0x02, "Service Required" },
3898
    {0, NULL }
3899
};
3900
3901
static const value_string network_availability_vals[] = {
3902
    { 0x00, "No network available" },
3903
    { 0x01, "One or more networks available" },
3904
    {0, NULL }
3905
};
3906
3907
static const value_string training_status_status_vals[] = {
3908
    { 0x00, "Other" },
3909
    { 0x01, "Idle" },
3910
    { 0x02, "Warming Up" },
3911
    { 0x03, "Low Intensity Interval" },
3912
    { 0x04, "High Intensity Interval" },
3913
    { 0x05, "Recovery Interval" },
3914
    { 0x06, "Isometric" },
3915
    { 0x07, "Heart Rate Control" },
3916
    { 0x08, "Fitness Test" },
3917
    { 0x09, "Speed Outside of Control Region - Low" },
3918
    { 0x0A, "Speed Outside of Control Region - High" },
3919
    { 0x0B, "Cool Down" },
3920
    { 0x0C, "Watt Control" },
3921
    { 0x0D, "Manual Mode (Quick Start)" },
3922
    { 0x0E, "Pre-Workout" },
3923
    { 0x0F, "Post-Workout" },
3924
    {0, NULL }
3925
};
3926
3927
static const value_string fitness_machine_status_opcode_vals[] = {
3928
    { 0x01, "Reset" },
3929
    { 0x02, "Fitness Machine Stopped or Paused by the User" },
3930
    { 0x03, "Fitness Machine Stopped by Safety Key" },
3931
    { 0x04, "Fitness Machine Started or Resumed by the User" },
3932
    { 0x05, "Target Speed Changed" },
3933
    { 0x06, "Target Incline Changed" },
3934
    { 0x07, "Target Resistance Level Changed" },
3935
    { 0x08, "Target Power Changed" },
3936
    { 0x09, "Target Heart Rate Changed" },
3937
    { 0x0A, "Targeted Expended Energy Changed" },
3938
    { 0x0B, "Targeted Number of Steps Changed" },
3939
    { 0x0C, "Targeted Number of Strides Changed" },
3940
    { 0x0D, "Targeted Distance Changed" },
3941
    { 0x0E, "Targeted Training Time Changed" },
3942
    { 0x0F, "Targeted Time in Two Heart Rate Zones Changed" },
3943
    { 0x10, "Targeted Time in Three Heart Rate Zones Changed" },
3944
    { 0x11, "Targeted Time in Five Heart Rate Zones Changed" },
3945
    { 0x12, "Indoor Bike Simulation Parameters Changed" },
3946
    { 0x13, "Wheel Circumference Changed" },
3947
    { 0x14, "Spin Down Status" },
3948
    { 0x15, "Targeted Cadence Changed" },
3949
    { 0xFF, "Control Permission Lost" },
3950
    {0, NULL }
3951
};
3952
3953
static const value_string fitness_machine_control_information_vals[] = {
3954
    { 0x01, "Stop" },
3955
    { 0x02, "Pause" },
3956
    {0, NULL }
3957
};
3958
3959
static const value_string fitness_machine_spin_down_status_vals[] = {
3960
    { 0x01, "Spin Down Requested" },
3961
    { 0x02, "Success" },
3962
    { 0x03, "Error" },
3963
    { 0x04, "Stop Pedalling" },
3964
    {0, NULL }
3965
};
3966
3967
static const value_string ots_volume_control_point_procedure_vals[] = {
3968
    { 0x00, "Relative Volume Down" },
3969
    { 0x01, "Relative Volume Up" },
3970
    { 0x02, "Unmute/Relative Volume Down" },
3971
    { 0x03, "Unmute/Relative Volume Up" },
3972
    { 0x04, "Set Absolute Volume" },
3973
    { 0x05, "Unmute" },
3974
    { 0x06, "Mute" },
3975
    {0, NULL }
3976
};
3977
3978
static const true_false_string control_point_mask_value_tfs = {
3979
    "Leave as Default",
3980
    "Turn Off" };
3981
3982
static const true_false_string flags_heading_source_tfs = {
3983
    "Magnetic Compass",
3984
    "Movement" };
3985
3986
static const true_false_string location_and_speed_flags_speed_and_distance_format_tfs = {
3987
    "3D",
3988
    "2D" };
3989
3990
static const true_false_string navigation_indicator_type_tfs = {
3991
    "To Destination",
3992
    "To Waypoint" };
3993
3994
static const true_false_string weight_measurement_flags_measurement_units_tfs = {
3995
    "Imperial (lb & in)",
3996
    "SI (kg & m)" };
3997
3998
static const true_false_string microbit_ad_tfs = {
3999
    "Analogue",
4000
    "Digital"
4001
};
4002
4003
static const true_false_string microbit_io_tfs = {
4004
    "Input",
4005
    "Output"
4006
};
4007
4008
static const true_false_string timezone_information_type_tfs = {
4009
    "Information relative to local time",
4010
    "Information relative to UTC"
4011
};
4012
4013
4014
static const char *unit_unitless = "";
4015
4016
/* signed area*/
4017
4018
static void helper_base_signed_negative_exponent(char * const buf, const int base, const char * const unit, const uint32_t value)
4019
0
{
4020
0
    const int32_t signed_value = (const int32_t) value;
4021
0
    const int32_t fraction = (((signed_value < 0) ? -1 : 1) * signed_value) % base;
4022
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%i.%i%s", signed_value / base, fraction, unit);
4023
0
}
4024
4025
0
static void base_signed_one_tenth_unitless(char *buf, uint32_t value) {
4026
0
    helper_base_signed_negative_exponent(buf, 10, unit_unitless, value);
4027
0
}
4028
4029
0
static void base_signed_one_tenth_percentage(char *buf, uint32_t value) {
4030
0
    helper_base_signed_negative_exponent(buf, 10, "%%", value);
4031
0
}
4032
4033
0
static void base_signed_one_thousandth_meters_per_seconds(char *buf, uint32_t value) {
4034
0
    helper_base_signed_negative_exponent(buf, 1000, "m/s", value);
4035
0
}
4036
4037
0
static void base_signed_one_hundredth_percentage(char *buf, uint32_t value) {
4038
0
    helper_base_signed_negative_exponent(buf, 100, "%%", value);
4039
0
}
4040
4041
/* unsigned area */
4042
4043
0
static void base_unsigned_one_tenth_unitless(char *buf, uint32_t value) {
4044
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u", value / 10, value % 10);
4045
0
}
4046
4047
0
static void base_unsigned_one_hundredth_km_h(char *buf, uint32_t value) {
4048
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%u.%02u km/h", value / 100, value % 100);
4049
0
}
4050
4051
0
static void base_unsigned_one_tenth_percentage(char *buf, uint32_t value) {
4052
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u%%", value / 10, value % 10);
4053
0
}
4054
4055
0
static void base_unsigned_one_tenth_milimeters(char *buf, uint32_t value) {
4056
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%u.%umm", value / 10, value % 10);
4057
0
}
4058
4059
0
static void base_unsigned_one_half_half_minute(char *buf, uint32_t value) {
4060
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%u.%um 1/min", value / 2, value % 2);
4061
0
}
4062
4063
0
static void base_unsigned_one_ten_thousandth_unitless(char *buf, uint32_t value) {
4064
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u", value / 10000, value % 10000);
4065
0
}
4066
4067
4068
0
static void base_unsigned_one_hundredth_kg_per_meter(char *buf, uint32_t value) {
4069
0
    snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u Kg/m", value / 100, value % 100);
4070
0
}
4071
4072
4073
union request_parameters_union {
4074
    void *data;
4075
4076
    struct _read_write {
4077
        uint16_t handle;
4078
        uint16_t offset;
4079
    } read_write;
4080
4081
    struct _read_multiple {
4082
        unsigned  number_of_handles;
4083
        uint16_t *handle;
4084
    } read_multiple;
4085
4086
    struct _mtu {
4087
        uint16_t mtu;
4088
    } mtu;
4089
4090
    struct _read_by_type {
4091
        uint16_t starting_handle;
4092
        uint16_t ending_handle;
4093
        bluetooth_uuid_t uuid;
4094
    } read_by_type;
4095
4096
    struct _find_information {
4097
        uint16_t starting_handle;
4098
        uint16_t ending_handle;
4099
    } find_information;
4100
};
4101
4102
typedef struct _request_data_t {
4103
    uint8_t                         opcode;
4104
    uint32_t                        request_in_frame;
4105
    uint32_t                        response_in_frame;
4106
4107
    union request_parameters_union  parameters;
4108
} request_data_t;
4109
4110
typedef struct _handle_data_t {
4111
    bluetooth_uuid_t uuid;
4112
4113
    enum attribute_type type;
4114
} handle_data_t;
4115
4116
4117
typedef struct _mtu_data_t {
4118
    unsigned  mtu;
4119
} mtu_data_t;
4120
4121
typedef struct _fragment_data_t {
4122
    unsigned length;
4123
    unsigned offset;
4124
    int      data_in_frame;
4125
    uint8_t *data;
4126
} fragment_data_t;
4127
4128
4129
void proto_register_btatt(void);
4130
void proto_reg_handoff_btatt(void);
4131
4132
void proto_register_btgatt(void);
4133
void proto_reg_handoff_btgatt(void);
4134
4135
5.10k
#define PROTO_DATA_BTATT_HANDLE   0x00
4136
4137
static void btatt_handle_prompt(packet_info *pinfo, char* result)
4138
0
{
4139
0
    uint16_t *value_data;
4140
4141
0
    value_data = (uint16_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE);
4142
0
    if (value_data)
4143
0
        snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "ATT Handle 0x%04x as", (unsigned) *value_data);
4144
0
    else
4145
0
        snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Unknown ATT Handle");
4146
0
}
4147
4148
static void *btatt_handle_value(packet_info *pinfo)
4149
0
{
4150
0
    uint16_t *value_data;
4151
4152
0
    value_data = (uint16_t *) p_get_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE);
4153
4154
0
    if (value_data)
4155
0
        return GUINT_TO_POINTER((unsigned long)*value_data);
4156
4157
0
    return NULL;
4158
0
}
4159
4160
static bool is_readable_request(uint8_t opcode)
4161
32.4k
{
4162
32.4k
    return (opcode == ATT_OPCODE_READ_REQUEST ||
4163
32.3k
            opcode == ATT_OPCODE_READ_BLOB_REQUEST ||
4164
32.3k
            opcode == ATT_OPCODE_READ_BY_TYPE_REQUEST ||
4165
32.3k
            opcode == ATT_OPCODE_READ_MULTIPLE_REQUEST);
4166
32.4k
}
4167
4168
static bool is_readable_response(uint8_t opcode)
4169
24.9k
{
4170
24.9k
    return (opcode == ATT_OPCODE_READ_RESPONSE ||
4171
24.9k
            opcode == ATT_OPCODE_READ_BLOB_RESPONSE ||
4172
24.9k
            opcode == ATT_OPCODE_READ_BY_TYPE_RESPONSE ||
4173
23.1k
            opcode == ATT_OPCODE_READ_MULTIPLE_RESPONSE);
4174
24.9k
}
4175
4176
static bool is_writeable_request(uint8_t opcode)
4177
24.9k
{
4178
24.9k
    return (opcode == ATT_OPCODE_WRITE_REQUEST ||
4179
24.9k
            opcode == ATT_OPCODE_WRITE_PREPARE_REQUEST);
4180
24.9k
}
4181
4182
static bool is_writeable_response(uint8_t opcode)
4183
23.1k
{
4184
23.1k
    return (opcode == ATT_OPCODE_WRITE_RESPONSE ||
4185
23.1k
            opcode == ATT_OPCODE_WRITE_PREPARE_RESPONSE);
4186
23.1k
}
4187
4188
static uint16_t
4189
get_gatt_service_handle_from_handle(packet_info *pinfo, uint32_t handle,
4190
    btl2cap_data_t *l2cap_data);
4191
4192
static uint16_t
4193
get_gatt_char_decl_handle_from_handle(packet_info *pinfo, uint32_t handle,
4194
    btl2cap_data_t *l2cap_data);
4195
4196
static bool bluetooth_gatt_has_no_parameter(uint8_t opcode)
4197
710
{
4198
710
    return is_readable_request(opcode) ||
4199
708
            opcode == ATT_OPCODE_WRITE_RESPONSE ||
4200
708
            opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION;
4201
710
}
4202
4203
static int
4204
get_handle_db_direction(uint8_t opcode, int direction)
4205
31.7k
{
4206
31.7k
    if (is_readable_request(opcode) || is_writeable_request(opcode) || opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION || opcode == ATT_OPCODE_WRITE_REQUEST)
4207
6.77k
        return !direction;
4208
24.9k
    if (is_readable_response(opcode) || is_writeable_response(opcode))
4209
1.78k
        return direction;
4210
23.1k
    if (opcode == ATT_OPCODE_HANDLE_VALUE_NOTIFICATION || opcode == ATT_OPCODE_HANDLE_VALUE_INDICATION)
4211
7
        return direction;
4212
4213
23.1k
    return direction;
4214
23.1k
}
4215
4216
static request_data_t *
4217
get_request(tvbuff_t *tvb, int offset, packet_info *pinfo, uint8_t opcode,
4218
        btl2cap_data_t *l2cap_data)
4219
1.53k
{
4220
1.53k
    request_data_t  *request_data;
4221
1.53k
    wmem_tree_key_t  key[6];
4222
1.53k
    wmem_tree_t     *sub_wmemtree;
4223
1.53k
    uint32_t         frame_number, curr_layer_num, direction, cid;
4224
4225
1.53k
    if (!l2cap_data)
4226
0
        return NULL;
4227
4228
1.53k
    curr_layer_num = pinfo->curr_layer_num;
4229
4230
    /* For dynamic channels, use the channel's local CID. For fixed channels, use the CID from the PDU. */
4231
1.53k
    cid = (l2cap_data->cid == BTL2CAP_FIXED_CID_ATT) ? l2cap_data->cid : l2cap_data->local_cid;
4232
4233
    // Request is always in opposite direction from response
4234
1.53k
    direction = pinfo->p2p_dir == P2P_DIR_SENT ? P2P_DIR_RECV : P2P_DIR_SENT;
4235
4236
1.53k
    key[0].length = 1;
4237
1.53k
    key[0].key    = &l2cap_data->interface_id;
4238
1.53k
    key[1].length = 1;
4239
1.53k
    key[1].key    = &l2cap_data->adapter_id;
4240
1.53k
    key[2].length = 1;
4241
1.53k
    key[2].key    = &curr_layer_num;
4242
1.53k
    key[3].length = 1;
4243
1.53k
    key[3].key    = &cid;
4244
1.53k
    key[4].length = 1;
4245
1.53k
    key[4].key    = &direction;
4246
1.53k
    key[5].length = 0;
4247
1.53k
    key[5].key    = NULL;
4248
4249
1.53k
    frame_number = pinfo->num;
4250
4251
1.53k
    sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(requests, key);
4252
1.53k
    request_data = (sub_wmemtree) ? (request_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4253
1.53k
    if (request_data && request_data->request_in_frame == pinfo->num)
4254
0
        return request_data;
4255
4256
1.53k
    if (request_data) do {
4257
22
        frame_number = request_data->request_in_frame - 1;
4258
4259
22
        if (request_data->request_in_frame == pinfo->num)
4260
0
            break;
4261
4262
22
      switch (opcode) {
4263
1
      case 0x01: /* Error Response */
4264
1
          if (tvb_captured_length_remaining(tvb, offset) < 1)
4265
0
              return NULL;
4266
1
          opcode = tvb_get_uint8(tvb, 1) + 1;
4267
          /* FALL THROUGH */
4268
1
      case 0x03: /* Exchange MTU Response */
4269
1
      case 0x05: /* Find Information Response */
4270
1
      case 0x07: /* Find By Type Value Response */
4271
3
      case 0x09: /* Read By Type Response */
4272
3
      case 0x0b: /* Read Response */
4273
5
      case 0x0d: /* Read Blob Response */
4274
5
      case 0x0f: /* Read Multiple Response */
4275
5
      case 0x11: /* Read By Group Type Response */
4276
5
      case 0x13: /* Write Response */
4277
5
      case 0x17: /* Prepare Write Response */
4278
5
      case 0x19: /* Execute Write Response */
4279
7
      case 0x21: /* Read Multiple Variable Response */
4280
7
      case 0x1E: /* Handle Value Confirmation */
4281
7
          if (request_data->opcode == opcode - 1)
4282
0
              return request_data;
4283
4284
7
          break;
4285
22
      }
4286
22
    } while(0);
4287
4288
1.53k
    request_data = (sub_wmemtree) ? (request_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4289
4290
1.53k
    if (!request_data)
4291
1.53k
        return NULL;
4292
4293
3
    if (request_data->request_in_frame == pinfo->num)
4294
0
        return request_data;
4295
4296
3
    switch (opcode) {
4297
0
    case 0x01: /* Error Response */
4298
0
        if (tvb_captured_length_remaining(tvb, offset) < 1)
4299
0
            return NULL;
4300
0
        opcode = tvb_get_uint8(tvb, 1) + 1;
4301
        /* FALL THROUGH */
4302
0
    case 0x03: /* Exchange MTU Response */
4303
0
    case 0x05: /* Find Information Response */
4304
0
    case 0x07: /* Find By Type Value Response */
4305
0
    case 0x09: /* Read By Type Response */
4306
0
    case 0x0b: /* Read Response */
4307
0
    case 0x0d: /* Read Blob Response */
4308
0
    case 0x0f: /* Read Multiple Response */
4309
0
    case 0x11: /* Read By Group Type Response */
4310
0
    case 0x13: /* Write Response */
4311
0
    case 0x17: /* Prepare Write Response */
4312
0
    case 0x19: /* Execute Write Response */
4313
0
    case 0x21: /* Read Multiple Variable Response */
4314
0
    case 0x1E: /* Handle Value Confirmation */
4315
0
        if (request_data->opcode == opcode -1)
4316
0
            return request_data;
4317
4318
0
        break;
4319
0
    case 0x1B: /* Handle Value Notification */
4320
0
    case 0x52: /* Write Command */
4321
0
    case 0xD2: /* Signed Write Command */
4322
        /* There is no response for them */
4323
0
        return NULL;
4324
0
    case 0x02: /* Exchange MTU Request */
4325
0
    case 0x04: /* Find Information Request */
4326
3
    case 0x06: /* Find By Type Value Request */
4327
3
    case 0x08: /* Read By Type Request */
4328
3
    case 0x0a: /* Read Request */
4329
3
    case 0x0c: /* Read Blob Request */
4330
3
    case 0x0e: /* Read Multiple Request */
4331
3
    case 0x10: /* Read By Group Type Request */
4332
3
    case 0x12: /* Write Request */
4333
3
    case 0x16: /* Prepare Write Request */
4334
3
    case 0x18: /* Execute Write Request */
4335
3
    case 0x1D: /* Handle Value Indication */
4336
3
    case 0x20: /* Read Multiple Variable Request */
4337
        /* This should never happen */
4338
3
    default:
4339
3
        return NULL;
4340
3
    }
4341
4342
0
    return NULL;
4343
3
}
4344
4345
static void
4346
save_request(packet_info *pinfo, uint8_t opcode, union request_parameters_union parameters,
4347
        btl2cap_data_t *l2cap_data)
4348
639
{
4349
639
    wmem_tree_key_t  key[7];
4350
639
    uint32_t         frame_number, curr_layer_num, direction, cid;
4351
639
    request_data_t  *request_data;
4352
4353
639
    frame_number = pinfo->num;
4354
639
    curr_layer_num = pinfo->curr_layer_num;
4355
639
    cid = (l2cap_data->cid == BTL2CAP_FIXED_CID_ATT) ? l2cap_data->cid : l2cap_data->local_cid;
4356
639
    direction = pinfo->p2p_dir;
4357
4358
639
    key[0].length = 1;
4359
639
    key[0].key    = &l2cap_data->interface_id;
4360
639
    key[1].length = 1;
4361
639
    key[1].key    = &l2cap_data->adapter_id;
4362
639
    key[2].length = 1;
4363
639
    key[2].key    = &curr_layer_num;
4364
639
    key[3].length = 1;
4365
639
    key[3].key    = &cid;
4366
639
    key[4].length = 1;
4367
639
    key[4].key    = &direction;
4368
639
    key[5].length = 1;
4369
639
    key[5].key    = &frame_number;
4370
639
    key[6].length = 0;
4371
639
    key[6].key    = NULL;
4372
4373
639
    request_data = wmem_new0(wmem_file_scope(), request_data_t);
4374
639
    request_data->opcode = opcode;
4375
639
    request_data->request_in_frame = frame_number;
4376
639
    request_data->response_in_frame = 0;
4377
4378
639
    request_data->parameters = parameters;
4379
4380
639
    wmem_tree_insert32_array(requests, key, request_data);
4381
639
}
4382
4383
static void
4384
save_handle(packet_info *pinfo, bluetooth_uuid_t uuid, uint32_t handle,
4385
        enum attribute_type  attribute_type, btl2cap_data_t *l2cap_data)
4386
2.93k
{
4387
2.93k
    if (!handle && uuid.size != 2 && uuid.size != 16)
4388
0
        return;
4389
4390
2.93k
    if (have_tap_listener(btatt_tap_handles)) {
4391
0
        tap_handles_t  *tap_handles;
4392
4393
0
        tap_handles = wmem_new(pinfo->pool, tap_handles_t);
4394
0
        tap_handles->handle = handle;
4395
0
        tap_handles->uuid = uuid;
4396
0
        tap_handles->uuid_str = print_bluetooth_uuid(&tap_handles->uuid);
4397
0
        tap_handles->numeric_uuid_str = print_numeric_bluetooth_uuid(pinfo->pool, &tap_handles->uuid);
4398
0
        tap_handles->attribute_type = attribute_type;
4399
4400
0
        tap_handles->service_handle =
4401
0
            get_gatt_service_handle_from_handle(pinfo, handle, l2cap_data);
4402
0
        tap_handles->char_decl_handle =
4403
0
            get_gatt_char_decl_handle_from_handle(pinfo, handle, l2cap_data);
4404
4405
0
        tap_queue_packet(btatt_tap_handles, pinfo, tap_handles);
4406
0
    }
4407
4408
2.93k
    if (!pinfo->fd->visited && l2cap_data) {
4409
2.93k
        wmem_tree_key_t  key[6];
4410
2.93k
        uint32_t         frame_number, direction;
4411
2.93k
        handle_data_t   *handle_data;
4412
4413
2.93k
        frame_number = pinfo->num;
4414
2.93k
        direction = pinfo->p2p_dir;
4415
2.93k
        if (uuid.bt_uuid == 0x2ADB || uuid.bt_uuid == 0x2ADD) {
4416
            // Mesh Provisioning Data In and Mesh Proxy Data In
4417
            // are in the opposite direction
4418
0
            direction = !direction;
4419
0
        }
4420
4421
2.93k
        key[0].length = 1;
4422
2.93k
        key[0].key    = &l2cap_data->interface_id;
4423
2.93k
        key[1].length = 1;
4424
2.93k
        key[1].key    = &l2cap_data->adapter_id;
4425
2.93k
        key[2].length = 1;
4426
2.93k
        key[2].key    = &direction;
4427
2.93k
        key[3].length = 1;
4428
2.93k
        key[3].key    = &handle;
4429
2.93k
        key[4].length = 1;
4430
2.93k
        key[4].key    = &frame_number;
4431
2.93k
        key[5].length = 0;
4432
2.93k
        key[5].key    = NULL;
4433
4434
2.93k
        handle_data = wmem_new(wmem_file_scope(), handle_data_t);
4435
2.93k
        handle_data->uuid = uuid;
4436
2.93k
        handle_data->type = attribute_type;
4437
4438
2.93k
        wmem_tree_insert32_array(handle_to_uuid, key, handle_data);
4439
2.93k
    }
4440
2.93k
}
4441
4442
bluetooth_uuid_t
4443
get_gatt_bluetooth_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
4444
    btl2cap_data_t *l2cap_data)
4445
10.1k
{
4446
10.1k
    wmem_tree_key_t  key[5];
4447
10.1k
    uint32_t         frame_number, direction;
4448
10.1k
    handle_data_t   *handle_data;
4449
10.1k
    wmem_tree_t     *sub_wmemtree;
4450
10.1k
    bluetooth_uuid_t uuid;
4451
4452
10.1k
    memset(&uuid, 0, sizeof uuid);
4453
4454
10.1k
    if (l2cap_data) {
4455
10.1k
        frame_number = pinfo->num;
4456
10.1k
        direction = get_handle_db_direction(opcode, pinfo->p2p_dir);
4457
4458
10.1k
        key[0].length = 1;
4459
10.1k
        key[0].key    = &l2cap_data->interface_id;
4460
10.1k
        key[1].length = 1;
4461
10.1k
        key[1].key    = &l2cap_data->adapter_id;
4462
10.1k
        key[2].length = 1;
4463
10.1k
        key[2].key    = &direction;
4464
10.1k
        key[3].length = 1;
4465
10.1k
        key[3].key    = &handle;
4466
10.1k
        key[4].length = 0;
4467
10.1k
        key[4].key    = NULL;
4468
4469
10.1k
        sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4470
10.1k
        handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4471
4472
10.1k
        if (handle_data)
4473
5.53k
            uuid = handle_data->uuid;
4474
10.1k
    }
4475
4476
10.1k
    return uuid;
4477
10.1k
}
4478
4479
static uint16_t
4480
get_gatt_service_handle_from_handle(packet_info *pinfo, uint32_t handle,
4481
    btl2cap_data_t *l2cap_data)
4482
0
{
4483
0
    wmem_tree_key_t  key[5];
4484
0
    uint32_t         frame_number, direction;
4485
0
    handle_data_t   *handle_data;
4486
0
    wmem_tree_t     *sub_wmemtree;
4487
4488
0
    if (l2cap_data) {
4489
0
        frame_number = pinfo->num;
4490
0
        direction = pinfo->p2p_dir;
4491
4492
0
        key[0].length = 1;
4493
0
        key[0].key    = &l2cap_data->interface_id;
4494
0
        key[1].length = 1;
4495
0
        key[1].key    = &l2cap_data->adapter_id;
4496
0
        key[2].length = 1;
4497
0
        key[2].key    = &direction;
4498
0
        key[3].length = 1;
4499
0
        key[3].key    = &handle;
4500
0
        key[4].length = 0;
4501
0
        key[4].key    = NULL;
4502
4503
0
        while (handle > 0) {
4504
0
            sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4505
0
            handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4506
4507
0
            if (handle_data && handle_data->type == ATTRIBUTE_TYPE_SERVICE) {
4508
0
                return handle;
4509
0
            }
4510
4511
0
            handle -= 1;
4512
0
        }
4513
0
    }
4514
4515
0
    return 0;
4516
0
}
4517
4518
static uint16_t
4519
get_gatt_char_decl_handle_from_handle(packet_info *pinfo, uint32_t handle,
4520
    btl2cap_data_t *l2cap_data)
4521
0
{
4522
0
    wmem_tree_key_t  key[5];
4523
0
    uint32_t         frame_number, direction;
4524
0
    handle_data_t   *handle_data;
4525
0
    wmem_tree_t     *sub_wmemtree;
4526
4527
0
    if (l2cap_data) {
4528
0
        frame_number = pinfo->num;
4529
0
        direction = pinfo->p2p_dir;
4530
4531
0
        key[0].length = 1;
4532
0
        key[0].key    = &l2cap_data->interface_id;
4533
0
        key[1].length = 1;
4534
0
        key[1].key    = &l2cap_data->adapter_id;
4535
0
        key[2].length = 1;
4536
0
        key[2].key    = &direction;
4537
0
        key[3].length = 1;
4538
0
        key[3].key    = &handle;
4539
0
        key[4].length = 0;
4540
0
        key[4].key    = NULL;
4541
4542
0
        while (handle > 0) {
4543
0
            sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4544
0
            handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4545
4546
0
            if (handle_data) {
4547
0
                if ((handle_data->uuid.bt_uuid == UUID_GATT_INCLUDE_DECLARATION) ||
4548
0
                    (handle_data->uuid.bt_uuid == UUID_GATT_CHARACTERISTIC_DECLARATION)) {
4549
0
                    return handle;
4550
0
                }
4551
0
            }
4552
4553
0
            handle -= 1;
4554
0
        }
4555
0
    }
4556
4557
0
    return 0;
4558
0
}
4559
4560
static bluetooth_uuid_t
4561
get_service_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
4562
        btl2cap_data_t *l2cap_data)
4563
11.4k
{
4564
11.4k
    wmem_tree_key_t  key[5];
4565
11.4k
    uint32_t         frame_number, direction;
4566
11.4k
    handle_data_t   *handle_data;
4567
11.4k
    wmem_tree_t     *sub_wmemtree;
4568
11.4k
    bluetooth_uuid_t uuid;
4569
4570
11.4k
    memset(&uuid, 0, sizeof uuid);
4571
4572
11.4k
    if (l2cap_data) {
4573
11.4k
        frame_number = pinfo->num;
4574
11.4k
        direction = get_handle_db_direction(opcode, pinfo->p2p_dir);
4575
4576
11.4k
        key[0].length = 1;
4577
11.4k
        key[0].key    = &l2cap_data->interface_id;
4578
11.4k
        key[1].length = 1;
4579
11.4k
        key[1].key    = &l2cap_data->adapter_id;
4580
11.4k
        key[2].length = 1;
4581
11.4k
        key[2].key    = &direction;
4582
11.4k
        key[3].length = 1;
4583
11.4k
        key[3].key    = &handle;
4584
11.4k
        key[4].length = 0;
4585
11.4k
        key[4].key    = NULL;
4586
4587
231M
        while (handle > 0) {
4588
231M
            sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4589
231M
            handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4590
4591
231M
            if (handle_data && handle_data->type == ATTRIBUTE_TYPE_SERVICE) {
4592
0
                uuid = handle_data->uuid;
4593
0
                return uuid;
4594
0
            }
4595
4596
231M
            handle -= 1;
4597
231M
        }
4598
11.4k
    }
4599
4600
11.4k
    return uuid;
4601
11.4k
}
4602
4603
static bluetooth_uuid_t
4604
get_characteristic_uuid_from_handle(packet_info *pinfo, uint32_t handle, uint8_t opcode,
4605
        btl2cap_data_t *l2cap_data)
4606
10.1k
{
4607
10.1k
    wmem_tree_key_t  key[5];
4608
10.1k
    uint32_t         frame_number, direction;
4609
10.1k
    handle_data_t   *handle_data;
4610
10.1k
    wmem_tree_t     *sub_wmemtree;
4611
10.1k
    bluetooth_uuid_t uuid;
4612
4613
10.1k
    memset(&uuid, 0, sizeof uuid);
4614
4615
10.1k
    if (l2cap_data) {
4616
10.1k
        frame_number = pinfo->num;
4617
10.1k
        direction = get_handle_db_direction(opcode, pinfo->p2p_dir);
4618
4619
10.1k
        key[0].length = 1;
4620
10.1k
        key[0].key    = &l2cap_data->interface_id;
4621
10.1k
        key[1].length = 1;
4622
10.1k
        key[1].key    = &l2cap_data->adapter_id;
4623
10.1k
        key[2].length = 1;
4624
10.1k
        key[2].key    = &direction;
4625
10.1k
        key[3].length = 1;
4626
10.1k
        key[3].key    = &handle;
4627
10.1k
        key[4].length = 0;
4628
10.1k
        key[4].key    = NULL;
4629
4630
231M
        while (handle > 0) {
4631
231M
            sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(handle_to_uuid, key);
4632
231M
            handle_data = (sub_wmemtree) ? (handle_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
4633
4634
231M
            if (handle_data && handle_data->type == ATTRIBUTE_TYPE_SERVICE)
4635
0
                return uuid;
4636
4637
231M
            if (handle_data && handle_data->type == ATTRIBUTE_TYPE_CHARACTERISTIC) {
4638
0
                uuid = handle_data->uuid;
4639
0
                return uuid;
4640
0
            }
4641
4642
231M
            handle -= 1;
4643
231M
        }
4644
10.1k
    }
4645
4646
10.1k
    return uuid;
4647
10.1k
}
4648
4649
static void col_append_info_by_handle(packet_info *pinfo, uint16_t handle, uint8_t opcode, btl2cap_data_t *l2cap_data)
4650
2.96k
{
4651
2.96k
    bluetooth_uuid_t   service_uuid;
4652
2.96k
    bluetooth_uuid_t   characteristic_uuid;
4653
2.96k
    bluetooth_uuid_t   uuid;
4654
4655
2.96k
    if (!l2cap_data)
4656
0
        return;
4657
4658
2.96k
    service_uuid = get_service_uuid_from_handle(pinfo, handle, opcode, l2cap_data);
4659
2.96k
    characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, handle, opcode, l2cap_data);
4660
2.96k
    uuid = get_gatt_bluetooth_uuid_from_handle(pinfo, handle, opcode, l2cap_data);
4661
4662
4663
2.96k
    if (!memcmp(&service_uuid, &uuid, sizeof(uuid))) {
4664
24
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Handle: 0x%04x (%s)",
4665
24
                handle, print_bluetooth_uuid(&uuid));
4666
2.93k
    } else if (!memcmp(&characteristic_uuid, &uuid, sizeof(uuid))) {
4667
0
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Handle: 0x%04x (%s: %s)",
4668
0
                handle, print_bluetooth_uuid(&service_uuid), print_bluetooth_uuid(&uuid));
4669
2.93k
    } else {
4670
2.93k
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Handle: 0x%04x (%s: %s: %s)",
4671
2.93k
                handle, print_bluetooth_uuid(&service_uuid), print_bluetooth_uuid(&characteristic_uuid), print_bluetooth_uuid(&uuid));
4672
2.93k
    }
4673
2.96k
}
4674
4675
static int dissect_gatt_uuid(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset)
4676
1
{
4677
1
    proto_item       *sub_item;
4678
1
    bluetooth_uuid_t  sub_uuid;
4679
4680
1
    if (tvb_reported_length_remaining(tvb, offset) == 2) {
4681
0
        proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4682
        /* TODO: want to do this and show? */
4683
        /* sub_uuid = get_bluetooth_uuid(tvb, offset, 2); */
4684
0
        offset += 2;
4685
1
    } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
4686
0
        sub_item = proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
4687
0
        sub_uuid = get_bluetooth_uuid(tvb, offset, 16);
4688
0
        proto_item_append_text(sub_item, " (%s)", print_bluetooth_uuid(&sub_uuid));
4689
0
        offset += 16;
4690
1
    } else {
4691
1
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
4692
1
        expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
4693
1
        offset = tvb_captured_length(tvb);
4694
1
    }
4695
4696
1
    return offset;
4697
1
}
4698
4699
static int
4700
dissect_handle(proto_tree *tree, packet_info *pinfo, int hf,
4701
        tvbuff_t *tvb, int offset, btl2cap_data_t *l2cap_data,
4702
        bluetooth_uuid_t *uuid, int32_t handle, uint8_t opcode)
4703
7.19k
{
4704
7.19k
    proto_item        *handle_item;
4705
7.19k
    proto_item        *sub_item;
4706
7.19k
    proto_tree        *sub_tree;
4707
7.19k
    bluetooth_uuid_t   service_uuid;
4708
7.19k
    bluetooth_uuid_t   characteristic_uuid;
4709
7.19k
    bluetooth_uuid_t   attribute_uuid;
4710
4711
7.19k
    if (handle == HANDLE_TVB) {
4712
7.19k
        handle_item = proto_tree_add_item(tree, hf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4713
7.19k
        handle = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
4714
7.19k
    } else if (handle >= 0 && handle <= UINT16_MAX) {
4715
0
        handle_item = proto_tree_add_uint(tree, hf, tvb, 0, 0, handle);
4716
0
        proto_item_set_generated(handle_item);
4717
0
    } else {
4718
0
        DISSECTOR_ASSERT_NOT_REACHED();
4719
0
    }
4720
4721
7.19k
    service_uuid = get_service_uuid_from_handle(pinfo, (uint16_t) handle, opcode, l2cap_data);
4722
7.19k
    characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, (uint16_t) handle, opcode, l2cap_data);
4723
7.19k
    attribute_uuid = get_gatt_bluetooth_uuid_from_handle(pinfo, (uint16_t) handle, opcode, l2cap_data);
4724
4725
7.19k
    proto_item_append_text(handle_item, " (");
4726
7.19k
    if (memcmp(&service_uuid, &attribute_uuid, sizeof(attribute_uuid))) {
4727
2.59k
        if (service_uuid.size == 2 || service_uuid.size == 16) {
4728
0
            proto_item_append_text(handle_item, "%s: ", print_bluetooth_uuid(&service_uuid));
4729
0
            sub_tree = proto_item_add_subtree(handle_item, ett_btatt_handle);
4730
4731
0
            if (service_uuid.size == 2)
4732
0
                sub_item = proto_tree_add_uint(sub_tree, hf_btatt_service_uuid16, tvb, 0, 0, service_uuid.bt_uuid);
4733
0
            else
4734
0
                sub_item = proto_tree_add_bytes_with_length(sub_tree, hf_btatt_service_uuid128, tvb, 0, 0, service_uuid.data, 16);
4735
4736
0
            proto_item_set_generated(sub_item);
4737
0
        }
4738
2.59k
    }
4739
4740
7.19k
    if (memcmp(&characteristic_uuid, &attribute_uuid, sizeof(attribute_uuid))) {
4741
2.59k
        if (characteristic_uuid.size == 2 || characteristic_uuid.size == 16) {
4742
0
            proto_item_append_text(handle_item, "%s: ", print_bluetooth_uuid(&characteristic_uuid));
4743
0
            sub_tree = proto_item_add_subtree(handle_item, ett_btatt_handle);
4744
4745
0
            if (characteristic_uuid.size == 2)
4746
0
                sub_item = proto_tree_add_uint(sub_tree, hf_btatt_characteristic_uuid16, tvb, 0, 0, characteristic_uuid.bt_uuid);
4747
0
            else
4748
0
                sub_item = proto_tree_add_bytes_with_length(sub_tree, hf_btatt_characteristic_uuid128, tvb, 0, 0, characteristic_uuid.data, 16);
4749
4750
0
            proto_item_set_generated(sub_item);
4751
0
        }
4752
2.59k
    }
4753
4754
7.19k
    proto_item_append_text(handle_item, "%s)", print_bluetooth_uuid(&attribute_uuid));
4755
7.19k
    if (attribute_uuid.size == 2 || attribute_uuid.size == 16) {
4756
2.59k
        sub_tree = proto_item_add_subtree(handle_item, ett_btatt_handle);
4757
4758
2.59k
        if (attribute_uuid.size == 2)
4759
1.95k
            sub_item = proto_tree_add_uint(sub_tree, hf_btatt_uuid16, tvb, 0, 0, attribute_uuid.bt_uuid);
4760
641
        else
4761
641
            sub_item = proto_tree_add_bytes_with_length(sub_tree, hf_btatt_uuid128, tvb, 0, 0, attribute_uuid.data, 16);
4762
4763
2.59k
        proto_item_set_generated(sub_item);
4764
2.59k
    }
4765
4766
7.19k
    if (uuid)
4767
2.88k
        *uuid = attribute_uuid;
4768
4769
7.19k
    return offset + 2;
4770
7.19k
}
4771
4772
static int
4773
btatt_dissect_attribute_handle(uint16_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, btatt_data_t *att_data);
4774
4775
static int
4776
btatt_call_dissector_by_dissector_name_with_data(const char *dissector_name,
4777
        tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
4778
10
{
4779
10
    dissector_handle_t handle;
4780
4781
10
    handle = find_dissector(dissector_name);
4782
10
    if (handle != NULL)
4783
10
        return call_dissector_with_data(handle, tvb, pinfo, tree, data);
4784
0
    else
4785
0
        REPORT_DISSECTOR_BUG("Dissector %s not registered", dissector_name);
4786
10
}
4787
4788
/*
4789
    dissects attribute handle and takes care of reassembly:
4790
    If sub-dissector sets pinfo->deseg_offset >0 && < pktlen the leftover bytes are stored and front-attached to the next packet
4791
    returns 0 if paket was not handled
4792
    returns #bytes consumed
4793
*/
4794
static int
4795
4.13k
btatt_dissect_with_reassmbly(uint16_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, btatt_data_t *att_data){
4796
    /*
4797
     * Cases
4798
     * 1) single paket: deseg_len=0 deseg_offset=pktlen oder 0??
4799
     * 2) start stream: deseg_len=MORE_BYTE   deseg_offset>-1<pktlen -> partially consumed, store fragment, finish
4800
     * 3) cont stream:  deseg_len=MORE_BYTE   deseg_offset=-1 (due to header mismatch) -> not consumed, add previous fragment, run again
4801
     * 4) end stream: deseg_len=0              deseg_offset=pktlen -> completely consumed, return pktlen
4802
     *
4803
     * case 3 can lead to case 2 -> stop fragment stream, create new fragment stream
4804
     * */
4805
4.13k
    unsigned consumed;
4806
4.13k
    bool save_fragmented;
4807
4.13k
    bool more_fragments = false;
4808
4.13k
    int          offset = 0;
4809
    // do not test for (PINFO_FD_VISITED(pinfo)) otherwise the lua dissector is not added
4810
4811
4.13k
again:
4812
4.13k
    pinfo->desegment_offset = -1;
4813
4.13k
    pinfo->desegment_len = 0;
4814
4.13k
    consumed = btatt_dissect_attribute_handle(handle, tvb, pinfo, tree, att_data);
4815
4816
    //consumed == 0: paket was rejected by subdissector, do not test for fragmentation
4817
4.13k
    if (!(consumed == 0 && pinfo->desegment_len == 0))
4818
0
    {
4819
0
        uint32_t msg_seqid = handle << 16 | ( att_data->opcode & 0xffff);
4820
0
        pinfo->srcport = handle;
4821
0
        pinfo->destport =  att_data->opcode;
4822
0
        if ((unsigned)pinfo->desegment_offset == tvb_captured_length(tvb))
4823
0
        {
4824
            // case 1
4825
0
            more_fragments = false;
4826
0
        }
4827
0
        if (pinfo->desegment_offset > -1 && (unsigned)pinfo->desegment_offset < tvb_captured_length(tvb))
4828
0
        {
4829
            // case 2
4830
            //drop leftovers before a fresh fragment ist started
4831
0
            tvbuff_t *old_tvb_data = fragment_delete(&msg_reassembly_table, pinfo, msg_seqid, NULL);
4832
0
            if (old_tvb_data)
4833
0
                tvb_free(old_tvb_data);
4834
0
            more_fragments = true;
4835
0
        }
4836
0
        if (pinfo->desegment_offset == -1)
4837
0
        {
4838
            // case 3
4839
0
            more_fragments = false;
4840
0
        }
4841
0
        if (pinfo->desegment_offset == -1 && consumed == tvb_captured_length(tvb))
4842
0
        {
4843
            // case 4
4844
0
            more_fragments = false;
4845
0
        }
4846
4847
0
        save_fragmented = pinfo->fragmented;
4848
0
        if (consumed < tvb_captured_length(tvb))
4849
0
        {
4850
0
            offset = (pinfo->desegment_offset==-1?0:pinfo->desegment_offset);
4851
0
            tvbuff_t *new_tvb = NULL;
4852
0
            fragment_head *frag_msg = NULL;
4853
0
            pinfo->fragmented = true;
4854
0
            frag_msg = fragment_add_seq_next(&msg_reassembly_table,
4855
0
                                             tvb, offset, pinfo,
4856
0
                                             msg_seqid, NULL,                            /* ID for fragments belonging together */
4857
0
                                             tvb_captured_length_remaining(tvb, offset),
4858
0
                                             more_fragments);                            /* More fragments? */
4859
4860
0
            new_tvb = process_reassembled_data(tvb, offset, pinfo,
4861
0
                                               "Reassembled Message", frag_msg, &msg_frag_items,
4862
0
                                               NULL, tree);
4863
4864
0
            if (frag_msg)
4865
0
            { /* Reassembled */
4866
0
                col_append_str(pinfo->cinfo, COL_INFO,
4867
0
                               "Last Pckt (Message Reassembled)");
4868
0
            }
4869
0
            else
4870
0
            { /* Not last packet of reassembled Short Message */
4871
0
                col_append_fstr(pinfo->cinfo, COL_INFO,
4872
0
                                "(Message fragment %u)", pinfo->num);
4873
0
            }
4874
4875
0
            pinfo->fragmented = save_fragmented;
4876
            //Reassembly buffer is empty but reassembly requested. break the loop
4877
0
            if (new_tvb && (tvb_captured_length(tvb) == tvb_captured_length(new_tvb)))
4878
0
                return 0;
4879
0
            if (new_tvb)
4880
0
            { /* take it all */
4881
0
                tvb = new_tvb;
4882
0
                goto again;
4883
0
            }
4884
0
            return offset;
4885
0
        }
4886
0
    }
4887
4.13k
    return 0;
4888
4.13k
}
4889
4890
4891
static unsigned
4892
add_item_btatt_time(proto_tree *tree, tvbuff_t *tvb, unsigned offset)
4893
4
{
4894
4
    proto_tree_add_item(tree, hf_btatt_year, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4895
4
    offset += 2;
4896
4897
4
    proto_tree_add_item(tree, hf_btatt_month, tvb, offset, 1, ENC_NA);
4898
4
    offset += 1;
4899
4900
4
    proto_tree_add_item(tree, hf_btatt_day, tvb, offset, 1, ENC_NA);
4901
4
    offset += 1;
4902
4903
4
    proto_tree_add_item(tree, hf_btatt_hours, tvb, offset, 1, ENC_NA);
4904
4
    offset += 1;
4905
4906
4
    proto_tree_add_item(tree, hf_btatt_minutes, tvb, offset, 1, ENC_NA);
4907
4
    offset += 1;
4908
4909
4
    proto_tree_add_item(tree, hf_btatt_seconds, tvb, offset, 1, ENC_NA);
4910
4
    offset += 1;
4911
4912
4
    return offset;
4913
4
}
4914
4915
static unsigned
4916
add_item_btatt_timestamp(proto_tree *tree, int hf_index, tvbuff_t *tvb, unsigned offset)
4917
1
{
4918
1
    proto_item  *sub_item;
4919
1
    proto_tree  *sub_tree;
4920
4921
1
    sub_item = proto_tree_add_item(tree, hf_index, tvb, offset, 7, ENC_NA);
4922
1
    sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
4923
4924
1
    proto_item_append_text(sub_item, ": %04u-%02u-%02u %02u:%02u:%02u",
4925
1
        tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN),
4926
1
        tvb_get_uint8(tvb, offset + 2),
4927
1
        tvb_get_uint8(tvb, offset + 3),
4928
1
        tvb_get_uint8(tvb, offset + 4),
4929
1
        tvb_get_uint8(tvb, offset + 5),
4930
1
        tvb_get_uint8(tvb, offset + 6));
4931
4932
1
   return add_item_btatt_time(sub_tree, tvb, offset);
4933
1
}
4934
4935
static int
4936
dissect_attribute_value(proto_tree *tree, proto_item *patron_item, packet_info *pinfo, tvbuff_t *old_tvb,
4937
        int old_offset, int length, uint16_t handle, bluetooth_uuid_t uuid, btatt_data_t *att_data)
4938
4.13k
{
4939
4.13k
    proto_item  *sub_item;
4940
4.13k
    proto_tree  *sub_tree = NULL;
4941
4.13k
    tvbuff_t    *tvb;
4942
4.13k
    unsigned     offset = 0;
4943
4.13k
    bluetooth_uuid_t sub_uuid;
4944
4.13k
    bluetooth_uuid_t service_uuid;
4945
4.13k
    uint16_t     sub_handle;
4946
4.13k
    uint32_t     value;
4947
4.13k
    uint32_t     flags;
4948
4.13k
    uint32_t     operator_value;
4949
4.13k
    uint32_t     opcode;
4950
4.13k
    uint32_t     operand_offset;
4951
4.13k
    uint32_t     interface_id;
4952
4.13k
    uint32_t     adapter_id;
4953
4.13k
    int * const *hfs;
4954
4.13k
    btl2cap_data_t *l2cap_data = NULL;
4955
4956
4.13k
    tvb = tvb_new_subset_length(old_tvb, old_offset, length);
4957
4958
4.13k
    DISSECTOR_ASSERT(att_data);
4959
4960
4.13k
    l2cap_data = att_data->l2cap_data;
4961
4.13k
    att_data->handle = handle;
4962
4963
4.13k
    if (p_get_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE) == NULL) {
4964
974
        uint16_t *value_data;
4965
4966
974
        value_data = wmem_new(wmem_file_scope(), uint16_t);
4967
974
        *value_data = handle;
4968
4969
974
        p_add_proto_data(pinfo->pool, pinfo, proto_btatt, PROTO_DATA_BTATT_HANDLE, value_data);
4970
974
    }
4971
4972
4.13k
    offset = btatt_dissect_with_reassmbly(handle,tvb,pinfo,tree,att_data);
4973
4.13k
    if (offset == tvb_captured_length(tvb))
4974
2.87k
        return old_offset + offset;
4975
4976
1.25k
    if (p_get_proto_data(pinfo->pool, pinfo, proto_bluetooth, PROTO_DATA_BLUETOOTH_SERVICE_UUID) == NULL) {
4977
947
        char *value_data;
4978
4979
947
        value_data = wmem_strdup(wmem_file_scope(), print_numeric_bluetooth_uuid(pinfo->pool, &uuid));
4980
4981
947
        p_add_proto_data(pinfo->pool, pinfo, proto_bluetooth, PROTO_DATA_BLUETOOTH_SERVICE_UUID, value_data);
4982
947
    }
4983
4984
1.25k
    service_uuid = get_service_uuid_from_handle(pinfo, handle, att_data->opcode, l2cap_data);
4985
1.25k
    offset = dissector_try_uint_with_data(att_service_dissector_table, service_uuid.bt_uuid, tvb, pinfo, tree, true, att_data);
4986
1.25k
    if (offset == tvb_captured_length(tvb))
4987
0
        return old_offset + offset;
4988
4989
    /* hier wird subdissector aufgerufen */
4990
    /* dort wird auch von einem neuen PAket ausgegangen, was es natürlich nicht ist, darum fehelern und kein subdissector aufgerufen*/
4991
1.25k
    if (dissector_try_string_with_data(bluetooth_uuid_table, print_numeric_bluetooth_uuid(pinfo->pool, &uuid), tvb, pinfo, tree, true, att_data))
4992
222
        return old_offset + length;
4993
1.03k
    else if (!uuid.bt_uuid) {
4994
17
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
4995
2
            return old_offset;
4996
4997
15
        proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
4998
4999
15
        return old_offset + tvb_captured_length(tvb);
5000
17
    }
5001
5002
1.01k
    switch (uuid.bt_uuid) {
5003
0
    case 0x2800: /* GATT Primary Service Declaration */
5004
0
    case 0x2801: /* GATT Secondary Service Declaration */
5005
0
        if (is_readable_request(att_data->opcode) || att_data->opcode == ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST)
5006
0
            break;
5007
5008
0
        if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE)
5009
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5010
5011
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5012
0
            break;
5013
5014
0
        if (tvb_reported_length_remaining(tvb, offset) == 2) {
5015
0
            proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5016
0
            sub_uuid = get_bluetooth_uuid(tvb, offset, 2);
5017
0
            proto_item_append_text(patron_item, ", UUID: %s", print_bluetooth_uuid(&sub_uuid));
5018
0
            offset += 2;
5019
5020
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(&sub_uuid));
5021
5022
0
            save_handle(pinfo, sub_uuid, handle, ATTRIBUTE_TYPE_SERVICE, l2cap_data);
5023
0
        }
5024
0
        else if (tvb_reported_length_remaining(tvb, offset) == 16)
5025
0
        {
5026
0
            proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
5027
0
            sub_uuid = get_bluetooth_uuid(tvb, offset, 16);
5028
0
            proto_item_append_text(patron_item, ", UUID128: %s", print_bluetooth_uuid(&sub_uuid));
5029
0
            offset += 16;
5030
5031
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(&sub_uuid));
5032
5033
0
            save_handle(pinfo, sub_uuid, handle, ATTRIBUTE_TYPE_SERVICE, l2cap_data);
5034
0
        }
5035
0
        else
5036
0
        {
5037
0
            sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
5038
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
5039
0
            offset = tvb_captured_length(tvb);
5040
0
        }
5041
5042
0
        break;
5043
2
    case 0x2802: /* GATT Include Declaration */
5044
2
        if (is_readable_request(att_data->opcode))
5045
0
            break;
5046
5047
2
        if (!is_readable_response(att_data->opcode))
5048
2
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5049
5050
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5051
0
            break;
5052
5053
2
        offset = dissect_handle(tree, pinfo, hf_btatt_included_service_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, att_data->opcode);
5054
2
        sub_handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
5055
5056
2
        proto_tree_add_item(tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5057
2
        offset += 2;
5058
5059
2
        proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5060
2
        sub_uuid = get_bluetooth_uuid(tvb, offset, 2);
5061
2
        proto_item_append_text(patron_item, ", Included Handle: 0x%04x, UUID: %s", sub_handle, print_bluetooth_uuid(&sub_uuid));
5062
2
        offset += 2;
5063
5064
2
        col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(&sub_uuid));
5065
5066
2
        save_handle(pinfo, sub_uuid, sub_handle, ATTRIBUTE_TYPE_OTHER, l2cap_data);
5067
5068
2
        break;
5069
0
    case 0x2803: /* GATT Characteristic Declaration*/
5070
0
        if (is_readable_request(att_data->opcode) || att_data->opcode == ATT_OPCODE_READ_BY_TYPE_REQUEST)
5071
0
            break;
5072
5073
0
        if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_READ_BY_TYPE_RESPONSE)
5074
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5075
5076
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5077
0
            break;
5078
5079
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_properties, ett_btatt_characteristic_properties,  hfx_btatt_characteristic_properties, ENC_NA);
5080
0
        offset += 1;
5081
5082
0
        offset = dissect_handle(tree, pinfo, hf_btatt_characteristic_value_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, att_data->opcode);
5083
0
        sub_handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
5084
5085
0
        if (tvb_reported_length_remaining(tvb, offset) == 16) {
5086
0
            proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
5087
0
            sub_uuid = get_bluetooth_uuid(tvb, offset, 16);
5088
0
            proto_item_append_text(patron_item, ", Characteristic Handle: 0x%04x, UUID128: %s", tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN), print_bluetooth_uuid(&sub_uuid));
5089
0
            offset += 16;
5090
5091
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(&sub_uuid));
5092
5093
0
            save_handle(pinfo, sub_uuid, sub_handle, ATTRIBUTE_TYPE_CHARACTERISTIC, l2cap_data);
5094
0
        }
5095
0
        else if (tvb_reported_length_remaining(tvb, offset) == 2)
5096
0
        {
5097
0
            proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5098
0
            sub_uuid = get_bluetooth_uuid(tvb, offset, 2);
5099
0
            proto_item_append_text(patron_item, ", Characteristic Handle: 0x%04x, UUID: %s", sub_handle, print_bluetooth_uuid(&sub_uuid));
5100
0
            offset += 2;
5101
5102
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", print_bluetooth_uuid(&sub_uuid));
5103
5104
0
            save_handle(pinfo, sub_uuid, sub_handle, ATTRIBUTE_TYPE_CHARACTERISTIC, l2cap_data);
5105
0
        } else {
5106
0
            sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
5107
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
5108
0
            offset = tvb_captured_length(tvb);
5109
0
        }
5110
5111
0
        break;
5112
0
    case 0x2900: /* Characteristic Extended Properties */
5113
0
        if (is_readable_request(att_data->opcode))
5114
0
            break;
5115
5116
0
        if (!is_readable_response(att_data->opcode))
5117
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5118
5119
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5120
0
            break;
5121
5122
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_extended_properties, ett_btatt_value, hfx_btatt_characteristic_extended_properties, ENC_LITTLE_ENDIAN);
5123
0
        offset += 2;
5124
5125
0
        break;
5126
0
    case 0x2901: /* Characteristic User Description */
5127
0
        if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5128
0
            break;
5129
5130
0
        if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5131
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5132
5133
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5134
0
            break;
5135
5136
0
        proto_tree_add_item(tree, hf_btatt_characteristic_user_description, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
5137
0
        offset += tvb_captured_length_remaining(tvb, offset);
5138
5139
0
        break;
5140
0
    case 0x2902: /* GATT: Client Characteristic Configuration */
5141
0
        if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
5142
0
            break;
5143
5144
0
        if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5145
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5146
5147
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5148
0
            break;
5149
5150
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_configuration_client, ett_btatt_value, hfx_btatt_characteristic_configuration_client, ENC_LITTLE_ENDIAN);
5151
0
        value = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
5152
0
        offset += 2;
5153
5154
0
        {
5155
0
        bluetooth_uuid_t   characteristic_uuid;
5156
5157
0
        characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, handle, att_data->opcode, l2cap_data);
5158
5159
0
        if (value & 0x1) switch (characteristic_uuid.bt_uuid) { /* Notification */
5160
0
        case 0x2A05: /* Service Changed */
5161
0
        case 0x2A1C: /* Temperature Measurement */
5162
0
        case 0x2A21: /* Measurement Interval */
5163
0
        case 0x2A35: /* Blood Pressure Measurement */
5164
0
        case 0x2A52: /* Record Access Control Point */
5165
0
        case 0x2A55: /* SC Control Point */
5166
0
        case 0x2A66: /* Cycling Power Control Point */
5167
0
        case 0x2A6B: /* LN Control Point */
5168
0
        case 0x2A99: /* Database Change Increment */
5169
0
        case 0x2A9C: /* Body Composition Measurement */
5170
0
        case 0x2A9D: /* Weight Measurement */
5171
0
        case 0x2A9F: /* User Control Point */
5172
0
        case 0x2ABC: /* TDS Control Point */
5173
0
        case 0x2AC5: /* Object Action Control Point */
5174
0
        case 0x2AC6: /* Object List Control Point */
5175
0
        case 0x2AC8: /* Object Changed */
5176
0
        case 0x2AC9: /* Resolvable Private Address */
5177
0
        case 0x2ACC: /* Fitness Machine Feature */
5178
0
        case 0x2AD4: /* Supported Speed Range */
5179
0
        case 0x2AD5: /* Supported Inclination Range */
5180
0
        case 0x2AD6: /* Supported Resistance Level Range */
5181
0
        case 0x2AD7: /* Supported Heart Rate Range */
5182
0
        case 0x2AD8: /* Supported Power Range */
5183
0
        case 0x2AD9: /* Fitness Machine Control Point */
5184
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5185
0
            break;
5186
5187
0
        case 0x2A18: /* Glucose Measurement */
5188
0
        case 0x2A19: /* Battery Level */
5189
0
        case 0x2A1E: /* Intermediate Temperature */
5190
0
        case 0x2A22: /* Boot Keyboard Input Report */
5191
0
        case 0x2A2C: /* Magnetic Declination */
5192
0
        case 0x2A2B: /* Current Time */
5193
0
        case 0x2A31: /* Scan Refresh */
5194
0
        case 0x2A33: /* Boot Mouse Input Report */
5195
0
        case 0x2A34: /* Glucose Measurement Context */
5196
0
        case 0x2A36: /* Intermediate Cuff Pressure */
5197
0
        case 0x2A37: /* Heart Rate Measurement */
5198
0
        case 0x2A3F: /* Alert Status */
5199
0
        case 0x2A45: /* Unread Alert Status */
5200
0
        case 0x2A46: /* New Alert */
5201
0
        case 0x2A4D: /* Report */
5202
0
        case 0x2A53: /* RSC Measurement */
5203
0
        case 0x2A56: /* Digital */
5204
0
        case 0x2A58: /* Analog */
5205
0
        case 0x2A5A: /* Aggregate */
5206
0
        case 0x2A5B: /* CSC Measurement */
5207
0
        case 0x2A63: /* Cycling Power Measurement */
5208
0
        case 0x2A64: /* Cycling Power Vector */
5209
0
        case 0x2A67: /* Location and Speed */
5210
0
        case 0x2A68: /* Navigation */
5211
0
        case 0x2A6C: /* Elevation */
5212
0
        case 0x2A6D: /* Pressure */
5213
0
        case 0x2A6E: /* Temperature */
5214
0
        case 0x2A6F: /* Humidity */
5215
0
        case 0x2A70: /* True Wind Speed */
5216
0
        case 0x2A71: /* True Wind Direction */
5217
0
        case 0x2A72: /* Apparent Wind Speed */
5218
0
        case 0x2A73: /* Apparent Wind Direction */
5219
0
        case 0x2A74: /* Gust Factor */
5220
0
        case 0x2A75: /* Pollen Concentration */
5221
0
        case 0x2A76: /* UV Index */
5222
0
        case 0x2A77: /* Irradiance */
5223
0
        case 0x2A78: /* Rainfall */
5224
0
        case 0x2A79: /* Wind Chill */
5225
0
        case 0x2A7A: /* Heat Index */
5226
0
        case 0x2A7B: /* Dew Point */
5227
0
        case 0x2AA0: /* Magnetic Flux Density - 2D */
5228
0
        case 0x2AA1: /* Magnetic Flux Density - 3D */
5229
0
        case 0x2AA3: /* Barometric Pressure Trend */
5230
0
        case 0x2AA7: /* CGM Measurement */
5231
0
        case 0x2AB8: /* HTTP Status Code */
5232
0
        case 0x2ACD: /* Treadmill Data */
5233
0
        case 0x2ACE: /* Cross Trainer Data */
5234
0
        case 0x2ACF: /* Step Climber Data */
5235
0
        case 0x2AD0: /* Stair Climber Data */
5236
0
        case 0x2AD1: /* Rower Data */
5237
0
        case 0x2AD2: /* Indoor Bike Data */
5238
0
        case 0x2AD3: /* Training Status */
5239
0
        case 0x2ADA: /* Fitness Machine Status */
5240
0
        default:
5241
            /* Supported */
5242
0
            break;
5243
0
        }
5244
5245
0
        if (value & 0x2) switch (characteristic_uuid.bt_uuid) { /* Indication */
5246
0
        case 0x2A18: /* Glucose Measurement */
5247
0
        case 0x2A19: /* Battery Level */
5248
0
        case 0x2A1E: /* Intermediate Temperature */
5249
0
        case 0x2A22: /* Boot Keyboard Input Report */
5250
0
        case 0x2A2B: /* Current Time */
5251
0
        case 0x2A2C: /* Magnetic Declination */
5252
0
        case 0x2A31: /* Scan Refresh */
5253
0
        case 0x2A33: /* Boot Mouse Input Report */
5254
0
        case 0x2A34: /* Glucose Measurement Context */
5255
0
        case 0x2A36: /* Intermediate Cuff Pressure */
5256
0
        case 0x2A37: /* Heart Rate Measurement */
5257
0
        case 0x2A3F: /* Alert Status */
5258
0
        case 0x2A45: /* Unread Alert Status */
5259
0
        case 0x2A46: /* New Alert */
5260
0
        case 0x2A4D: /* Report */
5261
0
        case 0x2A53: /* RSC Measurement */
5262
0
        case 0x2A5B: /* CSC Measurement */
5263
0
        case 0x2A63: /* Cycling Power Measurement */
5264
0
        case 0x2A64: /* Cycling Power Vector */
5265
0
        case 0x2A67: /* Location and Speed */
5266
0
        case 0x2A68: /* Navigation */
5267
0
        case 0x2A6C: /* Elevation */
5268
0
        case 0x2A6D: /* Pressure */
5269
0
        case 0x2A6E: /* Temperature */
5270
0
        case 0x2A6F: /* Humidity */
5271
0
        case 0x2A70: /* True Wind Speed */
5272
0
        case 0x2A71: /* True Wind Direction */
5273
0
        case 0x2A72: /* Apparent Wind Speed */
5274
0
        case 0x2A73: /* Apparent Wind Direction */
5275
0
        case 0x2A74: /* Gust Factor */
5276
0
        case 0x2A75: /* Pollen Concentration */
5277
0
        case 0x2A76: /* UV Index */
5278
0
        case 0x2A77: /* Irradiance */
5279
0
        case 0x2A78: /* Rainfall */
5280
0
        case 0x2A79: /* Wind Chill */
5281
0
        case 0x2A7A: /* Heat Index */
5282
0
        case 0x2A7B: /* Dew Point */
5283
0
        case 0x2AA0: /* Magnetic Flux Density - 2D */
5284
0
        case 0x2AA1: /* Magnetic Flux Density - 3D */
5285
0
        case 0x2AA3: /* Barometric Pressure Trend */
5286
0
        case 0x2AA7: /* CGM Measurement */
5287
0
        case 0x2AB8: /* HTTP Status Code */
5288
0
        case 0x2AC9: /* Resolvable Private Address */
5289
0
        case 0x2ACC: /* Fitness Machine Feature */
5290
0
        case 0x2ACD: /* Treadmill Data */
5291
0
        case 0x2ACE: /* Cross Trainer Data */
5292
0
        case 0x2ACF: /* Step Climber Data */
5293
0
        case 0x2AD0: /* Stair Climber Data */
5294
0
        case 0x2AD1: /* Rower Data */
5295
0
        case 0x2AD2: /* Indoor Bike Data */
5296
0
        case 0x2AD3: /* Training Status */
5297
0
        case 0x2AD4: /* Supported Speed Range */
5298
0
        case 0x2AD5: /* Supported Inclination Range */
5299
0
        case 0x2AD6: /* Supported Resistance Level Range */
5300
0
        case 0x2AD7: /* Supported Heart Rate Range */
5301
0
        case 0x2AD8: /* Supported Power Range */
5302
0
        case 0x2ADA: /* Fitness Machine Status */
5303
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5304
0
            break;
5305
5306
0
        case 0x2A05: /* Service Changed */
5307
0
        case 0x2A1C: /* Temperature Measurement */
5308
0
        case 0x2A21: /* Measurement Interval */
5309
0
        case 0x2A35: /* Blood Pressure Measurement */
5310
0
        case 0x2A52: /* Record Access Control Point */
5311
0
        case 0x2A55: /* SC Control Point */
5312
0
        case 0x2A56: /* Digital */
5313
0
        case 0x2A58: /* Analog */
5314
0
        case 0x2A5A: /* Aggregate */
5315
0
        case 0x2A66: /* Cycling Power Control Point */
5316
0
        case 0x2A6B: /* LN Control Point */
5317
0
        case 0x2A99: /* Database Change Increment */
5318
0
        case 0x2A9C: /* Body Composition Measurement */
5319
0
        case 0x2A9D: /* Weight Measurement */
5320
0
        case 0x2A9F: /* User Control Point */
5321
0
        case 0x2ABC: /* TDS Control Point */
5322
0
        case 0x2AC5: /* Object Action Control Point */
5323
0
        case 0x2AC6: /* Object List Control Point */
5324
0
        case 0x2AC8: /* Object Changed */
5325
0
        case 0x2AD9: /* Fitness Machine Control Point */
5326
0
        default:
5327
            /* Supported */
5328
0
            break;
5329
0
        }
5330
5331
0
        if (value > 0x3)
5332
0
            expert_add_info(pinfo, tree, &ei_btatt_bad_data);
5333
5334
0
        }
5335
5336
0
        break;
5337
0
    case 0x2903: /* Server Characteristic Configuration */
5338
0
        if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5339
0
            break;
5340
5341
0
        if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5342
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5343
5344
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5345
0
            break;
5346
5347
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_characteristic_configuration_server, ett_btatt_value, hfx_btatt_characteristic_configuration_server, ENC_LITTLE_ENDIAN);
5348
0
        offset += 2;
5349
5350
0
        break;
5351
0
    case 0x2904: /* Characteristic Presentation Format */
5352
0
        if (is_readable_request(att_data->opcode))
5353
0
            break;
5354
5355
0
        if (!is_readable_response(att_data->opcode))
5356
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5357
5358
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5359
0
            break;
5360
5361
0
        proto_tree_add_item(tree, hf_btatt_characteristic_presentation_format, tvb, offset, 1, ENC_NA);
5362
0
        offset += 1;
5363
5364
0
        proto_tree_add_item(tree, hf_btatt_characteristic_presentation_exponent, tvb, offset, 1, ENC_NA);
5365
0
        offset += 1;
5366
5367
0
        proto_tree_add_item(tree, hf_btatt_characteristic_presentation_unit, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5368
0
        offset += 2;
5369
5370
0
        proto_tree_add_item(tree, hf_btatt_characteristic_presentation_namespace, tvb, offset, 1, ENC_NA);
5371
0
        value = tvb_get_uint8(tvb, offset);
5372
0
        offset += 1;
5373
5374
0
        if (value == 0x01) /* Bluetooth SIG */
5375
0
            proto_tree_add_item(tree, hf_btatt_characteristic_presentation_namespace_description_btsig, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5376
0
        else
5377
0
            proto_tree_add_item(tree, hf_btatt_characteristic_presentation_namespace_description, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5378
0
        offset += 2;
5379
5380
0
        break;
5381
0
    case 0x2905: /* Characteristic Aggregate Format */
5382
0
        if (is_readable_request(att_data->opcode))
5383
0
            break;
5384
5385
0
        if (!is_readable_response(att_data->opcode))
5386
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5387
5388
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5389
0
            break;
5390
5391
0
        sub_item = proto_tree_add_none_format(tree, hf_btatt_handles_info,
5392
0
                tvb, offset, tvb_captured_length(tvb), "Handles (%i items)",
5393
0
                tvb_captured_length(tvb) / 2);
5394
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
5395
5396
0
        while (offset < (int64_t) tvb_captured_length(tvb)) {
5397
0
            offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, att_data->opcode);
5398
0
        }
5399
0
        break;
5400
0
    case 0x2906: /* Valid Range */ {
5401
0
        bluetooth_uuid_t     characteristic_uuid;
5402
0
        const char          *characteristic_dissector_name;
5403
0
        dissector_handle_t   characteristic_dissector;
5404
5405
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5406
0
            break;
5407
5408
0
        characteristic_uuid = get_characteristic_uuid_from_handle(pinfo, handle, att_data->opcode, l2cap_data);
5409
5410
0
        characteristic_dissector_name = wmem_strdup_printf(pinfo->pool, "btgatt.uuid0x%s", print_numeric_bluetooth_uuid(pinfo->pool, &characteristic_uuid));
5411
0
        characteristic_dissector = find_dissector(characteristic_dissector_name);
5412
5413
0
        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);
5414
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
5415
5416
0
        if (characteristic_dissector)
5417
0
            call_dissector_with_data(characteristic_dissector, tvb_new_subset_length(tvb, offset, tvb_reported_length_remaining(tvb, offset) / 2), pinfo, sub_tree, att_data);
5418
5419
0
        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);
5420
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
5421
5422
0
        if (characteristic_dissector)
5423
0
            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);
5424
5425
0
        offset += tvb_reported_length_remaining(tvb, offset);
5426
0
        }
5427
0
        break;
5428
0
    case 0x2907: /* External Report Reference */
5429
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
5430
0
            if (is_readable_request(att_data->opcode))
5431
0
                break;
5432
5433
0
            if (!is_readable_response(att_data->opcode))
5434
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5435
0
        }
5436
5437
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5438
0
            break;
5439
5440
0
        if (tvb_reported_length_remaining(tvb, offset) == 2) {
5441
0
            proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5442
0
            offset += 2;
5443
0
        } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
5444
0
            proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
5445
0
            offset += 16;
5446
0
        } else {
5447
0
            sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
5448
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
5449
0
            offset = tvb_captured_length(tvb);
5450
0
        }
5451
0
        break;
5452
0
    case 0x2908: /* GATT: Report Reference */
5453
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
5454
0
            if (is_readable_request(att_data->opcode))
5455
0
                break;
5456
5457
0
            if (!is_readable_response(att_data->opcode))
5458
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5459
0
        }
5460
5461
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5462
0
            break;
5463
5464
0
        proto_tree_add_item(tree, hf_btatt_report_reference_report_id, tvb, offset, 1, ENC_NA);
5465
0
        offset += 1;
5466
5467
0
        proto_tree_add_item(tree, hf_btatt_report_reference_report_type, tvb, offset, 1, ENC_NA);
5468
0
        offset += 1;
5469
5470
0
        break;
5471
0
    case 0x2909: /* Number of Digitals */
5472
0
        if (is_readable_request(att_data->opcode))
5473
0
            break;
5474
5475
0
        if (!is_readable_response(att_data->opcode))
5476
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5477
5478
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5479
0
            break;
5480
5481
0
        proto_tree_add_item(tree, hf_btatt_number_of_digitals, tvb, offset, 1, ENC_NA);
5482
0
        offset += 1;
5483
5484
0
        break;
5485
0
    case 0x290A: /* Value Trigger Setting */
5486
0
        if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5487
0
            break;
5488
5489
0
        if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5490
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5491
5492
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5493
0
            break;
5494
5495
0
        proto_tree_add_item(tree, hf_btatt_value_trigger_setting_condition, tvb, offset, 1, ENC_NA);
5496
0
        value = tvb_get_uint8(tvb, offset);
5497
0
        offset += 1;
5498
5499
0
        if (value >= 1 && value <= 3) {
5500
0
            proto_tree_add_item(tree, hf_btatt_value_trigger_setting_analog, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5501
0
            offset += 2;
5502
0
        } else if (value == 4) {
5503
0
            btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a56", tvb_new_subset_length(tvb, offset, 1), pinfo, tree, att_data);
5504
0
            offset += 1;
5505
0
        } else if (value == 5 || value == 6) {
5506
0
            proto_tree_add_item(tree, hf_btatt_value_trigger_setting_analog_one, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5507
0
            offset += 2;
5508
5509
0
            proto_tree_add_item(tree, hf_btatt_value_trigger_setting_analog_two, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5510
0
            offset += 2;
5511
0
        }
5512
5513
0
        break;
5514
0
    case 0x290B: /* Environmental Sensing Configuration */
5515
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5516
0
            break;
5517
5518
0
        proto_tree_add_item(tree, hf_btatt_esp_trigger_logic, tvb, offset, 1, ENC_NA);
5519
0
        offset += 1;
5520
5521
0
        break;
5522
0
    case 0x290C: /* Environmental Sensing Measurement */
5523
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5524
0
            break;
5525
5526
0
        proto_tree_add_item(tree, hf_btatt_esp_flags, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5527
0
        offset += 2;
5528
5529
0
        proto_tree_add_item(tree, hf_btatt_esp_sampling_function, tvb, offset, 1, ENC_NA);
5530
0
        offset += 1;
5531
5532
0
        proto_tree_add_item(tree, hf_btatt_esp_measurement_period, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5533
0
        offset += 3;
5534
5535
0
        proto_tree_add_item(tree, hf_btatt_esp_update_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5536
0
        offset += 3;
5537
5538
0
        proto_tree_add_item(tree, hf_btatt_esp_application, tvb, offset, 1, ENC_NA);
5539
0
        offset += 1;
5540
5541
0
        proto_tree_add_item(tree, hf_btatt_esp_measurement_uncertainty, tvb, offset, 1, ENC_NA);
5542
0
        offset += 1;
5543
5544
0
        break;
5545
0
    case 0x290D: /* Environmental Sensing Trigger Setting */
5546
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5547
0
            break;
5548
5549
0
        proto_tree_add_item(tree, hf_btatt_esp_condition, tvb, offset, 1, ENC_NA);
5550
0
        offset += 1;
5551
5552
0
        proto_tree_add_item(tree, hf_btatt_esp_operand, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
5553
0
        offset += tvb_captured_length_remaining(tvb, offset);
5554
0
        break;
5555
0
    case 0x290E: /* Time Trigger Setting */
5556
0
        if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5557
0
            break;
5558
5559
0
        if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5560
0
            expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5561
5562
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5563
0
            break;
5564
5565
0
        proto_tree_add_item(tree, hf_btatt_time_trigger_setting_condition, tvb, offset, 1, ENC_NA);
5566
0
        value = tvb_get_uint8(tvb, offset);
5567
0
        offset += 1;
5568
5569
0
        if (value == 0) {
5570
0
            proto_tree_add_item(tree, hf_btatt_time_trigger_setting_value, tvb, offset, 1, ENC_NA);
5571
0
            offset += 1;
5572
0
        } else if (value == 1 || value == 2) {
5573
0
            proto_tree_add_item(tree, hf_btatt_time_trigger_setting_value_time_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5574
0
            offset += 3;
5575
0
        } else if (value == 3) {
5576
0
            proto_tree_add_item(tree, hf_btatt_time_trigger_setting_value_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5577
0
            offset += 2;
5578
0
        }
5579
5580
0
        break;
5581
2
    case 0x2A00: /* Device Name */
5582
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5583
0
            break;
5584
5585
2
        proto_tree_add_item(tree, hf_btatt_device_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
5586
2
        offset += tvb_captured_length_remaining(tvb, offset);
5587
5588
2
        break;
5589
1
    case 0x2A01: /* Appearance */
5590
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5591
0
            break;
5592
5593
1
        switch ((tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN) & 0xFFC0) >> 6) {
5594
0
        case 0x003: /* Watch */
5595
0
            hfs = hfx_btatt_appearance_watch;
5596
0
            break;
5597
5598
0
        case 0x00C: /* Thermometer */
5599
0
            hfs = hfx_btatt_appearance_thermometer;
5600
0
            break;
5601
5602
0
        case 0x00D: /* Heart Rate Sensor */
5603
0
            hfs = hfx_btatt_appearance_heart_rate;
5604
0
            break;
5605
5606
0
        case 0x00E: /* Blood Pressure */
5607
0
            hfs = hfx_btatt_appearance_blood_pressure;
5608
0
            break;
5609
5610
0
        case 0x00F: /* HID */
5611
0
            hfs = hfx_btatt_appearance_hid;
5612
0
            break;
5613
5614
0
        case 0x011: /* Running Walking Sensor */
5615
0
            hfs = hfx_btatt_appearance_running_walking_sensor;
5616
0
            break;
5617
5618
0
        case 0x012: /* Cycling */
5619
0
            hfs = hfx_btatt_appearance_cycling;
5620
0
            break;
5621
5622
0
        case 0x031: /* Pulse Oximeter */
5623
0
            hfs = hfx_btatt_appearance_pulse_oximeter;
5624
0
            break;
5625
5626
0
        case 0x033: /* Personal Mobility Device */
5627
0
            hfs = hfx_btatt_appearance_personal_mobility_device;
5628
0
            break;
5629
5630
0
        case 0x035: /* Insulin Pump */
5631
0
            hfs = hfx_btatt_appearance_insulin_pump;
5632
0
            break;
5633
5634
0
        case 0x051: /* Outdoor Sports Activity */
5635
0
            hfs = hfx_btatt_appearance_outdoor_sports_activity;
5636
0
            break;
5637
5638
1
        default:
5639
1
            hfs = hfx_btatt_appearance;
5640
1
        }
5641
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_appearance, ett_btatt_value, hfs, ENC_LITTLE_ENDIAN);
5642
1
        offset += 2;
5643
5644
1
        break;
5645
0
    case 0x2A02: /* Peripheral Privacy Flag */
5646
0
        if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
5647
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5648
0
                break;
5649
5650
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
5651
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5652
0
        }
5653
5654
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5655
0
            break;
5656
5657
0
        proto_tree_add_item(tree, hf_btatt_peripheral_privacy_flag, tvb, offset, 1, ENC_NA);
5658
0
        offset += 1;
5659
5660
0
        break;
5661
0
    case 0x2A03: /* Reconnection Address */
5662
0
        if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
5663
0
            if (is_writeable_response(att_data->opcode))
5664
0
                break;
5665
5666
0
            if (!is_writeable_request(att_data->opcode))
5667
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5668
0
        }
5669
5670
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5671
0
            break;
5672
5673
0
        if (l2cap_data) {
5674
0
            interface_id = l2cap_data->interface_id;
5675
0
            adapter_id = l2cap_data->adapter_id;
5676
0
        } else {
5677
0
            interface_id = adapter_id = 0;
5678
0
        }
5679
0
        offset = dissect_bd_addr(hf_btatt_reconnection_address, pinfo, tree, tvb, offset, false, interface_id, adapter_id, NULL);
5680
5681
0
        break;
5682
0
    case 0x2A04: /* Peripheral Preferred Connection Parameters */
5683
0
        if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
5684
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
5685
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5686
0
        }
5687
5688
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5689
0
            break;
5690
5691
0
        proto_tree_add_item(tree, hf_btatt_minimum_connection_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5692
0
        offset += 2;
5693
5694
0
        proto_tree_add_item(tree, hf_btatt_maximum_connection_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5695
0
        offset += 2;
5696
5697
0
        proto_tree_add_item(tree, hf_btatt_peripheral_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5698
0
        offset += 2;
5699
5700
0
        proto_tree_add_item(tree, hf_btatt_connection_supervision_timeout_multiplier, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5701
0
        offset += 2;
5702
5703
0
        break;
5704
2
    case 0x2A05: /* Service Changed */
5705
2
        if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ATTRIBUTE_PROFILE) {
5706
0
            if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
5707
0
                break;
5708
5709
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
5710
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5711
0
        }
5712
5713
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5714
0
            break;
5715
5716
2
        proto_tree_add_item(tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5717
2
        offset += 2;
5718
5719
2
        proto_tree_add_item(tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5720
2
        offset += 2;
5721
5722
2
        break;
5723
0
    case 0x2A06: /* Alert Level */
5724
0
        if (service_uuid.bt_uuid == GATT_SERVICE_IMMEDIATE_ALERT) {
5725
0
            if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
5726
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5727
0
        } else if (service_uuid.bt_uuid == GATT_SERVICE_LINK_LOSS) {
5728
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5729
0
                break;
5730
5731
0
            if (!is_readable_response(att_data->opcode) &&
5732
0
                    !is_writeable_request(att_data->opcode))
5733
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5734
0
        }
5735
5736
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5737
0
            break;
5738
5739
0
        proto_tree_add_item(tree, hf_btatt_alert_level, tvb, offset, 1, ENC_NA);
5740
0
        offset += 1;
5741
5742
0
        break;
5743
0
    case 0x2A07: /* Tx Power Level */
5744
0
        if (service_uuid.bt_uuid == GATT_SERVICE_TX_POWER) {
5745
0
            if (is_readable_request(att_data->opcode))
5746
0
                break;
5747
5748
0
            if (!is_readable_response(att_data->opcode))
5749
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5750
0
        }
5751
5752
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5753
0
            break;
5754
5755
0
        proto_tree_add_item(tree, hf_btatt_tx_power_level, tvb, offset, 1, ENC_NA);
5756
0
        offset += 1;
5757
5758
0
        break;
5759
0
    case 0x2A08: /* Date Time */
5760
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5761
0
            break;
5762
5763
0
        offset = add_item_btatt_time(tree, tvb, offset);
5764
5765
0
        break;
5766
1
    case 0x2A09: /* Day of Week */
5767
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5768
0
            break;
5769
5770
1
        proto_tree_add_item(tree, hf_btatt_day_of_week, tvb, offset, 1, ENC_NA);
5771
1
        offset += 1;
5772
5773
1
        break;
5774
0
    case 0x2A0A: /* Day Date Time */
5775
2
    case 0x2A0B: /* Exact Time 100 */  /* APPROVED: NO */
5776
2
    case 0x2A0C: /* Exact Time 256 */
5777
3
    case 0x2A2B: /* Current Time */
5778
3
        if (uuid.bt_uuid == 0x2A2B) {/* Current Time */
5779
1
            if (service_uuid.bt_uuid == GATT_SERVICE_CURRENT_TIME_SERVICE) {
5780
0
                if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5781
0
                    break;
5782
5783
0
                if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) &&
5784
0
                        att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
5785
0
                    expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5786
0
            }
5787
1
        }
5788
5789
3
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5790
0
            break;
5791
5792
3
        offset = add_item_btatt_time(tree, tvb, offset);
5793
5794
3
        proto_tree_add_item(tree, hf_btatt_day_of_week, tvb, offset, 1, ENC_NA);
5795
3
        offset += 1;
5796
5797
3
        if (uuid.bt_uuid == 0x2A0C || uuid.bt_uuid == 0x2A2B) {
5798
1
            proto_tree_add_item(tree, hf_btatt_fractions256, tvb, offset, 1, ENC_NA);
5799
1
            offset += 1;
5800
2
        } else if (uuid.bt_uuid == 0x2A0B) {
5801
2
            proto_tree_add_item(tree, hf_btatt_fractions100, tvb, offset, 1, ENC_NA);
5802
2
            offset += 1;
5803
2
        }
5804
5805
3
        if (uuid.bt_uuid == 0x2A2B) {
5806
1
            proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_time_adjust_reason, ett_btatt_value, hfx_btatt_time_adjust_reason, ENC_NA);
5807
1
            offset += 1;
5808
1
        }
5809
5810
3
        break;
5811
0
    case 0x2A0D: /* DST Offset */
5812
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5813
0
            break;
5814
5815
0
        proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
5816
0
        offset += 1;
5817
5818
0
        break;
5819
0
    case 0x2A0E: /* Time Zone */
5820
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5821
0
            break;
5822
5823
0
        proto_tree_add_item(tree, hf_btatt_timezone, tvb, offset, 1, ENC_NA);
5824
0
        offset += 1;
5825
5826
0
        break;
5827
0
    case 0x2A0F: /* Local Time Information */
5828
1
    case 0x2A10: /* Secondary Time Zone */  /* APPROVED: NO */
5829
1
        if (service_uuid.bt_uuid == GATT_SERVICE_CURRENT_TIME_SERVICE) {
5830
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
5831
0
                break;
5832
5833
0
            if (!is_readable_response(att_data->opcode) &&
5834
0
                    !is_writeable_request(att_data->opcode))
5835
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5836
0
        }
5837
5838
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5839
0
            break;
5840
5841
1
        if (uuid.bt_uuid == 0x2A10) {
5842
1
            proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_timezone_information, ett_btatt_value, hfx_btatt_timezone_information, ENC_NA);
5843
1
            offset += 1;
5844
1
        }
5845
5846
1
        proto_tree_add_item(tree, hf_btatt_timezone, tvb, offset, 1, ENC_NA);
5847
1
        offset += 1;
5848
5849
1
        proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
5850
1
        offset += 1;
5851
5852
1
        break;
5853
0
    case 0x2A11: /* Time with DST */
5854
0
        if (service_uuid.bt_uuid == GATT_SERVICE_NEXT_DST_CHANGE_SERVICE) {
5855
0
            if (is_readable_request(att_data->opcode))
5856
0
                break;
5857
5858
0
            if (!is_readable_response(att_data->opcode))
5859
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5860
0
        }
5861
5862
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5863
0
            break;
5864
5865
0
        offset = add_item_btatt_time(tree, tvb, offset);
5866
5867
0
        proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
5868
0
        offset += 1;
5869
5870
0
        break;
5871
0
    case 0x2A12: /* Time Accuracy */
5872
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5873
0
            break;
5874
5875
0
        proto_tree_add_item(tree, hf_btatt_time_accuracy, tvb, offset, 1, ENC_NA);
5876
0
        offset += 1;
5877
5878
0
        break;
5879
0
    case 0x2A13: /* Time Source */
5880
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5881
0
            break;
5882
5883
0
        proto_tree_add_item(tree, hf_btatt_time_source, tvb, offset, 1, ENC_NA);
5884
0
        offset += 1;
5885
5886
0
        break;
5887
1
    case 0x2A14: /* Reference Time Information */
5888
1
        if (service_uuid.bt_uuid == GATT_SERVICE_CURRENT_TIME_SERVICE) {
5889
0
            if (is_readable_request(att_data->opcode))
5890
0
                break;
5891
5892
0
            if (!is_readable_response(att_data->opcode))
5893
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5894
0
        }
5895
5896
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5897
0
            break;
5898
5899
1
        proto_tree_add_item(tree, hf_btatt_time_source, tvb, offset, 1, ENC_NA);
5900
1
        offset += 1;
5901
5902
1
        proto_tree_add_item(tree, hf_btatt_time_accuracy, tvb, offset, 1, ENC_NA);
5903
1
        offset += 1;
5904
5905
1
        proto_tree_add_item(tree, hf_btatt_time_days_since_update, tvb, offset, 1, ENC_NA);
5906
1
        offset += 1;
5907
5908
1
        proto_tree_add_item(tree, hf_btatt_time_hours_since_update, tvb, offset, 1, ENC_NA);
5909
1
        offset += 1;
5910
5911
1
        break;
5912
0
    case 0x2A15: /* Time Broadcast */  /* APPROVED: NO */
5913
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5914
0
            break;
5915
5916
0
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a0c", tvb_new_subset_length(tvb, offset, 9), pinfo, tree, att_data);
5917
0
        offset += 9;
5918
5919
0
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a0f", tvb_new_subset_length(tvb, offset, 2), pinfo, tree, att_data);
5920
0
        offset += 2;
5921
5922
0
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a14", tvb_new_subset_length(tvb, offset, 4), pinfo, tree, att_data);
5923
0
        offset += 4;
5924
5925
0
        break;
5926
0
    case 0x2A16: /* Time Update Control Point */
5927
0
        if (service_uuid.bt_uuid == GATT_SERVICE_REFERENCE_TIME_UPDATE_SERVICE) {
5928
0
            if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
5929
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5930
0
        }
5931
5932
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5933
0
            break;
5934
5935
0
        proto_tree_add_item(tree, hf_btatt_time_update_control_point, tvb, offset, 1, ENC_NA);
5936
0
        offset += 1;
5937
5938
0
        break;
5939
0
    case 0x2A17: /* Time Update State */
5940
0
        if (service_uuid.bt_uuid == GATT_SERVICE_REFERENCE_TIME_UPDATE_SERVICE) {
5941
0
            if (is_readable_request(att_data->opcode))
5942
0
                break;
5943
5944
0
            if (!is_readable_response(att_data->opcode))
5945
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5946
0
        }
5947
5948
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5949
0
            break;
5950
5951
0
        proto_tree_add_item(tree, hf_btatt_time_current_state, tvb, offset, 1, ENC_NA);
5952
0
        offset += 1;
5953
5954
0
        proto_tree_add_item(tree, hf_btatt_time_result, tvb, offset, 1, ENC_NA);
5955
0
        offset += 1;
5956
5957
0
        break;
5958
0
    case 0x2A18: /* Glucose Measurement */
5959
0
        if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE) {
5960
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
5961
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
5962
0
        }
5963
5964
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
5965
0
            break;
5966
5967
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_flags, ett_btatt_value, hfx_btatt_glucose_measurement_flags, ENC_NA);
5968
0
        flags = tvb_get_uint8(tvb, offset);
5969
0
        offset += 1;
5970
5971
0
        proto_tree_add_item(tree, hf_btatt_glucose_measurement_sequence_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5972
0
        offset += 2;
5973
5974
0
        offset = add_item_btatt_timestamp(tree, hf_btatt_glucose_measurement_base_time, tvb, offset);
5975
5976
0
        if (flags & 0x01) {
5977
0
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5978
0
            offset += 2;
5979
0
        }
5980
5981
0
        if ((flags & 0x02) && !(flags & 0x04)) {
5982
0
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_glucose_concentration_kg_per_l, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5983
0
            offset += 2;
5984
0
        }
5985
5986
0
        if ((flags & 0x02) && (flags & 0x04)) {
5987
0
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_glucose_concentration_mol_per_l, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5988
0
            offset += 2;
5989
0
        }
5990
5991
0
        if (flags & 0x02) {
5992
0
            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);
5993
0
            offset += 1;
5994
0
        }
5995
5996
0
        if (flags & 0x08) {
5997
0
            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);
5998
0
            offset += 2;
5999
0
        }
6000
6001
0
        break;
6002
0
    case 0x2A19: /* Battery Level */ {
6003
0
        if (service_uuid.bt_uuid == GATT_SERVICE_BATTERY_SERVICE) {
6004
0
            if (is_readable_request(att_data->opcode))
6005
0
                break;
6006
6007
0
            if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6008
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6009
0
        }
6010
6011
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6012
0
            break;
6013
6014
0
        uint32_t battery_level;
6015
0
        sub_item = proto_tree_add_item_ret_uint(tree, hf_btatt_battery_level, tvb, offset, 1, ENC_NA, &battery_level);
6016
0
        if (battery_level > 100)
6017
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6018
0
        offset += 1;
6019
6020
0
        }
6021
0
        break;
6022
0
    case 0x2A1A: /* Battery Power State */  /* APPROVED: NO */
6023
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6024
0
            break;
6025
6026
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_battery_power_state, ett_btatt_value, hfx_btatt_battery_power_state, ENC_NA);
6027
0
        offset += 1;
6028
6029
0
        break;
6030
0
    case 0x2A1B: /* Battery Level State */  /* APPROVED: NO */ {
6031
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6032
0
            break;
6033
6034
0
        uint32_t battery_level;
6035
0
        sub_item = proto_tree_add_item_ret_uint(tree, hf_btatt_battery_level, tvb, offset, 1, ENC_NA, &battery_level);
6036
0
        if (battery_level > 100)
6037
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6038
0
        offset += 1;
6039
6040
0
        if (tvb_reported_length_remaining(tvb, offset) >= 1) { /* optional field */
6041
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_battery_power_state, ett_btatt_value, hfx_btatt_battery_power_state, ENC_NA);
6042
0
            offset += 1;
6043
0
        }
6044
6045
0
        }
6046
0
        break;
6047
0
    case 0x2A1C: /* Temperature Measurement */
6048
0
    case 0x2A1E: /* Intermediate Temperature */
6049
0
        if (uuid.bt_uuid == 0x2A1C) {/* Temperature Measurement */
6050
0
            if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6051
0
                if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
6052
0
                    break;
6053
6054
0
                if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
6055
0
                    expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6056
0
            }
6057
0
        } else if (uuid.bt_uuid == 0x2A1E) {/* Intermediate Temperature */
6058
0
            if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6059
0
                if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6060
0
                    expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6061
0
            }
6062
0
        }
6063
6064
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6065
0
            break;
6066
6067
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_temperature_measurement_flags, ett_btatt_value, hfx_btatt_temperature_measurement_flags, ENC_NA);
6068
0
        flags = tvb_get_uint8(tvb, offset);
6069
0
        offset += 1;
6070
6071
0
        if (flags & 0x01) {
6072
0
            proto_tree_add_item(tree, hf_btatt_temperature_measurement_value_fahrenheit, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6073
0
        } else {
6074
0
            proto_tree_add_item(tree, hf_btatt_temperature_measurement_value_celsius, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6075
0
        }
6076
0
        offset += 4;
6077
6078
0
        if (flags & 0x02) {
6079
0
            offset = add_item_btatt_timestamp(tree, hf_btatt_temperature_measurement_timestamp, tvb, offset);
6080
0
        }
6081
6082
0
        if (flags & 0x04) {
6083
0
            proto_tree_add_item(tree, hf_btatt_temperature_type, tvb, offset, 1, ENC_NA);
6084
0
            offset += 1;
6085
0
        }
6086
6087
0
        break;
6088
0
    case 0x2A1D: /* Temperature Type */
6089
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6090
0
            if (is_readable_request(att_data->opcode))
6091
0
                break;
6092
6093
0
            if (!is_readable_response(att_data->opcode))
6094
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6095
0
        }
6096
6097
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6098
0
            break;
6099
6100
0
        proto_tree_add_item(tree, hf_btatt_temperature_type, tvb, offset, 1, ENC_NA);
6101
0
        offset += 1;
6102
6103
0
        break;
6104
0
    case 0x2A1F: /* Temperature Celsius */  /* APPROVED: NO */ {
6105
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6106
0
            break;
6107
6108
0
        int32_t temperature;
6109
0
        sub_item = proto_tree_add_item_ret_int(tree, hf_btatt_temperature_celsius, tvb, offset, 2, ENC_LITTLE_ENDIAN, &temperature);
6110
0
        if (temperature < -2732)
6111
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6112
0
        offset += 2;
6113
6114
0
        }
6115
0
        break;
6116
1
    case 0x2A20: /* Temperature Fahrenheit */  /* APPROVED: NO */ {
6117
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6118
0
            break;
6119
6120
1
        int32_t temperature;
6121
1
        sub_item = proto_tree_add_item_ret_int(tree, hf_btatt_temperature_fahrenheit, tvb, offset, 2, ENC_LITTLE_ENDIAN, &temperature);
6122
1
        if (temperature < -4597)
6123
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
6124
1
        offset += 2;
6125
6126
1
        }
6127
0
        break;
6128
0
    case 0x2A21: /* Measurement Interval */
6129
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HEALTH_THERMOMETER) {
6130
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
6131
0
                break;
6132
6133
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
6134
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6135
0
        }
6136
6137
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6138
0
            break;
6139
6140
0
        proto_tree_add_item(tree, hf_btatt_measurement_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6141
0
        offset += 2;
6142
6143
0
        break;
6144
5
    case 0x2A22: /* Boot Keyboard Input Report */
6145
5
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6146
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6147
0
                break;
6148
6149
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6150
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6151
0
        }
6152
6153
5
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6154
0
            break;
6155
6156
5
        call_dissector_with_data(usb_hid_boot_keyboard_input_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
6157
5
        offset += tvb_reported_length_remaining(tvb, offset);
6158
6159
5
        break;
6160
0
    case 0x2A23: /* System ID */
6161
0
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6162
0
            if (is_readable_request(att_data->opcode))
6163
0
                break;
6164
6165
0
            if (!is_readable_response(att_data->opcode))
6166
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6167
0
        }
6168
6169
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6170
0
            break;
6171
6172
0
        proto_tree_add_item(tree, hf_btatt_system_id_manufacturer_identifier, tvb, offset, 5, ENC_LITTLE_ENDIAN);
6173
0
        offset += 5;
6174
6175
0
        proto_tree_add_item(tree, hf_btatt_system_id_organizationally_unique_identifier, tvb, offset, 3, ENC_LITTLE_ENDIAN);
6176
0
        offset += 3;
6177
0
        break;
6178
0
    case 0x2A24: /* Model Number String */
6179
0
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6180
0
            if (is_readable_request(att_data->opcode))
6181
0
                break;
6182
6183
0
            if (!is_readable_response(att_data->opcode))
6184
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6185
0
        }
6186
6187
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6188
0
            break;
6189
6190
0
        proto_tree_add_item(tree, hf_btatt_model_number_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6191
0
        offset += tvb_captured_length_remaining(tvb, offset);
6192
6193
0
        break;
6194
1
    case 0x2A25: /* Serial Number String */
6195
1
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6196
0
            if (is_readable_request(att_data->opcode))
6197
0
                break;
6198
6199
0
            if (!is_readable_response(att_data->opcode))
6200
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6201
0
        }
6202
6203
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6204
0
            break;
6205
6206
1
        proto_tree_add_item(tree, hf_btatt_serial_number_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6207
1
        offset += tvb_captured_length_remaining(tvb, offset);
6208
6209
1
        break;
6210
0
    case 0x2A26: /* Firmware Revision String */
6211
0
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6212
0
            if (is_readable_request(att_data->opcode))
6213
0
                break;
6214
6215
0
            if (!is_readable_response(att_data->opcode))
6216
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6217
0
        }
6218
6219
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6220
0
            break;
6221
6222
0
        proto_tree_add_item(tree, hf_btatt_firmware_revision_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6223
0
        offset += tvb_captured_length_remaining(tvb, offset);
6224
6225
0
        break;
6226
2
    case 0x2A27: /* Hardware Revision String */
6227
2
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6228
0
            if (is_readable_request(att_data->opcode))
6229
0
                break;
6230
6231
0
            if (!is_readable_response(att_data->opcode))
6232
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6233
0
        }
6234
6235
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6236
0
            break;
6237
6238
2
        proto_tree_add_item(tree, hf_btatt_hardware_revision_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6239
2
        offset += tvb_captured_length_remaining(tvb, offset);
6240
6241
2
        break;
6242
2
    case 0x2A28: /* Software Revision String */
6243
2
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6244
0
            if (is_readable_request(att_data->opcode))
6245
0
                break;
6246
6247
0
            if (!is_readable_response(att_data->opcode))
6248
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6249
0
        }
6250
6251
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6252
0
            break;
6253
6254
2
        proto_tree_add_item(tree, hf_btatt_software_revision_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6255
2
        offset += tvb_captured_length_remaining(tvb, offset);
6256
6257
2
        break;
6258
1
    case 0x2A29: /* Manufacturer Name String */
6259
1
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6260
0
            if (is_readable_request(att_data->opcode))
6261
0
                break;
6262
6263
0
            if (!is_readable_response(att_data->opcode))
6264
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6265
0
        }
6266
6267
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6268
0
            break;
6269
6270
1
        proto_tree_add_item(tree, hf_btatt_manufacturer_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6271
1
        offset += tvb_captured_length_remaining(tvb, offset);
6272
6273
1
        break;
6274
14
    case 0x2A2A: /* IEEE 11073-20601 Regulatory Certification Data List */ {
6275
14
        uint16_t count;
6276
14
        uint16_t list_length = 0;
6277
6278
14
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6279
0
            if (is_readable_request(att_data->opcode))
6280
0
                break;
6281
6282
0
            if (!is_readable_response(att_data->opcode))
6283
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6284
0
        }
6285
6286
14
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6287
0
            break;
6288
6289
14
        proto_tree_add_item(tree, hf_btatt_regulatory_certification_data_list_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6290
14
        count = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6291
14
        list_length += 2;
6292
14
        offset += 2;
6293
6294
14
        proto_tree_add_item(tree, hf_btatt_regulatory_certification_data_list_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6295
14
        list_length += 2;
6296
14
        offset += 2;
6297
6298
128
        while (count--) {
6299
114
            proto_item  *authorizing_body_data_item;
6300
114
            proto_tree  *authorizing_body_data_tree;
6301
114
            uint8_t      item_type;
6302
114
            uint16_t     item_length;
6303
114
            uint16_t     certification_data_list_count = 0;
6304
114
            uint16_t     certification_data_list_length = 0;
6305
114
            proto_item  *list_length_item;
6306
6307
114
            sub_item = proto_tree_add_item(tree, hf_btatt_regulatory_certification_data_list_item, tvb, offset, 0, ENC_NA);
6308
114
            sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
6309
6310
114
            proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_body, tvb, offset, 1, ENC_NA);
6311
114
            list_length += 1;
6312
114
            offset += 1;
6313
6314
114
            proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_body_structure_type, tvb, offset, 1, ENC_NA);
6315
114
            item_type = tvb_get_uint8(tvb, offset);
6316
114
            list_length += 1;
6317
114
            offset += 1;
6318
6319
114
            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);
6320
114
            item_length = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6321
114
            list_length += 2 + item_length;
6322
114
            offset += 2;
6323
6324
114
            if (item_type == 0x01) {
6325
4
                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);
6326
4
                authorizing_body_data_tree = proto_item_add_subtree(authorizing_body_data_item, ett_btatt_list);
6327
6328
4
                if (item_length > 0) {
6329
4
                    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);
6330
4
                    offset += 1;
6331
4
                }
6332
6333
4
                if (item_length > 1) {
6334
4
                    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);
6335
4
                    offset += 1;
6336
4
                }
6337
6338
4
                if (item_length > 2) {
6339
4
                    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);
6340
4
                    certification_data_list_count = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6341
4
                    offset += 2;
6342
4
                }
6343
6344
4
                if (item_length > 4) {
6345
4
                    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);
6346
4
                    certification_data_list_length = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6347
4
                    offset += 2;
6348
4
                }
6349
6350
4
                if (item_length > 6 && certification_data_list_count) {
6351
4
                    proto_item  *certification_data_list_item;
6352
4
                    proto_tree  *certification_data_list_tree;
6353
6354
4
                    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);
6355
4
                    certification_data_list_tree = proto_item_add_subtree(certification_data_list_item, ett_btatt_list);
6356
6357
263
                    while (certification_data_list_count--) {
6358
259
                        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);
6359
259
                        offset += 2;
6360
259
                    }
6361
4
                }
6362
110
            } else if (item_type == 0x02) {
6363
2
                proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_regulation_bit_field_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6364
2
                offset += 2;
6365
108
            } else {
6366
108
                proto_tree_add_item(sub_tree, hf_btatt_regulatory_certification_data_list_item_data, tvb, offset, item_length, ENC_NA);
6367
108
                offset += item_length;
6368
108
            }
6369
6370
114
            proto_item_set_len(sub_item, 1 + 1 + 2 + item_length);
6371
6372
114
            if (list_length != length)
6373
101
                expert_add_info(pinfo, list_length_item, &ei_btatt_invalid_length);
6374
114
            }
6375
14
        }
6376
6377
0
        break;
6378
0
    case 0x2A2C: /* Magnetic Declination */
6379
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
6380
0
            if (is_readable_request(att_data->opcode))
6381
0
                break;
6382
6383
0
            if (!is_readable_response(att_data->opcode) &&
6384
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6385
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6386
0
        }
6387
6388
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6389
0
            break;
6390
6391
0
        proto_tree_add_item(tree, hf_btatt_magnetic_declination, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6392
0
        offset += 2;
6393
6394
0
        break;
6395
3
    case 0x2A2F: /* Position 2D */  /* APPROVED: NO */
6396
3
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6397
0
            break;
6398
6399
3
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2aae", tvb_new_subset_length(tvb, offset, 4), pinfo, tree, att_data);
6400
3
        offset += 4;
6401
6402
3
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2aaf", tvb_new_subset_length(tvb, offset, 4), pinfo, tree, att_data);
6403
3
        offset += 4;
6404
6405
3
        break;
6406
2
    case 0x2A30: /* Position 3D */  /* APPROVED: NO */
6407
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6408
0
            break;
6409
6410
2
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a2f", tvb_new_subset_length(tvb, offset, 8), pinfo, tree, att_data);
6411
2
        offset += 8;
6412
6413
2
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a6c", tvb_new_subset_length(tvb, offset, 3), pinfo, tree, att_data);
6414
2
        offset += 3;
6415
6416
2
        break;
6417
2
    case 0x2A31: /* Scan Refresh */
6418
2
        if (service_uuid.bt_uuid == GATT_SERVICE_SCAN_PARAMETERS) {
6419
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6420
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6421
0
        }
6422
6423
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6424
0
            break;
6425
6426
2
        proto_tree_add_item(tree, hf_btatt_scan_refresh, tvb, offset, 1, ENC_NA);
6427
2
        offset += 1;
6428
6429
2
        break;
6430
4
    case 0x2A32: /* Boot Keyboard Output Report */
6431
4
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6432
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6433
0
                break;
6434
6435
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6436
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6437
0
        }
6438
6439
4
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6440
0
            break;
6441
6442
4
        call_dissector_with_data(usb_hid_boot_keyboard_output_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
6443
4
        offset += tvb_reported_length_remaining(tvb, offset);
6444
6445
4
        break;
6446
2
    case 0x2A33: /* Boot Mouse Input Report */
6447
2
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6448
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6449
0
                break;
6450
6451
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6452
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6453
0
        }
6454
6455
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6456
0
            break;
6457
6458
2
        call_dissector_with_data(usb_hid_boot_mouse_input_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
6459
2
        offset += tvb_reported_length_remaining(tvb, offset);
6460
6461
2
        break;
6462
4
    case 0x2A34: /* Glucose Measurement Context */
6463
4
        if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE) {
6464
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6465
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6466
0
        }
6467
6468
4
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6469
0
            break;
6470
6471
4
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_measurement_context_flags, ett_btatt_value, hfx_btatt_glucose_measurement_context_flags, ENC_NA);
6472
4
        flags = tvb_get_uint8(tvb, offset);
6473
4
        offset += 1;
6474
6475
4
        proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_sequence_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6476
4
        offset += 2;
6477
6478
4
        if (flags & 0x80) {
6479
3
            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);
6480
3
            offset += 1;
6481
3
        }
6482
6483
4
        if (flags & 0x01) {
6484
3
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_carbohydrate_id, tvb, offset, 1, ENC_NA);
6485
3
            offset += 1;
6486
6487
3
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_carbohydrate_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6488
3
            offset += 2;
6489
3
        }
6490
6491
4
        if (flags & 0x02) {
6492
3
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_meal, tvb, offset, 1, ENC_NA);
6493
3
            offset += 1;
6494
3
        }
6495
6496
4
        if (flags & 0x04) {
6497
1
            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);
6498
1
            offset += 1;
6499
1
        }
6500
6501
4
        if (flags & 0x08) {
6502
2
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_exercise_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6503
2
            offset += 2;
6504
6505
2
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_exercise_intensity, tvb, offset, 1, ENC_NA);
6506
2
            offset += 1;
6507
2
        }
6508
6509
4
        if (flags & 0x10) {
6510
0
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_medication_id, tvb, offset, 1, ENC_NA);
6511
0
            offset += 1;
6512
6513
0
            if (flags & 0x20) {
6514
0
                proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_medication_l, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6515
0
                offset += 2;
6516
0
            } else {
6517
0
                proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_medication_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6518
0
                offset += 2;
6519
0
            }
6520
0
        }
6521
6522
4
        if (flags & 0x40) {
6523
2
            proto_tree_add_item(tree, hf_btatt_glucose_measurement_context_hba1c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6524
2
            offset += 2;
6525
2
        }
6526
6527
4
        break;
6528
1
    case 0x2A35: /* Blood Pressure Measurement */
6529
3
    case 0x2A36: /* Intermediate Cuff Pressure */
6530
3
        if (uuid.bt_uuid == 0x2A35) {/* Blood Pressure Measurement */
6531
1
            if (service_uuid.bt_uuid == GATT_SERVICE_BLOOD_PRESSURE) {
6532
0
                if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
6533
0
                    break;
6534
6535
0
                if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
6536
0
                    expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6537
0
            }
6538
2
        } else if (uuid.bt_uuid == 0x2A36) {/* Intermediate Cuff Pressure */
6539
2
            if (service_uuid.bt_uuid == GATT_SERVICE_BLOOD_PRESSURE) {
6540
0
                if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6541
0
                    expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6542
0
            }
6543
2
        }
6544
6545
3
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6546
0
            break;
6547
6548
3
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_blood_pressure_measurement_flags, ett_btatt_value, hfx_btatt_blood_pressure_measurement_flags, ENC_NA);
6549
3
        flags = tvb_get_uint8(tvb, offset);
6550
3
        offset += 1;
6551
6552
3
        if (flags & 0x01) {
6553
2
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_systolic_kpa, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6554
2
            offset += 2;
6555
6556
2
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_diastolic_kpa, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6557
2
            offset += 2;
6558
6559
2
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_kpa, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6560
2
            offset += 2;
6561
2
        } else {
6562
1
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_systolic_mmhg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6563
1
            offset += 2;
6564
6565
1
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_diastolic_mmhg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6566
1
            offset += 2;
6567
6568
1
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_mmhg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6569
1
            offset += 2;
6570
1
        }
6571
6572
3
        if (flags & 0x02) {
6573
0
            offset = add_item_btatt_timestamp(tree, hf_btatt_blood_pressure_measurement_timestamp, tvb, offset);
6574
0
        }
6575
6576
3
        if (flags & 0x04) {
6577
0
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6578
0
            offset += 2;
6579
0
        }
6580
6581
3
        if (flags & 0x08) {
6582
0
            proto_tree_add_item(tree, hf_btatt_blood_pressure_measurement_user_id, tvb, offset, 1, ENC_NA);
6583
0
            offset += 1;
6584
0
        }
6585
6586
3
        if (flags & 0x10) {
6587
0
            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);
6588
0
            offset += 2;
6589
0
        }
6590
6591
3
        break;
6592
5
    case 0x2A37: /* Heart Rate Measurement */
6593
5
        if (service_uuid.bt_uuid == GATT_SERVICE_HEART_RATE) {
6594
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6595
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6596
0
        }
6597
6598
5
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6599
0
            break;
6600
6601
5
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_heart_rate_measurement_flags, ett_btatt_value, hfx_btatt_heart_rate_measurement_flags, ENC_NA);
6602
5
        flags = tvb_get_uint8(tvb, offset);
6603
5
        offset += 1;
6604
6605
5
        if (flags & 0x01) {
6606
5
            proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_value_16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6607
5
            offset += 2;
6608
5
        } else {
6609
0
            proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_value_8, tvb, offset, 1, ENC_NA);
6610
0
            offset += 1;
6611
0
        }
6612
6613
5
        if (flags & 0x08) {
6614
5
            proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_energy_expended, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6615
5
            offset += 2;
6616
5
        }
6617
6618
5
        if (flags & 0x10) {
6619
5
            unsigned interval_count = 0;
6620
6621
5
            sub_item = proto_tree_add_item(tree, hf_btatt_heart_rate_measurement_rr_intervals, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
6622
5
            sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
6623
650
            while (tvb_reported_length_remaining(tvb, offset)) {
6624
645
                proto_tree_add_item(sub_tree, hf_btatt_heart_rate_measurement_rr_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6625
645
                offset += 2;
6626
645
                interval_count += 1;
6627
645
            }
6628
6629
5
            proto_item_append_text(sub_item, " [count = %2u]", interval_count);
6630
5
        }
6631
6632
5
        break;
6633
2
    case 0x2A38: /* Body Sensor Location */
6634
2
        if (service_uuid.bt_uuid == GATT_SERVICE_HEART_RATE) {
6635
0
            if (is_readable_request(att_data->opcode))
6636
0
                break;
6637
6638
0
            if (!is_readable_response(att_data->opcode))
6639
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6640
0
        }
6641
6642
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6643
0
            break;
6644
6645
2
        proto_tree_add_item(tree, hf_btatt_body_sensor_location, tvb, offset, 1, ENC_NA);
6646
2
        offset += 1;
6647
6648
2
        break;
6649
0
    case 0x2A39: /* Heart Rate Control Point */
6650
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HEART_RATE) {
6651
0
            if (is_writeable_response(att_data->opcode))
6652
0
                break;
6653
6654
0
            if (!is_writeable_request(att_data->opcode))
6655
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6656
0
        }
6657
6658
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6659
0
            break;
6660
6661
0
        proto_tree_add_item(tree, hf_btatt_heart_rate_control_point, tvb, offset, 1, ENC_NA);
6662
0
        offset += 1;
6663
6664
0
        break;
6665
2
    case 0x2A3A: /* Removable */  /* APPROVED: NO */
6666
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6667
0
            break;
6668
6669
2
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_removable, ett_btatt_value, hfx_btatt_removable, ENC_NA);
6670
2
        offset += 1;
6671
6672
2
        break;
6673
0
    case 0x2A3B: /* Service Required */  /* APPROVED: NO */
6674
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6675
0
            break;
6676
6677
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_service_required, ett_btatt_value, hfx_btatt_service_required, ENC_NA);
6678
0
        offset += 1;
6679
6680
0
        break;
6681
0
    case 0x2A3C: /* Scientific Temperature Celsius */  /* APPROVED: NO */
6682
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6683
0
            break;
6684
6685
0
        proto_tree_add_item(tree, hf_btatt_scientific_temperature_celsius, tvb, offset, 8, ENC_LITTLE_ENDIAN);
6686
0
        offset += 8;
6687
6688
0
        break;
6689
1
    case 0x2A3D: /* String */  /* APPROVED: NO */
6690
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6691
0
            break;
6692
6693
1
        proto_tree_add_item(tree, hf_btatt_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6694
1
        offset += tvb_reported_length_remaining(tvb, offset);
6695
6696
1
        break;
6697
0
    case 0x2A3E: /* Network Availability */  /* APPROVED: NO */
6698
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6699
0
            break;
6700
6701
0
        proto_tree_add_item(tree, hf_btatt_network_availability, tvb, offset, 1, ENC_NA);
6702
0
        offset += 1;
6703
6704
0
        break;
6705
0
    case 0x2A3F: /* Alert Status */
6706
0
        if (service_uuid.bt_uuid == GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE) {
6707
0
            if (is_readable_request(att_data->opcode))
6708
0
                break;
6709
6710
0
            if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6711
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6712
0
        }
6713
6714
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6715
0
            break;
6716
6717
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_alert_status, ett_btatt_value, hfx_btatt_alert_status, ENC_NA);
6718
0
        offset += 1;
6719
6720
0
        break;
6721
0
    case 0x2A40: /* Ringer Control Point */
6722
0
        if (service_uuid.bt_uuid == GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE) {
6723
0
            if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6724
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6725
0
        }
6726
6727
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6728
0
            break;
6729
6730
0
        proto_tree_add_item(tree, hf_btatt_ringer_control_point, tvb, offset, 1, ENC_NA);
6731
0
        offset += 1;
6732
6733
0
        break;
6734
0
    case 0x2A41: /* Ringer Setting */
6735
0
        if (service_uuid.bt_uuid == GATT_SERVICE_PHONE_ALERT_STATUS_SERVICE) {
6736
0
            if (is_readable_request(att_data->opcode))
6737
0
                break;
6738
6739
0
            if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6740
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6741
0
        }
6742
6743
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6744
0
            break;
6745
6746
0
        proto_tree_add_item(tree, hf_btatt_ringer_setting, tvb, offset, 1, ENC_NA);
6747
0
        offset += 1;
6748
6749
0
        break;
6750
1
    case 0x2A42: /* Alert Category ID Bit Mask */
6751
2
    case 0x2A47: /* Supported New Alert Category */
6752
3
    case 0x2A48: /* Supported Unread Alert Category */
6753
3
        if (uuid.bt_uuid == 0x2A47 || uuid.bt_uuid == 0x2A48) {/* Supported New Alert Category || Supported Unread Alert Category*/
6754
2
            if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6755
0
                if (is_readable_request(att_data->opcode))
6756
0
                    break;
6757
6758
0
                if (!is_readable_response(att_data->opcode))
6759
0
                    expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6760
0
            }
6761
2
        }
6762
6763
3
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6764
0
            break;
6765
6766
3
        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);
6767
3
        offset += 1;
6768
6769
3
        if (tvb_reported_length_remaining(tvb, offset) >= 1) {
6770
3
            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);
6771
3
            offset += 1;
6772
3
        }
6773
6774
3
        break;
6775
2
    case 0x2A43: /* Alert Category ID */
6776
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6777
0
            break;
6778
6779
2
        proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6780
2
        offset += 1;
6781
6782
2
        break;
6783
0
    case 0x2A44: /* Alert Notification Control Point */
6784
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6785
0
            if (is_writeable_response(att_data->opcode))
6786
0
                break;
6787
6788
0
            if (!is_writeable_request(att_data->opcode))
6789
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6790
0
        }
6791
6792
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6793
0
            break;
6794
6795
0
        proto_tree_add_item(tree, hf_btatt_alert_command_id, tvb, offset, 1, ENC_NA);
6796
0
        offset += 1;
6797
6798
0
        proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6799
0
        offset += 1;
6800
6801
0
        break;
6802
1
    case 0x2A45: /* Unread Alert Status */
6803
1
        if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6804
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6805
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6806
0
        }
6807
6808
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6809
0
            break;
6810
6811
1
        proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6812
1
        offset += 1;
6813
6814
1
        proto_tree_add_item(tree, hf_btatt_alert_unread_count, tvb, offset, 1, ENC_NA);
6815
1
        offset += 1;
6816
6817
1
        break;
6818
1
    case 0x2A46: /* New Alert */
6819
1
        if (service_uuid.bt_uuid == GATT_SERVICE_ALERT_NOTIFICATION_SERVICE) {
6820
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6821
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6822
0
        }
6823
6824
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6825
0
            break;
6826
6827
1
        proto_tree_add_item(tree, hf_btatt_alert_category_id, tvb, offset, 1, ENC_NA);
6828
1
        offset += 1;
6829
6830
1
        proto_tree_add_item(tree, hf_btatt_alert_number_of_new_alert, tvb, offset, 1, ENC_NA);
6831
1
        offset += 1;
6832
6833
1
        if (tvb_reported_length_remaining(tvb, offset) > 0) {
6834
1
            proto_tree_add_item(tree, hf_btatt_alert_text_string_information, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
6835
1
            offset += tvb_captured_length_remaining(tvb, offset);
6836
1
        }
6837
6838
1
        break;
6839
1
    case 0x2A49: /* Blood Pressure Feature */
6840
1
        if (service_uuid.bt_uuid == GATT_SERVICE_BLOOD_PRESSURE) {
6841
0
            if (is_readable_request(att_data->opcode))
6842
0
                break;
6843
6844
0
            if (!is_readable_response(att_data->opcode))
6845
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6846
0
        }
6847
6848
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6849
0
            break;
6850
6851
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_blood_pressure_feature, ett_btatt_value, hfx_btatt_blood_pressure_feature, ENC_LITTLE_ENDIAN);
6852
1
        offset += 2;
6853
6854
1
        break;
6855
1
    case 0x2A4A: /* HOGP: HID Information */
6856
1
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6857
0
            if (is_readable_request(att_data->opcode))
6858
0
                break;
6859
6860
0
            if (!is_readable_response(att_data->opcode))
6861
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6862
0
        }
6863
6864
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6865
0
            break;
6866
6867
1
        proto_tree_add_item(tree, hf_btatt_hogp_bcd_hid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6868
1
        offset += 2;
6869
6870
1
        proto_tree_add_item(tree, hf_btatt_hogp_b_country_code, tvb, offset, 1, ENC_NA);
6871
1
        offset += 1;
6872
6873
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_hogp_flags, ett_btatt_value, hfx_btatt_hogp_flags, ENC_NA);
6874
1
        offset += 1;
6875
6876
1
        break;
6877
561
    case 0x2A4B: /* HOGP: Report Map */
6878
561
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6879
0
            if (is_readable_request(att_data->opcode))
6880
0
                break;
6881
6882
0
            if (!is_readable_response(att_data->opcode))
6883
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6884
0
        }
6885
6886
561
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6887
0
            break;
6888
6889
561
        offset = dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, NULL);
6890
6891
561
        break;
6892
1
    case 0x2A4C: /* HID Control Point */
6893
1
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6894
0
            if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6895
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6896
0
        }
6897
6898
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6899
0
            break;
6900
6901
1
        proto_tree_add_item(tree, hf_btatt_hogp_hid_control_point_command, tvb, offset, 1, ENC_NA);
6902
1
        offset += 1;
6903
6904
1
        break;
6905
0
    case 0x2A4D: /* Report */
6906
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6907
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
6908
0
                break;
6909
6910
0
            if (!is_readable_response(att_data->opcode) &&
6911
0
                    !is_writeable_request(att_data->opcode) &&
6912
0
                    att_data->opcode != ATT_OPCODE_WRITE_COMMAND &&
6913
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
6914
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6915
0
        }
6916
6917
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6918
0
            break;
6919
6920
/* TODO: Implement */
6921
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
6922
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
6923
0
        offset = tvb_captured_length(tvb);
6924
6925
0
        break;
6926
0
    case 0x2A4E: /* HOGP: Protocol Mode */
6927
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HUMAN_INTERFACE_DEVICE) {
6928
0
            if (is_readable_request(att_data->opcode))
6929
0
                break;
6930
6931
0
            if (!is_readable_response(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6932
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6933
0
        }
6934
6935
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6936
0
            break;
6937
6938
0
        proto_tree_add_item(tree, hf_btatt_hogp_protocol_mode, tvb, offset, 1, ENC_NA);
6939
0
        offset += 1;
6940
6941
0
        break;
6942
1
    case 0x2A4F: /* Scan Interval Window */
6943
1
        if (service_uuid.bt_uuid == GATT_SERVICE_SCAN_PARAMETERS) {
6944
0
            if (att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
6945
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6946
0
        }
6947
6948
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6949
0
            break;
6950
6951
1
        proto_tree_add_item(tree, hf_btatt_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6952
1
        offset += 2;
6953
6954
1
        proto_tree_add_item(tree, hf_btatt_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6955
1
        offset += 2;
6956
6957
1
        break;
6958
0
    case 0x2A50: /* PnP ID */
6959
0
        if (service_uuid.bt_uuid == GATT_SERVICE_DEVICE_INFORMATION) {
6960
0
            if (is_readable_request(att_data->opcode))
6961
0
                break;
6962
6963
0
            if (!is_readable_response(att_data->opcode))
6964
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6965
0
        }
6966
6967
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6968
0
            break;
6969
6970
0
        proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id_source, tvb, offset, 1, ENC_NA);
6971
0
        value = tvb_get_uint8(tvb, offset);
6972
0
        offset += 1;
6973
6974
0
        if (value == 1)
6975
0
            proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id_bluetooth_sig, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6976
0
        else if (value == 2)
6977
0
            proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id_usb_forum, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6978
0
        else
6979
0
            proto_tree_add_item(tree, hf_btatt_pnp_id_vendor_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6980
0
        offset += 2;
6981
6982
0
        proto_tree_add_item(tree, hf_btatt_pnp_id_product_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6983
0
        offset += 2;
6984
6985
0
        proto_tree_add_item(tree, hf_btatt_pnp_id_product_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6986
0
        offset += 2;
6987
6988
0
        break;
6989
1
    case 0x2A51: /* Glucose Feature */
6990
1
        if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE) {
6991
0
            if (is_readable_request(att_data->opcode))
6992
0
                break;
6993
6994
0
            if (!is_readable_response(att_data->opcode))
6995
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
6996
0
        }
6997
6998
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
6999
0
            break;
7000
7001
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_glucose_feature, ett_btatt_value, hfx_btatt_glucose_feature, ENC_LITTLE_ENDIAN);
7002
1
        offset += 2;
7003
7004
1
        break;
7005
1
    case 0x2A52: /* Record Access Control Point */
7006
1
        if (service_uuid.bt_uuid == GATT_SERVICE_GLUCOSE ||
7007
1
                service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING ||
7008
1
                service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
7009
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7010
0
                break;
7011
7012
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7013
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7014
0
        }
7015
7016
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7017
0
            break;
7018
7019
1
        proto_tree_add_item(tree, hf_btatt_record_access_control_point_opcode, tvb, offset, 1, ENC_NA);
7020
1
        opcode = tvb_get_uint8(tvb, offset);
7021
1
        offset += 1;
7022
7023
1
        proto_tree_add_item(tree, hf_btatt_record_access_control_point_operator, tvb, offset, 1, ENC_NA);
7024
1
        operator_value = tvb_get_uint8(tvb, offset);
7025
1
        offset += 1;
7026
7027
1
        sub_item = proto_tree_add_item(tree, hf_btatt_record_access_control_point_operand, tvb, offset, 0, ENC_NA);
7028
1
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
7029
1
        operand_offset = offset;
7030
7031
1
        switch (opcode) {
7032
0
        case  1: /* Report Stored Records */
7033
0
        case  2: /* Delete Stored Records */
7034
1
        case  4: /* Report Number of Stored Records */
7035
1
            switch (operator_value) {
7036
0
            case 0: /* Null */
7037
0
            case 1: /* All records */
7038
0
            case 5: /* First record(i.e. oldest record) */
7039
0
            case 6: /* Last record (i.e. most recent record) */
7040
                /* N/A */
7041
7042
0
                break;
7043
0
            case 2: /* Less than or equal to */
7044
0
                proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_filter_type, tvb, offset, 1, ENC_NA);
7045
0
                value = tvb_get_uint8(tvb, offset);
7046
0
                offset += 1;
7047
7048
0
                if (value == 0x01) /* Time offset */ {
7049
0
                    proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_max_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7050
0
                    offset += 2;
7051
0
                } else {
7052
0
                    proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
7053
0
                    offset = tvb_captured_length(tvb);
7054
0
                }
7055
7056
0
                break;
7057
0
            case 3: /* Greater than or equal to */
7058
0
                proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_filter_type, tvb, offset, 1, ENC_NA);
7059
0
                value = tvb_get_uint8(tvb, offset);
7060
0
                offset += 1;
7061
7062
0
                if (value == 0x01) /* Time offset */ {
7063
0
                    proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_min_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7064
0
                    offset += 2;
7065
0
                } else {
7066
0
                    proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
7067
0
                    offset = tvb_captured_length(tvb);
7068
0
                }
7069
7070
0
                break;
7071
0
            case 4: /* Within range of (inclusive) */
7072
0
                proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_filter_type, tvb, offset, 1, ENC_NA);
7073
0
                value = tvb_get_uint8(tvb, offset);
7074
0
                offset += 1;
7075
7076
0
                if (value == 0x01) /* Time offset */ {
7077
0
                    proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_min_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7078
0
                    offset += 2;
7079
7080
0
                    proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_max_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7081
0
                    offset += 2;
7082
0
                } else {
7083
0
                    proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
7084
0
                    offset = tvb_captured_length(tvb);
7085
0
                }
7086
7087
0
                break;
7088
1
            }
7089
7090
1
            break;
7091
1
        case  3: /* Abort Operation */
7092
            /* N/A */
7093
7094
0
            break;
7095
7096
0
        case  5: /* Number of Stored Records Response */
7097
0
            proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_operand_number_of_records, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7098
0
            offset += 2;
7099
7100
0
            break;
7101
0
        case  6: /* Response Code */
7102
0
            proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7103
0
            offset += 1;
7104
7105
0
            proto_tree_add_item(sub_tree, hf_btatt_record_access_control_point_response_code, tvb, offset, 1, ENC_NA);
7106
0
            offset += 1;
7107
7108
0
            break;
7109
1
        };
7110
7111
1
        proto_item_set_len(sub_item, offset - operand_offset);
7112
7113
1
        break;
7114
2
    case 0x2A53: /* RSC Measurement */
7115
2
        if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE) {
7116
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7117
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7118
0
        }
7119
7120
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7121
0
            break;
7122
7123
2
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_rsc_measurement_flags, ett_btatt_value, hfx_btatt_rsc_measurement_flags, ENC_NA);
7124
2
        flags = tvb_get_uint8(tvb, offset);
7125
2
        offset += 1;
7126
7127
2
        proto_tree_add_item(tree, hf_btatt_rsc_measurement_instantaneous_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7128
2
        offset += 2;
7129
7130
2
        proto_tree_add_item(tree, hf_btatt_rsc_measurement_instantaneous_cadence, tvb, offset, 1, ENC_NA);
7131
2
        offset += 1;
7132
7133
2
        if (flags & 0x01) {
7134
1
            proto_tree_add_item(tree, hf_btatt_rsc_measurement_instantaneous_stride_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7135
1
            offset += 2;
7136
1
        }
7137
7138
2
        if (flags & 0x02) {
7139
0
            proto_tree_add_item(tree, hf_btatt_rsc_measurement_total_distance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7140
0
            offset += 4;
7141
0
        }
7142
7143
2
        break;
7144
0
    case 0x2A54: /* RSC Feature */
7145
0
        if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE) {
7146
0
            if (is_readable_request(att_data->opcode))
7147
0
                break;
7148
7149
0
            if (!is_readable_response(att_data->opcode))
7150
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7151
0
        }
7152
7153
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7154
0
            break;
7155
7156
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_rsc_feature, ett_btatt_value, hfx_btatt_rsc_feature, ENC_LITTLE_ENDIAN);
7157
0
        offset += 2;
7158
7159
0
        break;
7160
0
    case 0x2A55: /* SC Control Point */
7161
0
        if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE || service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE) {
7162
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7163
0
                break;
7164
7165
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7166
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7167
0
        }
7168
7169
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7170
0
            break;
7171
7172
0
        proto_tree_add_item(tree, hf_btatt_sc_control_point_opcode, tvb, offset, 1, ENC_NA);
7173
0
        opcode = tvb_get_uint8(tvb, offset);
7174
0
        offset += 1;
7175
7176
0
        switch (opcode) {
7177
0
        case  1: /* Set Cumulative Value */
7178
0
            proto_tree_add_item(tree, hf_btatt_sc_control_point_cumulative_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7179
0
            offset += 4;
7180
7181
0
            break;
7182
0
        case  3: /* Update Sensor Location */
7183
0
            proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7184
0
            offset += 1;
7185
7186
0
            break;
7187
0
        case 16: /* Response Code */
7188
0
            proto_tree_add_item(tree, hf_btatt_sc_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7189
0
            value = tvb_get_uint8(tvb, offset);
7190
0
            offset += 1;
7191
7192
0
            proto_tree_add_item(tree, hf_btatt_sc_control_point_response_value, tvb, offset, 1, ENC_NA);
7193
0
            offset += 1;
7194
7195
0
            if (value == 0x04 && tvb_get_uint8(tvb, offset) == 0x01) { /* Request Supported Sensor Locations */
7196
0
                while (tvb_captured_length_remaining(tvb, offset)) {
7197
0
                    proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7198
0
                    offset += 1;
7199
0
                }
7200
0
            }
7201
7202
0
            break;
7203
0
        case  2: /* Start Sensor Calibration */
7204
0
        case  4: /* Request Supported Sensor Locations */
7205
            /* N/A */
7206
0
            break;
7207
0
        }
7208
7209
0
        break;
7210
0
    case 0x2A56: /* Digital */
7211
0
        if (service_uuid.bt_uuid == GATT_SERVICE_AUTOMATION_IO) {
7212
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7213
0
                break;
7214
7215
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) &&
7216
0
                    att_data->opcode != ATT_OPCODE_WRITE_COMMAND && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7217
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7218
0
        }
7219
7220
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7221
0
            break;
7222
7223
0
        proto_tree_add_item(tree, hf_btatt_digital, tvb, offset, 1, ENC_NA);
7224
0
        offset += 1;
7225
7226
0
        break;
7227
0
    case 0x2A57: /* Digital Output */  /* APPROVED: NO */
7228
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7229
0
            break;
7230
7231
0
        proto_tree_add_item(tree, hf_btatt_digital_output, tvb, offset, -1, ENC_NA);
7232
0
        offset += tvb_reported_length_remaining(tvb, offset);
7233
7234
0
        break;
7235
0
    case 0x2A58: /* Analog */
7236
0
        if (service_uuid.bt_uuid == GATT_SERVICE_AUTOMATION_IO) {
7237
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7238
0
                break;
7239
7240
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) &&
7241
0
                    att_data->opcode != ATT_OPCODE_WRITE_COMMAND && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7242
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7243
0
        }
7244
7245
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7246
0
            break;
7247
7248
0
        proto_tree_add_item(tree, hf_btatt_analog, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7249
0
        offset += 2;
7250
7251
0
        break;
7252
0
    case 0x2A59: /* Analog Output */  /* APPROVED: NO */
7253
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7254
0
            break;
7255
7256
0
        proto_tree_add_item(tree, hf_btatt_analog_output, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7257
0
        offset += 2;
7258
7259
0
        break;
7260
0
    case 0x2A5A: /* Aggregate */
7261
0
        if (service_uuid.bt_uuid == GATT_SERVICE_AUTOMATION_IO) {
7262
0
            if (is_readable_request(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7263
0
                break;
7264
7265
0
            if (!is_readable_response(att_data->opcode) &&
7266
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7267
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7268
0
        }
7269
7270
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7271
0
            break;
7272
7273
0
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a56", tvb_new_subset_length(tvb, offset, 1), pinfo, tree, att_data);
7274
0
        offset += 1;
7275
7276
0
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a58", tvb_new_subset_length(tvb, offset, 2), pinfo, tree, att_data);
7277
0
        offset += 2;
7278
7279
0
        break;
7280
3
    case 0x2A5B: /* CSC Measurement */
7281
3
        if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE) {
7282
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7283
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7284
0
        }
7285
7286
3
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7287
0
            break;
7288
7289
3
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_csc_measurement_flags, ett_btatt_value, hfx_btatt_csc_measurement_flags, ENC_NA);
7290
3
        flags = tvb_get_uint8(tvb, offset);
7291
3
        offset += 1;
7292
7293
3
        if (flags & 0x01) {
7294
1
            proto_tree_add_item(tree, hf_btatt_csc_measurement_cumulative_wheel_revolutions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7295
1
            offset += 4;
7296
7297
1
            proto_tree_add_item(tree, hf_btatt_csc_measurement_last_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7298
1
            offset += 2;
7299
1
        }
7300
7301
3
        if (flags & 0x02) {
7302
1
            proto_tree_add_item(tree, hf_btatt_csc_measurement_cumulative_crank_revolutions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7303
1
            offset += 2;
7304
7305
1
            proto_tree_add_item(tree, hf_btatt_csc_measurement_last_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7306
1
            offset += 2;
7307
1
        }
7308
7309
3
        break;
7310
0
    case 0x2A5C: /* CSC Feature */
7311
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE) {
7312
0
            if (is_readable_request(att_data->opcode))
7313
0
                break;
7314
7315
0
            if (!is_readable_response(att_data->opcode))
7316
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7317
0
        }
7318
7319
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7320
0
            break;
7321
7322
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_csc_feature, ett_btatt_value, hfx_btatt_csc_feature, ENC_LITTLE_ENDIAN);
7323
0
        offset += 2;
7324
7325
0
        break;
7326
1
    case 0x2A5D: /* Sensor Location */
7327
1
        if (service_uuid.bt_uuid == GATT_SERVICE_RUNNING_SPEED_AND_CADENCE ||
7328
1
                service_uuid.bt_uuid == GATT_SERVICE_CYCLING_SPEED_AND_CADENCE ||
7329
1
                service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7330
0
            if (is_readable_request(att_data->opcode))
7331
0
                break;
7332
7333
0
            if (!is_readable_response(att_data->opcode))
7334
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7335
0
        }
7336
7337
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7338
0
            break;
7339
7340
1
        proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7341
1
        offset += 1;
7342
7343
1
        break;
7344
0
    case 0x2A5E: /* PLX Spot-Check Measurement */
7345
0
        if (service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
7346
0
            if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7347
0
                break;
7348
7349
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7350
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7351
0
        }
7352
7353
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7354
0
            break;
7355
7356
0
        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);
7357
0
        flags = tvb_get_uint8(tvb, offset);
7358
0
        offset += 1;
7359
7360
0
        sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_spot_check, tvb, offset, 4, ENC_NA);
7361
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7362
7363
0
        proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7364
0
        offset += 2;
7365
7366
0
        proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7367
0
        offset += 2;
7368
7369
0
        if (flags & 0x01) {
7370
0
            sub_item = proto_tree_add_item(tree, hf_btatt_plx_spot_check_measurement_timestamp, tvb, offset, 7, ENC_NA);
7371
0
            sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7372
7373
0
            btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, sub_tree, att_data);
7374
0
            offset += 7;
7375
0
        }
7376
7377
0
        if (flags & 0x02) {
7378
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_measurement_status, ett_btatt_value, hfx_btatt_plx_measurement_status, ENC_LITTLE_ENDIAN);
7379
0
            offset += 2;
7380
0
        }
7381
7382
0
        if (flags & 0x04) {
7383
0
            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);
7384
0
            offset += 3;
7385
0
        }
7386
7387
0
        if (flags & 0x08) {
7388
0
            proto_tree_add_item(tree, hf_btatt_plx_pulse_amplitude_index, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7389
0
            offset += 2;
7390
0
        }
7391
7392
0
        break;
7393
0
    case 0x2A5F: /* PLX Continuous Measurement */
7394
0
        if (service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
7395
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7396
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7397
0
        }
7398
7399
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7400
0
            break;
7401
7402
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_continuous_measurement_flags, ett_btatt_value, hfx_btatt_plx_continuous_measurement_flags, ENC_NA);
7403
0
        flags = tvb_get_uint8(tvb, offset);
7404
0
        offset += 1;
7405
7406
0
        sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_normal, tvb, offset, 4, ENC_NA);
7407
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7408
7409
0
        proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7410
0
        offset += 2;
7411
7412
0
        proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7413
0
        offset += 2;
7414
7415
0
        if (flags & 0x01) {
7416
0
            sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_fast, tvb, offset, 4, ENC_NA);
7417
0
            sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7418
7419
0
            proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7420
0
            offset += 2;
7421
7422
0
            proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7423
0
            offset += 2;
7424
0
        }
7425
7426
0
        if (flags & 0x02) {
7427
0
            sub_item = proto_tree_add_item(tree, hf_btatt_plx_spo2pr_slow, tvb, offset, 4, ENC_NA);
7428
0
            sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
7429
7430
0
            proto_tree_add_item(sub_tree, hf_btatt_plx_spo2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7431
0
            offset += 2;
7432
7433
0
            proto_tree_add_item(sub_tree, hf_btatt_plx_pulse_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7434
0
            offset += 2;
7435
0
        }
7436
7437
0
        if (flags & 0x04) {
7438
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_measurement_status, ett_btatt_value, hfx_btatt_plx_measurement_status, ENC_LITTLE_ENDIAN);
7439
0
            offset += 2;
7440
0
        }
7441
7442
0
        if (flags & 0x08) {
7443
0
            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);
7444
0
            offset += 3;
7445
0
        }
7446
7447
0
        if (flags & 0x10) {
7448
0
            proto_tree_add_item(tree, hf_btatt_plx_pulse_amplitude_index, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7449
0
            offset += 2;
7450
0
        }
7451
7452
0
        break;
7453
1
    case 0x2A60: /* PLX Features */
7454
1
        if (service_uuid.bt_uuid == GATT_SERVICE_PULSE_OXIMETER) {
7455
0
            if (is_readable_request(att_data->opcode))
7456
0
                break;
7457
7458
0
            if (!is_readable_response(att_data->opcode))
7459
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7460
0
        }
7461
7462
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7463
0
            break;
7464
7465
1
        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);
7466
1
        flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7467
1
        offset += 2;
7468
7469
1
        if (flags & 0x01) {
7470
1
            proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_plx_measurement_status, ett_btatt_value, hfx_btatt_plx_measurement_status, ENC_LITTLE_ENDIAN);
7471
1
            offset += 2;
7472
1
        }
7473
7474
1
        if (flags & 0x02) {
7475
1
            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);
7476
1
            offset += 3;
7477
1
        }
7478
7479
1
        break;
7480
0
    case 0x2A63: /* Cycling Power Measurement */
7481
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7482
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7483
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7484
0
        }
7485
7486
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7487
0
            break;
7488
7489
0
        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);
7490
0
        flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7491
0
        offset += 2;
7492
7493
0
        proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_instantaneous_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7494
0
        offset += 2;
7495
7496
0
        if (flags & 0x01) {
7497
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_pedal_power_balance, tvb, offset, 1, ENC_NA);
7498
0
            offset += 1;
7499
0
        }
7500
7501
0
        if (flags & 0x04) {
7502
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_accumulated_torque, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7503
0
            offset += 2;
7504
0
        }
7505
7506
0
        if (flags & 0x10) {
7507
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_wheel_revolution_data_cumulative_wheel_revolutions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7508
0
            offset += 4;
7509
7510
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_wheel_revolution_data_last_wheel_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7511
0
            offset += 2;
7512
0
        }
7513
7514
0
        if (flags & 0x20) {
7515
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_crank_revolution_data_cumulative_crank_revolutions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7516
0
            offset += 2;
7517
7518
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_crank_revolution_data_last_crank_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7519
0
            offset += 2;
7520
0
        }
7521
7522
0
        if (flags & 0x40) {
7523
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_force_magnitudes_maximum_force_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7524
0
            offset += 2;
7525
7526
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_force_magnitudes_minimum_force_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7527
0
            offset += 2;
7528
0
        }
7529
7530
0
        if (flags & 0x80) {
7531
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_maximum_torque_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7532
0
            offset += 2;
7533
7534
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_minimum_torque_magnitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7535
0
            offset += 2;
7536
0
        }
7537
7538
0
        if (flags & 0x100) {
7539
0
            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_LITTLE_ENDIAN);
7540
0
            offset += 3;
7541
0
        }
7542
7543
0
        if (flags & 0x200) {
7544
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_top_dead_spot_angle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7545
0
            offset += 2;
7546
0
        }
7547
7548
0
        if (flags & 0x400) {
7549
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_bottom_dead_spot_angle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7550
0
            offset += 2;
7551
0
        }
7552
7553
0
        if (flags & 0x800) {
7554
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_measurement_accumulated_energy, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7555
0
            offset += 2;
7556
0
        }
7557
7558
0
        break;
7559
0
    case 0x2A64: /* Cycling Power Vector */
7560
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7561
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7562
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7563
0
        }
7564
7565
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7566
0
            break;
7567
7568
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cycling_power_vector_flags, ett_btatt_value, hfx_btatt_cycling_power_vector_flags, ENC_NA);
7569
0
        flags = tvb_get_uint8(tvb, offset);
7570
0
        offset += 1;
7571
7572
0
        if (flags & 0x01) {
7573
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_vector_crank_revolution_data_cumulative_crank_revolutions, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7574
0
            offset += 2;
7575
7576
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_vector_crank_revolution_data_last_crank_event_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7577
0
            offset += 2;
7578
0
        }
7579
7580
0
        if (flags & 0x02) {
7581
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_vector_first_crank_measurement_angle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7582
0
            offset += 2;
7583
0
        }
7584
7585
0
        if (flags & 0x04) {
7586
0
            while (tvb_reported_length_remaining(tvb, offset) > 0) {
7587
0
                proto_tree_add_item(tree, hf_btatt_cycling_power_vector_instantaneous_force_magnitude_array, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7588
0
                offset += 2;
7589
0
            }
7590
0
        }
7591
7592
0
        if (flags & 0x08) {
7593
0
            while (tvb_reported_length_remaining(tvb, offset) > 0) {
7594
0
                proto_tree_add_item(tree, hf_btatt_cycling_power_vector_instantaneous_torque_magnitude_array, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7595
0
                offset += 2;
7596
0
            }
7597
0
        }
7598
7599
0
        break;
7600
0
    case 0x2A65: /* Cycling Power Feature */
7601
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7602
0
            if (is_readable_request(att_data->opcode))
7603
0
                break;
7604
7605
0
            if (!is_readable_response(att_data->opcode))
7606
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7607
0
        }
7608
7609
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7610
0
            break;
7611
7612
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cycling_power_feature, ett_btatt_value, hfx_btatt_cycling_power_feature, ENC_LITTLE_ENDIAN);
7613
0
        offset += 4;
7614
7615
0
        break;
7616
0
    case 0x2A66: /* Cycling Power Control Point */
7617
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CYCLING_POWER) {
7618
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7619
0
                break;
7620
7621
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7622
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7623
0
        }
7624
7625
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7626
0
            break;
7627
7628
0
        proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_opcode, tvb, offset, 1, ENC_NA);
7629
0
        opcode = tvb_get_uint8(tvb, offset);
7630
0
        offset += 1;
7631
7632
0
        switch (opcode) {
7633
0
        case  1: /* Set Cumulative Value */
7634
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_cumulative_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7635
0
            offset += 4;
7636
7637
0
            break;
7638
0
        case  2: /* Update Sensor Location */
7639
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_sensor_location, tvb, offset, 1, ENC_NA);
7640
0
            offset += 1;
7641
7642
0
            break;
7643
0
        case  4: /* Set Crank Length */
7644
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_crank_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7645
0
            offset += 2;
7646
7647
0
            break;
7648
0
        case  6: /* Set Chain Length */
7649
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7650
0
            offset += 2;
7651
7652
0
            break;
7653
0
        case  8: /* Set Chain Weight */
7654
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_weight, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7655
0
            offset += 2;
7656
7657
0
            break;
7658
0
        case 10: /* Set Span Length */
7659
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_span_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7660
0
            offset += 2;
7661
7662
0
            break;
7663
0
        case 13: /* Mask Cycling Power Measurement Characteristic Content */
7664
0
            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);
7665
0
            offset += 2;
7666
7667
0
            break;
7668
0
        case  3: /* Request Supported Sensor Locations */
7669
0
        case  5: /* Request Crank Length */
7670
0
        case  7: /* Request Chain Length */
7671
0
        case  9: /* Request Chain Weight */
7672
0
        case 11: /* Request Span Length */
7673
0
        case 12: /* Start Offset Compensation */
7674
0
        case 14: /* Request Sampling Rate */
7675
0
        case 15: /* Request Factory Calibration Date */
7676
            /* N/A */
7677
7678
0
            break;
7679
0
        case 32: /* Response Code */
7680
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7681
0
            offset += 1;
7682
7683
0
            proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_response_value, tvb, offset, 1, ENC_NA);
7684
0
            offset += 1;
7685
7686
0
            switch (tvb_get_uint8(tvb, offset - 2)) {
7687
0
            case  1: /* Set Cumulative Value */
7688
0
            case  2: /* Update Sensor Location */
7689
0
            case  4: /* Set Crank Length */
7690
0
            case  6: /* Set Chain Length */
7691
0
            case  8: /* Set Chain Weight */
7692
0
            case 10: /* Set Span Length */
7693
0
            case 13: /* Mask Cycling Power Measurement Characteristic Content */
7694
                /* N/A */
7695
7696
0
                break;
7697
0
            case  3: /* Request Supported Sensor Locations */
7698
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7699
0
                    while (tvb_captured_length_remaining(tvb, offset)) {
7700
0
                        proto_tree_add_item(tree, hf_btatt_sensor_location, tvb, offset, 1, ENC_NA);
7701
0
                        offset += 1;
7702
0
                    }
7703
0
                }
7704
7705
0
                break;
7706
0
            case  5: /* Request Crank Length */
7707
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7708
0
                    proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_crank_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7709
0
                    offset += 2;
7710
0
                }
7711
7712
0
                break;
7713
0
            case  7: /* Request Chain Length */
7714
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7715
0
                    proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7716
0
                    offset += 2;
7717
0
                }
7718
7719
0
                break;
7720
0
            case  9: /* Request Chain Weight */
7721
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7722
0
                    proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_chain_weight, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7723
0
                    offset += 2;
7724
0
                }
7725
7726
0
                break;
7727
0
            case 11: /* Request Span Length */
7728
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7729
0
                    proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_span_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7730
0
                    offset += 2;
7731
0
                }
7732
7733
0
                break;
7734
0
            case 12: /* Start Offset Compensation */
7735
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7736
0
                    proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_start_offset_compensation, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7737
0
                    offset += 2;
7738
0
                }
7739
7740
0
                break;
7741
0
            case 14: /* Request Sampling Rate */
7742
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7743
0
                    proto_tree_add_item(tree, hf_btatt_cycling_power_control_point_sampling_rate, tvb, offset, 1, ENC_NA);
7744
0
                    offset += 1;
7745
0
                }
7746
7747
0
                break;
7748
0
            case 15: /* Request Factory Calibration Date */
7749
0
                if (tvb_get_uint8(tvb, offset - 1) == 0x01) /* Success */ {
7750
0
                    offset = add_item_btatt_timestamp(tree, hf_btatt_cycling_power_control_point_factory_calibration_date, tvb, offset);
7751
0
                }
7752
7753
0
                break;
7754
0
            }
7755
0
            break;
7756
0
        }
7757
7758
0
        break;
7759
0
    case 0x2A67: /* Location and Speed */
7760
0
        if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7761
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7762
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7763
0
        }
7764
7765
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7766
0
            break;
7767
7768
0
        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);
7769
0
        flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7770
0
        offset += 2;
7771
7772
0
        if (flags & 0x01) {
7773
0
            proto_tree_add_item(tree, hf_btatt_location_and_speed_instantaneous_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7774
0
            offset += 2;
7775
0
        }
7776
7777
0
        if (flags & 0x02) {
7778
0
            proto_tree_add_item(tree, hf_btatt_location_and_speed_total_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7779
0
            offset += 3;
7780
0
        }
7781
7782
0
        if (flags & 0x04) {
7783
0
            proto_tree_add_item(tree, hf_btatt_location_and_speed_location_latitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7784
0
            offset += 4;
7785
7786
0
            proto_tree_add_item(tree, hf_btatt_location_and_speed_location_longitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7787
0
            offset += 4;
7788
0
        }
7789
7790
0
        if (flags & 0x08) {
7791
0
            proto_tree_add_item(tree, hf_btatt_location_and_speed_elevation, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7792
0
            offset += 3;
7793
0
        }
7794
7795
0
        if (flags & 0x10) {
7796
0
            proto_tree_add_item(tree, hf_btatt_location_and_speed_heading, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7797
0
            offset += 2;
7798
0
        }
7799
7800
0
        if (flags & 0x20) {
7801
0
            proto_tree_add_item(tree, hf_btatt_location_and_speed_rolling_time, tvb, offset, 1, ENC_NA);
7802
0
            offset += 1;
7803
0
        }
7804
7805
0
        if (flags & 0x40) {
7806
0
            offset = add_item_btatt_timestamp(tree, hf_btatt_location_and_speed_utc_time, tvb, offset);
7807
0
        }
7808
7809
0
        break;
7810
0
    case 0x2A68: /* Navigation */
7811
0
        if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7812
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
7813
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7814
0
        }
7815
7816
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7817
0
            break;
7818
7819
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_navigation_flags, ett_btatt_value, hfx_btatt_navigation_flags, ENC_LITTLE_ENDIAN);
7820
0
        flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7821
0
        offset += 2;
7822
7823
0
        proto_tree_add_item(tree, hf_btatt_navigation_bearing, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7824
0
        offset += 2;
7825
7826
0
        proto_tree_add_item(tree, hf_btatt_navigation_heading, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7827
0
        offset += 2;
7828
7829
0
        if (flags & 0x01) {
7830
0
            proto_tree_add_item(tree, hf_btatt_navigation_remaining_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7831
0
            offset += 3;
7832
0
        }
7833
7834
0
        if (flags & 0x02) {
7835
0
            proto_tree_add_item(tree, hf_btatt_navigation_remaining_vertical_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7836
0
            offset += 3;
7837
0
        }
7838
7839
0
        if (flags & 0x04) {
7840
0
            offset = add_item_btatt_timestamp(tree, hf_btatt_navigation_estimated_time_of_arrival, tvb, offset);
7841
0
        }
7842
7843
0
        break;
7844
0
    case 0x2A69: /* Position Quality */
7845
0
        if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7846
0
            if (is_readable_request(att_data->opcode))
7847
0
                break;
7848
7849
0
            if (!is_readable_response(att_data->opcode))
7850
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7851
0
        }
7852
7853
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7854
0
            break;
7855
7856
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_position_quality_flags, ett_btatt_value, hfx_btatt_position_quality_flags, ENC_LITTLE_ENDIAN);
7857
0
        flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
7858
0
        offset += 2;
7859
7860
0
        if (flags & 0x01) {
7861
0
            proto_tree_add_item(tree, hf_btatt_position_quality_number_of_beacons_in_solution, tvb, offset, 1, ENC_NA);
7862
0
            offset += 1;
7863
0
        }
7864
7865
0
        if (flags & 0x02) {
7866
0
            proto_tree_add_item(tree, hf_btatt_position_quality_number_of_beacons_in_view, tvb, offset, 1, ENC_NA);
7867
0
            offset += 1;
7868
0
        }
7869
7870
0
        if (flags & 0x04) {
7871
0
            proto_tree_add_item(tree, hf_btatt_position_quality_time_to_first_fix, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7872
0
            offset += 2;
7873
0
        }
7874
7875
0
        if (flags & 0x08) {
7876
0
            proto_tree_add_item(tree, hf_btatt_position_quality_ehpe, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7877
0
            offset += 4;
7878
0
        }
7879
7880
0
        if (flags & 0x10) {
7881
0
            proto_tree_add_item(tree, hf_btatt_position_quality_evpe, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7882
0
            offset += 4;
7883
0
        }
7884
7885
0
        if (flags & 0x20) {
7886
0
            proto_tree_add_item(tree, hf_btatt_position_quality_hdop, tvb, offset, 1, ENC_NA);
7887
0
            offset += 1;
7888
0
        }
7889
7890
0
        if (flags & 0x40) {
7891
0
            proto_tree_add_item(tree, hf_btatt_position_quality_vdop, tvb, offset, 1, ENC_NA);
7892
0
            offset += 1;
7893
0
        }
7894
7895
0
        break;
7896
0
    case 0x2A6A: /* LN Feature */
7897
0
        if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7898
0
            if (is_readable_request(att_data->opcode))
7899
0
                break;
7900
7901
0
            if (!is_readable_response(att_data->opcode))
7902
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7903
0
        }
7904
7905
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7906
0
            break;
7907
7908
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ln_feature, ett_btatt_value, hfx_btatt_ln_feature, ENC_LITTLE_ENDIAN);
7909
0
        offset += 4;
7910
7911
0
        break;
7912
2
    case 0x2A6B: /* LN Control Point */
7913
2
        if (service_uuid.bt_uuid == GATT_SERVICE_LOCATION_AND_NAVIGATION) {
7914
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
7915
0
                break;
7916
7917
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
7918
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
7919
0
        }
7920
7921
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
7922
0
            break;
7923
7924
2
        proto_tree_add_item(tree, hf_btatt_ln_control_point_opcode, tvb, offset, 1, ENC_NA);
7925
2
        opcode = tvb_get_uint8(tvb, offset);
7926
2
        offset += 1;
7927
7928
2
        switch (opcode) {
7929
0
        case  1: /* Set Cumulative Value */
7930
0
            proto_tree_add_item(tree, hf_btatt_ln_control_point_cumulative_value, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7931
0
            offset += 3;
7932
7933
0
            break;
7934
0
        case  2: /* Mask Location and Speed Characteristic Content */
7935
0
            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);
7936
0
            offset += 2;
7937
7938
0
            break;
7939
1
        case  3: /* Navigation Control */
7940
1
            proto_tree_add_item(tree, hf_btatt_ln_control_point_navigation_control, tvb, offset, 1, ENC_NA);
7941
1
            offset += 1;
7942
7943
1
            break;
7944
0
        case  4: /* Request Number of Routes */
7945
            /* N/A */
7946
7947
0
            break;
7948
0
        case  5: /* Request Name of Route */
7949
0
        case  6: /* Select Route */
7950
0
            proto_tree_add_item(tree, hf_btatt_ln_control_point_route_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7951
0
            offset += 2;
7952
7953
0
            break;
7954
0
        case  7: /* Set Fix Rate */
7955
0
            proto_tree_add_item(tree, hf_btatt_ln_control_point_fix_rate, tvb, offset, 1, ENC_NA);
7956
0
            offset += 1;
7957
7958
0
            break;
7959
0
        case  8: /* Set Elevation */
7960
0
            proto_tree_add_item(tree, hf_btatt_ln_control_point_elevation, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7961
0
            offset += 3;
7962
7963
0
            break;
7964
0
        case 32: /* Response Code */
7965
0
            proto_tree_add_item(tree, hf_btatt_ln_control_point_request_opcode, tvb, offset, 1, ENC_NA);
7966
0
            offset += 1;
7967
7968
0
            proto_tree_add_item(tree, hf_btatt_ln_control_point_response_value, tvb, offset, 1, ENC_NA);
7969
0
            offset += 1;
7970
7971
0
            switch (tvb_get_uint8(tvb, offset - 2)) {
7972
0
            case  1: /* Set Cumulative Value */
7973
0
            case  2: /* Mask Location and Speed Characteristic Content */
7974
0
            case  3: /* Navigation Control */
7975
0
            case  6: /* Select Route */
7976
0
            case  7: /* Set Fix Rate */
7977
0
            case  8: /* Set Elevation */
7978
                /* N/A */
7979
7980
0
                break;
7981
0
            case  4: /* Request Number of Routes */
7982
0
                proto_tree_add_item(tree, hf_btatt_ln_control_point_response_value_number_of_routes, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7983
0
                offset += 2;
7984
7985
0
                break;
7986
0
            case  5: /* Request Name of Route */
7987
0
                proto_tree_add_item(tree, hf_btatt_ln_control_point_response_value_name_of_route, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
7988
0
                offset += tvb_captured_length_remaining(tvb, offset);
7989
7990
0
                break;
7991
0
            }
7992
7993
0
            break;
7994
2
        }
7995
7996
2
        break;
7997
2
    case 0x2A6C: /* Elevation */
7998
2
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
7999
0
            if (is_readable_request(att_data->opcode))
8000
0
                break;
8001
8002
0
            if (!is_readable_response(att_data->opcode) &&
8003
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8004
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8005
0
        }
8006
8007
2
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8008
0
            break;
8009
8010
2
        proto_tree_add_item(tree, hf_btatt_elevation, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8011
2
        offset += 3;
8012
8013
2
        break;
8014
0
    case 0x2A6D: /* Pressure */
8015
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8016
0
            if (is_readable_request(att_data->opcode))
8017
0
                break;
8018
8019
0
            if (!is_readable_response(att_data->opcode) &&
8020
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8021
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8022
0
        }
8023
8024
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8025
0
            break;
8026
8027
0
        proto_tree_add_item(tree, hf_btatt_pressure, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8028
0
        offset += 4;
8029
8030
0
        break;
8031
0
    case 0x2A6E: /* Temperature */
8032
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8033
0
            if (is_readable_request(att_data->opcode))
8034
0
                break;
8035
8036
0
            if (!is_readable_response(att_data->opcode) &&
8037
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8038
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8039
0
        }
8040
8041
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8042
0
            break;
8043
8044
0
        proto_tree_add_item(tree, hf_btatt_temperature, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8045
0
        offset += 2;
8046
8047
0
        break;
8048
0
    case 0x2A6F: /* Humidity */
8049
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8050
0
            if (is_readable_request(att_data->opcode))
8051
0
                break;
8052
8053
0
            if (!is_readable_response(att_data->opcode) &&
8054
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8055
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8056
0
        }
8057
8058
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8059
0
            break;
8060
8061
0
        proto_tree_add_item(tree, hf_btatt_humidity, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8062
0
        offset += 2;
8063
8064
0
        break;
8065
0
    case 0x2A70: /* True Wind Speed */
8066
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8067
0
            if (is_readable_request(att_data->opcode))
8068
0
                break;
8069
8070
0
            if (!is_readable_response(att_data->opcode) &&
8071
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8072
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8073
0
        }
8074
8075
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8076
0
            break;
8077
8078
0
        proto_tree_add_item(tree, hf_btatt_true_wind_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8079
0
        offset += 2;
8080
8081
0
        break;
8082
0
    case 0x2A71: /* True Wind Direction */
8083
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8084
0
            if (is_readable_request(att_data->opcode))
8085
0
                break;
8086
8087
0
            if (!is_readable_response(att_data->opcode) &&
8088
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8089
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8090
0
        }
8091
8092
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8093
0
            break;
8094
8095
0
        proto_tree_add_item(tree, hf_btatt_true_wind_direction, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8096
0
        offset += 2;
8097
8098
0
        break;
8099
0
    case 0x2A72: /* Apparent Wind Speed */
8100
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8101
0
            if (is_readable_request(att_data->opcode))
8102
0
                break;
8103
8104
0
            if (!is_readable_response(att_data->opcode) &&
8105
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8106
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8107
0
        }
8108
8109
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8110
0
            break;
8111
8112
0
        proto_tree_add_item(tree, hf_btatt_apparent_wind_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8113
0
        offset += 2;
8114
8115
0
        break;
8116
0
    case 0x2A73: /* Apparent Wind Direction */
8117
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8118
0
            if (is_readable_request(att_data->opcode))
8119
0
                break;
8120
8121
0
            if (!is_readable_response(att_data->opcode) &&
8122
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8123
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8124
0
        }
8125
8126
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8127
0
            break;
8128
8129
0
        proto_tree_add_item(tree, hf_btatt_apparent_wind_direction, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8130
0
        offset += 2;
8131
8132
0
        break;
8133
0
    case 0x2A74: /* Gust Factor */
8134
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8135
0
            if (is_readable_request(att_data->opcode))
8136
0
                break;
8137
8138
0
            if (!is_readable_response(att_data->opcode) &&
8139
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8140
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8141
0
        }
8142
8143
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8144
0
            break;
8145
8146
0
        proto_tree_add_item(tree, hf_btatt_gust_factor, tvb, offset, 1, ENC_NA);
8147
0
        offset += 1;
8148
8149
0
        break;
8150
0
    case 0x2A75: /* Pollen Concentration */
8151
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8152
0
            if (is_readable_request(att_data->opcode))
8153
0
                break;
8154
8155
0
            if (!is_readable_response(att_data->opcode) &&
8156
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8157
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8158
0
        }
8159
8160
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8161
0
            break;
8162
8163
0
        proto_tree_add_item(tree, hf_btatt_pollen_concentration, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8164
0
        offset += 3;
8165
8166
0
        break;
8167
0
    case 0x2A76: /* UV Index */
8168
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8169
0
            if (is_readable_request(att_data->opcode))
8170
0
                break;
8171
8172
0
            if (!is_readable_response(att_data->opcode) &&
8173
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8174
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8175
0
        }
8176
8177
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8178
0
            break;
8179
8180
0
        proto_tree_add_item(tree, hf_btatt_uv_index, tvb, offset, 1, ENC_NA);
8181
0
        offset += 1;
8182
8183
0
        break;
8184
0
    case 0x2A77: /* Irradiance */
8185
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8186
0
            if (is_readable_request(att_data->opcode))
8187
0
                break;
8188
8189
0
            if (!is_readable_response(att_data->opcode) &&
8190
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8191
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8192
0
        }
8193
8194
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8195
0
            break;
8196
8197
0
        proto_tree_add_item(tree, hf_btatt_irradiance, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8198
0
        offset += 2;
8199
8200
0
        break;
8201
0
    case 0x2A78: /* Rainfall */
8202
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8203
0
            if (is_readable_request(att_data->opcode))
8204
0
                break;
8205
8206
0
            if (!is_readable_response(att_data->opcode) &&
8207
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8208
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8209
0
        }
8210
8211
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8212
0
            break;
8213
8214
0
        proto_tree_add_item(tree, hf_btatt_rainfall, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8215
0
        offset += 2;
8216
8217
0
        break;
8218
0
    case 0x2A79: /* Wind Chill */
8219
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8220
0
            if (is_readable_request(att_data->opcode))
8221
0
                break;
8222
8223
0
            if (!is_readable_response(att_data->opcode) &&
8224
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8225
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8226
0
        }
8227
8228
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8229
0
            break;
8230
8231
0
        proto_tree_add_item(tree, hf_btatt_wind_chill, tvb, offset, 1, ENC_NA);
8232
0
        offset += 1;
8233
8234
0
        break;
8235
0
    case 0x2A7A: /* Heat Index */
8236
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8237
0
            if (is_readable_request(att_data->opcode))
8238
0
                break;
8239
8240
0
            if (!is_readable_response(att_data->opcode) &&
8241
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8242
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8243
0
        }
8244
8245
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8246
0
            break;
8247
8248
0
        proto_tree_add_item(tree, hf_btatt_heart_index, tvb, offset, 1, ENC_NA);
8249
0
        offset += 1;
8250
8251
0
        break;
8252
0
    case 0x2A7B: /* Dew Point */
8253
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8254
0
            if (is_readable_request(att_data->opcode))
8255
0
                break;
8256
8257
0
            if (!is_readable_response(att_data->opcode) &&
8258
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8259
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8260
0
        }
8261
8262
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8263
0
            break;
8264
8265
0
        proto_tree_add_item(tree, hf_btatt_dew_point, tvb, offset, 1, ENC_NA);
8266
0
        offset += 1;
8267
8268
0
        break;
8269
0
    case 0x2A7D: /* Descriptor Value Changed */
8270
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
8271
0
            if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8272
0
                break;
8273
8274
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8275
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8276
0
        }
8277
8278
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8279
0
            break;
8280
8281
0
        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);
8282
0
        offset += 2;
8283
8284
0
        if (tvb_reported_length_remaining(tvb, offset) == 2) {
8285
0
            proto_tree_add_item(tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8286
0
            offset += 2;
8287
0
        } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
8288
0
            proto_tree_add_item(tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
8289
0
            offset += 16;
8290
0
        } else {
8291
0
            sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
8292
0
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
8293
0
            offset = tvb_captured_length(tvb);
8294
0
        }
8295
8296
0
        break;
8297
0
    case 0x2A7E: /* Aerobic Heart Rate Lower Limit */
8298
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8299
0
            break;
8300
8301
0
        proto_tree_add_item(tree, hf_btatt_aerobic_heart_rate_lower_limit, tvb, offset, 1, ENC_NA);
8302
0
        offset += 1;
8303
8304
0
        break;
8305
0
    case 0x2A7F: /* Aerobic Threshold */
8306
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8307
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8308
0
                break;
8309
8310
0
            if (!is_readable_response(att_data->opcode) &&
8311
0
                    !is_writeable_request(att_data->opcode))
8312
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8313
0
        }
8314
8315
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8316
0
            break;
8317
8318
0
        proto_tree_add_item(tree, hf_btatt_aerobic_threshold, tvb, offset, 1, ENC_NA);
8319
0
        offset += 1;
8320
8321
0
        break;
8322
0
    case 0x2A80: /* Age */
8323
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8324
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8325
0
                break;
8326
8327
0
            if (!is_readable_response(att_data->opcode) &&
8328
0
                    !is_writeable_request(att_data->opcode))
8329
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8330
0
        }
8331
8332
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8333
0
            break;
8334
8335
0
        proto_tree_add_item(tree, hf_btatt_age, tvb, offset, 1, ENC_NA);
8336
0
        offset += 1;
8337
8338
0
        break;
8339
0
    case 0x2A81: /* Anaerobic Heart Rate Lower Limit */
8340
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8341
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8342
0
                break;
8343
8344
0
            if (!is_readable_response(att_data->opcode) &&
8345
0
                    !is_writeable_request(att_data->opcode))
8346
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8347
0
        }
8348
8349
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8350
0
            break;
8351
8352
0
        proto_tree_add_item(tree, hf_btatt_anaerobic_heart_rate_lower_limit, tvb, offset, 1, ENC_NA);
8353
0
        offset += 1;
8354
8355
0
        break;
8356
1
    case 0x2A82: /* Anaerobic Heart Rate Upper Limit */
8357
1
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8358
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8359
0
                break;
8360
8361
0
            if (!is_readable_response(att_data->opcode) &&
8362
0
                    !is_writeable_request(att_data->opcode))
8363
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8364
0
        }
8365
8366
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8367
0
            break;
8368
8369
1
        proto_tree_add_item(tree, hf_btatt_anaerobic_heart_rate_upper_limit, tvb, offset, 1, ENC_NA);
8370
1
        offset += 1;
8371
8372
1
        break;
8373
0
    case 0x2A83: /* Anaerobic Threshold */
8374
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8375
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8376
0
                break;
8377
8378
0
            if (!is_readable_response(att_data->opcode) &&
8379
0
                    !is_writeable_request(att_data->opcode))
8380
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8381
0
        }
8382
8383
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8384
0
            break;
8385
8386
0
        proto_tree_add_item(tree, hf_btatt_anaerobic_threshold, tvb, offset, 1, ENC_NA);
8387
0
        offset += 1;
8388
8389
0
        break;
8390
0
    case 0x2A84: /* Aerobic Heart Rate Upper Limit */
8391
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8392
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8393
0
                break;
8394
8395
0
            if (!is_readable_response(att_data->opcode) &&
8396
0
                    !is_writeable_request(att_data->opcode))
8397
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8398
0
        }
8399
8400
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8401
0
            break;
8402
8403
0
        proto_tree_add_item(tree, hf_btatt_aerobic_heart_rate_upper_limit, tvb, offset, 1, ENC_NA);
8404
0
        offset += 1;
8405
8406
0
        break;
8407
0
    case 0x2A85: /* Date of Birth */
8408
0
    case 0x2A86: /* Date of Threshold Assessment */
8409
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8410
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8411
0
                break;
8412
8413
0
            if (!is_readable_response(att_data->opcode) &&
8414
0
                    !is_writeable_request(att_data->opcode))
8415
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8416
0
        }
8417
8418
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8419
0
            break;
8420
8421
0
        proto_tree_add_item(tree, hf_btatt_year, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8422
0
        offset += 2;
8423
8424
0
        proto_tree_add_item(tree, hf_btatt_month, tvb, offset, 1, ENC_NA);
8425
0
        offset += 1;
8426
8427
0
        proto_tree_add_item(tree, hf_btatt_day, tvb, offset, 1, ENC_NA);
8428
0
        offset += 1;
8429
8430
0
        break;
8431
0
    case 0x2A87: /* Email Address */
8432
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8433
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8434
0
                break;
8435
8436
0
            if (!is_readable_response(att_data->opcode) &&
8437
0
                    !is_writeable_request(att_data->opcode))
8438
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8439
0
        }
8440
8441
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8442
0
            break;
8443
8444
0
        proto_tree_add_item(tree, hf_btatt_email_address, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
8445
0
        offset += tvb_captured_length_remaining(tvb, offset);
8446
8447
0
        break;
8448
0
    case 0x2A88: /* Fat Burn Heart Rate Lower Limit */
8449
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8450
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8451
0
                break;
8452
8453
0
            if (!is_readable_response(att_data->opcode) &&
8454
0
                    !is_writeable_request(att_data->opcode))
8455
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8456
0
        }
8457
8458
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8459
0
            break;
8460
8461
0
        proto_tree_add_item(tree, hf_btatt_fat_burn_heart_rate_lower_limit, tvb, offset, 1, ENC_NA);
8462
0
        offset += 1;
8463
8464
0
        break;
8465
0
    case 0x2A89: /* Fat Burn Heart Rate Upper Limit */
8466
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8467
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8468
0
                break;
8469
8470
0
            if (!is_readable_response(att_data->opcode) &&
8471
0
                    !is_writeable_request(att_data->opcode))
8472
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8473
0
        }
8474
8475
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8476
0
            break;
8477
8478
0
        proto_tree_add_item(tree, hf_btatt_fat_burn_heart_rate_upper_limit, tvb, offset, 1, ENC_NA);
8479
0
        offset += 1;
8480
8481
0
        break;
8482
0
    case 0x2A8A: /* First Name */
8483
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8484
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8485
0
                break;
8486
8487
0
            if (!is_readable_response(att_data->opcode) &&
8488
0
                    !is_writeable_request(att_data->opcode))
8489
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8490
0
        }
8491
8492
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8493
0
            break;
8494
8495
0
        proto_tree_add_item(tree, hf_btatt_first_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
8496
0
        offset += tvb_captured_length_remaining(tvb, offset);
8497
8498
0
        break;
8499
0
    case 0x2A8B: /* Five Zone Heart Rate Limits */
8500
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8501
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8502
0
                break;
8503
8504
0
            if (!is_readable_response(att_data->opcode) &&
8505
0
                    !is_writeable_request(att_data->opcode))
8506
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8507
0
        }
8508
8509
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8510
0
            break;
8511
8512
0
        proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_very_light_light_limit, tvb, offset, 1, ENC_NA);
8513
0
        offset += 1;
8514
8515
0
        proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_light_moderate_limit, tvb, offset, 1, ENC_NA);
8516
0
        offset += 1;
8517
8518
0
        proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_moderate_hard_limit, tvb, offset, 1, ENC_NA);
8519
0
        offset += 1;
8520
8521
0
        proto_tree_add_item(tree, hf_btatt_five_zone_heart_rate_limits_hard_maximum_limit, tvb, offset, 1, ENC_NA);
8522
0
        offset += 1;
8523
8524
0
        break;
8525
0
    case 0x2A8C: /* Gender */
8526
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8527
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8528
0
                break;
8529
8530
0
            if (!is_readable_response(att_data->opcode) &&
8531
0
                    !is_writeable_request(att_data->opcode))
8532
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8533
0
        }
8534
8535
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8536
0
            break;
8537
8538
0
        proto_tree_add_item(tree, hf_btatt_gender, tvb, offset, 1, ENC_NA);
8539
0
        offset += 1;
8540
8541
0
        break;
8542
0
    case 0x2A8D: /* Heart Rate Max */
8543
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8544
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8545
0
                break;
8546
8547
0
            if (!is_readable_response(att_data->opcode) &&
8548
0
                    !is_writeable_request(att_data->opcode))
8549
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8550
0
        }
8551
8552
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8553
0
            break;
8554
8555
0
        proto_tree_add_item(tree, hf_btatt_heart_rate_max, tvb, offset, 1, ENC_NA);
8556
0
        offset += 1;
8557
8558
0
        break;
8559
0
    case 0x2A8E: /* Height */
8560
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8561
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8562
0
                break;
8563
8564
0
            if (!is_readable_response(att_data->opcode) &&
8565
0
                    !is_writeable_request(att_data->opcode))
8566
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8567
0
        }
8568
8569
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8570
0
            break;
8571
8572
0
        proto_tree_add_item(tree, hf_btatt_height, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8573
0
        offset += 2;
8574
8575
0
        break;
8576
0
    case 0x2A8F: /* Hip Circumference */
8577
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8578
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8579
0
                break;
8580
8581
0
            if (!is_readable_response(att_data->opcode) &&
8582
0
                    !is_writeable_request(att_data->opcode))
8583
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8584
0
        }
8585
8586
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8587
0
            break;
8588
8589
0
        proto_tree_add_item(tree, hf_btatt_hip_circumference, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8590
0
        offset += 2;
8591
8592
0
        break;
8593
1
    case 0x2A90: /* Last Name */
8594
1
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8595
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8596
0
                break;
8597
8598
0
            if (!is_readable_response(att_data->opcode) &&
8599
0
                    !is_writeable_request(att_data->opcode))
8600
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8601
0
        }
8602
8603
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8604
0
            break;
8605
8606
1
        proto_tree_add_item(tree, hf_btatt_last_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
8607
1
        offset += tvb_captured_length_remaining(tvb, offset);
8608
8609
1
        break;
8610
0
    case 0x2A91: /* Maximum Recommended Heart Rate */
8611
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8612
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8613
0
                break;
8614
8615
0
            if (!is_readable_response(att_data->opcode) &&
8616
0
                    !is_writeable_request(att_data->opcode))
8617
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8618
0
        }
8619
8620
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8621
0
            break;
8622
8623
0
        proto_tree_add_item(tree, hf_btatt_maximum_recommended_heart_rate, tvb, offset, 1, ENC_NA);
8624
0
        offset += 1;
8625
8626
0
        break;
8627
0
    case 0x2A92: /* Resting Heart Rate */
8628
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8629
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8630
0
                break;
8631
8632
0
            if (!is_readable_response(att_data->opcode) &&
8633
0
                    !is_writeable_request(att_data->opcode))
8634
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8635
0
        }
8636
8637
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8638
0
            break;
8639
8640
0
        proto_tree_add_item(tree, hf_btatt_resting_heart_rate, tvb, offset, 1, ENC_NA);
8641
0
        offset += 1;
8642
8643
0
        break;
8644
1
    case 0x2A93: /* Sport Type for Aerobic and Anaerobic Thresholds */
8645
1
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8646
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8647
0
                break;
8648
8649
0
            if (!is_readable_response(att_data->opcode) &&
8650
0
                    !is_writeable_request(att_data->opcode))
8651
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8652
0
        }
8653
8654
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8655
0
            break;
8656
8657
1
        proto_tree_add_item(tree, hf_btatt_sport_type_for_aerobic_and_anaerobic_thresholds, tvb, offset, 1, ENC_NA);
8658
1
        offset += 1;
8659
8660
1
        break;
8661
0
    case 0x2A94: /* Three Zone Heart Rate Limits */
8662
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8663
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8664
0
                break;
8665
8666
0
            if (!is_readable_response(att_data->opcode) &&
8667
0
                    !is_writeable_request(att_data->opcode))
8668
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8669
0
        }
8670
8671
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8672
0
            break;
8673
8674
0
        proto_tree_add_item(tree, hf_btatt_three_zone_heart_rate_limits_light_moderate, tvb, offset, 1, ENC_NA);
8675
0
        offset += 1;
8676
8677
0
        proto_tree_add_item(tree, hf_btatt_three_zone_heart_rate_limits_moderate_hard, tvb, offset, 1, ENC_NA);
8678
0
        offset += 1;
8679
8680
0
        break;
8681
0
    case 0x2A95: /* Two Zone Heart Rate Limit */
8682
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8683
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8684
0
                break;
8685
8686
0
            if (!is_readable_response(att_data->opcode) &&
8687
0
                    !is_writeable_request(att_data->opcode))
8688
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8689
0
        }
8690
8691
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8692
0
            break;
8693
8694
0
        proto_tree_add_item(tree, hf_btatt_two_zone_heart_rate_limit_fat_burn_fitness, tvb, offset, 1, ENC_NA);
8695
0
        offset += 1;
8696
8697
0
        break;
8698
1
    case 0x2A96: /* VO2 Max */
8699
1
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8700
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8701
0
                break;
8702
8703
0
            if (!is_readable_response(att_data->opcode) &&
8704
0
                    !is_writeable_request(att_data->opcode))
8705
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8706
0
        }
8707
8708
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8709
0
            break;
8710
8711
1
        proto_tree_add_item(tree, hf_btatt_vo2_max, tvb, offset, 1, ENC_NA);
8712
1
        offset += 1;
8713
8714
1
        break;
8715
0
    case 0x2A97: /* Waist Circumference */
8716
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8717
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8718
0
                break;
8719
8720
0
            if (!is_readable_response(att_data->opcode) &&
8721
0
                    !is_writeable_request(att_data->opcode))
8722
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8723
0
        }
8724
8725
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8726
0
            break;
8727
8728
0
        proto_tree_add_item(tree, hf_btatt_waist_circumference, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8729
0
        offset += 2;
8730
8731
0
        break;
8732
0
    case 0x2A98: /* Weight */
8733
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8734
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8735
0
                break;
8736
8737
0
            if (!is_readable_response(att_data->opcode) &&
8738
0
                    !is_writeable_request(att_data->opcode))
8739
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8740
0
        }
8741
8742
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8743
0
            break;
8744
8745
0
        proto_tree_add_item(tree, hf_btatt_weight, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8746
0
        offset += 2;
8747
8748
0
        break;
8749
0
    case 0x2A99: /* Database Change Increment */
8750
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8751
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
8752
0
                break;
8753
8754
0
            if (!is_readable_response(att_data->opcode) &&
8755
0
                    !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
8756
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8757
0
        }
8758
8759
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8760
0
            break;
8761
8762
0
        proto_tree_add_item(tree, hf_btatt_database_change_increment, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8763
0
        offset += 4;
8764
8765
0
        break;
8766
0
    case 0x2A9A: /* User Index */
8767
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8768
0
            if (is_readable_request(att_data->opcode))
8769
0
                break;
8770
8771
0
            if (!is_readable_response(att_data->opcode))
8772
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8773
0
        }
8774
8775
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8776
0
            break;
8777
8778
0
        proto_tree_add_item(tree, hf_btatt_user_index, tvb, offset, 1, ENC_NA);
8779
0
        offset += 1;
8780
8781
0
        break;
8782
0
    case 0x2A9B: /* Body Composition Feature */
8783
0
        if (service_uuid.bt_uuid == GATT_SERVICE_BODY_COMPOSITION) {
8784
0
            if (is_readable_request(att_data->opcode))
8785
0
                break;
8786
8787
0
            if (!is_readable_response(att_data->opcode))
8788
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8789
0
        }
8790
8791
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8792
0
            break;
8793
8794
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_body_composition_feature, ett_btatt_value, hfx_btatt_body_composition_feature, ENC_LITTLE_ENDIAN);
8795
0
        offset += 4;
8796
8797
0
        break;
8798
0
    case 0x2A9C: /* Body Composition Measurement */
8799
0
        if (service_uuid.bt_uuid == GATT_SERVICE_BODY_COMPOSITION) {
8800
0
            if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8801
0
                break;
8802
8803
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8804
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8805
0
        }
8806
8807
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8808
0
            break;
8809
8810
0
        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);
8811
0
        flags = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
8812
0
        offset += 2;
8813
8814
0
        proto_tree_add_item(tree, hf_btatt_body_composition_measurement_body_fat_percentage, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8815
0
        offset += 2;
8816
8817
0
        if (flags & 0x02) {
8818
0
            offset = add_item_btatt_timestamp(tree, hf_btatt_body_composition_measurement_timestamp, tvb, offset);
8819
0
        }
8820
8821
0
        if (flags & 0x04) {
8822
0
            proto_tree_add_item(tree, hf_btatt_body_composition_measurement_user_id, tvb, offset, 1, ENC_NA);
8823
0
            offset += 1;
8824
0
        }
8825
8826
0
        if (flags & 0x08) {
8827
0
            proto_tree_add_item(tree, hf_btatt_body_composition_measurement_basal_metabolism, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8828
0
            offset += 2;
8829
0
        }
8830
8831
0
        if (flags & 0x10) {
8832
0
            proto_tree_add_item(tree, hf_btatt_body_composition_measurement_muscle_percentage, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8833
0
            offset += 2;
8834
0
        }
8835
8836
0
        if (flags & 0x20) {
8837
0
            if (flags & 0x01)
8838
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_muscle_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8839
0
            else
8840
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_muscle_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8841
0
            offset += 2;
8842
8843
0
        }
8844
8845
0
        if (flags & 0x40) {
8846
0
            if (flags & 0x01)
8847
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_fat_free_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8848
0
            else
8849
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_fat_free_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8850
0
            offset += 2;
8851
8852
0
        }
8853
8854
0
        if (flags & 0x80) {
8855
0
            if (flags & 0x01)
8856
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_soft_lean_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8857
0
            else
8858
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_soft_lean_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8859
0
            offset += 2;
8860
0
        }
8861
8862
0
        if (flags & 0x100) {
8863
0
            if (flags & 0x01)
8864
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_body_water_mass_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8865
0
            else
8866
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_body_water_mass_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8867
0
            offset += 2;
8868
0
        }
8869
8870
0
        if (flags & 0x200) {
8871
0
            proto_tree_add_item(tree, hf_btatt_body_composition_measurement_impedance, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8872
0
            offset += 2;
8873
0
        }
8874
8875
0
        if (flags & 0x400) {
8876
0
            if (flags & 0x01)
8877
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_weight_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8878
0
            else
8879
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_weight_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8880
0
            offset += 2;
8881
0
        }
8882
8883
0
        if (flags & 0x800) {
8884
0
            if (flags & 0x01)
8885
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_height_inches, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8886
0
            else
8887
0
                proto_tree_add_item(tree, hf_btatt_body_composition_measurement_height_meter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8888
0
            offset += 2;
8889
0
        }
8890
8891
0
        break;
8892
0
    case 0x2A9D: /* Weight Measurement */
8893
0
        if (service_uuid.bt_uuid == GATT_SERVICE_WEIGHT_SCALE) {
8894
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8895
0
                break;
8896
8897
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8898
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8899
0
        }
8900
8901
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8902
0
            break;
8903
8904
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_weight_measurement_flags, ett_btatt_value, hfx_btatt_weight_measurement_flags, ENC_NA);
8905
0
        flags = tvb_get_uint8(tvb, offset);
8906
0
        offset += 1;
8907
8908
0
        if (flags & 0x01)
8909
0
            proto_tree_add_item(tree, hf_btatt_weight_measurement_weight_lb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8910
0
        else
8911
0
            proto_tree_add_item(tree, hf_btatt_weight_measurement_weight_kg, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8912
0
        offset += 2;
8913
8914
0
        if (flags & 0x02) {
8915
0
            offset = add_item_btatt_timestamp(tree, hf_btatt_weight_measurement_timestamp, tvb, offset);
8916
0
        }
8917
8918
0
        if (flags & 0x04) {
8919
0
            proto_tree_add_item(tree, hf_btatt_weight_measurement_user_id, tvb, offset, 1, ENC_NA);
8920
0
            offset += 1;
8921
0
        }
8922
8923
0
        if (flags & 0x08) {
8924
0
            proto_tree_add_item(tree, hf_btatt_weight_measurement_bmi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8925
0
            offset += 2;
8926
8927
0
            if (flags & 0x01)
8928
0
                proto_tree_add_item(tree, hf_btatt_weight_measurement_height_in, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8929
0
            else
8930
0
                proto_tree_add_item(tree, hf_btatt_weight_measurement_height_m, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8931
0
            offset += 2;
8932
0
        }
8933
8934
0
        break;
8935
1
    case 0x2A9E: /* Weight Scale Feature */
8936
1
         if (service_uuid.bt_uuid == GATT_SERVICE_WEIGHT_SCALE) {
8937
0
            if (is_readable_request(att_data->opcode))
8938
0
                break;
8939
8940
0
            if (!is_readable_response(att_data->opcode))
8941
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8942
0
        }
8943
8944
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8945
0
            break;
8946
8947
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_weight_scale_feature, ett_btatt_value, hfx_btatt_weight_scale_feature, ENC_LITTLE_ENDIAN);
8948
1
        offset += 4;
8949
8950
1
        break;
8951
0
    case 0x2A9F: /* User Control Point */
8952
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
8953
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
8954
0
                break;
8955
8956
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
8957
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
8958
0
        }
8959
8960
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
8961
0
            break;
8962
8963
0
        proto_tree_add_item(tree, hf_btatt_user_control_point_opcode, tvb, offset, 1, ENC_NA);
8964
0
        opcode = tvb_get_uint8(tvb, offset);
8965
0
        offset += 1;
8966
8967
0
        switch (opcode) {
8968
0
        case 0x01: /* Register New User */
8969
0
            sub_item = proto_tree_add_item(tree, hf_btatt_user_control_point_consent_code, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8970
0
            value =  tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
8971
0
            if (value > 9999)
8972
0
                expert_add_info(pinfo, sub_item, &ei_btatt_consent_out_of_bounds);
8973
0
            offset += 2;
8974
8975
0
            break;
8976
0
        case 0x02: /* Consent */
8977
0
            proto_tree_add_item(tree, hf_btatt_user_index, tvb, offset, 1, ENC_NA);
8978
0
            offset += 1;
8979
8980
0
            sub_item = proto_tree_add_item(tree, hf_btatt_user_control_point_consent_code, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8981
0
            value =  tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
8982
0
            if (value > 9999)
8983
0
                expert_add_info(pinfo, sub_item, &ei_btatt_consent_out_of_bounds);
8984
0
            offset += 2;
8985
8986
0
            break;
8987
0
        case 0x03: /* Delete User Data */
8988
            /* N/A */
8989
0
            break;
8990
0
        case 0x20: /* Response Code */
8991
0
            proto_tree_add_item(tree, hf_btatt_user_control_point_request_opcode, tvb, offset, 1, ENC_NA);
8992
0
            offset += 1;
8993
8994
0
            proto_tree_add_item(tree, hf_btatt_user_control_point_response_value, tvb, offset, 1, ENC_NA);
8995
0
            offset += 1;
8996
8997
0
            if (tvb_get_uint8(tvb, offset - 2) == 0x01 && tvb_get_uint8(tvb, offset - 1) == 0x01) { /* Register New User && Success */
8998
0
                proto_tree_add_item(tree, hf_btatt_user_index, tvb, offset, 1, ENC_NA);
8999
0
                offset += 1;
9000
0
            }
9001
9002
0
            break;
9003
0
        }
9004
9005
0
        break;
9006
0
    case 0x2AA0: /* Magnetic Flux Density - 2D */
9007
0
    case 0x2AA1: /* Magnetic Flux Density - 3D */
9008
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
9009
0
            if (is_readable_request(att_data->opcode))
9010
0
                break;
9011
9012
0
            if (!is_readable_response(att_data->opcode) &&
9013
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9014
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9015
0
        }
9016
9017
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9018
0
            break;
9019
9020
0
        proto_tree_add_item(tree, hf_btatt_magnetic_flux_density_x, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9021
0
        offset += 2;
9022
9023
0
        proto_tree_add_item(tree, hf_btatt_magnetic_flux_density_y, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9024
0
        offset += 2;
9025
9026
0
        if (uuid.bt_uuid == 0x2AA1) {
9027
0
            proto_tree_add_item(tree, hf_btatt_magnetic_flux_density_z, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9028
0
            offset += 2;
9029
0
        }
9030
9031
0
        break;
9032
0
    case 0x2AA2: /* Language */
9033
0
        if (service_uuid.bt_uuid == GATT_SERVICE_USER_DATA) {
9034
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9035
0
                break;
9036
9037
0
            if (!is_readable_response(att_data->opcode) &&
9038
0
                    !is_writeable_request(att_data->opcode))
9039
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9040
0
        }
9041
9042
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9043
0
            break;
9044
9045
0
        proto_tree_add_item(tree, hf_btatt_language, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
9046
0
        offset += tvb_captured_length_remaining(tvb, offset);
9047
9048
0
        break;
9049
0
    case 0x2AA3: /* Barometric Pressure Trend */
9050
0
        if (service_uuid.bt_uuid == GATT_SERVICE_ENVIRONMENTAL_SENSING) {
9051
0
            if (is_readable_request(att_data->opcode))
9052
0
                break;
9053
9054
0
            if (!is_readable_response(att_data->opcode) &&
9055
0
                    att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9056
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9057
0
        }
9058
9059
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9060
0
            break;
9061
9062
0
        proto_tree_add_item(tree, hf_btatt_barometric_pressure_trend, tvb, offset, 1, ENC_NA);
9063
0
        offset += 1;
9064
9065
0
        break;
9066
0
    case 0x2AA4: /* Bond Management Control Point */
9067
0
        if (service_uuid.bt_uuid == GATT_SERVICE_BOND_MANAGEMENT) {
9068
0
            if (is_writeable_response(att_data->opcode))
9069
0
                break;
9070
9071
0
            if (!is_writeable_request(att_data->opcode))
9072
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9073
0
        }
9074
9075
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9076
0
            break;
9077
9078
0
        proto_tree_add_item(tree, hf_btatt_bond_management_control_point_opcode, tvb, offset, 1, ENC_NA);
9079
0
        offset += 1;
9080
9081
0
        if (tvb_reported_length_remaining(tvb, offset) > 0) {
9082
0
            proto_tree_add_item(tree, hf_btatt_bond_management_control_point_authorization_code, tvb, offset, length -1, ENC_UTF_8);
9083
0
            offset += tvb_reported_length_remaining(tvb, offset);
9084
0
        }
9085
0
        break;
9086
0
    case 0x2AA5: /* Bond Management Feature */
9087
0
        if (service_uuid.bt_uuid == GATT_SERVICE_BOND_MANAGEMENT) {
9088
0
            if (is_readable_request(att_data->opcode))
9089
0
                break;
9090
9091
0
            if (!is_readable_response(att_data->opcode))
9092
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9093
0
        }
9094
9095
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9096
0
            break;
9097
9098
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_bond_management_feature, ett_btatt_value, hfx_btatt_bond_management_feature, ENC_LITTLE_ENDIAN);
9099
0
        flags = tvb_get_uint24(tvb, offset, ENC_LITTLE_ENDIAN);
9100
0
        offset += 3;
9101
9102
0
        if (flags & 0x800000) {
9103
0
            do {
9104
0
                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);
9105
0
                offset += 1;
9106
0
            } while (tvb_get_uint8(tvb, offset - 1) & 0x80);
9107
0
        }
9108
9109
0
        break;
9110
0
    case 0x2AA6: /* Central Address Resolution */
9111
0
        if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
9112
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
9113
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9114
0
        }
9115
9116
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9117
0
            break;
9118
9119
0
        proto_tree_add_item(tree, hf_btatt_central_address_resolution, tvb, offset, 1, ENC_NA);
9120
0
        offset += 1;
9121
9122
0
        break;
9123
0
    case 0x2AA7: /* CGM Measurement */
9124
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9125
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9126
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9127
0
        }
9128
9129
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9130
0
            break;
9131
9132
0
        sub_item = proto_tree_add_item(tree, hf_btatt_cgm_measurement_size, tvb, offset, 1, ENC_NA);
9133
0
        if (tvb_get_uint8(tvb, offset) >= 6)
9134
0
            expert_add_info(pinfo, sub_item, &ei_btatt_cgm_size_too_small);
9135
0
        offset += 1;
9136
9137
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cgm_measurement_flags, ett_btatt_value, hfx_btatt_cgm_measurement_flags, ENC_NA);
9138
0
        flags = tvb_get_uint8(tvb, offset);
9139
0
        offset += 1;
9140
9141
0
        proto_tree_add_item(tree, hf_btatt_cgm_measurement_glucose_concentration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9142
0
        offset += 2;
9143
9144
0
        proto_tree_add_item(tree, hf_btatt_cgm_measurement_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9145
0
        offset += 2;
9146
9147
0
        if (flags & 0xE0) {
9148
0
            value = 0;
9149
0
            if (flags & 0x80)
9150
0
                value += 1;
9151
0
            if (flags & 0x40)
9152
0
                value += 1;
9153
0
            if (flags & 0x20)
9154
0
                value += 1;
9155
9156
0
            sub_item = proto_tree_add_item(tree, hf_btatt_cgm_sensor_status_annunciation, tvb, offset, value, ENC_NA);
9157
0
            sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
9158
0
        }
9159
9160
0
        if (flags & 0x80) {
9161
0
            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);
9162
0
            offset += 1;
9163
0
        }
9164
9165
0
        if (flags & 0x40) {
9166
0
            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);
9167
0
            offset += 1;
9168
0
        }
9169
9170
0
        if (flags & 0x20) {
9171
0
            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);
9172
0
            offset += 1;
9173
0
        }
9174
9175
0
        if (flags & 0x01) {
9176
0
            proto_tree_add_item(tree, hf_btatt_cgm_measurement_trend_information, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9177
0
            offset += 2;
9178
0
        }
9179
9180
0
        if (flags & 0x02) {
9181
0
            proto_tree_add_item(tree, hf_btatt_cgm_measurement_quality, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9182
0
            offset += 2;
9183
0
        }
9184
9185
        /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9186
0
        if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9187
0
            proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9188
0
            offset += 2;
9189
0
        }
9190
9191
0
        break;
9192
1
    case 0x2AA8: /* CGM Feature */
9193
1
        if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9194
0
            if (is_readable_request(att_data->opcode))
9195
0
                break;
9196
9197
0
            if (!is_readable_response(att_data->opcode))
9198
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9199
0
        }
9200
9201
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9202
0
            break;
9203
9204
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_cgm_feature_feature, ett_btatt_value, hfx_btatt_cgm_feature_feature, ENC_LITTLE_ENDIAN);
9205
1
        offset += 3;
9206
9207
1
        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);
9208
1
        offset += 1;
9209
9210
        /* NOTE: This one is mandatory - if not supported then 0xFFFF */
9211
1
        proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9212
1
        offset += 2;
9213
9214
1
        break;
9215
0
    case 0x2AA9: /* CGM Status */
9216
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9217
0
            if (is_readable_request(att_data->opcode))
9218
0
                break;
9219
9220
0
            if (!is_readable_response(att_data->opcode))
9221
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9222
0
        }
9223
9224
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9225
0
            break;
9226
9227
0
        proto_tree_add_item(tree, hf_btatt_cgm_time_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9228
0
        offset += 2;
9229
9230
0
        sub_item = proto_tree_add_item(tree, hf_btatt_cgm_status, tvb, offset, 3, ENC_LITTLE_ENDIAN);
9231
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
9232
9233
0
        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);
9234
0
        offset += 1;
9235
9236
0
        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);
9237
0
        offset += 1;
9238
9239
0
        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);
9240
0
        offset += 1;
9241
9242
9243
        /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9244
0
        if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9245
0
            proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9246
0
            offset += 2;
9247
0
        }
9248
9249
0
        break;
9250
1
    case 0x2AAA: /* CGM Session Start Time */
9251
1
        if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9252
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9253
0
                break;
9254
9255
0
            if (!is_readable_response(att_data->opcode) &&
9256
0
                    !is_writeable_request(att_data->opcode))
9257
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9258
0
        }
9259
9260
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9261
0
            break;
9262
9263
1
        offset = add_item_btatt_timestamp(tree, hf_btatt_cgm_session_start_time, tvb, offset);
9264
9265
1
        proto_tree_add_item(tree, hf_btatt_timezone, tvb, offset, 1, ENC_NA);
9266
1
        offset += 1;
9267
9268
1
        proto_tree_add_item(tree, hf_btatt_dst_offset, tvb, offset, 1, ENC_NA);
9269
1
        offset += 1;
9270
9271
        /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9272
1
        if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9273
1
            proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9274
1
            offset += 2;
9275
1
        }
9276
9277
1
        break;
9278
1
    case 0x2AAB: /* CGM Session Run Time */
9279
1
        if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9280
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9281
0
                break;
9282
9283
0
            if (!is_readable_response(att_data->opcode) &&
9284
0
                    !is_writeable_request(att_data->opcode))
9285
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9286
0
        }
9287
9288
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9289
0
            break;
9290
9291
1
        proto_tree_add_item(tree, hf_btatt_cgm_session_run_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9292
1
        offset += 2;
9293
9294
        /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9295
1
        if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9296
1
            proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9297
1
            offset += 2;
9298
1
        }
9299
9300
1
        break;
9301
0
    case 0x2AAC: /* CGM Specific Ops Control Point */
9302
0
        if (service_uuid.bt_uuid == GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING) {
9303
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9304
0
                break;
9305
9306
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9307
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9308
0
        }
9309
9310
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9311
0
            break;
9312
9313
0
        proto_tree_add_item(tree, hf_btatt_cgm_specific_ops_control_point_opcode, tvb, offset, 1, ENC_NA);
9314
0
        opcode = tvb_get_uint8(tvb, offset);
9315
0
        offset += 1;
9316
9317
0
        sub_item = proto_tree_add_item(tree, hf_btatt_cgm_specific_ops_control_point_operand, tvb, offset, 0, ENC_NA);
9318
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
9319
0
        operand_offset = offset;
9320
9321
0
        switch (opcode) {
9322
0
        case  1: /* Set CGM Communication Interval */
9323
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_communication_interval, tvb, offset, 1, ENC_NA);
9324
0
            offset += 1;
9325
9326
0
            break;
9327
0
        case  2: /* Get CGM Communication Interval */
9328
0
        case  8: /* Get Patient High Alert Level */
9329
0
        case 11: /* Get Patient Low Alert Level */
9330
0
        case 14: /* Get Hypo Alert Level */
9331
0
        case 17: /* Get Hyper Alert Level */
9332
0
        case 20: /* Get Rate of Decrease Alert Level */
9333
0
        case 23: /* Get Rate of Increase Alert Level */
9334
0
        case 25: /* Reset Device Specific Alert */
9335
0
        case 26: /* Start the Session */
9336
0
        case 27: /* Stop the Session */
9337
            /* N/A */
9338
9339
0
            break;
9340
0
        case  4: /* Set Glucose Calibration Value */
9341
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_glucose_concentration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9342
0
            offset += 2;
9343
9344
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9345
0
            offset += 2;
9346
9347
0
            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);
9348
0
            offset += 1;
9349
9350
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_next_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9351
0
            offset += 2;
9352
9353
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_data_record_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9354
0
            offset += 2;
9355
9356
0
            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);
9357
0
            offset += 1;
9358
9359
0
            break;
9360
0
        case  5: /* Get Glucose Calibration Value */
9361
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_calibration_data_record_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9362
0
            offset += 2;
9363
9364
0
            break;
9365
0
        case  7: /* Set Patient High Alert Level */
9366
0
        case 10: /* Set Patient Low Alert Level */
9367
0
        case 13: /* Set Hypo Alert Level */
9368
0
        case 16: /* Set Hyper Alert Level */
9369
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9370
0
            offset += 2;
9371
9372
0
            break;
9373
0
        case 19: /* Set Rate of Decrease Alert Level */
9374
0
        case 22: /* Set Rate of Increase Alert Level */
9375
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9376
0
            offset += 2;
9377
9378
0
            break;
9379
0
        case  3: /* CGM Communication Interval response */
9380
0
        case  6: /* Glucose Calibration Value response */
9381
0
        case  9: /* Patient High Alert Level Response */
9382
0
        case 12: /* Patient Low Alert Level Response */
9383
0
        case 15: /* Hypo Alert Level Response */
9384
0
        case 18: /* Hyper Alert Level Response */
9385
0
        case 21: /* Rate of Decrease Alert Level Response */
9386
0
        case 24: /* Rate of Increase Alert Level Response */
9387
0
            expert_add_info(pinfo, sub_item, &ei_btatt_opcode_invalid_request);
9388
0
            break;
9389
9390
0
        case 28: /* Response Code */
9391
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_request_opcode, tvb, offset, 1, ENC_NA);
9392
0
            offset += 1;
9393
9394
0
            proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_response_code, tvb, offset, 1, ENC_NA);
9395
0
            offset += 1;
9396
9397
0
            switch (tvb_get_uint8(tvb, offset - 2)) {
9398
0
            case  1: /* Set CGM Communication Interval */
9399
0
            case  2: /* Get CGM Communication Interval */
9400
0
            case  4: /* Set Glucose Calibration Value */
9401
0
            case  5: /* Get Glucose Calibration Value */
9402
0
            case  7: /* Set Patient High Alert Level */
9403
0
            case  8: /* Get Patient High Alert Level */
9404
0
            case 10: /* Set Patient Low Alert Level */
9405
0
            case 11: /* Get Patient Low Alert Level */
9406
0
            case 13: /* Set Hypo Alert Level */
9407
0
            case 14: /* Get Hypo Alert Level */
9408
0
            case 16: /* Set Hyper Alert Level */
9409
0
            case 17: /* Get Hyper Alert Level */
9410
0
            case 19: /* Set Rate of Decrease Alert Level */
9411
0
            case 20: /* Get Rate of Decrease Alert Level */
9412
0
            case 22: /* Set Rate of Increase Alert Level */
9413
0
            case 23: /* Get Rate of Increase Alert Level */
9414
0
            case 25: /* Reset Device Specific Alert */
9415
0
            case 26: /* Start the Session */
9416
0
            case 27: /* Stop the Session */
9417
0
                expert_add_info(pinfo, sub_item, &ei_btatt_opcode_invalid_response);
9418
0
                break;
9419
9420
0
            case  3: /* CGM Communication Interval response */
9421
0
                proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_communication_interval, tvb, offset, 1, ENC_NA);
9422
0
                offset += 1;
9423
9424
0
                break;
9425
0
            case  6: /* Glucose Calibration Value response */
9426
0
                proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_glucose_concentration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9427
0
                offset += 2;
9428
9429
0
                proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9430
0
                offset += 2;
9431
9432
0
                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);
9433
0
                offset += 1;
9434
9435
0
                proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_next_calibration_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9436
0
                offset += 2;
9437
9438
0
                proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_calibration_data_record_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9439
0
                offset += 2;
9440
9441
0
                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);
9442
0
                offset += 1;
9443
9444
0
                break;
9445
0
            case  9: /* Patient High Alert Level Response */
9446
0
            case 12: /* Patient Low Alert Level Response */
9447
0
            case 15: /* Hypo Alert Level Response */
9448
0
            case 18: /* Hyper Alert Level Response */
9449
0
                proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9450
0
                offset += 2;
9451
9452
0
                break;
9453
0
            case 21: /* Rate of Decrease Alert Level Response */
9454
0
            case 24: /* Rate of Increase Alert Level Response */
9455
0
                proto_tree_add_item(sub_tree, hf_btatt_cgm_specific_ops_control_point_operand_alert_level_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9456
0
                offset += 2;
9457
9458
0
                break;
9459
0
            }
9460
9461
0
            break;
9462
0
        };
9463
9464
0
        proto_item_set_len(sub_item, offset - operand_offset);
9465
9466
        /* NOTE: only add if "E2E-CRC Supported bit is set in CGM Feature", but for now simple heuristic should be enough */
9467
0
        if (tvb_reported_length_remaining(tvb, offset) >= 2) {
9468
0
            proto_tree_add_item(tree, hf_btatt_cgm_e2e_crc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9469
0
            offset += 2;
9470
0
        }
9471
9472
0
        break;
9473
0
    case 0x2AAD: /* Indoor Positioning Configuration */
9474
0
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9475
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9476
0
                break;
9477
9478
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9479
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9480
0
        }
9481
9482
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9483
0
            break;
9484
9485
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_indoor_positioning_configuration, ett_btatt_value, hfx_btatt_indoor_positioning_configuration, ENC_NA);
9486
0
        offset += 1;
9487
9488
0
        break;
9489
3
    case 0x2AAE: /* Latitude */
9490
3
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9491
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9492
0
                break;
9493
9494
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9495
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9496
0
        }
9497
9498
3
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9499
0
            break;
9500
9501
3
        proto_tree_add_item(tree, hf_btatt_latitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9502
3
        offset += 4;
9503
9504
3
        break;
9505
3
    case 0x2AAF: /* Longitude */
9506
3
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9507
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9508
0
                break;
9509
9510
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9511
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9512
0
        }
9513
9514
3
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9515
0
            break;
9516
9517
3
        proto_tree_add_item(tree, hf_btatt_longitude, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9518
3
        offset += 4;
9519
9520
3
        break;
9521
0
    case 0x2AB0: /* Local North Coordinate */
9522
0
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9523
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9524
0
                break;
9525
9526
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9527
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9528
0
        }
9529
9530
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9531
0
            break;
9532
9533
0
        proto_tree_add_item(tree, hf_btatt_local_north_coordinate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9534
0
        offset += 2;
9535
9536
0
        break;
9537
0
    case 0x2AB1: /* Local East Coordinate */
9538
0
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9539
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9540
0
                break;
9541
9542
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9543
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9544
0
        }
9545
9546
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9547
0
            break;
9548
9549
0
        proto_tree_add_item(tree, hf_btatt_local_east_coordinate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9550
0
        offset += 2;
9551
9552
0
        break;
9553
1
    case 0x2AB2: /* Floor Number */
9554
1
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9555
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9556
0
                break;
9557
9558
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9559
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9560
0
        }
9561
9562
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9563
0
            break;
9564
9565
1
        proto_tree_add_item(tree, hf_btatt_floor_number, tvb, offset, 1, ENC_NA);
9566
1
        offset += 1;
9567
9568
1
        break;
9569
0
    case 0x2AB3: /* Altitude */
9570
0
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9571
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9572
0
                break;
9573
9574
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9575
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9576
0
        }
9577
9578
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9579
0
            break;
9580
9581
0
        proto_tree_add_item(tree, hf_btatt_altitude, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9582
0
        offset += 2;
9583
9584
0
        break;
9585
1
    case 0x2AB4: /* Uncertainty */
9586
1
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9587
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9588
0
                break;
9589
9590
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9591
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9592
0
        }
9593
9594
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9595
0
            break;
9596
9597
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_uncertainty, ett_btatt_value, hfx_btatt_uncertainty, ENC_NA);
9598
1
        offset += 1;
9599
9600
1
        break;
9601
1
    case 0x2AB5: /* Location Name */
9602
1
        if (service_uuid.bt_uuid == GATT_SERVICE_INDOOR_POSITIONING) {
9603
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9604
0
                break;
9605
9606
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_WRITE_COMMAND)
9607
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9608
0
        }
9609
9610
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9611
0
            break;
9612
9613
1
        proto_tree_add_item(tree, hf_btatt_location_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
9614
1
        offset += tvb_captured_length_remaining(tvb, offset);
9615
9616
1
        break;
9617
1
    case 0x2AB6: /* URI */
9618
1
        if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9619
0
            if (is_writeable_response(att_data->opcode))
9620
0
                break;
9621
9622
0
            if (!is_writeable_request(att_data->opcode))
9623
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9624
0
        }
9625
9626
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9627
0
            break;
9628
9629
1
        proto_tree_add_item(tree, hf_btatt_uri, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
9630
1
        offset += tvb_captured_length_remaining(tvb, offset);
9631
9632
1
        break;
9633
1
    case 0x2AB7: /* HTTP Headers */
9634
1
        if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9635
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9636
0
                break;
9637
9638
0
            if (!is_readable_response(att_data->opcode) &&
9639
0
                    !is_writeable_request(att_data->opcode))
9640
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9641
0
        }
9642
9643
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9644
0
            break;
9645
9646
1
        sub_item = proto_tree_add_item(tree, hf_btatt_http_headers, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
9647
1
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
9648
9649
1
        call_dissector(http_handle, tvb_new_subset_remaining(tvb, offset), pinfo, sub_tree);
9650
9651
1
        offset += tvb_captured_length_remaining(tvb, offset);
9652
9653
1
        break;
9654
0
    case 0x2AB8: /* HTTP Status Code */
9655
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9656
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
9657
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9658
0
        }
9659
9660
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9661
0
            break;
9662
9663
0
        proto_tree_add_item(tree, hf_btatt_http_status_code, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9664
0
        offset += 2;
9665
9666
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_http_data_status, ett_btatt_value, hfx_btatt_http_data_status, ENC_NA);
9667
0
        offset += 1;
9668
9669
0
        break;
9670
1
    case 0x2AB9: /* HTTP Entity Body */
9671
1
        if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9672
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9673
0
                break;
9674
9675
0
            if (!is_readable_response(att_data->opcode) &&
9676
0
                    !is_writeable_request(att_data->opcode))
9677
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9678
0
        }
9679
9680
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9681
0
            break;
9682
9683
1
        proto_tree_add_item(tree, hf_btatt_http_entity_body, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
9684
1
        offset += tvb_captured_length_remaining(tvb, offset);
9685
9686
1
        break;
9687
1
    case 0x2ABA: /* HTTP Control Point */
9688
1
        if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9689
0
            if (is_writeable_response(att_data->opcode))
9690
0
                break;
9691
9692
0
            if (!is_writeable_request(att_data->opcode))
9693
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9694
0
        }
9695
9696
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9697
0
            break;
9698
9699
1
        proto_tree_add_item(tree, hf_btatt_http_control_point_opcode, tvb, offset, 1, ENC_NA);
9700
1
        offset += 1;
9701
9702
1
        break;
9703
0
    case 0x2ABB: /* HTTPS Security */
9704
0
        if (service_uuid.bt_uuid == GATT_SERVICE_HTTP_PROXY) {
9705
0
            if (is_readable_request(att_data->opcode))
9706
0
                break;
9707
9708
0
            if (!is_readable_response(att_data->opcode))
9709
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9710
0
        }
9711
9712
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9713
0
            break;
9714
9715
0
        proto_tree_add_item(tree, hf_btatt_https_security, tvb, offset, 1, ENC_NA);
9716
0
        offset += 1;
9717
9718
0
        break;
9719
0
    case 0x2ABC: /* TDS Control Point */
9720
0
        if (service_uuid.bt_uuid == GATT_SERVICE_TRANSPORT_DISCOVERY) {
9721
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9722
0
                break;
9723
9724
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9725
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9726
0
        }
9727
9728
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9729
0
            break;
9730
9731
0
        proto_tree_add_item(tree, hf_btatt_tds_opcode, tvb, offset, 1, ENC_NA);
9732
0
        offset += 1;
9733
9734
0
        if (att_data->opcode == 0x1B || att_data->opcode == 0x1D) { /* Handle Value Notification || Handle Value Indication" */
9735
0
            proto_tree_add_item(tree, hf_btatt_tds_result_code, tvb, offset, 1, ENC_NA);
9736
0
            offset += 1;
9737
0
        } else {
9738
0
            proto_tree_add_item(tree, hf_btatt_tds_organization_id, tvb, offset, 1, ENC_NA);
9739
0
            offset += 1;
9740
0
        }
9741
9742
0
        if (tvb_reported_length_remaining(tvb, offset) > 0) {
9743
0
            proto_tree_add_item(tree, hf_btatt_tds_data, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
9744
0
            offset += tvb_reported_length_remaining(tvb, offset);
9745
0
        }
9746
9747
0
        break;
9748
1
    case 0x2ABD: /* OTS Feature */
9749
1
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9750
0
            if (is_readable_request(att_data->opcode))
9751
0
                break;
9752
9753
0
            if (!is_readable_response(att_data->opcode))
9754
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9755
0
        }
9756
9757
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9758
0
            break;
9759
9760
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_feature_oacp, ett_btatt_value, hfx_btatt_ots_feature_oacp, ENC_LITTLE_ENDIAN);
9761
1
        offset += 4;
9762
9763
1
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_feature_olcp, ett_btatt_value, hfx_btatt_ots_feature_olcp, ENC_LITTLE_ENDIAN);
9764
1
        offset += 4;
9765
9766
1
        break;
9767
0
    case 0x2ABE: /* Object Name */
9768
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9769
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9770
0
                break;
9771
9772
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9773
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9774
0
        }
9775
9776
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9777
0
            break;
9778
9779
0
        proto_tree_add_item(tree, hf_btatt_ots_object_name, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
9780
0
        offset += tvb_captured_length_remaining(tvb, offset);
9781
9782
0
        break;
9783
1
    case 0x2ABF: /* Object Type */
9784
1
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9785
0
            if (is_readable_request(att_data->opcode))
9786
0
                break;
9787
9788
0
            if (!is_readable_response(att_data->opcode))
9789
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9790
0
        }
9791
9792
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9793
0
            break;
9794
9795
1
        offset = dissect_gatt_uuid(tree, pinfo, tvb, offset);
9796
9797
1
        break;
9798
1
    case 0x2AC0: /* Object Size */
9799
1
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9800
0
            if (is_readable_request(att_data->opcode))
9801
0
                break;
9802
9803
0
            if (!is_readable_response(att_data->opcode))
9804
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9805
0
        }
9806
9807
1
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9808
0
            break;
9809
9810
1
        proto_tree_add_item(tree, hf_btatt_ots_current_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9811
1
        offset += 4;
9812
9813
1
        proto_tree_add_item(tree, hf_btatt_ots_allocated_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9814
1
        offset += 4;
9815
9816
1
        break;
9817
0
    case 0x2AC1: /* Object First-Created */
9818
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9819
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9820
0
                break;
9821
9822
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9823
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9824
0
        }
9825
9826
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9827
0
            break;
9828
9829
0
        sub_item = proto_tree_add_item(tree, hf_btatt_ots_object_first_created, tvb, offset, 7, ENC_NA);
9830
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
9831
9832
0
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, sub_tree, att_data);
9833
0
        offset += 7;
9834
9835
0
        break;
9836
0
    case 0x2AC2: /* Object Last-Modified */
9837
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9838
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9839
0
                break;
9840
9841
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9842
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9843
0
        }
9844
9845
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9846
0
            break;
9847
9848
0
        sub_item = proto_tree_add_item(tree, hf_btatt_ots_object_last_modified, tvb, offset, 7, ENC_NA);
9849
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
9850
9851
0
        btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, sub_tree, att_data);
9852
0
        offset += 7;
9853
9854
0
        break;
9855
0
    case 0x2AC3: /* Object ID */
9856
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9857
0
            if (is_readable_request(att_data->opcode))
9858
0
                break;
9859
9860
0
            if (!is_readable_response(att_data->opcode))
9861
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9862
0
        }
9863
9864
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9865
0
            break;
9866
9867
0
        proto_tree_add_item(tree, hf_btatt_ots_object_id, tvb, offset, 6, ENC_LITTLE_ENDIAN);
9868
0
        offset += 6;
9869
9870
0
        break;
9871
0
    case 0x2AC4: /* Object Properties */
9872
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9873
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
9874
0
                break;
9875
9876
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
9877
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9878
0
        }
9879
9880
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9881
0
            break;
9882
9883
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_properties, ett_btatt_value, hfx_btatt_ots_properties, ENC_LITTLE_ENDIAN);
9884
0
        offset += 4;
9885
9886
0
        break;
9887
0
    case 0x2AC5: /* Object Action Control Point */
9888
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9889
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9890
0
                break;
9891
9892
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9893
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9894
0
        }
9895
9896
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9897
0
            break;
9898
9899
0
        proto_tree_add_item(tree, hf_btatt_ots_action_opcode, tvb, offset, 1, ENC_NA);
9900
0
        opcode = tvb_get_uint8(tvb, offset);
9901
0
        offset += 1;
9902
9903
0
        switch (opcode) {
9904
0
        case 0x01: /* Create  */
9905
0
            proto_tree_add_item(tree, hf_btatt_ots_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9906
0
            offset += 4;
9907
9908
0
            offset = dissect_gatt_uuid(tree, pinfo, tvb, offset);
9909
9910
0
            break;
9911
0
        case 0x02: /* Delete  */
9912
0
        case 0x07: /* Abort */
9913
            /* none */
9914
9915
0
            break;
9916
0
        case 0x03: /* Calculate Checksum */
9917
0
        case 0x05: /* Read */
9918
0
        case 0x06: /* Write */
9919
0
            proto_tree_add_item(tree, hf_btatt_ots_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9920
0
            offset += 4;
9921
9922
0
            proto_tree_add_item(tree, hf_btatt_ots_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9923
0
            offset += 4;
9924
9925
0
            break;
9926
0
        case 0x04: /* Execute */
9927
0
            if (tvb_reported_length_remaining(tvb, offset) > 0) {
9928
0
                proto_tree_add_item(tree, hf_btatt_ots_execute_data, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
9929
0
                offset += tvb_reported_length_remaining(tvb, offset);
9930
0
            }
9931
9932
0
            break;
9933
0
        case 0x60: /* Response Code */
9934
0
            proto_tree_add_item(tree, hf_btatt_ots_action_response_opcode, tvb, offset, 1, ENC_NA);
9935
0
            offset += 1;
9936
9937
0
            proto_tree_add_item(tree, hf_btatt_ots_action_result_code, tvb, offset, 1, ENC_NA);
9938
0
            offset += 1;
9939
9940
0
            switch (tvb_get_uint8(tvb, offset)) {
9941
0
            case 0x01: /* Create  */
9942
0
            case 0x02: /* Delete  */
9943
0
            case 0x05: /* Read */
9944
0
            case 0x06: /* Write */
9945
0
            case 0x07: /* Abort */
9946
0
            case 0x60: /* Response Code */
9947
                /* none */
9948
9949
0
                break;
9950
0
            case 0x03: /* Calculate Checksum */
9951
0
                proto_tree_add_checksum(tree, tvb, offset, hf_btatt_ots_checksum, -1, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
9952
0
                offset += 4;
9953
9954
0
                break;
9955
0
            case 0x04: /* Execute */
9956
0
                if (tvb_reported_length_remaining(tvb, offset) > 0) {
9957
0
                    proto_tree_add_item(tree, hf_btatt_ots_execute_data, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
9958
0
                    offset += tvb_reported_length_remaining(tvb, offset);
9959
0
                }
9960
9961
0
                break;
9962
0
            }
9963
0
        }
9964
0
        break;
9965
0
    case 0x2AC6: /* Object List Control Point */
9966
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
9967
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
9968
0
                break;
9969
9970
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
9971
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
9972
0
        }
9973
9974
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
9975
0
            break;
9976
9977
0
        proto_tree_add_item(tree, hf_btatt_ots_list_opcode, tvb, offset, 1, ENC_NA);
9978
0
        opcode = tvb_get_uint8(tvb, offset);
9979
0
        offset += 1;
9980
9981
0
        switch (opcode) {
9982
0
        case 0x01: /* First */
9983
0
        case 0x02: /* Last */
9984
0
        case 0x03: /* Previous */
9985
0
        case 0x04: /* Next */
9986
0
        case 0x07: /* Request Number of Object */
9987
0
        case 0x08: /* Clear Marking */
9988
            /* none */
9989
0
            break;
9990
0
        case 0x05: /* Go To */
9991
0
            proto_tree_add_item(tree, hf_btatt_ots_object_id, tvb, offset, 6, ENC_LITTLE_ENDIAN);
9992
0
            offset += 6;
9993
9994
0
            break;
9995
0
        case 0x06: /* Order */
9996
0
            proto_tree_add_item(tree, hf_btatt_ots_list_order, tvb, offset, 1, ENC_NA);
9997
0
            offset += 1;
9998
9999
0
            break;
10000
0
        case 0x70: /* Response Code  */
10001
0
            proto_tree_add_item(tree, hf_btatt_ots_list_response_opcode, tvb, offset, 1, ENC_NA);
10002
0
            offset += 1;
10003
10004
0
            proto_tree_add_item(tree, hf_btatt_ots_list_result_code, tvb, offset, 1, ENC_NA);
10005
0
            offset += 1;
10006
10007
0
            switch (tvb_get_uint8(tvb, offset - 2)) {
10008
0
            case 0x01: /* First */
10009
0
            case 0x02: /* Last */
10010
0
            case 0x03: /* Previous */
10011
0
            case 0x04: /* Next */
10012
0
            case 0x05: /* Go To */
10013
0
            case 0x06: /* Order */
10014
0
            case 0x08: /* Clear Marking */
10015
0
            case 0x70: /* Response Code  */
10016
                /* none */
10017
0
                break;
10018
0
            case 0x07: /* Request Number of Object */
10019
0
                proto_tree_add_item(tree, hf_btatt_ots_list_total_number_of_objects, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10020
0
                offset += 4;
10021
0
            }
10022
0
        }
10023
10024
0
        break;
10025
0
    case 0x2AC7: /* Object List Filter */
10026
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
10027
0
            if (is_readable_request(att_data->opcode) || is_writeable_response(att_data->opcode))
10028
0
                break;
10029
10030
0
            if (!is_readable_response(att_data->opcode) && !is_writeable_request(att_data->opcode))
10031
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10032
0
        }
10033
10034
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10035
0
            break;
10036
10037
0
        proto_tree_add_item(tree, hf_btatt_ots_filter, tvb, offset, 1, ENC_NA);
10038
0
        offset += 1;
10039
0
        switch (tvb_get_uint8(tvb, offset - 1)) {
10040
0
        case 0x00: /* No Filter */
10041
0
        case 0x0A: /* Marked Objects */
10042
            /* none */
10043
0
            break;
10044
0
        case 0x01: /* Name Starts With */
10045
0
        case 0x02: /* Name Ends With */
10046
0
        case 0x03: /* Name Contains*/
10047
0
        case 0x04: /* Name is Exactly */
10048
0
            proto_tree_add_item(tree, hf_btatt_ots_name_string, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_UTF_8);
10049
0
            offset += tvb_reported_length_remaining(tvb, offset);
10050
10051
0
            break;
10052
0
        case 0x05: /* Object Type */
10053
0
            offset = dissect_gatt_uuid(tree, pinfo, tvb, offset);
10054
10055
0
            break;
10056
0
        case 0x06: /* Created Between */
10057
0
        case 0x07: /* Modified Between */
10058
0
            btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, tree, att_data);
10059
0
            offset += 7;
10060
10061
0
            btatt_call_dissector_by_dissector_name_with_data("btgatt.uuid0x2a08", tvb_new_subset_length(tvb, offset, 7), pinfo, tree, att_data);
10062
0
            offset += 7;
10063
10064
0
            break;
10065
0
        case 0x08: /* Current Size Between */
10066
0
        case 0x09: /* Allocated Size Between */
10067
0
            proto_tree_add_item(tree, hf_btatt_ots_size_from, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10068
0
            offset += 4;
10069
10070
0
            proto_tree_add_item(tree, hf_btatt_ots_size_to, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10071
0
            offset += 4;
10072
10073
0
            break;
10074
0
        }
10075
10076
0
        break;
10077
0
    case 0x2AC8: /* Object Changed */
10078
0
        if (service_uuid.bt_uuid == GATT_SERVICE_OBJECT_TRANSFER) {
10079
0
            if (att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
10080
0
                break;
10081
10082
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
10083
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10084
0
        }
10085
10086
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10087
0
            break;
10088
10089
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_ots_flags, ett_btatt_value, hfx_btatt_ots_flags, ENC_NA);
10090
0
        offset += 1;
10091
10092
0
        proto_tree_add_item(tree, hf_btatt_ots_object_id, tvb, offset, 6, ENC_LITTLE_ENDIAN);
10093
0
        offset += 6;
10094
10095
0
        break;
10096
0
    case 0x2AC9: /* Resolvable Private Address */
10097
0
        if (service_uuid.bt_uuid == GATT_SERVICE_GENERIC_ACCESS_PROFILE) {
10098
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10099
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10100
0
        }
10101
10102
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10103
0
            break;
10104
10105
0
        proto_tree_add_item(tree, hf_btatt_resolvable_private_address, tvb, offset, 1, ENC_NA);
10106
0
        offset += 1;
10107
10108
0
        break;
10109
0
    case 0x2ACC: /* Fitness Machine Feature */
10110
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10111
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10112
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10113
0
        }
10114
10115
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10116
0
            break;
10117
10118
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_fitness_machine_features, ett_btatt_value, hfx_btatt_fitness_machine_features, ENC_LITTLE_ENDIAN);
10119
0
        offset += 4;
10120
10121
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_target_setting_features, ett_btatt_value, hfx_btatt_target_setting_features, ENC_LITTLE_ENDIAN);
10122
0
        offset += 4;
10123
10124
0
        break;
10125
0
    case 0x2ACD: /* Treadmill Data */
10126
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10127
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10128
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10129
0
        }
10130
10131
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10132
0
            break;
10133
10134
        /* TODO */
10135
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10136
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10137
0
        offset = tvb_captured_length(tvb);
10138
10139
0
        break;
10140
0
    case 0x2ACE: /* Cross Trainer Data */
10141
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10142
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10143
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10144
0
        }
10145
10146
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10147
0
            break;
10148
10149
        /* TODO */
10150
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10151
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10152
0
        offset = tvb_captured_length(tvb);
10153
10154
0
        break;
10155
0
    case 0x2ACF: /* Step Climber Data */
10156
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10157
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10158
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10159
0
        }
10160
10161
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10162
0
            break;
10163
10164
        /* TODO */
10165
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10166
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10167
0
        offset = tvb_captured_length(tvb);
10168
10169
0
        break;
10170
0
    case 0x2AD0: /* Stair Climber Data */
10171
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10172
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10173
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10174
0
        }
10175
10176
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10177
0
            break;
10178
10179
        /* TODO */
10180
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10181
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10182
0
        offset = tvb_captured_length(tvb);
10183
10184
0
        break;
10185
0
    case 0x2AD1: /* Rower Data */
10186
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10187
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10188
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10189
0
        }
10190
10191
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10192
0
            break;
10193
10194
        /* TODO */
10195
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10196
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10197
0
        offset = tvb_captured_length(tvb);
10198
10199
0
        break;
10200
0
    case 0x2AD2: /* Indoor Bike Data */
10201
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10202
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10203
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10204
0
        }
10205
10206
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10207
0
            break;
10208
10209
        /* TODO */
10210
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10211
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10212
0
        offset = tvb_captured_length(tvb);
10213
10214
0
        break;
10215
0
    case 0x2AD3: /* Training Status */
10216
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10217
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode) ||
10218
0
                    att_data->opcode == ATT_OPCODE_HANDLE_VALUE_NOTIFICATION))
10219
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10220
0
        }
10221
10222
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10223
0
            break;
10224
10225
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_btatt_training_status_flags, ett_btatt_value, hfx_btatt_training_status_flags, ENC_NA);
10226
0
        offset += 1;
10227
10228
0
        proto_tree_add_item(tree, hf_btatt_training_status_status, tvb, offset, 1, ENC_NA);
10229
0
        offset += 1;
10230
10231
0
        proto_tree_add_item(tree, hf_btatt_training_status_status_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_UTF_8);
10232
0
        offset += tvb_captured_length_remaining(tvb, offset);
10233
10234
0
        break;
10235
0
    case 0x2AD4: /* Supported Speed Range */
10236
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10237
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10238
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10239
0
        }
10240
10241
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10242
0
            break;
10243
10244
0
        proto_tree_add_item(tree, hf_btatt_supported_speed_range_minimum_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10245
0
        offset += 2;
10246
10247
0
        proto_tree_add_item(tree, hf_btatt_supported_speed_range_maximum_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10248
0
        offset += 2;
10249
10250
0
        proto_tree_add_item(tree, hf_btatt_supported_speed_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10251
0
        offset += 2;
10252
10253
0
        break;
10254
0
    case 0x2AD5: /* Supported Inclination Range */
10255
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10256
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10257
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10258
0
        }
10259
10260
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10261
0
            break;
10262
10263
0
        proto_tree_add_item(tree, hf_btatt_supported_inclination_range_minimum_inclination, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10264
0
        offset += 2;
10265
10266
0
        proto_tree_add_item(tree, hf_btatt_supported_inclination_range_maximum_inclination, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10267
0
        offset += 2;
10268
10269
0
        proto_tree_add_item(tree, hf_btatt_supported_inclination_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10270
0
        offset += 2;
10271
10272
0
        break;
10273
0
    case 0x2AD6: /* Supported Resistance Level Range */
10274
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10275
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10276
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10277
0
        }
10278
10279
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10280
0
            break;
10281
10282
0
        proto_tree_add_item(tree, hf_btatt_supported_resistance_level_range_minimum_resistance_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10283
0
        offset += 2;
10284
10285
0
        proto_tree_add_item(tree, hf_btatt_supported_resistance_level_range_maximum_resistance_level, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10286
0
        offset += 2;
10287
        /* NOTE: can Resistance be negative? Bluetooth bug? see also hf_btatt_fitness_machine_resistance_level */
10288
10289
0
        proto_tree_add_item(tree, hf_btatt_supported_resistance_level_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10290
0
        offset += 2;
10291
10292
0
        break;
10293
0
    case 0x2AD7: /* Supported Heart Rate Range */
10294
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10295
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10296
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10297
0
        }
10298
10299
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10300
0
            break;
10301
10302
0
        proto_tree_add_item(tree, hf_btatt_supported_heart_rate_range_minimum_heart_rate, tvb, offset, 1, ENC_NA);
10303
0
        offset += 1;
10304
10305
0
        proto_tree_add_item(tree, hf_btatt_supported_heart_rate_range_maximum_heart_rate, tvb, offset, 1, ENC_NA);
10306
0
        offset += 1;
10307
10308
0
        proto_tree_add_item(tree, hf_btatt_supported_heart_rate_range_minimum_increment, tvb, offset, 1, ENC_NA);
10309
0
        offset += 1;
10310
10311
0
        break;
10312
0
    case 0x2AD8: /* Supported Power Range */
10313
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10314
0
            if (!(is_readable_request(att_data->opcode) || is_readable_response(att_data->opcode)))
10315
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10316
0
        }
10317
10318
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10319
0
            break;
10320
10321
0
        proto_tree_add_item(tree, hf_btatt_supported_power_range_minimum_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10322
0
        offset += 2;
10323
10324
0
        proto_tree_add_item(tree, hf_btatt_supported_power_range_maximum_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10325
0
        offset += 2;
10326
10327
0
        proto_tree_add_item(tree, hf_btatt_supported_power_range_minimum_increment, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10328
0
        offset += 2;
10329
10330
0
        break;
10331
0
    case 0x2AD9: /* Fitness Machine Control Point */
10332
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10333
0
            if (is_writeable_response(att_data->opcode) || att_data->opcode == ATT_OPCODE_HANDLE_VALUE_CONFIRMATION)
10334
0
                break;
10335
10336
0
            if (!is_writeable_request(att_data->opcode) && att_data->opcode != ATT_OPCODE_HANDLE_VALUE_INDICATION)
10337
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10338
0
        }
10339
10340
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10341
0
            break;
10342
10343
        /* TODO */
10344
0
        sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10345
0
        expert_add_info(pinfo, sub_item, &ei_btatt_undecoded);
10346
0
        offset = tvb_captured_length(tvb);
10347
10348
0
        break;
10349
0
    case 0x2ADA: /* Fitness Machine Status */ {
10350
0
        if (service_uuid.bt_uuid == GATT_SERVICE_FITNESS_MACHINE) {
10351
0
            if (att_data->opcode != ATT_OPCODE_HANDLE_VALUE_NOTIFICATION)
10352
0
                expert_add_info(pinfo, tree, &ei_btatt_invalid_usage);
10353
0
        }
10354
10355
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10356
0
            break;
10357
10358
0
        uint32_t ftm_status_opcode;
10359
10360
0
        proto_tree_add_item_ret_uint(tree, hf_btatt_fitness_machine_status_opcode, tvb, offset, 1, ENC_NA, &ftm_status_opcode);
10361
0
        offset += 1;
10362
10363
0
        switch (ftm_status_opcode) {
10364
0
        case 0x02: /* Fitness Machine Stopped or Paused by the User */
10365
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_control_information, tvb, offset, 1, ENC_NA);
10366
0
            offset += 1;
10367
10368
0
            break;
10369
0
        case 0x05: /* Target Speed Changed */
10370
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10371
0
            offset += 2;
10372
10373
0
            break;
10374
0
        case 0x06: /* Target Incline Changed */
10375
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_incline, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10376
0
            offset += 2;
10377
10378
0
            break;
10379
0
        case 0x07: /* Target Resistance Level Changed */
10380
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_resistance_level, tvb, offset, 1, ENC_NA);
10381
0
            offset += 1;
10382
            /* NOTE: this is 8bit, but hf_btatt_supported_resistance_level_range_maximum_resistance_level is 16bit, Bluetooth bug?*/
10383
10384
0
            break;
10385
0
        case 0x08: /* Target Power Changed */
10386
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_power, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10387
0
            offset += 2;
10388
10389
0
            break;
10390
0
        case 0x09: /* Target Heart Rate Changed */
10391
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_heart_rate, tvb, offset, 1, ENC_NA);
10392
0
            offset += 1;
10393
10394
0
            break;
10395
0
        case 0x0A: /* Targeted Expended Energy Changed */
10396
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_expended_energy, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10397
0
            offset += 2;
10398
10399
0
            break;
10400
0
        case 0x0B: /* Targeted Number of Steps Changed */
10401
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_number_of_steps, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10402
0
            offset += 2;
10403
10404
0
            break;
10405
0
        case 0x0C: /* Targeted Number of Strides Changed */
10406
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_number_of_strides, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10407
0
            offset += 2;
10408
10409
0
            break;
10410
0
        case 0x0D: /* Targeted Distance Changed */
10411
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_distance, tvb, offset, 3, ENC_LITTLE_ENDIAN);
10412
0
            offset += 3;
10413
10414
0
            break;
10415
0
        case 0x0E: /* Targeted Training Time Changed */
10416
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_training_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10417
0
            offset += 2;
10418
10419
0
            break;
10420
0
        case 0x0F: /* Targeted Time in Three Heart Rate Zones Changed */
10421
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_fat_burn_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10422
0
            offset += 2;
10423
10424
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_fitness_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10425
0
            offset += 2;
10426
10427
0
            break;
10428
0
        case 0x10: /* Targeted Time in Three Heart Rate Zones Changed */
10429
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_light_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10430
0
            offset += 2;
10431
10432
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_moderate_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10433
0
            offset += 2;
10434
10435
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_hard_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10436
0
            offset += 2;
10437
10438
0
            break;
10439
0
        case 0x11: /* Targeted Time in Five Heart Rate Zones Changed */
10440
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_very_light_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10441
0
            offset += 2;
10442
10443
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_light_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10444
0
            offset += 2;
10445
10446
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_moderate_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10447
0
            offset += 2;
10448
10449
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_hard_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10450
0
            offset += 2;
10451
10452
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_targeted_time_in_maximum_zone, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10453
0
            offset += 2;
10454
10455
0
            break;
10456
0
        case 0x12: /* Indoor Bike Simulation Parameters Changed */
10457
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_wind_speed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10458
0
            offset += 2;
10459
10460
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_grade, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10461
0
            offset += 2;
10462
10463
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_coefficient_of_rolling_resistance, tvb, offset, 1, ENC_NA);
10464
0
            offset += 1;
10465
10466
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_wind_resistance_coefficient, tvb, offset, 1, ENC_NA);
10467
0
            offset += 1;
10468
10469
0
            break;
10470
0
        case 0x13: /* Wheel Circumference Changed */
10471
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_wheel_circumference, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10472
0
            offset += 2;
10473
10474
0
            break;
10475
0
        case 0x14: /* Spin Down Status */
10476
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_spin_down_status, tvb, offset, 1, ENC_NA);
10477
0
            offset += 1;
10478
10479
0
            break;
10480
0
        case 0x15: /* Targeted Cadence Changed */
10481
0
            proto_tree_add_item(tree, hf_btatt_fitness_machine_cadence, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10482
0
            offset += 2;
10483
10484
0
            break;
10485
0
        case 0x01: /* Reset */
10486
0
        case 0x03: /* Fitness Machine Stopped by Safety Key */
10487
0
        case 0x04: /* Fitness Machine Started or Resumed by the User */
10488
0
        case 0xFF: /* Control Permission Lost */
10489
0
        default:
10490
            /* N/A */
10491
0
            break;
10492
0
        }
10493
10494
0
        }
10495
0
        break;
10496
1
    case 0x2ADB: /* Mesh Provisioning Data In */
10497
2
    case 0x2ADC: /* Mesh Provisioning Data Out */
10498
3
    case 0x2ADD: /* Mesh Proxy Data In */
10499
3
    case 0x2ADE: /* Mesh Proxy Data Out */
10500
3
        if (btmesh_proxy_handle) {
10501
3
            btle_mesh_proxy_ctx_t *proxy_ctx;
10502
3
            proxy_ctx = wmem_new0(pinfo->pool, btle_mesh_proxy_ctx_t);
10503
10504
3
            if (l2cap_data) {
10505
3
                proxy_ctx->interface_id = l2cap_data->interface_id;
10506
3
                proxy_ctx->adapter_id = l2cap_data->adapter_id;
10507
3
            } else {
10508
0
                proxy_ctx->interface_id = proxy_ctx->adapter_id = 0;
10509
0
            }
10510
3
            proxy_ctx->chandle = 0; //TODO
10511
3
            proxy_ctx->bt_uuid = uuid.bt_uuid;
10512
3
            proxy_ctx->access_address = 0; //TODO
10513
10514
3
            switch (att_data->opcode) {
10515
0
                case ATT_OPCODE_WRITE_COMMAND:
10516
0
                    proxy_ctx->proxy_side = E_BTMESH_PROXY_SIDE_CLIENT;
10517
10518
0
                    break;
10519
0
                case ATT_OPCODE_HANDLE_VALUE_NOTIFICATION:
10520
0
                    proxy_ctx->proxy_side = E_BTMESH_PROXY_SIDE_SERVER;
10521
10522
0
                    break;
10523
3
                default:
10524
3
                    proxy_ctx->proxy_side = E_BTMESH_PROXY_SIDE_UNKNOWN;
10525
10526
3
                break;
10527
3
            }
10528
10529
3
            call_dissector_with_data(btmesh_proxy_handle, tvb_new_subset_length(tvb, offset, length),
10530
3
                pinfo, proto_tree_get_root(tree), proxy_ctx);
10531
3
            offset += length;
10532
3
        } else {
10533
0
            if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10534
0
                break;
10535
10536
0
            proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10537
0
            offset = tvb_captured_length(tvb);
10538
0
        }
10539
10540
3
        break;
10541
3
    case 0x2B7D: /* Volume State */
10542
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10543
0
            break;
10544
10545
0
        proto_tree_add_item(tree, hf_btatt_volume_setting, tvb, offset, 1, ENC_NA);
10546
0
        offset += 1;
10547
10548
0
        proto_tree_add_item(tree, hf_btatt_volume_mute, tvb, offset, 1, ENC_NA);
10549
0
        offset += 1;
10550
10551
0
        proto_tree_add_item(tree, hf_btatt_volume_change_counter, tvb, offset, 1, ENC_NA);
10552
0
        offset += 1;
10553
0
        break;
10554
0
    case 0x2B7E: /* Volume Control Point */
10555
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10556
0
            break;
10557
10558
0
        proto_tree_add_item(tree, hf_btatt_volume_control_point_procedure, tvb, offset, 1, ENC_NA);
10559
0
        opcode = tvb_get_uint8(tvb, offset);
10560
0
        offset += 1;
10561
10562
        /* All procedures must have change counter */
10563
0
        if (opcode <= 0x06) {
10564
0
            proto_tree_add_item(tree, hf_btatt_volume_change_counter, tvb, offset, 1, ENC_NA);
10565
0
            offset += 1;
10566
0
        }
10567
10568
        /* Set Absolute Volume also carries volume */
10569
0
        if (opcode == 0x04) {
10570
0
            proto_tree_add_item(tree, hf_btatt_volume_setting, tvb, offset, 1, ENC_NA);
10571
0
            offset += 1;
10572
0
        }
10573
0
        break;
10574
0
    case 0x2B7F: /* Volume Flags */
10575
0
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10576
0
            break;
10577
10578
0
        proto_tree_add_item(tree, hf_btatt_volume_flags, tvb, offset, 1, ENC_NA);
10579
0
        offset += 1;
10580
0
        break;
10581
0
    case 0x2A62: /* Pulse Oximetry Control Point */ /* APPROVED: NO */
10582
0
    case 0x2AE0: /* Average Current */
10583
0
    case 0x2AE1: /* Average Voltage */
10584
0
    case 0x2AE2: /* Boolean */
10585
0
    case 0x2AE3: /* Chromatic Distance From Planckian */
10586
0
    case 0x2AE4: /* Chromaticity Coordinates */
10587
0
    case 0x2AE5: /* Chromaticity In CCT And Duv Values */
10588
0
    case 0x2AE6: /* Chromaticity Tolerance */
10589
0
    case 0x2AE7: /* CIE 13.3-1995 Color Rendering Index */
10590
0
    case 0x2AE8: /* Coefficient */
10591
0
    case 0x2AE9: /* Correlated Color Temperature */
10592
0
    case 0x2AEA: /* Count 16 */
10593
0
    case 0x2AEB: /* Count 24 */
10594
0
    case 0x2AEC: /* Country Code */
10595
0
    case 0x2AED: /* Date UTC */
10596
0
    case 0x2AEE: /* Electric Current */
10597
0
    case 0x2AEF: /* Electric Current Range */
10598
0
    case 0x2AF0: /* Electric Current Specification */
10599
0
    case 0x2AF1: /* Electric Current Statistics */
10600
0
    case 0x2AF2: /* Energy */
10601
0
    case 0x2AF3: /* Energy In A Period Of Day */
10602
0
    case 0x2AF4: /* Event Statistics */
10603
0
    case 0x2AF5: /* Fixed String 16 */
10604
0
    case 0x2AF6: /* Fixed String 24 */
10605
0
    case 0x2AF7: /* Fixed String 36 */
10606
0
    case 0x2AF8: /* Fixed String 8 */
10607
0
    case 0x2AF9: /* Generic Level */
10608
0
    case 0x2AFA: /* Global Trade Item Number */
10609
0
    case 0x2AFB: /* Illuminance */
10610
0
    case 0x2AFC: /* Luminous Efficacy */
10611
0
    case 0x2AFD: /* Luminous Energy */
10612
0
    case 0x2AFE: /* Luminous Exposure */
10613
0
    case 0x2AFF: /* Luminous Flux */
10614
0
    case 0x2B00: /* Luminous Flux Range */
10615
0
    case 0x2B01: /* Luminous Intensity */
10616
0
    case 0x2B02: /* Mass Flow */
10617
0
    case 0x2B03: /* Perceived Lightness */
10618
0
    case 0x2B04: /* Percentage 8 */
10619
0
    case 0x2B05: /* Power */
10620
0
    case 0x2B06: /* Power Specification */
10621
0
    case 0x2B07: /* Relative Runtime In A Current Range */
10622
0
    case 0x2B08: /* Relative Runtime In A Generic Level Range */
10623
0
    case 0x2B09: /* Relative Value In A Voltage Range */
10624
0
    case 0x2B0A: /* Relative Value In An Illuminance Range */
10625
0
    case 0x2B0B: /* Relative Value In A Period of Day */
10626
0
    case 0x2B0C: /* Relative Value In A Temperature Range */
10627
0
    case 0x2B0D: /* Temperature 8 */
10628
0
    case 0x2B0E: /* Temperature 8 In A Period Of Day */
10629
0
    case 0x2B0F: /* Temperature 8 Statistics */
10630
0
    case 0x2B10: /* Temperature Range */
10631
0
    case 0x2B11: /* Temperature Statistics */
10632
0
    case 0x2B12: /* Time Decihour 8 */
10633
0
    case 0x2B13: /* Time Exponential 8 */
10634
0
    case 0x2B14: /* Time Hour 24 */
10635
0
    case 0x2B15: /* Time Millisecond 24 */
10636
0
    case 0x2B16: /* Time Second 16 */
10637
0
    case 0x2B17: /* Time Second 8 */
10638
0
    case 0x2B18: /* Voltage */
10639
0
    case 0x2B19: /* Voltage Specification */
10640
0
    case 0x2B1A: /* Voltage Statistics */
10641
0
    case 0x2B1B: /* Volume Flow */
10642
0
    case 0x2B1C: /* Chromaticity Coordinate */
10643
0
    case 0x2B1D: /* Reconnection Configuration Feature */
10644
0
    case 0x2B1E: /* Reconnection Configuration Settings */
10645
0
    case 0x2B1F: /* Reconnection Configuration Control Point */
10646
        /* TODO */
10647
15
    default:
10648
15
        if (bluetooth_gatt_has_no_parameter(att_data->opcode))
10649
0
            break;
10650
10651
15
        proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
10652
15
        offset = tvb_captured_length(tvb);
10653
1.01k
    }
10654
10655
358
    return old_offset + offset;
10656
1.01k
}
10657
10658
static int
10659
btatt_dissect_attribute_handle(uint16_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, btatt_data_t *att_data)
10660
4.13k
{
10661
4.13k
    dissector_handle_t attribute_handler;
10662
4.13k
    const char* attribute_name;
10663
10664
4.13k
    attribute_handler = dissector_get_uint_handle(att_handle_dissector_table, handle);
10665
4.13k
    if (attribute_handler == NULL)
10666
4.13k
        return 0;
10667
10668
0
    attribute_name = dissector_handle_get_dissector_name(attribute_handler); /* abbrev */
10669
0
    DISSECTOR_ASSERT(attribute_name);
10670
10671
    /* For all registered subdissectors except BT GATT subdissectors, retrieve root tree. */
10672
0
    if (0 != strncmp(attribute_name, "btgatt", 6))
10673
0
        tree = proto_tree_get_parent_tree(tree);
10674
10675
    /* Note for BT GATT subdissectors:
10676
     * It will implicitly call dissect_btgatt() which retrieves the BT UUID
10677
     * from the registered data and then calls dissect_attribute_value().
10678
     */
10679
10680
0
    return dissector_try_uint_with_data(att_handle_dissector_table, handle, tvb, pinfo, tree, true, att_data);
10681
4.13k
}
10682
10683
static int
10684
dissect_btgatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data, void *cb)
10685
10
{
10686
10
    proto_item  *main_item;
10687
10
    proto_tree  *main_tree;
10688
10
    proto_item  *patron_item = NULL;
10689
10
    bluetooth_uuid_t uuid;
10690
10691
10
    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);
10692
10
    main_tree = proto_item_add_subtree(main_item, ett_btgatt);
10693
10694
10
    uuid.size = 2;
10695
10
    uuid.bt_uuid = (uint16_t)GPOINTER_TO_UINT(cb);
10696
10
    uuid.data[1] = uuid.bt_uuid & 0xFF;
10697
10
    uuid.data[0] = (uuid.bt_uuid >> 8) & 0xFF;
10698
10699
10
    return dissect_attribute_value(main_tree, patron_item, pinfo, tvb,
10700
10
            0, tvb_captured_length(tvb), 0, uuid, (btatt_data_t *) data);
10701
10702
10
}
10703
10704
static bool
10705
is_long_attribute_value(bluetooth_uuid_t uuid)
10706
2
{
10707
2
    switch (uuid.bt_uuid) {
10708
0
    case 0x2901: /* Characteristic User Description */
10709
0
    case 0x2A00: /* Device Name */
10710
0
    case 0x2A24: /* Model Number String */
10711
0
    case 0x2A25: /* Serial Number String */
10712
0
    case 0x2A26: /* Firmware Revision String */
10713
0
    case 0x2A27: /* Hardware Revision String */
10714
0
    case 0x2A28: /* Software Revision String */
10715
0
    case 0x2A29: /* Manufacturer Name String */
10716
0
    case 0x2A4B: /* Report Map */
10717
0
    case 0x2A87: /* Email Address */
10718
0
    case 0x2A90: /* Last Name */
10719
0
    case 0x2AA4: /* Bond Management Control Point */
10720
0
    case 0x2AB5: /* Location Name */
10721
0
    case 0x2AB6: /* URI */
10722
0
    case 0x2AB7: /* HTTP Headers */
10723
0
    case 0x2AB9: /* HTTP Entity Body */
10724
0
    case 0x2ABE: /* Object Name */
10725
0
        return true;
10726
2
    }
10727
10728
2
    return bluetooth_get_custom_uuid_long_attr(&uuid);
10729
2
}
10730
10731
static unsigned
10732
get_mtu(packet_info *pinfo, btl2cap_data_t *l2cap_data)
10733
1.53k
{
10734
1.53k
    wmem_tree_key_t  key[5];
10735
1.53k
    uint32_t         frame_number;
10736
1.53k
    mtu_data_t      *mtu_data;
10737
1.53k
    wmem_tree_t     *sub_wmemtree;
10738
1.53k
    unsigned         mtu = 23;
10739
10740
1.53k
    if (l2cap_data) {
10741
        /* Default to the minimum MTU permitted on each type of bearer:
10742
         * LE ATT: 23 octets.
10743
         * BR/EDR ATT: 48 octets.
10744
         * Enhanced ATT over any transport: 64 octets.
10745
         */
10746
1.53k
        mtu = l2cap_data->cid == BTL2CAP_FIXED_CID_ATT ? 23 : 48;
10747
10748
1.53k
        if (l2cap_data->psm == BTL2CAP_PSM_EATT) {
10749
0
            mtu = 64;
10750
0
        }
10751
10752
        /* Currently, MTU isn't stored per bearer, because the L2CAP dissector
10753
         * doesn't parse/provide that information.
10754
         *
10755
         * Until someday when that happens, continue assuming that the MTU of
10756
         * the dynamic bearers is at least equal to that of the fixed bearer. */
10757
10758
1.53k
        frame_number = pinfo->num;
10759
10760
1.53k
        key[0].length = 1;
10761
1.53k
        key[0].key    = &l2cap_data->interface_id;
10762
1.53k
        key[1].length = 1;
10763
1.53k
        key[1].key    = &l2cap_data->adapter_id;
10764
1.53k
        key[2].length = 1;
10765
1.53k
        key[2].key    = &l2cap_data->remote_bd_addr_oui;
10766
1.53k
        key[3].length = 1;
10767
1.53k
        key[3].key    = &l2cap_data->remote_bd_addr_id;
10768
1.53k
        key[4].length = 0;
10769
1.53k
        key[4].key    = NULL;
10770
10771
1.53k
        sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(mtus, key);
10772
1.53k
        mtu_data = (sub_wmemtree) ? (mtu_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
10773
10774
1.53k
        if (mtu_data)
10775
0
            mtu = mtu_data->mtu;
10776
1.53k
    }
10777
10778
1.53k
    return mtu;
10779
1.53k
}
10780
10781
static void
10782
save_mtu(packet_info *pinfo, btl2cap_data_t *l2cap_data, unsigned mtu)
10783
0
{
10784
0
    wmem_tree_key_t  key[6];
10785
0
    uint32_t         frame_number;
10786
0
    mtu_data_t      *mtu_data;
10787
10788
0
    frame_number = pinfo->num;
10789
10790
0
    key[0].length = 1;
10791
0
    key[0].key    = &l2cap_data->interface_id;
10792
0
    key[1].length = 1;
10793
0
    key[1].key    = &l2cap_data->adapter_id;
10794
0
    key[2].length = 1;
10795
0
    key[2].key    = &l2cap_data->remote_bd_addr_oui;
10796
0
    key[3].length = 1;
10797
0
    key[3].key    = &l2cap_data->remote_bd_addr_id;
10798
0
    key[4].length = 1;
10799
0
    key[4].key    = &frame_number;
10800
0
    key[5].length = 0;
10801
0
    key[5].key    = NULL;
10802
10803
0
    mtu_data = wmem_new(wmem_file_scope(), mtu_data_t);
10804
0
    mtu_data->mtu = mtu;
10805
10806
0
    wmem_tree_insert32_array(mtus, key, mtu_data);
10807
0
}
10808
10809
static void
10810
save_value_fragment(packet_info *pinfo, tvbuff_t *tvb, int offset,
10811
        uint32_t handle, unsigned data_offset, btl2cap_data_t *l2cap_data)
10812
0
{
10813
0
    wmem_tree_key_t   key[6];
10814
0
    uint32_t          frame_number, cid;
10815
0
    fragment_data_t  *fragment_data;
10816
10817
0
    frame_number = pinfo->num;
10818
0
    cid = (l2cap_data->cid == BTL2CAP_FIXED_CID_ATT) ? l2cap_data->cid : l2cap_data->local_cid;
10819
10820
0
    key[0].length = 1;
10821
0
    key[0].key    = &l2cap_data->interface_id;
10822
0
    key[1].length = 1;
10823
0
    key[1].key    = &l2cap_data->adapter_id;
10824
0
    key[2].length = 1;
10825
0
    key[2].key    = &cid;
10826
0
    key[3].length = 1;
10827
0
    key[3].key    = &handle;
10828
0
    key[4].length = 1;
10829
0
    key[4].key    = &frame_number;
10830
0
    key[5].length = 0;
10831
0
    key[5].key    = NULL;
10832
10833
0
    fragment_data = wmem_new(wmem_file_scope(), fragment_data_t);
10834
0
    fragment_data->length = tvb_captured_length_remaining(tvb, offset);
10835
0
    fragment_data->offset = data_offset;
10836
0
    fragment_data->data_in_frame = frame_number;
10837
0
    fragment_data->data = (uint8_t *) tvb_memdup(wmem_file_scope(), tvb, offset, fragment_data->length);
10838
10839
0
    wmem_tree_insert32_array(fragments, key, fragment_data);
10840
0
}
10841
10842
static uint8_t *
10843
get_value(packet_info *pinfo, uint32_t handle, btl2cap_data_t *l2cap_data, unsigned *length)
10844
0
{
10845
0
    wmem_tree_key_t   key[5];
10846
0
    uint32_t          frame_number, cid;
10847
0
    fragment_data_t  *fragment_data;
10848
0
    wmem_tree_t      *sub_wmemtree;
10849
0
    unsigned          last_offset = UINT_MAX;
10850
0
    unsigned          size;
10851
0
    bool              first = true;
10852
0
    uint8_t          *data = NULL;
10853
10854
0
    if (l2cap_data) {
10855
0
        frame_number = pinfo->num;
10856
0
        cid = (l2cap_data->cid == BTL2CAP_FIXED_CID_ATT) ? l2cap_data->cid : l2cap_data->local_cid;
10857
10858
0
        key[0].length = 1;
10859
0
        key[0].key    = &l2cap_data->interface_id;
10860
0
        key[1].length = 1;
10861
0
        key[1].key    = &l2cap_data->adapter_id;
10862
0
        key[2].length = 1;
10863
0
        key[2].key    = &cid;
10864
0
        key[3].length = 1;
10865
0
        key[3].key    = &handle;
10866
0
        key[4].length = 0;
10867
0
        key[4].key    = NULL;
10868
10869
0
        sub_wmemtree = (wmem_tree_t *) wmem_tree_lookup32_array(fragments, key);
10870
0
        while (1) {
10871
0
            fragment_data = (sub_wmemtree) ? (fragment_data_t *) wmem_tree_lookup32_le(sub_wmemtree, frame_number) : NULL;
10872
0
            if (!fragment_data || (fragment_data->offset >= last_offset))
10873
0
                break;
10874
10875
0
            if (first) {
10876
0
                size = fragment_data->offset + fragment_data->length;
10877
0
                data = (uint8_t *) wmem_alloc(pinfo->pool, size);
10878
10879
0
                if (length)
10880
0
                    *length = size;
10881
10882
0
                first = false;
10883
0
            } else if (fragment_data->offset + fragment_data->length != last_offset) {
10884
0
                break;
10885
0
            }
10886
10887
0
            memcpy(data + fragment_data->offset, fragment_data->data, fragment_data->length);
10888
10889
0
            if (fragment_data->offset == 0)
10890
0
                return data;
10891
0
            frame_number = fragment_data->data_in_frame - 1;
10892
0
            last_offset = fragment_data->offset;
10893
0
        }
10894
0
    }
10895
10896
0
    if (length)
10897
0
        *length = 0;
10898
0
    return NULL;
10899
0
}
10900
10901
static int
10902
dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
10903
1.54k
{
10904
1.54k
    proto_item        *main_item;
10905
1.54k
    proto_tree        *main_tree;
10906
1.54k
    proto_item        *sub_item;
10907
1.54k
    proto_tree        *sub_tree;
10908
1.54k
    int                offset = 0;
10909
1.54k
    uint8_t            opcode;
10910
1.54k
    uint8_t            request_opcode;
10911
1.54k
    btl2cap_data_t     *l2cap_data;
10912
1.54k
    btatt_data_t       att_data;
10913
1.54k
    request_data_t    *request_data;
10914
1.54k
    uint16_t           handle;
10915
1.54k
    bluetooth_uuid_t   uuid;
10916
1.54k
    unsigned           mtu;
10917
/* desegmentation stuff */
10918
//    int deseg_offset = 0;
10919
/*end desegmentation stuff */
10920
1.54k
    memset(&uuid, 0, sizeof uuid);
10921
10922
1.54k
    l2cap_data = (btl2cap_data_t *) data;
10923
10924
1.54k
    if (tvb_reported_length_remaining(tvb, 0) < 1)
10925
12
        return 0;
10926
10927
1.53k
    att_data.l2cap_data   = l2cap_data;
10928
10929
1.53k
    main_item = proto_tree_add_item(tree, proto_btatt, tvb, 0, -1, ENC_NA);
10930
1.53k
    main_tree = proto_item_add_subtree(main_item, ett_btatt);
10931
10932
1.53k
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATT");
10933
10934
1.53k
    switch (pinfo->p2p_dir) {
10935
14
        case P2P_DIR_SENT:
10936
14
            col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
10937
14
            break;
10938
5
        case P2P_DIR_RECV:
10939
5
            col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
10940
5
            break;
10941
1.51k
        default:
10942
1.51k
            col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection ");
10943
1.51k
            break;
10944
1.53k
    }
10945
10946
1.53k
    mtu = get_mtu(pinfo, l2cap_data);
10947
1.53k
    if (tvb_reported_length(tvb) > mtu)
10948
1.34k
        expert_add_info(pinfo, main_item, &ei_btatt_mtu_exceeded);
10949
10950
1.53k
    proto_tree_add_bitmask_with_flags(main_tree, tvb, offset, hf_btatt_opcode, ett_btatt_opcode,  hfx_btatt_opcode, ENC_NA, BMT_NO_APPEND);
10951
1.53k
    opcode = tvb_get_uint8(tvb, 0);
10952
1.53k
    att_data.opcode = opcode;
10953
1.53k
    offset++;
10954
1.53k
    request_data = get_request(tvb, offset, pinfo, opcode, l2cap_data);
10955
1.53k
    col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const(opcode, opcode_vals, "<unknown>"));
10956
1.53k
    switch (opcode) {
10957
10
    case 0x01: /* Error Response */
10958
10
        {
10959
10
        uint8_t              error_code;
10960
10
        bluetooth_uuid_t     service_uuid;
10961
10
        const value_string  *error_vals = error_code_vals;
10962
10
        int                  hfx_btatt_error_code = hf_btatt_error_code;
10963
10964
10
        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);
10965
10
        request_opcode = tvb_get_uint8(tvb, offset);
10966
10
        offset += 1;
10967
10968
10
        offset = dissect_handle(main_tree, pinfo, hf_btatt_handle_in_error, tvb, offset, l2cap_data, NULL, HANDLE_TVB, opcode);
10969
10
        handle = tvb_get_letohs(tvb, offset - 2);
10970
10971
10
        error_code = tvb_get_uint8(tvb, offset);
10972
10973
10
        if (error_code >= 0x80 && error_code <= 0x9F) {
10974
0
            service_uuid = get_service_uuid_from_handle(pinfo, handle, opcode, l2cap_data);
10975
10976
0
            switch (service_uuid.bt_uuid) {
10977
0
            case GATT_SERVICE_AUTOMATION_IO:
10978
0
                error_vals = error_code_aios_vals;
10979
0
                hfx_btatt_error_code = hf_btatt_error_code_aios;
10980
10981
0
                break;
10982
0
            case GATT_SERVICE_ALERT_NOTIFICATION_SERVICE:
10983
0
                error_vals = error_code_ans_vals;
10984
0
                hfx_btatt_error_code = hf_btatt_error_code_ans;
10985
10986
0
                break;
10987
0
            case GATT_SERVICE_BOND_MANAGEMENT:
10988
0
                error_vals = error_code_bms_vals;
10989
0
                hfx_btatt_error_code = hf_btatt_error_code_bms;
10990
10991
0
                break;
10992
0
            case GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING:
10993
0
                error_vals = error_code_cgms_vals;
10994
0
                hfx_btatt_error_code = hf_btatt_error_code_cgms;
10995
10996
0
                break;
10997
0
            case GATT_SERVICE_CYCLING_POWER:
10998
0
                error_vals = error_code_cps_vals;
10999
0
                hfx_btatt_error_code = hf_btatt_error_code_cps;
11000
11001
0
                break;
11002
0
            case GATT_SERVICE_CYCLING_SPEED_AND_CADENCE:
11003
0
                error_vals = error_code_cscs_vals;
11004
0
                hfx_btatt_error_code = hf_btatt_error_code_cscs;
11005
11006
0
                break;
11007
0
            case GATT_SERVICE_CURRENT_TIME_SERVICE:
11008
0
                error_vals = error_code_cts_vals;
11009
0
                hfx_btatt_error_code = hf_btatt_error_code_cts;
11010
11011
0
                break;
11012
0
            case GATT_SERVICE_ENVIRONMENTAL_SENSING:
11013
0
                error_vals = error_code_ess_vals;
11014
0
                hfx_btatt_error_code = hf_btatt_error_code_ess;
11015
11016
0
                break;
11017
0
            case GATT_SERVICE_GLUCOSE:
11018
0
                error_vals = error_code_gls_vals;
11019
0
                hfx_btatt_error_code = hf_btatt_error_code_gls;
11020
11021
0
                break;
11022
0
            case GATT_SERVICE_HTTP_PROXY:
11023
0
                error_vals = error_code_hps_vals;
11024
0
                hfx_btatt_error_code = hf_btatt_error_code_hps;
11025
11026
0
                break;
11027
0
            case GATT_SERVICE_HEART_RATE:
11028
0
                error_vals = error_code_hrs_vals;
11029
0
                hfx_btatt_error_code = hf_btatt_error_code_hrs;
11030
11031
0
                break;
11032
0
            case GATT_SERVICE_HEALTH_THERMOMETER:
11033
0
                error_vals = error_code_hts_vals;
11034
0
                hfx_btatt_error_code = hf_btatt_error_code_hts;
11035
11036
0
                break;
11037
0
            case GATT_SERVICE_INDOOR_POSITIONING:
11038
0
                error_vals = error_code_ips_vals;
11039
0
                hfx_btatt_error_code = hf_btatt_error_code_ips;
11040
11041
0
                break;
11042
0
            case GATT_SERVICE_OBJECT_TRANSFER:
11043
0
                error_vals = error_code_ots_vals;
11044
0
                hfx_btatt_error_code = hf_btatt_error_code_ots;
11045
11046
0
                break;
11047
0
            case GATT_SERVICE_RUNNING_SPEED_AND_CADENCE:
11048
0
                error_vals = error_code_rscs_vals;
11049
0
                hfx_btatt_error_code = hf_btatt_error_code_rscs;
11050
11051
0
                break;
11052
0
            case GATT_SERVICE_USER_DATA:
11053
0
                error_vals = error_code_uds_vals;
11054
0
                hfx_btatt_error_code = hf_btatt_error_code_uds;
11055
11056
0
                break;
11057
0
            default:
11058
0
                error_vals = error_code_vals;
11059
0
                hfx_btatt_error_code = hf_btatt_error_code;
11060
0
            }
11061
0
        }
11062
10
        col_append_fstr(pinfo->cinfo, COL_INFO, " - %s",
11063
10
                        val_to_str_const(error_code, error_vals, "<unknown>"));
11064
11065
10
        col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11066
11067
10
        proto_tree_add_item(main_tree, hfx_btatt_error_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11068
10
        offset++;
11069
11070
10
        if (request_data && (request_opcode == 0x08 || request_opcode == 0x10)) {
11071
0
            sub_item = proto_tree_add_uint(main_tree, hf_btatt_uuid16, tvb, 0, 0, request_data->parameters.read_by_type.uuid.bt_uuid);
11072
0
            proto_item_set_generated(sub_item);
11073
0
        }
11074
10
        }
11075
0
        break;
11076
11077
4
    case 0x02: /* Exchange MTU Request */
11078
4
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Client Rx MTU: %u", tvb_get_letohs(tvb, offset));
11079
4
        proto_tree_add_item(main_tree, hf_btatt_client_rx_mtu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11080
4
        offset += 2;
11081
11082
4
        if (!pinfo->fd->visited && l2cap_data) {
11083
4
            union request_parameters_union  request_parameters;
11084
11085
4
            request_parameters.mtu.mtu = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11086
11087
4
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11088
4
        }
11089
11090
4
        break;
11091
11092
10
    case 0x03: /* Exchange MTU Response */
11093
10
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Server Rx MTU: %u", tvb_get_letohs(tvb, offset));
11094
10
        proto_tree_add_item(main_tree, hf_btatt_server_rx_mtu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11095
10
        if (!pinfo->fd->visited && request_data && l2cap_data) {
11096
0
            unsigned new_mtu;
11097
11098
0
            new_mtu = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
11099
0
            if (new_mtu > request_data->parameters.mtu.mtu)
11100
0
                new_mtu = request_data->parameters.mtu.mtu;
11101
0
            save_mtu(pinfo, l2cap_data, new_mtu);
11102
0
        }
11103
10
        offset += 2;
11104
10
        break;
11105
11106
7
    case 0x04: /* Find Information Request */
11107
7
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Handles: 0x%04x..0x%04x",
11108
7
                            tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11109
7
        proto_tree_add_item(main_tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11110
7
        offset += 2;
11111
11112
7
        proto_tree_add_item(main_tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11113
7
        offset += 2;
11114
11115
7
        if (!pinfo->fd->visited && l2cap_data) {
11116
7
            union request_parameters_union  request_parameters;
11117
11118
7
            request_parameters.find_information.starting_handle = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
11119
7
            request_parameters.find_information.ending_handle   = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11120
11121
7
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11122
7
        }
11123
11124
7
        break;
11125
11126
118
    case 0x05: /* Find Information Response */
11127
118
        {
11128
118
            uint8_t format;
11129
11130
118
            sub_item = proto_tree_add_item(main_tree, hf_btatt_uuid_format, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11131
118
            format = tvb_get_uint8(tvb, offset);
11132
118
            offset += 1;
11133
11134
118
            if (format == 1) {
11135
2.50k
                while (tvb_reported_length_remaining(tvb, offset) > 0) {
11136
2.42k
                    sub_item = proto_tree_add_item(main_tree, hf_btatt_information_data, tvb, offset, 4, ENC_NA);
11137
2.42k
                    sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11138
11139
2.42k
                    offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, opcode);
11140
2.42k
                    handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11141
11142
2.42k
                    proto_tree_add_item(sub_tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11143
2.42k
                    uuid = get_bluetooth_uuid(tvb, offset, 2);
11144
2.42k
                    offset += 2;
11145
11146
2.42k
                    proto_item_append_text(sub_item, ", Handle: 0x%04x, UUID: %s",
11147
2.42k
                            handle, print_bluetooth_uuid(&uuid));
11148
11149
2.42k
                    save_handle(pinfo, uuid, handle, ATTRIBUTE_TYPE_OTHER, l2cap_data);
11150
11151
2.42k
                    col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11152
2.42k
                }
11153
71
            }
11154
47
            else if (format == 2) {
11155
647
                while (tvb_reported_length_remaining(tvb, offset) > 0) {
11156
602
                    sub_item = proto_tree_add_item(main_tree, hf_btatt_information_data, tvb, offset, 4, ENC_NA);
11157
602
                    sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11158
11159
602
                    offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, opcode);
11160
602
                    handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11161
11162
602
                    proto_tree_add_item(sub_tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
11163
602
                    uuid = get_bluetooth_uuid(tvb, offset, 16);
11164
602
                    offset += 16;
11165
11166
602
                    proto_item_append_text(sub_item, ", Handle: 0x%04x, UUID: %s",
11167
602
                            handle, print_bluetooth_uuid(&uuid));
11168
11169
602
                    save_handle(pinfo, uuid, handle, ATTRIBUTE_TYPE_OTHER, l2cap_data);
11170
11171
602
                    col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11172
602
                }
11173
45
            }
11174
2
            else {
11175
2
                expert_add_info(pinfo, sub_item, &ei_btatt_uuid_format_unknown);
11176
2
            }
11177
118
        }
11178
118
        break;
11179
11180
1.24k
    case 0x06: /* Find By Type Value Request */
11181
1.24k
        col_append_fstr(pinfo->cinfo, COL_INFO, ", %s, Handles: 0x%04x..0x%04x",
11182
1.24k
                            val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &bluetooth_uuid_vals_ext, "<unknown>"),
11183
1.24k
                            tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11184
11185
1.24k
        proto_tree_add_item(main_tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11186
1.24k
        offset += 2;
11187
11188
1.24k
        proto_tree_add_item(main_tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11189
1.24k
        offset += 2;
11190
11191
1.24k
        proto_tree_add_item(main_tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11192
1.24k
        uuid = get_bluetooth_uuid(tvb, offset - 2, 2);
11193
1.24k
        offset += 2;
11194
11195
1.24k
        dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), 0, uuid, &att_data);
11196
11197
1.24k
        if (!pinfo->fd->visited && l2cap_data) {
11198
583
            union request_parameters_union  request_parameters;
11199
11200
583
            request_parameters.read_by_type.starting_handle = tvb_get_uint16(tvb, offset - 6, ENC_LITTLE_ENDIAN);
11201
583
            request_parameters.read_by_type.ending_handle   = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
11202
583
            request_parameters.read_by_type.uuid = uuid;
11203
11204
583
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11205
583
        }
11206
11207
1.24k
        offset = tvb_reported_length(tvb);
11208
11209
1.24k
        break;
11210
11211
14
    case 0x07: /* Find By Type Value Response */
11212
632
        while (tvb_reported_length_remaining(tvb, offset) > 0) {
11213
618
            sub_item = proto_tree_add_none_format(main_tree, hf_btatt_handles_info, tvb, offset, 4,
11214
618
                                            "Handles Info, Handle: 0x%04x, Group End Handle: 0x%04x",
11215
618
                                            tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11216
11217
618
            sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11218
11219
618
            offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, opcode);
11220
11221
618
            proto_tree_add_item(sub_tree, hf_btatt_group_end_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11222
618
            offset += 2;
11223
11224
618
            if (request_data)
11225
0
                save_handle(pinfo, request_data->parameters.read_by_type.uuid,
11226
0
                        tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN),
11227
0
                        ATTRIBUTE_TYPE_OTHER, l2cap_data);
11228
11229
618
        }
11230
14
        break;
11231
11232
4
    case 0x08: /* Read By Type Request */
11233
9
    case 0x10: /* Read By Group Type Request */
11234
9
        col_append_fstr(pinfo->cinfo, COL_INFO, ", %s, Handles: 0x%04x..0x%04x",
11235
9
                            val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &bluetooth_uuid_vals_ext, "<unknown>"),
11236
9
                            tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11237
11238
9
        proto_tree_add_item(main_tree, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11239
9
        offset += 2;
11240
9
        proto_tree_add_item(main_tree, hf_btatt_ending_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11241
9
        offset += 2;
11242
11243
9
        if (tvb_reported_length_remaining(tvb, offset) == 2) {
11244
0
            proto_tree_add_item(main_tree, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11245
0
            offset += 2;
11246
11247
0
            if (!pinfo->fd->visited && l2cap_data) {
11248
0
                union request_parameters_union  request_parameters;
11249
11250
0
                request_parameters.read_by_type.starting_handle = tvb_get_uint16(tvb, offset - 6, ENC_LITTLE_ENDIAN);
11251
0
                request_parameters.read_by_type.ending_handle   = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
11252
0
                request_parameters.read_by_type.uuid = get_bluetooth_uuid(tvb, offset - 2, 2);
11253
11254
0
                save_request(pinfo, opcode, request_parameters, l2cap_data);
11255
0
            }
11256
9
        } else if (tvb_reported_length_remaining(tvb, offset) == 16) {
11257
1
            sub_item = proto_tree_add_item(main_tree, hf_btatt_uuid128, tvb, offset, 16, ENC_NA);
11258
1
            proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(tvb_get_letohs(tvb, offset),
11259
1
                                            &bluetooth_uuid_vals_ext, "<unknown>"));
11260
1
            offset += 16;
11261
11262
1
            if (!pinfo->fd->visited && l2cap_data) {
11263
1
                union request_parameters_union  request_parameters;
11264
11265
1
                request_parameters.read_by_type.starting_handle = tvb_get_uint16(tvb, offset - 20, ENC_LITTLE_ENDIAN);
11266
1
                request_parameters.read_by_type.ending_handle   = tvb_get_uint16(tvb, offset - 18, ENC_LITTLE_ENDIAN);
11267
1
                request_parameters.read_by_type.uuid = get_bluetooth_uuid(tvb, offset - 16, 16);
11268
11269
1
                save_request(pinfo, opcode, request_parameters, l2cap_data);
11270
1
            }
11271
8
        } else {
11272
8
            sub_item = proto_tree_add_item(tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11273
8
            expert_add_info(pinfo, sub_item, &ei_btatt_bad_data);
11274
8
            offset = tvb_captured_length(tvb);
11275
8
        }
11276
11277
9
        break;
11278
11279
19
    case 0x09: /* Read By Type Response */
11280
19
        {
11281
19
            uint8_t length = tvb_get_uint8(tvb, offset);
11282
11283
19
            proto_tree_add_item(main_tree, hf_btatt_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11284
19
            offset++;
11285
11286
19
            if (length > 0) {
11287
19
                col_append_fstr(pinfo->cinfo, COL_INFO, ", Attribute List Length: %u",
11288
19
                                        tvb_reported_length_remaining(tvb, offset)/length);
11289
11290
610
                while (tvb_reported_length_remaining(tvb, offset) >= length)
11291
591
                {
11292
591
                    sub_item = proto_tree_add_none_format(main_tree, hf_btatt_attribute_data, tvb,
11293
591
                                                    offset, length, "Attribute Data, Handle: 0x%04x",
11294
591
                                                    tvb_get_letohs(tvb, offset));
11295
11296
591
                    sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11297
11298
591
                    if (request_data) {
11299
0
                        save_handle(pinfo, request_data->parameters.read_by_type.uuid,
11300
0
                                tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN),
11301
0
                                ATTRIBUTE_TYPE_OTHER, l2cap_data);
11302
0
                    }
11303
11304
591
                    offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, opcode);
11305
11306
591
                    if (request_data) {
11307
0
                        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);
11308
591
                    } else {
11309
591
                        proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, length - 2, ENC_NA);
11310
591
                        offset += length - 2;
11311
591
                    }
11312
591
                }
11313
19
            }
11314
11315
19
            if (request_data) {
11316
0
                sub_item = proto_tree_add_uint(main_tree, hf_btatt_uuid16, tvb, 0, 0, request_data->parameters.read_by_type.uuid.bt_uuid);
11317
0
                proto_item_set_generated(sub_item);
11318
0
            }
11319
19
        }
11320
19
        break;
11321
11322
2
    case 0x0a: /* Read Request */
11323
2
        offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, HANDLE_TVB, opcode);
11324
2
        handle = tvb_get_letohs(tvb, offset - 2);
11325
11326
2
        col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11327
11328
2
        if (!pinfo->fd->visited && l2cap_data) {
11329
2
            union request_parameters_union  request_parameters;
11330
11331
2
            request_parameters.read_write.handle = handle;
11332
2
            request_parameters.read_write.offset = 0;
11333
11334
2
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11335
2
        }
11336
11337
2
        offset = dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), handle, uuid, &att_data);
11338
11339
2
        break;
11340
11341
2
    case 0x0b: /* Read Response */
11342
2
        if (request_data) {
11343
0
            dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, request_data->parameters.read_write.handle, opcode);
11344
11345
0
            col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, l2cap_data);
11346
0
        }
11347
11348
2
        if (is_long_attribute_value(uuid) && tvb_captured_length(tvb) >= mtu) {
11349
0
            sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11350
0
            if (!pinfo->fd->visited && request_data && l2cap_data)
11351
0
                save_value_fragment(pinfo, tvb, offset, request_data->parameters.read_write.handle, 0, l2cap_data);
11352
0
            offset = tvb_captured_length(tvb);
11353
11354
0
            expert_add_info(pinfo, sub_item, &ei_btatt_mtu_full);
11355
2
        } else {
11356
2
            if (request_data)
11357
0
                handle = request_data->parameters.read_write.handle;
11358
2
            else
11359
2
                handle = 0;
11360
11361
2
            offset = dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, tvb_captured_length_remaining(tvb, offset), handle, uuid, &att_data);
11362
2
        }
11363
2
        break;
11364
11365
1
    case 0x0c: /* Read Blob Request */
11366
1
        offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, HANDLE_TVB, opcode);
11367
1
        handle = tvb_get_letohs(tvb, offset - 2);
11368
11369
1
        col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11370
1
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Offset: %u", tvb_get_letohs(tvb, offset));
11371
11372
1
        proto_tree_add_item(main_tree, hf_btatt_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11373
1
        offset += 2;
11374
11375
1
        dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, handle, uuid, &att_data);
11376
11377
11378
1
        if (!pinfo->fd->visited && l2cap_data) {
11379
1
            union request_parameters_union  request_parameters;
11380
11381
1
            request_parameters.read_write.handle = handle;
11382
1
            request_parameters.read_write.offset = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11383
11384
1
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11385
1
        }
11386
1
        break;
11387
11388
13
    case 0x0d: /* Read Blob Response */
11389
13
        if (request_data && request_data->opcode == (opcode - 1)) {
11390
0
            dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, request_data->parameters.read_write.handle, opcode);
11391
11392
0
            col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, l2cap_data);
11393
11394
0
            if (request_data->parameters.read_write.offset == 0 && !is_long_attribute_value(uuid)) {
11395
0
                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);
11396
0
            } else {
11397
0
                if (!pinfo->fd->visited && l2cap_data)
11398
0
                    save_value_fragment(pinfo, tvb, offset, request_data->parameters.read_write.handle, request_data->parameters.read_write.offset, l2cap_data);
11399
11400
0
                if (tvb_captured_length(tvb) < mtu) {
11401
0
                    tvbuff_t  *next_tvb;
11402
0
                    unsigned   reassembled_length;
11403
0
                    uint8_t   *reassembled_data;
11404
11405
0
                    sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11406
0
                    offset = tvb_captured_length(tvb);
11407
11408
0
                    reassembled_data = get_value(pinfo, request_data->parameters.read_write.handle, l2cap_data, &reassembled_length);
11409
0
                    if (reassembled_data) {
11410
0
                        sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
11411
0
                        next_tvb = tvb_new_child_real_data(tvb, reassembled_data, reassembled_length, reassembled_length);
11412
0
                        add_new_data_source(pinfo, next_tvb, "Reassembled ATT");
11413
0
                        dissect_attribute_value(sub_tree, NULL, pinfo, next_tvb, 0, tvb_captured_length(next_tvb), request_data->parameters.read_write.handle, uuid, &att_data);
11414
0
                    }
11415
0
                } else {
11416
0
                    sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11417
0
                    offset = tvb_captured_length(tvb);
11418
11419
0
                    expert_add_info(pinfo, sub_item, &ei_btatt_mtu_full);
11420
0
                }
11421
0
            }
11422
13
        } else {
11423
13
            proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11424
13
            offset = tvb_captured_length(tvb);
11425
13
        }
11426
11427
13
        break;
11428
11429
26
    case 0x0e: /* Multiple Read Request */
11430
30
    case 0x20: /* Read Multiple Variable Request */
11431
30
        if(tvb_reported_length_remaining(tvb, offset) < 4) {
11432
0
            expert_add_info(pinfo, main_item, &ei_btatt_handle_too_few);
11433
0
            break;
11434
0
        }
11435
11436
30
        col_append_str(pinfo->cinfo, COL_INFO, ", Handles: ");
11437
2.90k
        while (tvb_reported_length_remaining(tvb, offset) >= 2) {
11438
2.87k
            offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, HANDLE_TVB, opcode);
11439
2.87k
            handle = tvb_get_letohs(tvb, offset - 2);
11440
2.87k
            col_append_fstr(pinfo->cinfo, COL_INFO, "0x%04x ", handle);
11441
11442
2.87k
            dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, handle, uuid, &att_data);
11443
2.87k
        }
11444
11445
30
        if (!pinfo->fd->visited && l2cap_data) {
11446
30
            union request_parameters_union  request_parameters;
11447
11448
30
            request_parameters.read_multiple.number_of_handles = (tvb_captured_length(tvb) - 1) / 2;
11449
30
            request_parameters.read_multiple.handle = (uint16_t *) tvb_memdup(wmem_file_scope(),
11450
30
                    tvb, 1, request_parameters.read_multiple.number_of_handles * 2);
11451
11452
30
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11453
30
        }
11454
30
        break;
11455
11456
3
    case 0x0f: /* Multiple Read Response */
11457
14
    case 0x21: /* Read Multiple Variable Response */
11458
14
        if (request_data && request_data->opcode == (opcode - 1)) {
11459
0
            unsigned  i_handle;
11460
11461
0
            if (opcode == 0x0f) {
11462
0
                for (i_handle = 0; i_handle < request_data->parameters.read_multiple.number_of_handles; i_handle += 1) {
11463
0
                    dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, request_data->parameters.read_multiple.handle[i_handle], opcode);
11464
0
                    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);
11465
0
                }
11466
0
            } else {
11467
0
                i_handle = 0;
11468
                /* Read Multiple Variable Response */
11469
0
                for (;;) {
11470
0
                    int remain = tvb_reported_length_remaining(tvb, offset);
11471
0
                    uint16_t length;
11472
0
                    if (remain < 2)
11473
0
                        break;
11474
0
                    length = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
11475
0
                    offset+=2;
11476
0
                    remain-=2;
11477
0
                    if (remain < length)
11478
0
                        break;
11479
11480
0
                    dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, request_data->parameters.read_multiple.handle[i_handle], opcode);
11481
0
                    dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, length, request_data->parameters.read_multiple.handle[i_handle], uuid, &att_data);
11482
11483
0
                    i_handle++;
11484
0
                    offset += length;
11485
0
                }
11486
0
            }
11487
14
        } else {
11488
14
            proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11489
14
            offset = tvb_reported_length(tvb);
11490
14
        }
11491
14
        break;
11492
11493
11
    case 0x11: /* Read By Group Type Response */
11494
11
        {
11495
11
            uint8_t length = tvb_get_uint8(tvb, offset);
11496
11497
11
            proto_tree_add_item(main_tree, hf_btatt_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11498
11
            offset++;
11499
11500
11
            if (length > 0) {
11501
11
                col_append_fstr(pinfo->cinfo, COL_INFO, ", Attribute List Length: %u", tvb_reported_length_remaining(tvb, offset)/length);
11502
11503
78
                while (tvb_reported_length_remaining(tvb, offset) >= length) {
11504
67
                    sub_item = proto_tree_add_none_format(main_tree, hf_btatt_attribute_data, tvb, offset, length,
11505
67
                                                    "Attribute Data, Handle: 0x%04x, Group End Handle: 0x%04x",
11506
67
                                                    tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
11507
11508
67
                    sub_tree = proto_item_add_subtree(sub_item, ett_btatt_list);
11509
11510
67
                    offset = dissect_handle(sub_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, NULL, HANDLE_TVB, opcode);
11511
67
                    handle = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
11512
11513
67
                    proto_tree_add_item(sub_tree, hf_btatt_group_end_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11514
67
                    offset += 2;
11515
11516
67
                    if (request_data) {
11517
0
                        offset = dissect_attribute_value(sub_tree, sub_item, pinfo, tvb, offset, length - 4, handle, request_data->parameters.read_by_type.uuid, &att_data);
11518
67
                    } else {
11519
67
                        proto_tree_add_item(sub_tree, hf_btatt_value, tvb, offset, length - 4, ENC_NA);
11520
67
                        offset += length - 4;
11521
67
                    }
11522
67
                }
11523
11
            }
11524
11525
11
            if (request_data && request_data->opcode == (opcode - 1)) {
11526
0
                sub_item = proto_tree_add_uint(main_tree, hf_btatt_uuid16, tvb, 0, 0, request_data->parameters.read_by_type.uuid.bt_uuid);
11527
0
                proto_item_set_generated(sub_item);
11528
0
            }
11529
11
        }
11530
11
        break;
11531
11532
2
    case 0x12: /* Write Request */
11533
2
    case 0x1d: /* Handle Value Indication */
11534
3
    case 0x52: /* Write Command */
11535
4
    case 0x1b: /* Handle Value Notification */
11536
4
        offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, HANDLE_TVB, opcode);
11537
4
        handle = tvb_get_letohs(tvb, offset - 2);
11538
4
        col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11539
4
        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);
11540
4
        if (!pinfo->fd->visited && l2cap_data && (opcode == 0x12 || opcode == 0x1d)) {
11541
2
            union request_parameters_union  request_parameters;
11542
11543
2
            request_parameters.read_write.handle = handle;
11544
2
            request_parameters.read_write.offset = 0;
11545
11546
2
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11547
2
        }
11548
4
        break;
11549
11550
0
    case 0x13: /* Write Response */
11551
        /* No parameters */
11552
11553
0
        if (request_data && request_data->opcode == (opcode - 1)) {
11554
0
            dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, request_data->parameters.read_write.handle, opcode);
11555
11556
0
            dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, request_data->parameters.read_write.handle, uuid, &att_data);
11557
11558
0
            col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, l2cap_data);
11559
0
        }
11560
11561
0
        break;
11562
11563
6
    case 0x16: /* Prepare Write Request */
11564
7
    case 0x17: /* Prepare Write Response */
11565
7
        offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, HANDLE_TVB, opcode);
11566
7
        handle = tvb_get_letohs(tvb, offset - 2);
11567
11568
7
        col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11569
7
        col_append_fstr(pinfo->cinfo, COL_INFO, ", Offset: %u", tvb_get_letohs(tvb, offset));
11570
11571
7
        proto_tree_add_item(main_tree, hf_btatt_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11572
7
        offset += 2;
11573
11574
7
        if (!pinfo->fd->visited && l2cap_data && opcode == 0x16) {
11575
6
            union request_parameters_union  request_parameters;
11576
11577
6
            request_parameters.data = NULL;
11578
11579
6
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11580
6
        }
11581
7
        if (!pinfo->fd->visited && request_data && l2cap_data && opcode == 0x16)
11582
0
            save_value_fragment(pinfo, tvb, offset,
11583
0
                    tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN),
11584
0
                    tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN),
11585
0
                    l2cap_data);
11586
11587
        /* XXX: How to detect there is max data in frame and it is last fragment?
11588
        (Execute Write Request/Response is good candidate, but there is no one handle) */
11589
7
        if (request_data && request_data->opcode == (opcode - 1) && tvb_captured_length(tvb) < mtu) {
11590
0
            tvbuff_t  *next_tvb;
11591
0
            unsigned   reassembled_length;
11592
0
            uint8_t   *reassembled_data;
11593
11594
0
            sub_item = proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11595
11596
0
            reassembled_data = get_value(pinfo, request_data->parameters.read_write.handle, l2cap_data, &reassembled_length);
11597
0
            if (reassembled_data) {
11598
0
                sub_tree = proto_item_add_subtree(sub_item, ett_btatt_value);
11599
0
                next_tvb = tvb_new_child_real_data(tvb, reassembled_data, reassembled_length, reassembled_length);
11600
0
                add_new_data_source(pinfo, next_tvb, "Reassembled ATT");
11601
0
                dissect_attribute_value(sub_tree, NULL, pinfo, next_tvb, 0, tvb_captured_length(next_tvb), request_data->parameters.read_write.handle, uuid, &att_data);
11602
0
            }
11603
7
        } else {
11604
7
            proto_tree_add_item(main_tree, hf_btatt_value, tvb, offset, -1, ENC_NA);
11605
7
        }
11606
11607
7
        offset = tvb_reported_length(tvb);
11608
11609
7
        break;
11610
11611
3
    case 0x18: /* Execute Write Request */
11612
3
        col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
11613
3
                        val_to_str_const(tvb_get_uint8(tvb, offset), flags_vals, "<unknown>"));
11614
3
        proto_tree_add_item(main_tree, hf_btatt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11615
3
        offset++;
11616
11617
3
        if (!pinfo->fd->visited && l2cap_data) {
11618
3
            union request_parameters_union  request_parameters;
11619
11620
            /* NOTE: Enable request-response tracking using empty data*/
11621
3
            request_parameters.data = NULL;
11622
11623
3
            save_request(pinfo, opcode, request_parameters, l2cap_data);
11624
3
        }
11625
3
        break;
11626
11627
0
    case 0x19: /* Execute Write Response */
11628
        /* No parameters */
11629
0
        break;
11630
11631
0
    case 0x1E: /* Handle Value Confirmation */
11632
0
        if (request_data && request_data->opcode == (opcode - 1)) {
11633
0
            dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, request_data->parameters.read_write.handle, opcode);
11634
11635
0
            col_append_info_by_handle(pinfo, request_data->parameters.read_write.handle, opcode, l2cap_data);
11636
11637
0
            dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, 0, request_data->parameters.read_write.handle, uuid, &att_data);
11638
0
        }
11639
0
        break;
11640
11641
0
    case 0xd2: /* Signed Write Command */
11642
0
        {
11643
0
            uint8_t length;
11644
11645
0
            offset = dissect_handle(main_tree, pinfo, hf_btatt_handle, tvb, offset, l2cap_data, &uuid, HANDLE_TVB, opcode);
11646
0
            handle = tvb_get_letohs(tvb, offset - 2);
11647
11648
0
            col_append_info_by_handle(pinfo, handle, opcode, l2cap_data);
11649
11650
0
            length = tvb_reported_length_remaining(tvb, offset);
11651
0
            dissect_attribute_value(main_tree, NULL, pinfo, tvb, offset, (length > 12) ? length - 12 : 0, handle, uuid, &att_data);
11652
0
            if (length > 12) {
11653
0
                offset += length - 12;
11654
0
            }
11655
11656
0
            proto_tree_add_item(main_tree, hf_btatt_sign_counter, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11657
0
            offset+=4;
11658
0
            proto_tree_add_item(main_tree, hf_btatt_signature, tvb, offset, 8, ENC_NA);
11659
0
            offset+=8;
11660
0
        break;
11661
6
        }
11662
13
    default:
11663
13
        break;
11664
1.53k
    }
11665
11666
767
    if (request_data && request_data->opcode == (opcode - 1)) {
11667
0
        if (request_data->request_in_frame > 0  && request_data->request_in_frame != pinfo->num) {
11668
0
            sub_item = proto_tree_add_uint(main_tree, hf_request_in_frame, tvb, 0, 0, request_data->request_in_frame);
11669
0
            proto_item_set_generated(sub_item);
11670
0
        }
11671
0
        if (!pinfo->fd->visited && request_data->response_in_frame == 0 &&
11672
0
                pinfo->num > request_data->request_in_frame)
11673
0
            request_data->response_in_frame = pinfo->num;
11674
0
        if (request_data->response_in_frame > 0 && request_data->response_in_frame != pinfo->num) {
11675
0
            sub_item = proto_tree_add_uint(main_tree, hf_response_in_frame, tvb, 0, 0, request_data->response_in_frame);
11676
0
            proto_item_set_generated(sub_item);
11677
0
        }
11678
0
    }
11679
11680
767
    return offset;
11681
1.53k
}
11682
11683
static int
11684
dissect_btgatt_nordic_uart_tx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11685
0
{
11686
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11687
11688
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11689
0
        return -1;
11690
11691
0
    proto_tree_add_item(tree, hf_gatt_nordic_uart_tx, tvb, 0, tvb_captured_length(tvb), ENC_ASCII);
11692
11693
0
    return tvb_captured_length(tvb);
11694
0
}
11695
11696
static int
11697
dissect_btgatt_nordic_uart_rx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11698
0
{
11699
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11700
11701
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11702
0
        return -1;
11703
11704
0
    proto_tree_add_item(tree, hf_gatt_nordic_uart_rx, tvb, 0, tvb_captured_length(tvb), ENC_ASCII);
11705
11706
0
    return tvb_captured_length(tvb);
11707
0
}
11708
11709
static int
11710
dissect_btgatt_nordic_dfu_control_point(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
11711
0
{
11712
0
    int     offset = 0;
11713
0
    uint8_t opcode;
11714
0
    uint8_t request_opcode;
11715
0
    uint8_t status;
11716
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11717
11718
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11719
0
        return -1;
11720
11721
0
    proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_opcode, tvb, offset, 1, ENC_NA);
11722
0
    opcode = tvb_get_uint8(tvb, offset);
11723
0
    offset += 1;
11724
11725
0
    switch (opcode) {
11726
0
    case 0x01: /* Start DFU */
11727
0
        proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_image_type, tvb, offset, 1, ENC_NA);
11728
0
        offset += 1;
11729
11730
0
        break;
11731
0
    case 0x02: /* Initialize DFU Parameters */
11732
0
        if (tvb_reported_length_remaining(tvb, offset) > 0) {
11733
0
            proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_init_packet, tvb, offset, 1, ENC_NA);
11734
0
            offset += 1;
11735
0
        }
11736
11737
0
        break;
11738
0
    case 0x03: /* Receive Firmware Image */
11739
0
    case 0x04: /* Validate Firmware */
11740
0
    case 0x05: /* Activate Image and Reset */
11741
0
    case 0x06: /* Reset System */
11742
0
    case 0x07: /* Report Received Image Size */
11743
        /* nop */
11744
11745
0
        break;
11746
0
    case 0x08: /* Packet Receipt Notification Request */
11747
0
        proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_number_of_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11748
0
        offset += 2;
11749
11750
0
        break;
11751
0
    case 0x10: /* Response Code */
11752
0
        proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_request_opcode, tvb, offset, 1, ENC_NA);
11753
0
        request_opcode = tvb_get_uint8(tvb, offset);
11754
0
        offset += 1;
11755
11756
0
        proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_response_value, tvb, offset, 1, ENC_NA);
11757
0
        status = tvb_get_uint8(tvb, offset);
11758
0
        offset += 1;
11759
11760
0
        if (request_opcode == 0x07 && status == 0x01) { /* Report Received Image Size && Success */
11761
0
            proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_number_of_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11762
0
            offset += 4;
11763
0
        }
11764
11765
0
        break;
11766
0
    case 0x11: /* Packet Receipt Notification */
11767
0
        proto_tree_add_item(tree, hf_gatt_nordic_dfu_control_point_number_of_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11768
0
        offset += 4;
11769
0
        break;
11770
0
    }
11771
11772
0
    if (tvb_captured_length_remaining(tvb, offset) > 0) {
11773
0
        proto_tree_add_expert(tree, pinfo, &ei_btatt_unexpected_data, tvb, offset, -1);
11774
0
        offset = tvb_captured_length(tvb);
11775
0
    }
11776
11777
0
    return offset;
11778
0
}
11779
11780
static int
11781
dissect_btgatt_nordic_dfu_packet(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11782
0
{
11783
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11784
11785
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11786
0
        return -1;
11787
11788
0
    proto_tree_add_item(tree, hf_gatt_nordic_dfu_packet, tvb, 0, tvb_captured_length(tvb), ENC_NA);
11789
11790
0
    return tvb_captured_length(tvb);
11791
0
}
11792
11793
static int
11794
dissect_btgatt_microbit_accelerometer_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11795
0
{
11796
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11797
0
    proto_item *sub_item;
11798
0
    proto_tree *sub_tree;
11799
0
    double x_axis, y_axis, z_axis;
11800
0
    int offset = 0;
11801
11802
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11803
0
        return -1;
11804
11805
0
    x_axis = (double) (int) tvb_get_int16(tvb, offset, ENC_LITTLE_ENDIAN) / 1000.0;
11806
0
    y_axis = (double) (int) tvb_get_int16(tvb, offset+2, ENC_LITTLE_ENDIAN) / 1000.0;
11807
0
    z_axis = (double) (int) tvb_get_int16(tvb, offset+4, ENC_LITTLE_ENDIAN) / 1000.0;
11808
11809
0
    sub_item = proto_tree_add_item(tree, hf_gatt_microbit_accelerometer_data, tvb, 0, tvb_captured_length(tvb), ENC_NA);
11810
0
    sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_accelerometer);
11811
11812
0
    proto_item_append_text(sub_item, " (X: %f, Y: %f, Z: %f)", x_axis, y_axis, z_axis);
11813
0
    proto_tree_add_double(sub_tree, hf_gatt_microbit_accelerometer_x, tvb, offset, 2, x_axis);
11814
0
    offset += 2;
11815
0
    proto_tree_add_double(sub_tree, hf_gatt_microbit_accelerometer_y, tvb, offset, 2, y_axis);
11816
0
    offset += 2;
11817
0
    proto_tree_add_double(sub_tree, hf_gatt_microbit_accelerometer_z, tvb, offset, 2, z_axis);
11818
0
    offset += 2;
11819
11820
0
    return offset;
11821
0
}
11822
11823
static int
11824
dissect_btgatt_microbit_accelerometer_period(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11825
0
{
11826
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11827
0
    int offset = 0;
11828
11829
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11830
0
        return -1;
11831
11832
0
    proto_tree_add_item(tree, hf_gatt_microbit_accelerometer_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11833
0
    offset += 2;
11834
11835
0
    return offset;
11836
0
}
11837
11838
static int
11839
dissect_btgatt_microbit_magnetometer_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11840
0
{
11841
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11842
0
    proto_item *sub_item;
11843
0
    proto_tree *sub_tree;
11844
0
    double x_axis, y_axis, z_axis;
11845
0
    int offset = 0;
11846
11847
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11848
0
        return -1;
11849
11850
0
    x_axis = (double) (int) tvb_get_int16(tvb, offset, ENC_LITTLE_ENDIAN) / 1000.0;
11851
0
    y_axis = (double) (int) tvb_get_int16(tvb, offset+2, ENC_LITTLE_ENDIAN) / 1000.0;
11852
0
    z_axis = (double) (int) tvb_get_int16(tvb, offset+4, ENC_LITTLE_ENDIAN) / 1000.0;
11853
11854
0
    sub_item = proto_tree_add_item(tree, hf_gatt_microbit_magnetometer_data, tvb, 0, tvb_captured_length(tvb), ENC_NA);
11855
0
    sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_magnetometer);
11856
11857
0
    proto_item_append_text(sub_item, " (X: %f, Y: %f, Z: %f)", x_axis, y_axis, z_axis);
11858
0
    proto_tree_add_double(sub_tree, hf_gatt_microbit_magnetometer_x, tvb, offset, 2, x_axis);
11859
0
    offset += 2;
11860
0
    proto_tree_add_double(sub_tree, hf_gatt_microbit_magnetometer_y, tvb, offset, 2, y_axis);
11861
0
    offset += 2;
11862
0
    proto_tree_add_double(sub_tree, hf_gatt_microbit_magnetometer_z, tvb, offset, 2, z_axis);
11863
0
    offset += 2;
11864
11865
0
    return offset;
11866
0
}
11867
11868
static int
11869
dissect_btgatt_microbit_magnetometer_period(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11870
0
{
11871
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11872
0
    int offset = 0;
11873
11874
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11875
0
        return -1;
11876
11877
0
    proto_tree_add_item(tree, hf_gatt_microbit_magnetometer_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11878
0
    offset += 2;
11879
11880
0
    return offset;
11881
0
}
11882
11883
static int
11884
dissect_btgatt_microbit_magnetometer_bearing(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11885
0
{
11886
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11887
0
    int offset = 0;
11888
11889
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11890
0
        return -1;
11891
11892
0
    proto_tree_add_item(tree, hf_gatt_microbit_magnetometer_bearing, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11893
0
    offset += 2;
11894
11895
0
    return offset;
11896
0
}
11897
11898
static int
11899
dissect_btgatt_microbit_button_a_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11900
0
{
11901
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11902
0
    int offset = 0;
11903
11904
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11905
0
        return -1;
11906
11907
0
    proto_tree_add_item(tree, hf_gatt_microbit_button_a_state, tvb, offset, 1, ENC_NA);
11908
0
    offset += 1;
11909
11910
0
    return offset;
11911
0
}
11912
11913
static int
11914
dissect_btgatt_microbit_button_b_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11915
0
{
11916
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11917
0
    int offset = 0;
11918
11919
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11920
0
        return -1;
11921
11922
0
    proto_tree_add_item(tree, hf_gatt_microbit_button_b_state, tvb, offset, 1, ENC_NA);
11923
0
    offset += 1;
11924
11925
0
    return offset;
11926
0
}
11927
11928
static int
11929
dissect_btgatt_microbit_pin_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11930
0
{
11931
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11932
0
    proto_item *sub_item;
11933
0
    proto_tree *sub_tree;
11934
0
    int offset = 0;
11935
0
    int num_pins;
11936
0
    uint32_t number, value;
11937
11938
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11939
0
        return -1;
11940
11941
0
    num_pins = tvb_captured_length(tvb) / 2;
11942
0
    for (int i = 0; i < num_pins; i++) {
11943
0
        sub_item = proto_tree_add_item(tree, hf_gatt_microbit_pin_data, tvb, offset, 2, ENC_NA);
11944
0
        sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_pin_data);
11945
11946
0
        proto_tree_add_item_ret_uint(sub_tree, hf_gatt_microbit_pin_number, tvb, offset, 1, ENC_NA, &number);
11947
0
        offset++;
11948
11949
        /* The micro:bit has a 10 bit ADC but values are compressed to 8 bits with a loss of resolution. */
11950
0
        value = tvb_get_uint8(tvb, offset) * 4;
11951
0
        proto_tree_add_uint(sub_tree, hf_gatt_microbit_pin_value, tvb, offset, 1, value);
11952
0
        offset++;
11953
11954
0
        proto_item_set_text(sub_item, "Pin %u: %u", number, value);
11955
0
    }
11956
11957
0
    return offset;
11958
0
}
11959
11960
static int dissect_btgatt_microbit_pin_ad_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11961
0
{
11962
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11963
0
    proto_item *sub_item;
11964
0
    proto_tree *sub_tree;
11965
11966
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11967
0
        return -1;
11968
11969
0
    sub_item = proto_tree_add_item(tree, hf_gatt_microbit_pin_ad_config, tvb, 0, 3, ENC_LITTLE_ENDIAN);
11970
0
    sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_pin_ad_config);
11971
11972
0
    proto_tree_add_bitmask_list(sub_tree, tvb, 0, 3, hfx_btgatt_microbit_ad_pins, ENC_LITTLE_ENDIAN);
11973
11974
0
    return tvb_captured_length(tvb);
11975
0
}
11976
11977
static int dissect_btgatt_microbit_pin_io_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11978
0
{
11979
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11980
0
    proto_item *sub_item;
11981
0
    proto_tree *sub_tree;
11982
11983
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
11984
0
        return -1;
11985
11986
0
    sub_item = proto_tree_add_item(tree, hf_gatt_microbit_pin_io_config, tvb, 0, 3, ENC_LITTLE_ENDIAN);
11987
0
    sub_tree = proto_item_add_subtree(sub_item, ett_btgatt_microbit_pin_io_config);
11988
11989
0
    proto_tree_add_bitmask_list(sub_tree, tvb, 0, 3, hfx_btgatt_microbit_io_pins, ENC_LITTLE_ENDIAN);
11990
11991
0
    return tvb_captured_length(tvb);
11992
0
}
11993
11994
static int
11995
dissect_btgatt_microbit_pwm_control(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
11996
0
{
11997
0
    btatt_data_t *att_data = (btatt_data_t *) data;
11998
11999
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12000
0
        return -1;
12001
12002
0
    proto_tree_add_item(tree, hf_gatt_microbit_pwm_control, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12003
12004
0
    return tvb_captured_length(tvb);
12005
0
}
12006
12007
static int
12008
dissect_btgatt_microbit_led_matrix(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12009
0
{
12010
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12011
12012
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12013
0
        return -1;
12014
12015
0
    proto_tree_add_item(tree, hf_gatt_microbit_led_matrix, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12016
12017
0
    return tvb_captured_length(tvb);
12018
0
}
12019
12020
static int
12021
dissect_btgatt_microbit_led_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12022
0
{
12023
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12024
12025
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12026
0
        return -1;
12027
12028
0
    proto_tree_add_item(tree, hf_gatt_microbit_led_text, tvb, 0, tvb_captured_length(tvb), ENC_UTF_8);
12029
12030
0
    return tvb_captured_length(tvb);
12031
0
}
12032
12033
static int
12034
dissect_btgatt_microbit_scrolling_delay(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12035
0
{
12036
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12037
0
    int offset = 0;
12038
12039
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12040
0
        return -1;
12041
12042
0
    proto_tree_add_item(tree, hf_gatt_microbit_scrolling_delay, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12043
0
    offset += 2;
12044
12045
0
    return offset;
12046
0
}
12047
12048
static int
12049
dissect_btgatt_microbit_microbit_requirements(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12050
0
{
12051
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12052
12053
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12054
0
        return -1;
12055
12056
0
    proto_tree_add_item(tree, hf_gatt_microbit_microbit_requirements, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12057
12058
0
    return tvb_captured_length(tvb);
12059
0
}
12060
12061
static int
12062
dissect_btgatt_microbit_microbit_event(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12063
0
{
12064
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12065
12066
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12067
0
        return -1;
12068
12069
0
    proto_tree_add_item(tree, hf_gatt_microbit_microbit_event, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12070
12071
0
    return tvb_captured_length(tvb);
12072
0
}
12073
12074
static int
12075
dissect_btgatt_microbit_client_requirements(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12076
0
{
12077
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12078
12079
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12080
0
        return -1;
12081
12082
0
    proto_tree_add_item(tree, hf_gatt_microbit_client_requirements, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12083
12084
0
    return tvb_captured_length(tvb);
12085
0
}
12086
12087
static int
12088
dissect_btgatt_microbit_client_event(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12089
0
{
12090
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12091
12092
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12093
0
        return -1;
12094
12095
0
    proto_tree_add_item(tree, hf_gatt_microbit_client_event, tvb, 0, tvb_captured_length(tvb), ENC_NA);
12096
12097
0
    return tvb_captured_length(tvb);
12098
0
}
12099
12100
static int
12101
dissect_btgatt_microbit_dfu_control(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12102
0
{
12103
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12104
0
    int offset = 0;
12105
12106
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12107
0
        return -1;
12108
12109
0
    proto_tree_add_item(tree, hf_gatt_microbit_dfu_control, tvb, offset, 1, ENC_NA);
12110
0
    offset += 1;
12111
12112
0
    return offset;
12113
0
}
12114
12115
static int
12116
dissect_btgatt_microbit_temperature_value(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12117
0
{
12118
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12119
0
    int offset = 0;
12120
12121
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12122
0
        return -1;
12123
12124
0
    proto_tree_add_item(tree, hf_gatt_microbit_temperature_value, tvb, offset, 1, ENC_NA);
12125
0
    offset += 1;
12126
12127
0
    return offset;
12128
0
}
12129
12130
static int
12131
dissect_btgatt_microbit_temperature_period(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data)
12132
0
{
12133
0
    btatt_data_t *att_data = (btatt_data_t *) data;
12134
0
    int offset = 0;
12135
12136
0
    if (bluetooth_gatt_has_no_parameter(att_data->opcode))
12137
0
        return -1;
12138
12139
0
    proto_tree_add_item(tree, hf_gatt_microbit_temperature_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12140
0
    offset += 2;
12141
12142
0
    return offset;
12143
0
}
12144
12145
12146
12147
12148
void
12149
proto_register_btatt(void)
12150
14
{
12151
14
    module_t         *module;
12152
14
    expert_module_t  *expert_btatt;
12153
12154
    //src_port will be filled with handle
12155
    //dst_port will be filled with opcode
12156
14
    reassembly_table_register(&msg_reassembly_table,
12157
14
        &addresses_ports_reassembly_table_functions);
12158
14
    reassembly_table_init(&msg_reassembly_table,
12159
14
        &addresses_ports_reassembly_table_functions);
12160
14
    static hf_register_info hf[] = {
12161
14
        {&hf_btatt_opcode,
12162
14
            {"Opcode", "btatt.opcode",
12163
14
            FT_UINT8, BASE_HEX, VALS(opcode_vals), 0x0,
12164
14
            NULL, HFILL}
12165
14
        },
12166
14
        {&hf_btatt_opcode_authentication_signature,
12167
14
            {"Authentication Signature", "btatt.opcode.authentication_signature",
12168
14
            FT_BOOLEAN, 8, NULL, 0x80,
12169
14
            NULL, HFILL}
12170
14
        },
12171
14
        {&hf_btatt_opcode_command,
12172
14
            {"Command", "btatt.opcode.command",
12173
14
            FT_BOOLEAN, 8, NULL, 0x40,
12174
14
            NULL, HFILL}
12175
14
        },
12176
14
        {&hf_btatt_opcode_method,
12177
14
            {"Method", "btatt.opcode.method",
12178
14
            FT_UINT8, BASE_HEX, VALS(opcode_vals), 0x3F,
12179
14
            NULL, HFILL}
12180
14
        },
12181
14
        {&hf_btatt_handles_info,
12182
14
            {"Handles Info", "btatt.handles_info",
12183
14
            FT_NONE, BASE_NONE, NULL, 0x0,
12184
14
            NULL, HFILL}
12185
14
        },
12186
14
        {&hf_btatt_attribute_data,
12187
14
            {"Attribute Data", "btatt.attribute_data",
12188
14
            FT_NONE, BASE_NONE, NULL, 0x0,
12189
14
            NULL, HFILL}
12190
14
        },
12191
14
        {&hf_btatt_handle,
12192
14
            {"Handle", "btatt.handle",
12193
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12194
14
            NULL, HFILL}
12195
14
        },
12196
14
        {&hf_btatt_starting_handle,
12197
14
            {"Starting Handle", "btatt.starting_handle",
12198
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12199
14
            NULL, HFILL}
12200
14
        },
12201
14
        {&hf_btatt_ending_handle,
12202
14
            {"Ending Handle", "btatt.ending_handle",
12203
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12204
14
            NULL, HFILL}
12205
14
        },
12206
14
        {&hf_btatt_group_end_handle,
12207
14
            {"Group End Handle", "btatt.group_end_handle",
12208
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12209
14
            NULL, HFILL}
12210
14
        },
12211
14
        {&hf_btatt_value,
12212
14
            {"Value", "btatt.value",
12213
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
12214
14
            NULL, HFILL}
12215
14
        },
12216
14
        {&hf_btatt_req_opcode_in_error,
12217
14
            {"Request Opcode in Error", "btatt.req_opcode_in_error",
12218
14
            FT_UINT8, BASE_HEX, VALS(opcode_vals), 0x0,
12219
14
            NULL, HFILL}
12220
14
        },
12221
14
        {&hf_btatt_handle_in_error,
12222
14
            {"Handle in Error", "btatt.handle",
12223
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12224
14
            NULL, HFILL}
12225
14
        },
12226
14
        {&hf_btatt_error_code,
12227
14
            {"Error Code", "btatt.error_code",
12228
14
            FT_UINT8, BASE_HEX, VALS(error_code_vals), 0x0,
12229
14
            NULL, HFILL}
12230
14
        },
12231
14
        {&hf_btatt_error_code_aios,
12232
14
            {"Error Code", "btatt.error_code",
12233
14
            FT_UINT8, BASE_HEX, VALS(error_code_aios_vals), 0x0,
12234
14
            NULL, HFILL}
12235
14
        },
12236
14
        {&hf_btatt_error_code_ans,
12237
14
            {"Error Code", "btatt.error_code",
12238
14
            FT_UINT8, BASE_HEX, VALS(error_code_ans_vals), 0x0,
12239
14
            NULL, HFILL}
12240
14
        },
12241
14
        {&hf_btatt_error_code_bms,
12242
14
            {"Error Code", "btatt.error_code",
12243
14
            FT_UINT8, BASE_HEX, VALS(error_code_bms_vals), 0x0,
12244
14
            NULL, HFILL}
12245
14
        },
12246
14
        {&hf_btatt_error_code_cgms,
12247
14
            {"Error Code", "btatt.error_code",
12248
14
            FT_UINT8, BASE_HEX, VALS(error_code_cgms_vals), 0x0,
12249
14
            NULL, HFILL}
12250
14
        },
12251
14
        {&hf_btatt_error_code_cps,
12252
14
            {"Error Code", "btatt.error_code",
12253
14
            FT_UINT8, BASE_HEX, VALS(error_code_cps_vals), 0x0,
12254
14
            NULL, HFILL}
12255
14
        },
12256
14
        {&hf_btatt_error_code_cscs,
12257
14
            {"Error Code", "btatt.error_code",
12258
14
            FT_UINT8, BASE_HEX, VALS(error_code_cscs_vals), 0x0,
12259
14
            NULL, HFILL}
12260
14
        },
12261
14
        {&hf_btatt_error_code_cts,
12262
14
            {"Error Code", "btatt.error_code",
12263
14
            FT_UINT8, BASE_HEX, VALS(error_code_cts_vals), 0x0,
12264
14
            NULL, HFILL}
12265
14
        },
12266
14
        {&hf_btatt_error_code_ess,
12267
14
            {"Error Code", "btatt.error_code",
12268
14
            FT_UINT8, BASE_HEX, VALS(error_code_ess_vals), 0x0,
12269
14
            NULL, HFILL}
12270
14
        },
12271
14
        {&hf_btatt_error_code_gls,
12272
14
            {"Error Code", "btatt.error_code",
12273
14
            FT_UINT8, BASE_HEX, VALS(error_code_gls_vals), 0x0,
12274
14
            NULL, HFILL}
12275
14
        },
12276
14
        {&hf_btatt_error_code_hps,
12277
14
            {"Error Code", "btatt.error_code",
12278
14
            FT_UINT8, BASE_HEX, VALS(error_code_hps_vals), 0x0,
12279
14
            NULL, HFILL}
12280
14
        },
12281
14
        {&hf_btatt_error_code_hrs,
12282
14
            {"Error Code", "btatt.error_code",
12283
14
            FT_UINT8, BASE_HEX, VALS(error_code_hrs_vals), 0x0,
12284
14
            NULL, HFILL}
12285
14
        },
12286
14
        {&hf_btatt_error_code_hts,
12287
14
            {"Error Code", "btatt.error_code",
12288
14
            FT_UINT8, BASE_HEX, VALS(error_code_hts_vals), 0x0,
12289
14
            NULL, HFILL}
12290
14
        },
12291
14
        {&hf_btatt_error_code_ips,
12292
14
            {"Error Code", "btatt.error_code",
12293
14
            FT_UINT8, BASE_HEX, VALS(error_code_ips_vals), 0x0,
12294
14
            NULL, HFILL}
12295
14
        },
12296
14
        {&hf_btatt_error_code_ots,
12297
14
            {"Error Code", "btatt.error_code",
12298
14
            FT_UINT8, BASE_HEX, VALS(error_code_ots_vals), 0x0,
12299
14
            NULL, HFILL}
12300
14
        },
12301
14
        {&hf_btatt_error_code_rscs,
12302
14
            {"Error Code", "btatt.error_code",
12303
14
            FT_UINT8, BASE_HEX, VALS(error_code_rscs_vals), 0x0,
12304
14
            NULL, HFILL}
12305
14
        },
12306
14
        {&hf_btatt_error_code_uds,
12307
14
            {"Error Code", "btatt.error_code",
12308
14
            FT_UINT8, BASE_HEX, VALS(error_code_uds_vals), 0x0,
12309
14
            NULL, HFILL}
12310
14
        },
12311
14
        {&hf_btatt_service_uuid16,
12312
14
            {"Service UUID", "btatt.service_uuid16",
12313
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12314
14
            NULL, HFILL}
12315
14
        },
12316
14
        {&hf_btatt_service_uuid128,
12317
14
            {"Service UUID", "btatt.service_uuid128",
12318
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
12319
14
            NULL, HFILL}
12320
14
        },
12321
14
        {&hf_btatt_characteristic_uuid16,
12322
14
            {"Characteristic UUID", "btatt.characteristic_uuid16",
12323
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12324
14
            NULL, HFILL}
12325
14
        },
12326
14
        {&hf_btatt_characteristic_uuid128,
12327
14
            {"Characteristic UUID", "btatt.characteristic_uuid128",
12328
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
12329
14
            NULL, HFILL}
12330
14
        },
12331
14
        {&hf_btatt_uuid16,
12332
14
            {"UUID", "btatt.uuid16",
12333
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12334
14
            NULL, HFILL}
12335
14
        },
12336
14
        {&hf_btatt_uuid128,
12337
14
            {"UUID", "btatt.uuid128",
12338
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
12339
14
            NULL, HFILL}
12340
14
        },
12341
14
        {&hf_btatt_client_rx_mtu,
12342
14
            {"Client Rx MTU", "btatt.client_rx_mtu",
12343
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12344
14
            NULL, HFILL}
12345
14
        },
12346
14
        {&hf_btatt_server_rx_mtu,
12347
14
            {"Server Rx MTU", "btatt.server_rx_mtu",
12348
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12349
14
            NULL, HFILL}
12350
14
        },
12351
14
        {&hf_btatt_uuid_format,
12352
14
            {"UUID Format", "btatt.uuid_format",
12353
14
            FT_UINT8, BASE_HEX, VALS(uuid_format_vals), 0x0,
12354
14
            NULL, HFILL}
12355
14
        },
12356
14
        {&hf_btatt_length,
12357
14
            {"Length", "btatt.length",
12358
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12359
14
            "Length of Handle/Value Pair", HFILL}
12360
14
        },
12361
14
        {&hf_btatt_offset,
12362
14
            {"Offset", "btatt.offset",
12363
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12364
14
            NULL, HFILL}
12365
14
        },
12366
14
        {&hf_btatt_flags,
12367
14
            {"Flags", "btatt.flags",
12368
14
            FT_UINT8, BASE_HEX, VALS(flags_vals), 0x0,
12369
14
            NULL, HFILL}
12370
14
        },
12371
14
        {&hf_btatt_sign_counter,
12372
14
            {"Sign Counter", "btatt.sign_counter",
12373
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
12374
14
            NULL, HFILL}
12375
14
        },
12376
14
        {&hf_btatt_signature,
12377
14
            {"Signature", "btatt.signature",
12378
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
12379
14
            NULL, HFILL}
12380
14
        },
12381
14
        {&hf_btatt_characteristic_properties,
12382
14
            {"Characteristic Properties", "btatt.characteristic_properties",
12383
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
12384
14
            NULL, HFILL}
12385
14
        },
12386
14
        {&hf_btatt_characteristic_properties_extended_properties,
12387
14
            {"Extended Properties", "btatt.characteristic_properties.extended_properties",
12388
14
            FT_BOOLEAN, 8, NULL, 0x80,
12389
14
            NULL, HFILL}
12390
14
        },
12391
14
        {&hf_btatt_characteristic_properties_authenticated_signed_writes,
12392
14
            {"Authenticated Signed Writes", "btatt.characteristic_properties.authenticated_signed_writes",
12393
14
            FT_BOOLEAN, 8, NULL, 0x40,
12394
14
            NULL, HFILL}
12395
14
        },
12396
14
        {&hf_btatt_characteristic_properties_indicate,
12397
14
            {"Indicate", "btatt.characteristic_properties.indicate",
12398
14
            FT_BOOLEAN, 8, NULL, 0x20,
12399
14
            NULL, HFILL}
12400
14
        },
12401
14
        {&hf_btatt_characteristic_properties_notify,
12402
14
            {"Notify", "btatt.characteristic_properties.notify",
12403
14
            FT_BOOLEAN, 8, NULL, 0x10,
12404
14
            NULL, HFILL}
12405
14
        },
12406
14
        {&hf_btatt_characteristic_properties_write,
12407
14
            {"Write", "btatt.characteristic_properties.write",
12408
14
            FT_BOOLEAN, 8, NULL, 0x08,
12409
14
            NULL, HFILL}
12410
14
        },
12411
14
        {&hf_btatt_characteristic_properties_write_without_response,
12412
14
            {"Write without Response", "btatt.characteristic_properties.write_without_response",
12413
14
            FT_BOOLEAN, 8, NULL, 0x04,
12414
14
            NULL, HFILL}
12415
14
        },
12416
14
        {&hf_btatt_characteristic_properties_read,
12417
14
            {"Read", "btatt.characteristic_properties.read",
12418
14
            FT_BOOLEAN, 8, NULL, 0x02,
12419
14
            NULL, HFILL}
12420
14
        },
12421
14
        {&hf_btatt_characteristic_properties_broadcast,
12422
14
            {"Broadcast", "btatt.characteristic_properties.broadcast",
12423
14
            FT_BOOLEAN, 8, NULL, 0x01,
12424
14
            NULL, HFILL}
12425
14
        },
12426
14
        {&hf_btatt_characteristic_value_handle,
12427
14
            {"Characteristic Value Handle", "btatt.handle",
12428
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12429
14
            NULL, HFILL}
12430
14
        },
12431
14
        {&hf_btatt_included_service_handle,
12432
14
            {"Included Service Handle", "btatt.handle",
12433
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12434
14
            NULL, HFILL}
12435
14
        },
12436
14
        {&hf_btatt_information_data,
12437
14
            {"Information Data", "btatt.information_data",
12438
14
            FT_NONE, BASE_NONE, NULL, 0x0,
12439
14
            NULL, HFILL}
12440
14
        },
12441
14
        {&hf_btatt_characteristic_configuration_client,
12442
14
            {"Characteristic Configuration Client", "btatt.characteristic_configuration_client",
12443
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12444
14
            NULL, HFILL}
12445
14
        },
12446
14
        {&hf_btatt_characteristic_configuration_client_reserved,
12447
14
            {"Reserved", "btatt.characteristic_configuration_client.reserved",
12448
14
            FT_UINT16, BASE_HEX, NULL, 0xFFFC,
12449
14
            NULL, HFILL}
12450
14
        },
12451
14
        {&hf_btatt_characteristic_configuration_client_indication,
12452
14
            {"Indication", "btatt.characteristic_configuration_client.indication",
12453
14
            FT_BOOLEAN, 16, NULL, 0x0002,
12454
14
            NULL, HFILL}
12455
14
        },
12456
14
        {&hf_btatt_characteristic_configuration_client_notification,
12457
14
            {"Notification", "btatt.characteristic_configuration_client.notification",
12458
14
            FT_BOOLEAN, 16, NULL, 0x0001,
12459
14
            NULL, HFILL}
12460
14
        },
12461
14
        {&hf_btatt_characteristic_configuration_server,
12462
14
            {"Characteristic Configuration Server", "btatt.characteristic_configuration_server",
12463
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12464
14
            NULL, HFILL}
12465
14
        },
12466
14
        {&hf_btatt_characteristic_configuration_server_reserved,
12467
14
            {"Reserved", "btatt.characteristic_configuration_server.reserved",
12468
14
            FT_UINT16, BASE_HEX, NULL, 0xFFFE,
12469
14
            NULL, HFILL}
12470
14
        },
12471
14
        {&hf_btatt_characteristic_configuration_server_broadcast,
12472
14
            {"Broadcast", "btatt.characteristic_configuration_server.broadcast",
12473
14
            FT_BOOLEAN, 16, NULL, 0x0001,
12474
14
            NULL, HFILL}
12475
14
        },
12476
14
        {&hf_btatt_hogp_protocol_mode,
12477
14
            {"Protocol Mode", "btatt.hogp.protocol_mode",
12478
14
            FT_UINT8, BASE_HEX, VALS(hogp_protocol_mode_vals), 0x0,
12479
14
            NULL, HFILL}
12480
14
        },
12481
14
        {&hf_btatt_report_reference_report_id,
12482
14
            {"Report ID", "btatt.report_reference.report_id",
12483
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
12484
14
            NULL, HFILL}
12485
14
        },
12486
14
        {&hf_btatt_report_reference_report_type,
12487
14
            {"Report Type", "btatt.report_reference.report_type",
12488
14
            FT_UINT8, BASE_HEX, VALS(report_reference_report_type_vals), 0x0,
12489
14
            NULL, HFILL}
12490
14
        },
12491
14
        {&hf_btatt_hogp_bcd_hid,
12492
14
            {"bcdHID", "btatt.hogp.bcd_hid",
12493
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12494
14
            NULL, HFILL}
12495
14
        },
12496
14
        {&hf_btatt_hogp_b_country_code,
12497
14
            {"bCountryCode", "btatt.hogp.b_country_code",
12498
14
            FT_UINT8, BASE_HEX, VALS(hid_country_code_vals), 0x0,
12499
14
            NULL, HFILL}
12500
14
        },
12501
14
        {&hf_btatt_hogp_flags,
12502
14
            {"Flags", "btatt.hogp.flags",
12503
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
12504
14
            NULL, HFILL}
12505
14
        },
12506
14
        {&hf_btatt_hogp_flags_reserved,
12507
14
            {"Reserved", "btatt.hogp.flags.reserved",
12508
14
            FT_UINT8, BASE_HEX, NULL, 0xFC,
12509
14
            NULL, HFILL}
12510
14
        },
12511
14
        {&hf_btatt_hogp_flags_normally_connectable,
12512
14
            {"Normally Connectable", "btatt.hogp.flags.normally_connectable",
12513
14
            FT_BOOLEAN, 8, NULL, 0x02,
12514
14
            NULL, HFILL}
12515
14
        },
12516
14
        {&hf_btatt_hogp_flags_remote_wake,
12517
14
            {"Remote Wake", "btatt.hogp.flags.remote_wake",
12518
14
            FT_BOOLEAN, 8, NULL, 0x01,
12519
14
            NULL, HFILL}
12520
14
        },
12521
14
        {&hf_btatt_characteristic_user_description,
12522
14
            {"Characteristic User Description", "btatt.characteristic_user_description",
12523
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12524
14
            NULL, HFILL}
12525
14
        },
12526
14
        {&hf_btatt_characteristic_extended_properties,
12527
14
            {"Characteristic Extended Properties", "btatt.characteristic_extended_properties",
12528
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12529
14
            NULL, HFILL}
12530
14
        },
12531
14
        {&hf_btatt_characteristic_extended_properties_reserved,
12532
14
            {"Reserved", "btatt.characteristic_extended_properties.reserved",
12533
14
            FT_UINT16, BASE_HEX, NULL, 0xFFFC,
12534
14
            NULL, HFILL}
12535
14
        },
12536
14
        {&hf_btatt_characteristic_extended_properties_writable_auxiliaries,
12537
14
            {"Writable Auxiliaries", "btatt.characteristic_extended_properties.writable_auxiliaries",
12538
14
            FT_UINT16, BASE_HEX, NULL, 0x0002,
12539
14
            NULL, HFILL}
12540
14
        },
12541
14
        {&hf_btatt_characteristic_extended_properties_reliable_write,
12542
14
            {"Reliable Write", "btatt.characteristic_extended_properties.reliable_write",
12543
14
            FT_UINT16, BASE_HEX, NULL, 0x0001,
12544
14
            NULL, HFILL}
12545
14
        },
12546
14
        {&hf_btatt_characteristic_presentation_format,
12547
14
            {"Format", "btatt.characteristic_presentation.format",
12548
14
            FT_UINT8, BASE_HEX, VALS(characteristic_presentation_format_vals), 0x0,
12549
14
            NULL, HFILL}
12550
14
        },
12551
14
        {&hf_btatt_characteristic_presentation_exponent,
12552
14
            {"Exponent", "btatt.characteristic_presentation.exponent",
12553
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12554
14
            NULL, HFILL}
12555
14
        },
12556
14
        {&hf_btatt_characteristic_presentation_unit,
12557
14
            {"Unit", "btatt.characteristic_presentation.unit",
12558
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x0,
12559
14
            NULL, HFILL}
12560
14
        },
12561
14
        {&hf_btatt_characteristic_presentation_namespace,
12562
14
            {"Namespace", "btatt.characteristic_presentation.namespace",
12563
14
            FT_UINT8, BASE_HEX, VALS(characteristic_presentation_namespace_vals), 0x0,
12564
14
            NULL, HFILL}
12565
14
        },
12566
14
        {&hf_btatt_characteristic_presentation_namespace_description,
12567
14
            {"Namespace Description", "btatt.characteristic_presentation.namespace_description",
12568
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12569
14
            NULL, HFILL}
12570
14
        },
12571
14
        {&hf_btatt_characteristic_presentation_namespace_description_btsig,
12572
14
            {"Namespace Description", "btatt.characteristic_presentation.namespace_description",
12573
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &characteristic_presentation_namespace_description_btsig_vals_ext, 0x0,
12574
14
            NULL, HFILL}
12575
14
        },
12576
14
        {&hf_btatt_esp_trigger_logic,
12577
14
            {"Trigger Logic", "btatt.esp.trigger_logic",
12578
14
            FT_UINT8, BASE_HEX, VALS(esp_trigger_logic_vals), 0x0,
12579
14
            NULL, HFILL}
12580
14
        },
12581
14
        {&hf_btatt_esp_condition,
12582
14
            {"Trigger Logic", "btatt.esp.condition",
12583
14
            FT_UINT8, BASE_HEX, VALS(esp_condition_vals), 0x0,
12584
14
            NULL, HFILL}
12585
14
        },
12586
14
        {&hf_btatt_esp_operand,
12587
14
            {"Operand", "btatt.esp.operand",
12588
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
12589
14
            NULL, HFILL}
12590
14
        },
12591
14
        {&hf_btatt_esp_flags,
12592
14
            {"Flags", "btatt.esp.flags",
12593
14
            FT_UINT16, BASE_HEX, NULL, 0xFFFF,
12594
14
            NULL, HFILL}
12595
14
        },
12596
14
        {&hf_btatt_esp_sampling_function,
12597
14
            {"Sampling Function", "btatt.esp.sampling_function",
12598
14
            FT_UINT8, BASE_HEX, VALS(esp_sampling_function_vals), 0x0,
12599
14
            NULL, HFILL}
12600
14
        },
12601
14
        {&hf_btatt_esp_measurement_period,
12602
14
            {"Measurement Period", "btatt.esp.measurement_period",
12603
14
            FT_UINT24, BASE_DEC, NULL, 0x0,
12604
14
            NULL, HFILL}
12605
14
        },
12606
14
        {&hf_btatt_esp_update_interval,
12607
14
            {"Update Interval", "btatt.esp.update_interval",
12608
14
            FT_UINT24, BASE_DEC, NULL, 0x0,
12609
14
            NULL, HFILL}
12610
14
        },
12611
14
        {&hf_btatt_esp_application,
12612
14
            {"Application", "btatt.esp.application",
12613
14
            FT_UINT8, BASE_HEX, VALS(esp_application_vals), 0x0,
12614
14
            NULL, HFILL}
12615
14
        },
12616
14
        {&hf_btatt_esp_measurement_uncertainty,
12617
14
            {"Measurement Uncertainty", "btatt.esp.measurement_uncertainty",
12618
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12619
14
            NULL, HFILL}
12620
14
        },
12621
14
        {&hf_btatt_device_name,
12622
14
            {"Device Name", "btatt.device_name",
12623
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12624
14
            NULL, HFILL}
12625
14
        },
12626
14
        {&hf_btatt_appearance,
12627
14
            {"Appearance", "btatt.appearance",
12628
14
            FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12629
14
            NULL, HFILL}
12630
14
        },
12631
14
        {&hf_btatt_appearance_category,
12632
14
            {"Category", "btatt.appearance.category",
12633
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_category_vals), 0xFFC0,
12634
14
            NULL, HFILL}
12635
14
        },
12636
14
        {&hf_btatt_appearance_subcategory,
12637
14
            {"Subcategory", "btatt.appearance.subcategory",
12638
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_generic_vals), 0x003F,
12639
14
            NULL, HFILL}
12640
14
        },
12641
14
        {&hf_btatt_appearance_subcategory_watch,
12642
14
            {"Subcategory", "btatt.appearance.subcategory.watch",
12643
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_watch_vals), 0x003F,
12644
14
            NULL, HFILL}
12645
14
        },
12646
14
        {&hf_btatt_appearance_subcategory_thermometer,
12647
14
            {"Subcategory", "btatt.appearance.subcategory.thermometer",
12648
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_thermometer_vals), 0x003F,
12649
14
            NULL, HFILL}
12650
14
        },
12651
14
        {&hf_btatt_appearance_subcategory_heart_rate,
12652
14
            {"Subcategory", "btatt.appearance.subcategory.heart_rate",
12653
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_heart_rate_vals), 0x003F,
12654
14
            NULL, HFILL}
12655
14
        },
12656
14
        {&hf_btatt_appearance_subcategory_blood_pressure,
12657
14
            {"Subcategory", "btatt.appearance.subcategory.blood_pressure",
12658
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_blood_pressure_vals), 0x003F,
12659
14
            NULL, HFILL}
12660
14
        },
12661
14
        {&hf_btatt_appearance_subcategory_hid,
12662
14
            {"Subcategory", "btatt.appearance.subcategory.hid",
12663
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_hid_vals), 0x003F,
12664
14
            NULL, HFILL}
12665
14
        },
12666
14
        {&hf_btatt_appearance_subcategory_running_walking_sensor,
12667
14
            {"Subcategory", "btatt.appearance.subcategory.running_walking_sensor",
12668
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_running_walking_sensor_vals), 0x003F,
12669
14
            NULL, HFILL}
12670
14
        },
12671
14
        {&hf_btatt_appearance_subcategory_cycling,
12672
14
            {"Subcategory", "btatt.appearance.subcategory.cycling",
12673
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_cycling_vals), 0x003F,
12674
14
            NULL, HFILL}
12675
14
        },
12676
14
        {&hf_btatt_appearance_subcategory_pulse_oximeter,
12677
14
            {"Subcategory", "btatt.appearance.subcategory.pulse_oximeter",
12678
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_pulse_oximeter_vals), 0x003F,
12679
14
            NULL, HFILL}
12680
14
        },
12681
14
        {&hf_btatt_appearance_subcategory_personal_mobility_device,
12682
14
            {"Personal Mobility Device", "btatt.appearance.subcategory.personal_mobility_device",
12683
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_personal_mobility_device_vals), 0x003F,
12684
14
            NULL, HFILL}
12685
14
        },
12686
14
        {&hf_btatt_appearance_subcategory_insulin_pump,
12687
14
            {"Insulin Pump", "btatt.appearance.subcategory.insulin_pump",
12688
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_insulin_pump_vals), 0x003F,
12689
14
            NULL, HFILL}
12690
14
        },
12691
14
        {&hf_btatt_appearance_subcategory_outdoor_sports_activity,
12692
14
            {"Subcategory", "btatt.appearance.subcategory.outdoor_sports_activity",
12693
14
            FT_UINT16, BASE_DEC_HEX, VALS(appearance_subcategory_outdoor_sports_activity_vals), 0x003F,
12694
14
            NULL, HFILL}
12695
14
        },
12696
14
        {&hf_btatt_peripheral_privacy_flag,
12697
14
            {"Peripheral Privacy", "btatt.peripheral_privacy_flag",
12698
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
12699
14
            NULL, HFILL}
12700
14
        },
12701
14
        { &hf_btatt_reconnection_address,
12702
14
            { "Reconnection Address", "btatt.reconnection_address",
12703
14
            FT_ETHER, BASE_NONE, NULL, 0x0,
12704
14
            NULL, HFILL }
12705
14
        },
12706
14
        {&hf_btatt_minimum_connection_interval,
12707
14
            {"Minimum Connection Interval", "btatt.minimum_connection_interval",
12708
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12709
14
            NULL, HFILL}
12710
14
        },
12711
14
        {&hf_btatt_maximum_connection_interval,
12712
14
            {"Maximum Connection Interval", "btatt.maximum_connection_interval",
12713
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12714
14
            NULL, HFILL}
12715
14
        },
12716
14
        {&hf_btatt_peripheral_latency,
12717
14
            {"Peripheral Latency", "btatt.peripheral_latency",
12718
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12719
14
            NULL, HFILL}
12720
14
        },
12721
14
        {&hf_btatt_connection_supervision_timeout_multiplier,
12722
14
            {"Connection Supervision Timeout Multiplier", "btatt.connection_supervision_timeout_multiplier",
12723
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12724
14
            NULL, HFILL}
12725
14
        },
12726
14
        {&hf_btatt_alert_level,
12727
14
            {"Alert Level", "btatt.alert_level",
12728
14
            FT_UINT8, BASE_HEX, VALS(alert_level_vals), 0x0,
12729
14
            NULL, HFILL}
12730
14
        },
12731
14
        {&hf_btatt_tx_power_level,
12732
14
            {"Tx Power Level", "btatt.tx_power_level",
12733
14
            FT_INT8, BASE_DEC, NULL, 0x0,
12734
14
            NULL, HFILL}
12735
14
        },
12736
14
        {&hf_btatt_year,
12737
14
            {"Year", "btatt.year",
12738
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12739
14
            NULL, HFILL}
12740
14
        },
12741
14
        {&hf_btatt_month,
12742
14
            {"Month", "btatt.month",
12743
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12744
14
            NULL, HFILL}
12745
14
        },
12746
14
        {&hf_btatt_day,
12747
14
            {"Day", "btatt.day",
12748
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12749
14
            NULL, HFILL}
12750
14
        },
12751
14
        {&hf_btatt_hours,
12752
14
            {"Hours", "btatt.hours",
12753
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12754
14
            NULL, HFILL}
12755
14
        },
12756
14
        {&hf_btatt_minutes,
12757
14
            {"Minutes", "btatt.minutes",
12758
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12759
14
            NULL, HFILL}
12760
14
        },
12761
14
        {&hf_btatt_seconds,
12762
14
            {"Seconds", "btatt.seconds",
12763
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12764
14
            NULL, HFILL}
12765
14
        },
12766
14
        {&hf_btatt_day_of_week,
12767
14
            {"Day of Week", "btatt.day_of_week",
12768
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12769
14
            NULL, HFILL}
12770
14
        },
12771
14
        {&hf_btatt_fractions100,
12772
14
            {"Fractions100", "btatt.fractions100",
12773
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12774
14
            "1/100th of a second", HFILL}
12775
14
        },
12776
14
        {&hf_btatt_fractions256,
12777
14
            {"Fractions256", "btatt.fractions256",
12778
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12779
14
            "1/256th of a second", HFILL}
12780
14
        },
12781
14
        {&hf_btatt_dst_offset,
12782
14
            {"Daylight Saving Time Offset", "btatt.dst_offset",
12783
14
            FT_UINT8, BASE_HEX, VALS(dst_offset_vals), 0x0,
12784
14
            NULL, HFILL}
12785
14
        },
12786
14
        {&hf_btatt_model_number_string,
12787
14
            {"Model Number String", "btatt.model_number_string",
12788
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12789
14
            NULL, HFILL}
12790
14
        },
12791
14
        {&hf_btatt_serial_number_string,
12792
14
            {"Serial Number String", "btatt.serial_number_string",
12793
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12794
14
            NULL, HFILL}
12795
14
        },
12796
14
        {&hf_btatt_firmware_revision_string,
12797
14
            {"Firmware Revision String", "btatt.firmware_revision_string",
12798
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12799
14
            NULL, HFILL}
12800
14
        },
12801
14
        {&hf_btatt_hardware_revision_string,
12802
14
            {"Hardware Revision String", "btatt.hardware_revision_string",
12803
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12804
14
            NULL, HFILL}
12805
14
        },
12806
14
        {&hf_btatt_software_revision_string,
12807
14
            {"Software Revision String", "btatt.software_revision_string",
12808
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12809
14
            NULL, HFILL}
12810
14
        },
12811
14
        {&hf_btatt_manufacturer_string,
12812
14
            {"Manufacturer String", "btatt.manufacturer_string",
12813
14
            FT_STRING, BASE_NONE, NULL, 0x0,
12814
14
            NULL, HFILL}
12815
14
        },
12816
14
        {&hf_btatt_system_id_manufacturer_identifier,
12817
14
            {"Manufacturer Identifier", "btatt.system_id.manufacturer_identifier",
12818
14
            FT_UINT40, BASE_HEX, NULL, 0x0,
12819
14
            NULL, HFILL}
12820
14
        },
12821
14
        {&hf_btatt_system_id_organizationally_unique_identifier,
12822
14
            {"Organizationally Unique Identifier", "btatt.system_id.organizationally_unique_identifier",
12823
14
            FT_UINT24, BASE_OUI, NULL, 0x0,
12824
14
            NULL, HFILL}
12825
14
        },
12826
14
        {&hf_btatt_timezone,
12827
14
            {"Timezone", "btatt.timezone",
12828
14
            FT_INT8, BASE_DEC, VALS(timezone_vals), 0x0,
12829
14
            NULL, HFILL}
12830
14
        },
12831
14
        {&hf_btatt_time_accuracy,
12832
14
            {"Time Accuracy", "btatt.time_accuracy",
12833
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12834
14
            NULL, HFILL}
12835
14
        },
12836
14
        {&hf_btatt_time_source,
12837
14
            {"Time Source", "btatt.time_source",
12838
14
            FT_UINT8, BASE_DEC, VALS(time_source_vals), 0x0,
12839
14
            NULL, HFILL}
12840
14
        },
12841
14
        {&hf_btatt_time_days_since_update,
12842
14
            {"Days Since Update", "btatt.days_since_update",
12843
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12844
14
            NULL, HFILL}
12845
14
        },
12846
14
        {&hf_btatt_time_hours_since_update,
12847
14
            {"Hours Since Update", "btatt.hours_since_update",
12848
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
12849
14
            NULL, HFILL}
12850
14
        },
12851
14
        {&hf_btatt_time_update_control_point,
12852
14
            {"Update Control Point", "btatt.update_control_point",
12853
14
            FT_UINT8, BASE_HEX, VALS(time_update_control_point_vals), 0x0,
12854
14
            NULL, HFILL}
12855
14
        },
12856
14
        {&hf_btatt_time_current_state,
12857
14
            {"Current State", "btatt.time_current_state",
12858
14
            FT_UINT8, BASE_HEX, VALS(time_current_state_vals), 0x0,
12859
14
            NULL, HFILL}
12860
14
        },
12861
14
        {&hf_btatt_time_result,
12862
14
            {"Result", "btatt.time_result",
12863
14
            FT_UINT8, BASE_HEX, VALS(time_result_vals), 0x0,
12864
14
            NULL, HFILL}
12865
14
        },
12866
14
        {&hf_btatt_battery_level,
12867
14
            {"Battery Level", "btatt.battery_level",
12868
14
            FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_percent), 0x0,
12869
14
            NULL, HFILL}
12870
14
        },
12871
14
        {&hf_btatt_battery_power_state,
12872
14
            {"Battery Power State", "btatt.battery_power_state",
12873
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
12874
14
            NULL, HFILL}
12875
14
        },
12876
14
        {&hf_btatt_battery_power_state_level,
12877
14
            {"Level", "btatt.battery_power_state.level",
12878
14
            FT_UINT8, BASE_HEX, VALS(battery_power_state_level_vals), 0xC0,
12879
14
            NULL, HFILL}
12880
14
        },
12881
14
        {&hf_btatt_battery_power_state_charging,
12882
14
            {"Charging", "btatt.battery_power_state.charging",
12883
14
            FT_UINT8, BASE_HEX, VALS(battery_power_state_charging_vals), 0x30,
12884
14
            NULL, HFILL}
12885
14
        },
12886
14
        {&hf_btatt_battery_power_state_discharging,
12887
14
            {"Discharging", "btatt.battery_power_state.discharging",
12888
14
            FT_UINT8, BASE_HEX, VALS(battery_power_state_discharging_vals), 0x0C,
12889
14
            NULL, HFILL}
12890
14
        },
12891
14
        {&hf_btatt_battery_power_state_present,
12892
14
            {"Present", "btatt.battery_power_state.present",
12893
14
            FT_UINT8, BASE_HEX, VALS(battery_power_state_present_vals), 0x03,
12894
14
            NULL, HFILL}
12895
14
        },
12896
14
        {&hf_btatt_temperature_type,
12897
14
            {"Temperature Type", "btatt.temperature_type",
12898
14
            FT_UINT8, BASE_HEX, VALS(temperature_type_vals), 0x0,
12899
14
            NULL, HFILL}
12900
14
        },
12901
14
        {&hf_btatt_measurement_interval,
12902
14
            {"Measurement Interval", "btatt.measurement_interval",
12903
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
12904
14
            NULL, HFILL}
12905
14
        },
12906
14
        {&hf_btatt_time_adjust_reason,
12907
14
            {"Adjust Reason", "btatt.adjust_reason",
12908
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
12909
14
            NULL, HFILL}
12910
14
        },
12911
14
        {&hf_btatt_time_adjust_reason_reserved,
12912
14
            {"Reserved", "btatt.adjust_reason.reserved",
12913
14
            FT_UINT8, BASE_HEX, NULL, 0xF0,
12914
14
            NULL, HFILL}
12915
14
        },
12916
14
        {&hf_btatt_time_adjust_reason_change_of_dst,
12917
14
            {"Change of DST", "btatt.adjust_reason.change_of_dst",
12918
14
            FT_BOOLEAN, 8, NULL, 0x08,
12919
14
            NULL, HFILL}
12920
14
        },
12921
14
        {&hf_btatt_time_adjust_reason_change_of_timezone,
12922
14
            {"Change of Timezone", "btatt.adjust_reason.change_of_timezone",
12923
14
            FT_BOOLEAN, 8, NULL, 0x04,
12924
14
            NULL, HFILL}
12925
14
        },
12926
14
        {&hf_btatt_time_adjust_reason_external_reference_time_update,
12927
14
            {"External Reference Time Update", "btatt.adjust_reason.external_reference_time_update",
12928
14
            FT_BOOLEAN, 8, NULL, 0x02,
12929
14
            NULL, HFILL}
12930
14
        },
12931
14
        {&hf_btatt_time_adjust_reason_manual_time_update,
12932
14
            {"Manual Time Update", "btatt.adjust_reason.manual_time_update",
12933
14
            FT_BOOLEAN, 8, NULL, 0x01,
12934
14
            NULL, HFILL}
12935
14
        },
12936
14
        {&hf_btatt_magnetic_declination,
12937
14
            {"Magnetic Declination", "btatt.magnetic_declination",
12938
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
12939
14
            NULL, HFILL}
12940
14
        },
12941
14
        {&hf_btatt_scan_refresh,
12942
14
            {"Scan Refresh", "btatt.scan_refresh",
12943
14
            FT_UINT8, BASE_HEX, VALS(scan_refresh_vals), 0x0,
12944
14
            NULL, HFILL}
12945
14
        },
12946
14
        {&hf_btatt_body_sensor_location,
12947
14
            {"Body Sensor Location", "btatt.body_sensor_location",
12948
14
            FT_UINT8, BASE_HEX, VALS(body_sensor_location_vals), 0x0,
12949
14
            NULL, HFILL}
12950
14
        },
12951
14
        {&hf_btatt_heart_rate_control_point,
12952
14
            {"Heart Rate Control Point", "btatt.heart_rate_control_point",
12953
14
            FT_UINT8, BASE_HEX, VALS(heart_rate_control_point_vals), 0x0,
12954
14
            NULL, HFILL}
12955
14
        },
12956
14
        {&hf_btatt_alert_status,
12957
14
            {"Alert Status", "btatt.alert.status",
12958
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
12959
14
            NULL, HFILL}
12960
14
        },
12961
14
        {&hf_btatt_alert_status_reserved,
12962
14
            {"Reserved", "btatt.alert.status.reserved",
12963
14
            FT_UINT8, BASE_HEX, NULL, 0xF8,
12964
14
            NULL, HFILL}
12965
14
        },
12966
14
        {&hf_btatt_alert_status_display_alert_status,
12967
14
            {"Display Alert Status", "btatt.alert.status.display_alert_status",
12968
14
            FT_BOOLEAN, 8, NULL, 0x04,
12969
14
            NULL, HFILL}
12970
14
        },
12971
14
        {&hf_btatt_alert_status_vibrate_state,
12972
14
            {"Vibrate State", "btatt.alert.status.vibrate_state",
12973
14
            FT_BOOLEAN, 8, NULL, 0x02,
12974
14
            NULL, HFILL}
12975
14
        },
12976
14
        {&hf_btatt_alert_status_ringer_state,
12977
14
            {"Ringer State", "btatt.alert_status.ringer_state",
12978
14
            FT_BOOLEAN, 8, NULL, 0x01,
12979
14
            NULL, HFILL}
12980
14
        },
12981
14
        {&hf_btatt_ringer_control_point,
12982
14
            {"Ringer Control Point", "btatt.ringer_control_point",
12983
14
            FT_UINT8, BASE_HEX, VALS(ringer_control_point_vals), 0x0,
12984
14
            NULL, HFILL}
12985
14
        },
12986
14
        {&hf_btatt_ringer_setting,
12987
14
            {"Ringer Setting", "btatt.ringer_setting",
12988
14
            FT_UINT8, BASE_HEX, VALS(ringer_setting_vals), 0x0,
12989
14
            NULL, HFILL}
12990
14
        },
12991
14
        {&hf_btatt_alert_category_id_bitmask_1,
12992
14
            {"Alert Category ID Bitmask 1", "btatt.alert.category_id_bitmask_1",
12993
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
12994
14
            NULL, HFILL}
12995
14
        },
12996
14
        {&hf_btatt_alert_category_id_bitmask_1_schedule,
12997
14
            {"Schedule", "btatt.alert.category_id_bitmask_1.schedule",
12998
14
            FT_UINT8, BASE_HEX, NULL, 0x80,
12999
14
            NULL, HFILL}
13000
14
        },
13001
14
        {&hf_btatt_alert_category_id_bitmask_1_voice_mail,
13002
14
            {"Voice Mail", "btatt.alert.category_id_bitmask_1.voice_mail",
13003
14
            FT_UINT8, BASE_HEX, NULL, 0x40,
13004
14
            NULL, HFILL}
13005
14
        },
13006
14
        {&hf_btatt_alert_category_id_bitmask_1_sms_mms,
13007
14
            {"SMS/MMS", "btatt.alert.category_id_bitmask_1.sms_mms",
13008
14
            FT_UINT8, BASE_HEX, NULL, 0x20,
13009
14
            NULL, HFILL}
13010
14
        },
13011
14
        {&hf_btatt_alert_category_id_bitmask_1_missed_call,
13012
14
            {"Missed Call", "btatt.alert.category_id_bitmask_1.missed_call",
13013
14
            FT_UINT8, BASE_HEX, NULL, 0x10,
13014
14
            NULL, HFILL}
13015
14
        },
13016
14
        {&hf_btatt_alert_category_id_bitmask_1_call,
13017
14
            {"Call", "btatt.alert.category_id_bitmask_1.call",
13018
14
            FT_UINT8, BASE_HEX, NULL, 0x08,
13019
14
            NULL, HFILL}
13020
14
        },
13021
14
        {&hf_btatt_alert_category_id_bitmask_1_news,
13022
14
            {"News", "btatt.alert.category_id_bitmask_1.news",
13023
14
            FT_UINT8, BASE_HEX, NULL, 0x04,
13024
14
            NULL, HFILL}
13025
14
        },
13026
14
        {&hf_btatt_alert_category_id_bitmask_1_email,
13027
14
            {"Email", "btatt.alert.category_id_bitmask_1.email",
13028
14
            FT_UINT8, BASE_HEX, NULL, 0x02,
13029
14
            NULL, HFILL}
13030
14
        },
13031
14
        {&hf_btatt_alert_category_id_bitmask_1_simple_alert,
13032
14
            {"Simple Alert", "btatt.alert.category_id_bitmask_1.simple_alert",
13033
14
            FT_UINT8, BASE_HEX, NULL, 0x01,
13034
14
            NULL, HFILL}
13035
14
        },
13036
14
        {&hf_btatt_alert_category_id_bitmask_2,
13037
14
            {"Alert Category ID Bitmask 2", "btatt.alert.category_id_bitmask_2",
13038
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
13039
14
            NULL, HFILL}
13040
14
        },
13041
14
        {&hf_btatt_alert_category_id_bitmask_2_reserved,
13042
14
            {"Reserved", "btatt.alert.category_id_bitmask_2.reserved",
13043
14
            FT_UINT8, BASE_HEX, NULL, 0xFC,
13044
14
            NULL, HFILL}
13045
14
        },
13046
14
        {&hf_btatt_alert_category_id_bitmask_2_instant_message,
13047
14
            {"Instant Message", "btatt.alert.category_id_bitmask_2.instant_message",
13048
14
            FT_UINT8, BASE_HEX, NULL, 0x02,
13049
14
            NULL, HFILL}
13050
14
        },
13051
14
        {&hf_btatt_alert_category_id_bitmask_2_high_prioritized_alert,
13052
14
            {"High Prioritized Alert", "btatt.alert.category_id_bitmask_2.high_prioritized_alert",
13053
14
            FT_UINT8, BASE_HEX, NULL, 0x01,
13054
14
            NULL, HFILL}
13055
14
        },
13056
14
        {&hf_btatt_alert_category_id,
13057
14
            {"Alert Category ID", "btatt.alert.category_id",
13058
14
            FT_UINT8, BASE_HEX, VALS(alert_category_id_vals), 0x0,
13059
14
            NULL, HFILL}
13060
14
        },
13061
14
        {&hf_btatt_alert_command_id,
13062
14
            {"Alert Command ID", "btatt.alert.command_id",
13063
14
            FT_UINT8, BASE_HEX, VALS(alert_command_id_vals), 0x0,
13064
14
            NULL, HFILL}
13065
14
        },
13066
14
        {&hf_btatt_alert_unread_count,
13067
14
            {"Unread Count", "btatt.alert.unread_count",
13068
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13069
14
            NULL, HFILL}
13070
14
        },
13071
14
        {&hf_btatt_alert_number_of_new_alert,
13072
14
            {"Number of New Alert", "btatt.alert.number_of_new_alert",
13073
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13074
14
            NULL, HFILL}
13075
14
        },
13076
14
        {&hf_btatt_alert_text_string_information,
13077
14
            {"Text String Information", "btatt.text_string_information",
13078
14
            FT_STRING, BASE_NONE, NULL, 0x0,
13079
14
            NULL, HFILL}
13080
14
        },
13081
14
        {&hf_btatt_blood_pressure_feature,
13082
14
            {"Blood Pressure Feature", "btatt.blood_pressure.feature",
13083
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13084
14
            NULL, HFILL}
13085
14
        },
13086
14
        {&hf_btatt_blood_pressure_feature_reserved,
13087
14
            {"Reserved", "btatt.blood_pressure.feature.reserved",
13088
14
            FT_UINT16, BASE_HEX, NULL, 0xFFC0,
13089
14
            NULL, HFILL}
13090
14
        },
13091
14
        {&hf_btatt_blood_pressure_feature_multiple_bond,
13092
14
            {"Multiple Bond", "btatt.blood_pressure.feature.multiple_bond",
13093
14
            FT_BOOLEAN, 16, NULL, 0x0020,
13094
14
            NULL, HFILL}
13095
14
        },
13096
14
        {&hf_btatt_blood_pressure_feature_measurement_position_detection,
13097
14
            {"Measurement Position Detection", "btatt.blood_pressure.feature.measurement_position_detection",
13098
14
            FT_BOOLEAN, 16, NULL, 0x0010,
13099
14
            NULL, HFILL}
13100
14
        },
13101
14
        {&hf_btatt_blood_pressure_feature_puls_rate_range,
13102
14
            {"Puls Rate Range", "btatt.blood_pressure.feature.puls_rate_range",
13103
14
            FT_BOOLEAN, 16, NULL, 0x0008,
13104
14
            NULL, HFILL}
13105
14
        },
13106
14
        {&hf_btatt_blood_pressure_feature_irregular_pulse_detection,
13107
14
            {"Irregular Pulse Detection", "btatt.blood_pressure.feature.irregular_pulse_detection",
13108
14
            FT_BOOLEAN, 16, NULL, 0x0004,
13109
14
            NULL, HFILL}
13110
14
        },
13111
14
        {&hf_btatt_blood_pressure_feature_cuff_fit_detection,
13112
14
            {"Cuff Fit Detection", "btatt.blood_pressure.feature.cuff_fit_detection",
13113
14
            FT_BOOLEAN, 16, NULL, 0x0002,
13114
14
            NULL, HFILL}
13115
14
        },
13116
14
        {&hf_btatt_blood_pressure_feature_body_movement_detection,
13117
14
            {"Body Movement Detection", "btatt.blood_pressure.feature.body_movement_detection",
13118
14
            FT_BOOLEAN, 16, NULL, 0x0001,
13119
14
            NULL, HFILL}
13120
14
        },
13121
14
        {&hf_btatt_hogp_hid_control_point_command,
13122
14
            {"HID Control Point Command", "btatt.hogp.hid_control_point_command",
13123
14
            FT_UINT8, BASE_HEX, VALS(hid_control_point_command_vals), 0x0,
13124
14
            NULL, HFILL}
13125
14
        },
13126
14
        {&hf_btatt_le_scan_interval,
13127
14
            {"LE Scan Interval", "btatt.le_scan_interval",
13128
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13129
14
            NULL, HFILL}
13130
14
        },
13131
14
        {&hf_btatt_le_scan_window,
13132
14
            {"LE Scan Window", "btatt.le_scan_window",
13133
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13134
14
            NULL, HFILL}
13135
14
        },
13136
14
        { &hf_btatt_pnp_id_vendor_id_source,
13137
14
            { "Vendor ID Source",                "btatt.pnp_id.vendor_id_source",
13138
14
            FT_UINT8, BASE_HEX, VALS(pnp_id_vendor_id_source_vals), 0,
13139
14
            NULL, HFILL }
13140
14
        },
13141
14
        { &hf_btatt_pnp_id_vendor_id,
13142
14
            { "Vendor ID",                       "btatt.pnp_id.vendor_id",
13143
14
            FT_UINT16, BASE_HEX, NULL, 0,
13144
14
            NULL, HFILL }
13145
14
        },
13146
14
        { &hf_btatt_pnp_id_vendor_id_bluetooth_sig,
13147
14
            { "Vendor ID",                       "btatt.pnp_id.vendor_id",
13148
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_company_id_vals_ext, 0,
13149
14
            NULL, HFILL }
13150
14
        },
13151
14
        { &hf_btatt_pnp_id_vendor_id_usb_forum,
13152
14
            { "Vendor ID",                       "btatt.pnp_id.vendor_id",
13153
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &ext_usb_vendors_vals, 0,
13154
14
            NULL, HFILL }
13155
14
        },
13156
14
        { &hf_btatt_pnp_id_product_id,
13157
14
            { "Product ID",                      "btatt.pnp_id.product_id",
13158
14
            FT_UINT16, BASE_HEX, NULL, 0,
13159
14
            NULL, HFILL }
13160
14
        },
13161
14
        { &hf_btatt_pnp_id_product_version,
13162
14
            { "Version",                         "btatt.pnp_id.product_version",
13163
14
            FT_UINT16, BASE_HEX, NULL, 0,
13164
14
            NULL, HFILL }
13165
14
        },
13166
14
        {&hf_btatt_glucose_feature,
13167
14
            {"Glucose Feature", "btatt.glucose.feature",
13168
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13169
14
            NULL, HFILL}
13170
14
        },
13171
14
        {&hf_btatt_glucose_feature_reserved,
13172
14
            {"Reserved", "btatt.glucose.feature.reserved",
13173
14
            FT_BOOLEAN, 16, NULL, 0xF800,
13174
14
            NULL, HFILL}
13175
14
        },
13176
14
        {&hf_btatt_glucose_feature_multiple_bond,
13177
14
            {"Multiple Bond", "btatt.glucose.feature.multiple_bond",
13178
14
            FT_BOOLEAN, 16, NULL, 0x0400,
13179
14
            NULL, HFILL}
13180
14
        },
13181
14
        {&hf_btatt_glucose_feature_time_fault,
13182
14
            {"Time Fault", "btatt.glucose.feature.time_fault",
13183
14
            FT_BOOLEAN, 16, NULL, 0x0200,
13184
14
            NULL, HFILL}
13185
14
        },
13186
14
        {&hf_btatt_glucose_feature_general_device_fault,
13187
14
            {"General Device Fault", "btatt.glucose.feature.general_device_fault",
13188
14
            FT_BOOLEAN, 16, NULL, 0x0100,
13189
14
            NULL, HFILL}
13190
14
        },
13191
14
        {&hf_btatt_glucose_feature_sensor_read_interrupt_detection,
13192
14
            {"Sensor Read Interrupt Detection", "btatt.glucose.feature.sensor_read_interrupt_detection",
13193
14
            FT_BOOLEAN, 16, NULL, 0x0080,
13194
14
            NULL, HFILL}
13195
14
        },
13196
14
        {&hf_btatt_glucose_feature_sensor_temperature_high_low_detection,
13197
14
            {"Sensor Temperature High-Low Detection", "btatt.glucose.feature.sensor_temperature_high_low_detection",
13198
14
            FT_BOOLEAN, 16, NULL, 0x0040,
13199
14
            NULL, HFILL}
13200
14
        },
13201
14
        {&hf_btatt_glucose_feature_sensor_result_high_low_detection,
13202
14
            {"Sensor Result High-Low Detection", "btatt.glucose.feature.sensor_result_high_low_detection",
13203
14
            FT_BOOLEAN, 16, NULL, 0x0020,
13204
14
            NULL, HFILL}
13205
14
        },
13206
14
        {&hf_btatt_glucose_feature_sensor_strip_type_error_detection,
13207
14
            {"Sensor Strip Type Error Detection", "btatt.glucose.feature.sensor_strip_type_error_detection",
13208
14
            FT_BOOLEAN, 16, NULL, 0x0010,
13209
14
            NULL, HFILL}
13210
14
        },
13211
14
        {&hf_btatt_glucose_feature_sensor_strip_insertion_error_detection,
13212
14
            {"Sensor Strip Insertion Error Detection", "btatt.glucose.feature.sensor_strip_insertion_error_detection",
13213
14
            FT_BOOLEAN, 16, NULL, 0x0008,
13214
14
            NULL, HFILL}
13215
14
        },
13216
14
        {&hf_btatt_glucose_feature_sensor_sample_size,
13217
14
            {"Sensor Sample Size", "btatt.glucose.feature.sensor_sample_size",
13218
14
            FT_BOOLEAN, 16, NULL, 0x0004,
13219
14
            NULL, HFILL}
13220
14
        },
13221
14
        {&hf_btatt_glucose_feature_sensor_malfunction_detection,
13222
14
            {"Sensor Malfunction Detection", "btatt.glucose.feature.sensor_malfunction_detection",
13223
14
            FT_BOOLEAN, 16, NULL, 0x0002,
13224
14
            NULL, HFILL}
13225
14
        },
13226
14
        {&hf_btatt_glucose_feature_low_battery_detection_during_measurement,
13227
14
            {"Low Battery Detection During Measurement", "btatt.glucose.feature.low_battery_detection_during_measurement",
13228
14
            FT_BOOLEAN, 16, NULL, 0x0001,
13229
14
            NULL, HFILL}
13230
14
        },
13231
14
        {&hf_btatt_rsc_feature,
13232
14
            {"RSC Feature", "btatt.rsc.feature",
13233
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13234
14
            NULL, HFILL}
13235
14
        },
13236
14
        {&hf_btatt_rsc_feature_reserved,
13237
14
            {"Reserved", "btatt.rsc.feature.reserved",
13238
14
            FT_BOOLEAN, 16, NULL, 0xFF80,
13239
14
            NULL, HFILL}
13240
14
        },
13241
14
        {&hf_btatt_rsc_feature_multiple_sensor_locations,
13242
14
            {"Multiple Sensor Locations", "btatt.rsc.feature.multiple_sensor_locations",
13243
14
            FT_BOOLEAN, 16, NULL, 0x0010,
13244
14
            NULL, HFILL}
13245
14
        },
13246
14
        {&hf_btatt_rsc_feature_calibration_procedure,
13247
14
            {"Calibration Procedure", "btatt.rsc.feature.calibration_procedure",
13248
14
            FT_BOOLEAN, 16, NULL, 0x0008,
13249
14
            NULL, HFILL}
13250
14
        },
13251
14
        {&hf_btatt_rsc_feature_walking_or_running_status,
13252
14
            {"Walking_or Running Status", "btatt.rsc.feature.walking_or_running_status",
13253
14
            FT_BOOLEAN, 16, NULL, 0x0004,
13254
14
            NULL, HFILL}
13255
14
        },
13256
14
        {&hf_btatt_rsc_feature_total_distance_measurement,
13257
14
            {"Total Distance Measurement", "btatt.rsc.feature.total_distance_measurement",
13258
14
            FT_BOOLEAN, 16, NULL, 0x0002,
13259
14
            NULL, HFILL}
13260
14
        },
13261
14
        {&hf_btatt_rsc_feature_instantaneous_stride_length_measurement,
13262
14
            {"Instantaneous Stride Length Measurement", "btatt.rsc.feature.instantaneous_stride_length_measurement",
13263
14
            FT_BOOLEAN, 16, NULL, 0x0001,
13264
14
            NULL, HFILL}
13265
14
        },
13266
14
        {&hf_btatt_csc_feature,
13267
14
            {"CSC Feature", "btatt.csc.feature",
13268
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13269
14
            NULL, HFILL}
13270
14
        },
13271
14
        {&hf_btatt_csc_feature_reserved,
13272
14
            {"Reserved", "btatt.csc.feature.reserved",
13273
14
            FT_BOOLEAN, 16, NULL, 0xFFF8,
13274
14
            NULL, HFILL}
13275
14
        },
13276
14
        {&hf_btatt_csc_feature_multiple_sensor_locations,
13277
14
            {"Multiple Sensor Locations", "btatt.csc.feature.multiple_sensor_locations",
13278
14
            FT_BOOLEAN, 16, NULL, 0x0004,
13279
14
            NULL, HFILL}
13280
14
        },
13281
14
        {&hf_btatt_csc_feature_crank_revolution_data,
13282
14
            {"Crank Revolution Data", "btatt.csc.feature.crank_revolution_data",
13283
14
            FT_BOOLEAN, 16, NULL, 0x0002,
13284
14
            NULL, HFILL}
13285
14
        },
13286
14
        {&hf_btatt_csc_feature_wheel_revolution_data,
13287
14
            {"Wheel Revolution Data", "btatt.csc.feature.wheel_revolution_data",
13288
14
            FT_BOOLEAN, 16, NULL, 0x0001,
13289
14
            NULL, HFILL}
13290
14
        },
13291
14
        {&hf_btatt_sensor_location,
13292
14
            {"Sensor Location", "btatt.sensor_location",
13293
14
            FT_UINT8, BASE_HEX, VALS(sensor_location_vals), 0x0,
13294
14
            NULL, HFILL}
13295
14
        },
13296
14
        {&hf_btatt_elevation,
13297
14
            {"Elevation", "btatt.elevation",
13298
14
            FT_INT24, BASE_DEC, NULL, 0x0,
13299
14
            NULL, HFILL}
13300
14
        },
13301
14
        {&hf_btatt_pressure,
13302
14
            {"Pressure", "btatt.pressure",
13303
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
13304
14
            NULL, HFILL}
13305
14
        },
13306
14
        {&hf_btatt_temperature,
13307
14
            {"Temperature", "btatt.temperature",
13308
14
            FT_INT16, BASE_DEC, NULL, 0x0,
13309
14
            NULL, HFILL}
13310
14
        },
13311
14
        {&hf_btatt_humidity,
13312
14
            {"Humidity", "btatt.humidity",
13313
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13314
14
            NULL, HFILL}
13315
14
        },
13316
14
        {&hf_btatt_true_wind_speed,
13317
14
            {"True Wind Speed", "btatt.true_wind_speed",
13318
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13319
14
            NULL, HFILL}
13320
14
        },
13321
14
        {&hf_btatt_true_wind_direction,
13322
14
            {"True Wind Direction", "btatt.true_wind_direction",
13323
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
13324
14
            NULL, HFILL}
13325
14
        },
13326
14
        {&hf_btatt_apparent_wind_speed,
13327
14
            {"Apparent Wind Speed", "btatt.apparent_wind_speed",
13328
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13329
14
            NULL, HFILL}
13330
14
        },
13331
14
        {&hf_btatt_apparent_wind_direction,
13332
14
            {"Apparent Wind Direction", "btatt.apparent_wind_direction",
13333
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
13334
14
            NULL, HFILL}
13335
14
        },
13336
14
        {&hf_btatt_gust_factor,
13337
14
            {"Gust Factor", "btatt.gust_factor",
13338
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
13339
14
            NULL, HFILL}
13340
14
        },
13341
14
        {&hf_btatt_pollen_concentration,
13342
14
            {"Pollen Concentration", "btatt.pollen_concentration",
13343
14
            FT_INT24, BASE_DEC, NULL, 0x0,
13344
14
            NULL, HFILL}
13345
14
        },
13346
14
        {&hf_btatt_uv_index,
13347
14
            {"UV Index", "btatt.uv_index",
13348
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13349
14
            NULL, HFILL}
13350
14
        },
13351
14
        {&hf_btatt_irradiance,
13352
14
            {"Irradiance", "btatt.irradiance",
13353
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13354
14
            NULL, HFILL}
13355
14
        },
13356
14
        {&hf_btatt_rainfall,
13357
14
            {"Rainfall", "btatt.rainfall",
13358
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13359
14
            NULL, HFILL}
13360
14
        },
13361
14
        {&hf_btatt_wind_chill,
13362
14
            {"Wind Chill", "btatt.wind_chill",
13363
14
            FT_INT8, BASE_DEC, NULL, 0x0,
13364
14
            NULL, HFILL}
13365
14
        },
13366
14
        {&hf_btatt_heart_index,
13367
14
            {"Heart Index", "btatt.heart_index",
13368
14
            FT_INT8, BASE_DEC, NULL, 0x0,
13369
14
            NULL, HFILL}
13370
14
        },
13371
14
        {&hf_btatt_dew_point,
13372
14
            {"Dew Point", "btatt.dew_point",
13373
14
            FT_INT8, BASE_DEC, NULL, 0x0,
13374
14
            NULL, HFILL}
13375
14
        },
13376
14
        {&hf_btatt_descriptor_value_changed_flags,
13377
14
            {"Flags", "btatt.descriptor_value_changed.flags",
13378
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
13379
14
            NULL, HFILL}
13380
14
        },
13381
14
        {&hf_btatt_descriptor_value_changed_flags_reserved,
13382
14
            {"Reserved", "btatt.descriptor_value_changed.flags.reserved",
13383
14
            FT_BOOLEAN, 16, NULL, 0xF800,
13384
14
            NULL, HFILL}
13385
14
        },
13386
14
        {&hf_btatt_descriptor_value_changed_flags_change_to_characteristic_user_description_descriptor,
13387
14
            {"Change to Characteristic User Description Descriptor", "btatt.descriptor_value_changed.flags.change_to_characteristic_user_description_descriptor",
13388
14
            FT_BOOLEAN, 16, NULL, 0x0010,
13389
14
            NULL, HFILL}
13390
14
        },
13391
14
        {&hf_btatt_descriptor_value_changed_flags_change_to_es_measurement_descriptor,
13392
14
            {"Change to ES Measurement Descriptor", "btatt.descriptor_value_changed.flags.change_to_es_measurement_descriptor",
13393
14
            FT_BOOLEAN, 16, NULL, 0x0008,
13394
14
            NULL, HFILL}
13395
14
        },
13396
14
        {&hf_btatt_descriptor_value_changed_flags_change_to_es_configuration_descriptor,
13397
14
            {"Change to ES Configuration Descriptor", "btatt.descriptor_value_changed.flags.change_to_es_configuration_descriptor",
13398
14
            FT_BOOLEAN, 16, NULL, 0x0004,
13399
14
            NULL, HFILL}
13400
14
        },
13401
14
        {&hf_btatt_descriptor_value_changed_flags_change_to_one_or_more_es_trigger_setting_descriptors,
13402
14
            {"Change to One or More ES Trigger Setting Descriptors", "btatt.descriptor_value_changed.flags.change_to_one_or_more_es_trigger_setting_descriptors",
13403
14
            FT_BOOLEAN, 16, NULL, 0x0002,
13404
14
            NULL, HFILL}
13405
14
        },
13406
14
        {&hf_btatt_descriptor_value_changed_flags_source_of_change,
13407
14
            {"Source of Change", "btatt.descriptor_value_changed.flags.source_of_change",
13408
14
            FT_BOOLEAN, 16, NULL, 0x0001,
13409
14
            NULL, HFILL}
13410
14
        },
13411
14
        {&hf_btatt_aerobic_heart_rate_lower_limit,
13412
14
            {"Aerobic Heart Rate Lower Limit", "btatt.aerobic_heart_rate_lower_limit",
13413
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13414
14
            NULL, HFILL}
13415
14
        },
13416
14
        {&hf_btatt_aerobic_threshold,
13417
14
            {"Aerobic Threshold", "btatt.aerobic_threshold",
13418
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13419
14
            NULL, HFILL}
13420
14
        },
13421
14
        {&hf_btatt_age,
13422
14
            {"Age", "btatt.age",
13423
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13424
14
            NULL, HFILL}
13425
14
        },
13426
14
        {&hf_btatt_anaerobic_heart_rate_lower_limit,
13427
14
            {"Anaerobic Heart Rate Lower Limit", "btatt.anaerobic_heart_rate_lower_limit",
13428
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13429
14
            NULL, HFILL}
13430
14
        },
13431
14
        {&hf_btatt_anaerobic_heart_rate_upper_limit,
13432
14
            {"Anaerobic Heart Rate Upper Limit", "btatt.anaerobic_heart_rate_upper_limit",
13433
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13434
14
            NULL, HFILL}
13435
14
        },
13436
14
        {&hf_btatt_anaerobic_threshold,
13437
14
            {"Anaerobic Threshold", "btatt.anaerobic_threshold",
13438
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13439
14
            NULL, HFILL}
13440
14
        },
13441
14
        {&hf_btatt_aerobic_heart_rate_upper_limit,
13442
14
            {"Aerobic Heart Rate Upper Limit", "btatt.aerobic_heart_rate_upper_limit",
13443
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13444
14
            NULL, HFILL}
13445
14
        },
13446
14
        {&hf_btatt_email_address,
13447
14
            {"Email Address", "btatt.email_address",
13448
14
            FT_STRING, BASE_NONE, NULL, 0x0,
13449
14
            NULL, HFILL}
13450
14
        },
13451
14
        {&hf_btatt_fat_burn_heart_rate_lower_limit,
13452
14
            {"Fat Burn Heart Rate Lower Limit", "btatt.fat_burn_heart_rate_lower_limit",
13453
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13454
14
            NULL, HFILL}
13455
14
        },
13456
14
        {&hf_btatt_fat_burn_heart_rate_upper_limit,
13457
14
            {"Fat Burn Heart Rate Upper Limit", "btatt.fat_burn_heart_rate_upper_limit",
13458
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13459
14
            NULL, HFILL}
13460
14
        },
13461
14
        {&hf_btatt_first_name,
13462
14
            {"First Name", "btatt.first_name",
13463
14
            FT_STRING, BASE_NONE, NULL, 0x0,
13464
14
            NULL, HFILL}
13465
14
        },
13466
14
        {&hf_btatt_five_zone_heart_rate_limits_very_light_light_limit,
13467
14
            {"Very Light/Light Limit", "btatt.five_zone_heart_rate_limits.very_light_light_limit",
13468
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13469
14
            NULL, HFILL}
13470
14
        },
13471
14
        {&hf_btatt_five_zone_heart_rate_limits_light_moderate_limit,
13472
14
            {"Light/Moderate Limit,", "btatt.five_zone_heart_rate_limits.light_moderate_limit",
13473
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13474
14
            NULL, HFILL}
13475
14
        },
13476
14
        {&hf_btatt_five_zone_heart_rate_limits_moderate_hard_limit,
13477
14
            {"Moderate/Hard Limit", "btatt.five_zone_heart_rate_limits.moderate_hard_limit",
13478
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13479
14
            NULL, HFILL}
13480
14
        },
13481
14
        {&hf_btatt_five_zone_heart_rate_limits_hard_maximum_limit,
13482
14
            {"Hard/Maximum Limit", "btatt.five_zone_heart_rate_limits.hard_maximum_limit",
13483
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13484
14
            NULL, HFILL}
13485
14
        },
13486
14
        {&hf_btatt_gender,
13487
14
            {"Gender", "btatt.gender",
13488
14
            FT_UINT8, BASE_HEX, VALS(gender_vals), 0x0,
13489
14
            NULL, HFILL}
13490
14
        },
13491
14
        {&hf_btatt_heart_rate_max,
13492
14
            {"Heart Rate Max", "btatt.heart_rate_max",
13493
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13494
14
            NULL, HFILL}
13495
14
        },
13496
14
        {&hf_btatt_height,
13497
14
            {"Height", "btatt.height",
13498
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
13499
14
            NULL, HFILL}
13500
14
        },
13501
14
        {&hf_btatt_hip_circumference,
13502
14
            {"Hip Circumference", "btatt.hip_circumference",
13503
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
13504
14
            NULL, HFILL}
13505
14
        },
13506
14
        {&hf_btatt_last_name,
13507
14
            {"Last Name", "btatt.last_name",
13508
14
            FT_STRING, BASE_NONE, NULL, 0x0,
13509
14
            NULL, HFILL}
13510
14
        },
13511
14
        {&hf_btatt_maximum_recommended_heart_rate,
13512
14
            {"Maximum Recommended Heart Rate", "btatt.maximum_recommended_heart_rate",
13513
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13514
14
            NULL, HFILL}
13515
14
        },
13516
14
        {&hf_btatt_resting_heart_rate,
13517
14
            {"Resting Heart Rate", "btatt.resting_heart_rate",
13518
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13519
14
            NULL, HFILL}
13520
14
        },
13521
14
        {&hf_btatt_sport_type_for_aerobic_and_anaerobic_thresholds,
13522
14
            {"Sport Type for Aerobic and Anaerobic Thresholds", "btatt.sport_type_for_aerobic_and_anaerobic_thresholds",
13523
14
            FT_UINT8, BASE_DEC, VALS(sport_type_for_aerobic_and_anaerobic_thresholds_vals), 0x0,
13524
14
            NULL, HFILL}
13525
14
        },
13526
14
        {&hf_btatt_three_zone_heart_rate_limits_light_moderate,
13527
14
            {"Three zone Heart Rate Limits - Light (Fat burn) / Moderate (Aerobic) Limit", "btatt.three_zone_heart_rate_limits.light_moderate",
13528
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13529
14
            NULL, HFILL}
13530
14
        },
13531
14
        {&hf_btatt_three_zone_heart_rate_limits_moderate_hard,
13532
14
            {"Three zone Heart Rate Limits - Moderate (Aerobic) / Hard (Anaerobic) Limit", "btatt.three_zone_heart_rate_limits.moderate_hard",
13533
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13534
14
            NULL, HFILL}
13535
14
        },
13536
14
        {&hf_btatt_two_zone_heart_rate_limit_fat_burn_fitness,
13537
14
            {"Two zone Heart Rate Limit - Fat burn / Fitness Limit", "btatt.two_zone_heart_rate_limit.fat_burn_fitness",
13538
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13539
14
            NULL, HFILL}
13540
14
        },
13541
14
        {&hf_btatt_vo2_max,
13542
14
            {"VO2 Max", "btatt.vo2_max",
13543
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13544
14
            NULL, HFILL}
13545
14
        },
13546
14
        {&hf_btatt_waist_circumference,
13547
14
            {"Waist Circumference", "btatt.waist_circumference",
13548
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
13549
14
            NULL, HFILL}
13550
14
        },
13551
14
        {&hf_btatt_weight,
13552
14
            {"Weight", "btatt.weight",
13553
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
13554
14
            NULL, HFILL}
13555
14
        },
13556
14
        {&hf_btatt_database_change_increment,
13557
14
            {"Database Change Increment", "btatt.database_change_increment",
13558
14
            FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
13559
14
            NULL, HFILL}
13560
14
        },
13561
14
        {&hf_btatt_user_index,
13562
14
            {"User Index", "btatt.user_index",
13563
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
13564
14
            NULL, HFILL}
13565
14
        },
13566
14
        {&hf_btatt_magnetic_flux_density_x,
13567
14
            {"X", "btatt.hf_btatt_magnetic_flux_density.x",
13568
14
            FT_INT16, BASE_DEC, NULL, 0x0,
13569
14
            NULL, HFILL}
13570
14
        },
13571
14
        {&hf_btatt_magnetic_flux_density_y,
13572
14
            {"Y", "btatt.hf_btatt_magnetic_flux_density.y",
13573
14
            FT_INT16, BASE_DEC, NULL, 0x0,
13574
14
            NULL, HFILL}
13575
14
        },
13576
14
        {&hf_btatt_magnetic_flux_density_z,
13577
14
            {"Z", "btatt.hf_btatt_magnetic_flux_density.z",
13578
14
            FT_INT16, BASE_DEC, NULL, 0x0,
13579
14
            NULL, HFILL}
13580
14
        },
13581
14
        {&hf_btatt_language,
13582
14
            {"Language", "btatt.language",
13583
14
            FT_STRING, BASE_NONE, NULL, 0x0,
13584
14
            NULL, HFILL}
13585
14
        },
13586
14
        {&hf_btatt_barometric_pressure_trend,
13587
14
            {"Barometric Pressure Trend", "btatt.barometric_pressure_trend",
13588
14
            FT_UINT8, BASE_DEC, VALS(barometric_pressure_trend_vals), 0x0,
13589
14
            NULL, HFILL}
13590
14
        },
13591
14
        {&hf_btatt_central_address_resolution,
13592
14
            {"Central Address Resolution", "btatt.central_address_resolution",
13593
14
            FT_UINT8, BASE_DEC, VALS(central_address_resolution_vals), 0x0,
13594
14
            NULL, HFILL}
13595
14
        },
13596
14
        {&hf_btatt_resolvable_private_address,
13597
14
            {"Resolvable Private Address", "btatt.resolvable_private_address",
13598
14
            FT_UINT8, BASE_DEC, VALS(resolvable_private_address_vals), 0x0,
13599
14
            NULL, HFILL}
13600
14
        },
13601
14
        {&hf_btatt_cycling_power_feature,
13602
14
            {"Cycling Power Feature", "btatt.cycling_power_feature",
13603
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
13604
14
            NULL, HFILL}
13605
14
        },
13606
14
        {&hf_btatt_cycling_power_feature_reserved,
13607
14
            {"Reserved", "btatt.cycling_power_feature.reserved",
13608
14
            FT_UINT32, BASE_HEX, NULL, 0xFFF80000,
13609
14
            NULL, HFILL}
13610
14
        },
13611
14
        {&hf_btatt_cycling_power_feature_factory_calibration_date,
13612
14
            {"Factory Calibration Date", "btatt.cycling_power_feature.factory_calibration_date",
13613
14
            FT_BOOLEAN, 32, NULL, 0x00040000,
13614
14
            NULL, HFILL}
13615
14
        },
13616
14
        {&hf_btatt_cycling_power_feature_instantaneous_measurement_direction,
13617
14
            {"Instantaneous Measurement Direction", "btatt.cycling_power_feature.instantaneous_measurement_direction",
13618
14
            FT_BOOLEAN, 32, NULL, 0x00020000,
13619
14
            NULL, HFILL}
13620
14
        },
13621
14
        {&hf_btatt_cycling_power_feature_sensor_measurement_context,
13622
14
            {"Sensor Measurement Context", "btatt.cycling_power_feature.sensor_measurement_context",
13623
14
            FT_UINT32, BASE_HEX, VALS(cycling_power_feature_sensor_measurement_context_vals), 0x00010000,
13624
14
            NULL, HFILL}
13625
14
        },
13626
14
        {&hf_btatt_cycling_power_feature_span_length_adjustment,
13627
14
            {"Span Length Adjustment", "btatt.cycling_power_feature.span_length_adjustment",
13628
14
            FT_BOOLEAN, 32, NULL, 0x00008000,
13629
14
            NULL, HFILL}
13630
14
        },
13631
14
        {&hf_btatt_cycling_power_feature_chain_weight_adjustment,
13632
14
            {"Chain Weight Adjustment", "btatt.cycling_power_feature.chain_weight_adjustment",
13633
14
            FT_BOOLEAN, 32, NULL, 0x00004000,
13634
14
            NULL, HFILL}
13635
14
        },
13636
14
        {&hf_btatt_cycling_power_feature_chain_length_adjustment,
13637
14
            {"Chain Length Adjustment", "btatt.cycling_power_feature.chain_length_adjustment",
13638
14
            FT_BOOLEAN, 32, NULL, 0x00002000,
13639
14
            NULL, HFILL}
13640
14
        },
13641
14
        {&hf_btatt_cycling_power_feature_crank_length_adjustment,
13642
14
            {"Crank Length Adjustment", "btatt.cycling_power_feature.crank_length_adjustment",
13643
14
            FT_BOOLEAN, 32, NULL, 0x00001000,
13644
14
            NULL, HFILL}
13645
14
        },
13646
14
        {&hf_btatt_cycling_power_feature_multiple_sensor_locations,
13647
14
            {"Multiple Sensor Locations", "btatt.cycling_power_feature.multiple_sensor_locations",
13648
14
            FT_BOOLEAN, 32, NULL, 0x00000800,
13649
14
            NULL, HFILL}
13650
14
        },
13651
14
        {&hf_btatt_cycling_power_feature_cycling_power_measurement_characteristic_content_masking,
13652
14
            {"Cycling Power Measurement Characteristic Content Masking", "btatt.cycling_power_feature.cycling_power_measurement_characteristic_content_masking",
13653
14
            FT_BOOLEAN, 32, NULL, 0x00000400,
13654
14
            NULL, HFILL}
13655
14
        },
13656
14
        {&hf_btatt_cycling_power_feature_offset_compensation,
13657
14
            {"Offset Compensation", "btatt.cycling_power_feature.offset_compensation",
13658
14
            FT_BOOLEAN, 32, NULL, 0x00000200,
13659
14
            NULL, HFILL}
13660
14
        },
13661
14
        {&hf_btatt_cycling_power_feature_offset_compensation_indicator,
13662
14
            {"Offset Compensation Indicator", "btatt.cycling_power_feature.offset_compensation_indicator",
13663
14
            FT_BOOLEAN, 32, NULL, 0x00000100,
13664
14
            NULL, HFILL}
13665
14
        },
13666
14
        {&hf_btatt_cycling_power_feature_accumulated_energy,
13667
14
            {"Accumulated Energy", "btatt.cycling_power_feature.accumulated_energy",
13668
14
            FT_BOOLEAN, 32, NULL, 0x00000080,
13669
14
            NULL, HFILL}
13670
14
        },
13671
14
        {&hf_btatt_cycling_power_feature_top_and_bottom_dead_spot_angles,
13672
14
            {"Top and Bottom Dead Spot Angles", "btatt.cycling_power_feature.top_and_bottom_dead_spot_angles",
13673
14
            FT_BOOLEAN, 32, NULL, 0x00000040,
13674
14
            NULL, HFILL}
13675
14
        },
13676
14
        {&hf_btatt_cycling_power_feature_extreme_angles,
13677
14
            {"Extreme Angles", "btatt.cycling_power_feature.extreme_angles",
13678
14
            FT_BOOLEAN, 32, NULL, 0x00000020,
13679
14
            NULL, HFILL}
13680
14
        },
13681
14
        {&hf_btatt_cycling_power_feature_extreme_magnitudes,
13682
14
            {"Extreme Magnitudes", "btatt.cycling_power_feature.extreme_magnitudes",
13683
14
            FT_BOOLEAN, 32, NULL, 0x00000010,
13684
14
            NULL, HFILL}
13685
14
        },
13686
14
        {&hf_btatt_cycling_power_feature_crank_revolution_data,
13687
14
            {"Crank Revolution Data", "btatt.cycling_power_feature.crank_revolution_data",
13688
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
13689
14
            NULL, HFILL}
13690
14
        },
13691
14
        {&hf_btatt_cycling_power_feature_wheel_revolution_data,
13692
14
            {"Wheel Revolution Data", "btatt.cycling_power_feature.wheel_revolution_data",
13693
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
13694
14
            NULL, HFILL}
13695
14
        },
13696
14
        {&hf_btatt_cycling_power_feature_accumulated_torque,
13697
14
            {"Accumulated Torque", "btatt.cycling_power_feature.accumulated_torque",
13698
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
13699
14
            NULL, HFILL}
13700
14
        },
13701
14
        {&hf_btatt_cycling_power_feature_pedal_power_balance,
13702
14
            {"Pedal Power Balance", "btatt.cycling_power_feature.pedal_power_balance",
13703
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
13704
14
            NULL, HFILL}
13705
14
        },
13706
14
        {&hf_btatt_ln_feature,
13707
14
            {"LN Feature", "btatt.ln_feature",
13708
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
13709
14
            NULL, HFILL}
13710
14
        },
13711
14
        {&hf_btatt_ln_feature_reserved,
13712
14
            {"Reserved", "btatt.ln_feature.reserved",
13713
14
            FT_UINT32, BASE_HEX, NULL, 0xFFE00000,
13714
14
            NULL, HFILL}
13715
14
        },
13716
14
        {&hf_btatt_ln_feature_position_status,
13717
14
            {"Position Status", "btatt.ln_feature.position_status",
13718
14
            FT_BOOLEAN, 32, NULL, 0x00100000,
13719
14
            NULL, HFILL}
13720
14
        },
13721
14
        {&hf_btatt_ln_feature_elevation_setting,
13722
14
            {"Elevation Setting,", "btatt.ln_feature.elevation_setting",
13723
14
            FT_BOOLEAN, 32, NULL, 0x00080000,
13724
14
            NULL, HFILL}
13725
14
        },
13726
14
        {&hf_btatt_ln_feature_fix_rate_setting,
13727
14
            {"Fix Rate Setting", "btatt.ln_feature.fix_rate_setting",
13728
14
            FT_BOOLEAN, 32, NULL, 0x00040000,
13729
14
            NULL, HFILL}
13730
14
        },
13731
14
        {&hf_btatt_ln_feature_location_and_speed_characteristic_content_masking,
13732
14
            {"Location and Speed Characteristic Content Masking", "btatt.ln_feature.location_and_speed_characteristic_content_masking",
13733
14
            FT_BOOLEAN, 32, NULL, 0x00020000,
13734
14
            NULL, HFILL}
13735
14
        },
13736
14
        {&hf_btatt_ln_feature_vertical_dilution_of_precision,
13737
14
            {"Vertical Dilution of Precision", "btatt.ln_feature.vertical_dilution_of_precision",
13738
14
            FT_BOOLEAN, 32, NULL, 0x00010000,
13739
14
            NULL, HFILL}
13740
14
        },
13741
14
        {&hf_btatt_ln_feature_horizontal_dilution_of_precision,
13742
14
            {"Horizontal Dilution of Precision", "btatt.ln_feature.horizontal_dilution_of_precision",
13743
14
            FT_BOOLEAN, 32, NULL, 0x00008000,
13744
14
            NULL, HFILL}
13745
14
        },
13746
14
        {&hf_btatt_ln_feature_estimated_vertical_position_error,
13747
14
            {"Estimated Vertical Position Error", "btatt.ln_feature.estimated_vertical_position_error",
13748
14
            FT_BOOLEAN, 32, NULL, 0x00004000,
13749
14
            NULL, HFILL}
13750
14
        },
13751
14
        {&hf_btatt_ln_feature_estimated_horizontal_position_error,
13752
14
            {"Estimated Horizontal Position Error", "btatt.ln_feature.estimated_horizontal_position_error",
13753
14
            FT_BOOLEAN, 32, NULL, 0x00002000,
13754
14
            NULL, HFILL}
13755
14
        },
13756
14
        {&hf_btatt_ln_feature_time_to_first_fix,
13757
14
            {"Time to First Fix", "btatt.ln_feature.time_to_first_fix",
13758
14
            FT_BOOLEAN, 32, NULL, 0x00001000,
13759
14
            NULL, HFILL}
13760
14
        },
13761
14
        {&hf_btatt_ln_feature_number_of_beacons_in_view,
13762
14
            {"Number of Beacons in View", "btatt.ln_feature.number_of_beacons_in_view",
13763
14
            FT_BOOLEAN, 32, NULL, 0x00000800,
13764
14
            NULL, HFILL}
13765
14
        },
13766
14
        {&hf_btatt_ln_feature_number_of_beacons_in_solution,
13767
14
            {"Number of Beacons in Solution", "btatt.ln_feature.number_of_beacons_in_solution",
13768
14
            FT_BOOLEAN, 32, NULL, 0x00000400,
13769
14
            NULL, HFILL}
13770
14
        },
13771
14
        {&hf_btatt_ln_feature_estimated_time_of_arrival,
13772
14
            {"Estimated Time of Arrival", "btatt.ln_feature.estimated_time_of_arrival",
13773
14
            FT_BOOLEAN, 32, NULL, 0x00000200,
13774
14
            NULL, HFILL}
13775
14
        },
13776
14
        {&hf_btatt_ln_feature_remaining_vertical_distance,
13777
14
            {"Remaining Vertical Distance", "btatt.ln_feature.remaining_vertical_distance",
13778
14
            FT_BOOLEAN, 32, NULL, 0x00000100,
13779
14
            NULL, HFILL}
13780
14
        },
13781
14
        {&hf_btatt_ln_feature_remaining_distance,
13782
14
            {"Remaining Distance", "btatt.ln_feature.remaining_distance",
13783
14
            FT_BOOLEAN, 32, NULL, 0x00000080,
13784
14
            NULL, HFILL}
13785
14
        },
13786
14
        {&hf_btatt_ln_feature_utc_time,
13787
14
            {"UTC Time", "btatt.ln_feature.utc_time",
13788
14
            FT_BOOLEAN, 32, NULL, 0x00000040,
13789
14
            NULL, HFILL}
13790
14
        },
13791
14
        {&hf_btatt_ln_feature_rolling_time,
13792
14
            {"Rolling Time", "btatt.ln_feature.rolling_time",
13793
14
            FT_BOOLEAN, 32, NULL, 0x00000020,
13794
14
            NULL, HFILL}
13795
14
        },
13796
14
        {&hf_btatt_ln_feature_heading,
13797
14
            {"Heading", "btatt.ln_feature.heading",
13798
14
            FT_BOOLEAN, 32, NULL, 0x00000010,
13799
14
            NULL, HFILL}
13800
14
        },
13801
14
        {&hf_btatt_ln_feature_elevation,
13802
14
            {"Elevation", "btatt.ln_feature.elevation",
13803
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
13804
14
            NULL, HFILL}
13805
14
        },
13806
14
        {&hf_btatt_ln_feature_location,
13807
14
            {"Location", "btatt.ln_feature.location",
13808
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
13809
14
            NULL, HFILL}
13810
14
        },
13811
14
        {&hf_btatt_ln_feature_total_distance,
13812
14
            {"Total Distance", "btatt.ln_feature.total_distance",
13813
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
13814
14
            NULL, HFILL}
13815
14
        },
13816
14
        {&hf_btatt_ln_feature_instantaneous_speed,
13817
14
            {"Instantaneous Speed", "btatt.ln_feature.instantaneous_speed",
13818
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
13819
14
            NULL, HFILL}
13820
14
        },
13821
14
        {&hf_btatt_body_composition_feature,
13822
14
            {"Body Composition Feature", "btatt.body_composition_feature",
13823
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
13824
14
            NULL, HFILL}
13825
14
        },
13826
14
        {&hf_btatt_body_composition_feature_reserved,
13827
14
            {"Reserved", "btatt.body_composition_feature.reserved",
13828
14
            FT_UINT32, BASE_HEX, NULL, 0xFFFC0000,
13829
14
            NULL, HFILL}
13830
14
        },
13831
14
        {&hf_btatt_body_composition_feature_height_measurement_resolution,
13832
14
            {"Height Measurement Resolution", "btatt.body_composition_feature.height_measurement_resolution",
13833
14
            FT_UINT32, BASE_HEX, VALS(body_composition_feature_height_measurement_resolution_vals), 0x00038000,
13834
14
            NULL, HFILL}
13835
14
        },
13836
14
        {&hf_btatt_body_composition_feature_mass_measurement_resolution,
13837
14
            {"Mass Measurement Resolution", "btatt.body_composition_feature.mass_measurement_resolution",
13838
14
            FT_UINT32, BASE_HEX, VALS(body_composition_feature_mass_measurement_resolution_vals), 0x00007800,
13839
14
            NULL, HFILL}
13840
14
        },
13841
14
        {&hf_btatt_body_composition_feature_height,
13842
14
            {"Height", "btatt.body_composition_feature.height",
13843
14
            FT_BOOLEAN, 32, NULL, 0x00000400,
13844
14
            NULL, HFILL}
13845
14
        },
13846
14
        {&hf_btatt_body_composition_feature_weight,
13847
14
            {"Weight", "btatt.body_composition_feature.weight",
13848
14
            FT_BOOLEAN, 32, NULL, 0x00000200,
13849
14
            NULL, HFILL}
13850
14
        },
13851
14
        {&hf_btatt_body_composition_feature_impedance,
13852
14
            {"Impedance", "btatt.body_composition_feature.impedance",
13853
14
            FT_BOOLEAN, 32, NULL, 0x00000100,
13854
14
            NULL, HFILL}
13855
14
        },
13856
14
        {&hf_btatt_body_composition_feature_body_water_mass,
13857
14
            {"Body Water Mass", "btatt.body_composition_feature.body_water_mass",
13858
14
            FT_BOOLEAN, 32, NULL, 0x00000080,
13859
14
            NULL, HFILL}
13860
14
        },
13861
14
        {&hf_btatt_body_composition_feature_soft_lean_mass,
13862
14
            {"Soft Lean Mass", "btatt.body_composition_feature.soft_lean_mass",
13863
14
            FT_BOOLEAN, 32, NULL, 0x00000040,
13864
14
            NULL, HFILL}
13865
14
        },
13866
14
        {&hf_btatt_body_composition_feature_fat_free_mass,
13867
14
            {"Fat Free Mass", "btatt.body_composition_feature.fat_free_mass",
13868
14
            FT_BOOLEAN, 32, NULL, 0x00000020,
13869
14
            NULL, HFILL}
13870
14
        },
13871
14
        {&hf_btatt_body_composition_feature_muscle_mass,
13872
14
            {"Muscle Mass", "btatt.body_composition_feature.muscle_mass",
13873
14
            FT_BOOLEAN, 32, NULL, 0x00000010,
13874
14
            NULL, HFILL}
13875
14
        },
13876
14
        {&hf_btatt_body_composition_feature_muscle_percentage,
13877
14
            {"Muscle Percentage", "btatt.body_composition_feature.muscle_percentage",
13878
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
13879
14
            NULL, HFILL}
13880
14
        },
13881
14
        {&hf_btatt_body_composition_feature_basal_metabolism,
13882
14
            {"Basal Metabolism", "btatt.body_composition_feature.basal_metabolism",
13883
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
13884
14
            NULL, HFILL}
13885
14
        },
13886
14
        {&hf_btatt_body_composition_feature_multiple_users,
13887
14
            {"Multiple Users", "btatt.body_composition_feature.multiple_users",
13888
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
13889
14
            NULL, HFILL}
13890
14
        },
13891
14
        {&hf_btatt_body_composition_feature_timestamp,
13892
14
            {"Timestamp", "btatt.body_composition_feature.timestamp",
13893
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
13894
14
            NULL, HFILL}
13895
14
        },
13896
14
        {&hf_btatt_weight_scale_feature,
13897
14
            {"Weight Scale Feature", "btatt.weight_scale_feature",
13898
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
13899
14
            NULL, HFILL}
13900
14
        },
13901
14
        {&hf_btatt_weight_scale_feature_reserved,
13902
14
            {"Reserved", "btatt.weight_scale_feature.reserved",
13903
14
            FT_UINT32, BASE_HEX, NULL, 0xFFFFFC00,
13904
14
            NULL, HFILL}
13905
14
        },
13906
14
        {&hf_btatt_weight_scale_feature_height_measurement_resolution,
13907
14
            {"Height Measurement Resolution", "btatt.weight_scale_feature.height_measurement_resolution",
13908
14
            FT_UINT32, BASE_HEX, VALS(weight_scale_feature_height_measurement_resolution_vals), 0x00000380,
13909
14
            NULL, HFILL}
13910
14
        },
13911
14
        {&hf_btatt_weight_scale_feature_weight_measurement_resolution,
13912
14
            {"Mass Measurement Resolution", "btatt.weight_scale_feature.weight_measurement_resolution",
13913
14
            FT_UINT32, BASE_HEX, VALS(weight_scale_feature_weight_measurement_resolution_vals), 0x00000078,
13914
14
            NULL, HFILL}
13915
14
        },
13916
14
        {&hf_btatt_weight_scale_feature_bmi,
13917
14
            {"BMI", "btatt.weight_scale_feature.bmi",
13918
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
13919
14
            NULL, HFILL}
13920
14
        },
13921
14
        {&hf_btatt_weight_scale_feature_multiple_users,
13922
14
            {"Multiple Users", "btatt.weight_scale_feature.multiple_users",
13923
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
13924
14
            NULL, HFILL}
13925
14
        },
13926
14
        {&hf_btatt_weight_scale_feature_timestamp,
13927
14
            {"Timestamp", "btatt.weight_scale_feature.timestamp",
13928
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
13929
14
            NULL, HFILL}
13930
14
        },
13931
14
        {&hf_btatt_glucose_measurement_flags,
13932
14
            {"Flags", "btatt.glucose_measurement.flags",
13933
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
13934
14
            NULL, HFILL}
13935
14
        },
13936
14
        {&hf_btatt_glucose_measurement_flags_reserved,
13937
14
            {"Reserved", "btatt.glucose_measurement.flags.reserved",
13938
14
            FT_UINT8, BASE_HEX, NULL, 0xE0,
13939
14
            NULL, HFILL}
13940
14
        },
13941
14
        {&hf_btatt_glucose_measurement_flags_context_information_follows,
13942
14
            {"Context Information Follows", "btatt.glucose_measurement.flags.context_information_follows",
13943
14
            FT_BOOLEAN, 8, NULL, 0x10,
13944
14
            NULL, HFILL}
13945
14
        },
13946
14
        {&hf_btatt_glucose_measurement_flags_sensor_status_annunciation_present,
13947
14
            {"Sensor Status Annunciation Present", "btatt.glucose_measurement.flags.sensor_status_annunciation_present",
13948
14
            FT_BOOLEAN, 8, NULL, 0x08,
13949
14
            NULL, HFILL}
13950
14
        },
13951
14
        {&hf_btatt_glucose_measurement_flags_glucose_concentration_units,
13952
14
            {"Glucose Concentration Units", "btatt.glucose_measurement.flags.glucose_concentration_units",
13953
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_flags_glucose_concentration_units_vals), 0x04,
13954
14
            NULL, HFILL}
13955
14
        },
13956
14
        {&hf_btatt_glucose_measurement_flags_glucose_concentration_type_and_sample_location_present,
13957
14
            {"Glucose Concentration, Type and Sample Location Present", "btatt.glucose_measurement.flags.glucose_concentration_type_and_sample_location_present",
13958
14
            FT_BOOLEAN, 8, NULL, 0x02,
13959
14
            NULL, HFILL}
13960
14
        },
13961
14
        {&hf_btatt_glucose_measurement_flags_time_offset_present,
13962
14
            {"Time Offset Present", "btatt.glucose_measurement.flags.time_offset_present",
13963
14
            FT_BOOLEAN, 8, NULL, 0x01,
13964
14
            NULL, HFILL}
13965
14
        },
13966
14
        {&hf_btatt_glucose_measurement_sequence_number,
13967
14
            {"Sequence Number", "btatt.glucose_measurement.sequence_number",
13968
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
13969
14
            NULL, HFILL}
13970
14
        },
13971
14
        {&hf_btatt_glucose_measurement_base_time,
13972
14
            {"Base Time", "btatt.glucose_measurement.base_time",
13973
14
            FT_NONE, BASE_NONE, NULL, 0x0,
13974
14
            NULL, HFILL}
13975
14
        },
13976
14
        {&hf_btatt_glucose_measurement_time_offset,
13977
14
            {"Time Offset", "btatt.glucose_measurement.time_offset",
13978
14
            FT_INT16, BASE_DEC, NULL, 0x0,
13979
14
            NULL, HFILL}
13980
14
        },
13981
14
        {&hf_btatt_glucose_measurement_glucose_concentration_kg_per_l,
13982
14
            {"Glucose Concentration [kg/l]", "btatt.glucose_measurement.glucose_concentration.kg_per_l",
13983
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
13984
14
            NULL, HFILL}
13985
14
        },
13986
14
        {&hf_btatt_glucose_measurement_glucose_concentration_mol_per_l,
13987
14
            {"Glucose Concentration [mol/l]", "btatt.glucose_measurement.glucose_concentration.mol_per_l",
13988
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
13989
14
            NULL, HFILL}
13990
14
        },
13991
14
        {&hf_btatt_glucose_measurement_type_and_sample_location,
13992
14
            {"Type and Sample Location", "btatt.glucose_measurement.type_and_sample_location",
13993
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
13994
14
            NULL, HFILL}
13995
14
        },
13996
14
        {&hf_btatt_glucose_measurement_type_and_sample_location_type,
13997
14
            {"Type", "btatt.glucose_measurement.type_and_sample_location.type",
13998
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_type_and_sample_location_type_vals), 0x0F,
13999
14
            NULL, HFILL}
14000
14
        },
14001
14
        {&hf_btatt_glucose_measurement_type_and_sample_location_sample_location,
14002
14
            {"Sample Location", "btatt.glucose_measurement.type_and_sample_location.sample_location",
14003
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_type_and_sample_location_sample_location_vals), 0xF0,
14004
14
            NULL, HFILL}
14005
14
        },
14006
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation,
14007
14
            {"Sensor Status Annunciation", "btatt.glucose_measurement.sensor_status_annunciation",
14008
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
14009
14
            NULL, HFILL}
14010
14
        },
14011
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_reserved,
14012
14
            {"Reserved", "btatt.glucose_measurement.sensor_status_annunciation.reserved",
14013
14
            FT_UINT16, BASE_HEX, NULL, 0xF000,
14014
14
            NULL, HFILL}
14015
14
        },
14016
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_time_fault,
14017
14
            {"Time fault has occurred in the sensor and time may be inaccurate", "btatt.glucose_measurement.sensor_status_annunciation.time_fault",
14018
14
            FT_BOOLEAN, 16, NULL, 0x0800,
14019
14
            NULL, HFILL}
14020
14
        },
14021
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_general_fault,
14022
14
            {"General device fault has occurred in the sensor", "btatt.glucose_measurement.sensor_status_annunciation.general_fault",
14023
14
            FT_BOOLEAN, 16, NULL, 0x0400,
14024
14
            NULL, HFILL}
14025
14
        },
14026
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_read_interrupted,
14027
14
            {"Sensor read interrupted because strip was pulled too soon at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.read_interrupted",
14028
14
            FT_BOOLEAN, 16, NULL, 0x0200,
14029
14
            NULL, HFILL}
14030
14
        },
14031
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_low,
14032
14
            {"Sensor temperature too low for valid test/result at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.temperature_too_low",
14033
14
            FT_BOOLEAN, 16, NULL, 0x0100,
14034
14
            NULL, HFILL}
14035
14
        },
14036
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_temperature_too_high,
14037
14
            {"Sensor temperature too high for valid test/result at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.temperature_too_high",
14038
14
            FT_BOOLEAN, 16, NULL, 0x0080,
14039
14
            NULL, HFILL}
14040
14
        },
14041
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_low,
14042
14
            {"Sensor result lower than the device can process", "btatt.glucose_measurement.sensor_status_annunciation.result_too_low",
14043
14
            FT_BOOLEAN, 16, NULL, 0x0040,
14044
14
            NULL, HFILL}
14045
14
        },
14046
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_result_too_high,
14047
14
            {"Sensor result higher than the device can process", "btatt.glucose_measurement.sensor_status_annunciation.result_too_high",
14048
14
            FT_BOOLEAN, 16, NULL, 0x0020,
14049
14
            NULL, HFILL}
14050
14
        },
14051
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_strip_type_incorrect,
14052
14
            {"Strip type incorrect for device", "btatt.glucose_measurement.sensor_status_annunciation.strip_type_incorrect",
14053
14
            FT_BOOLEAN, 16, NULL, 0x0010,
14054
14
            NULL, HFILL}
14055
14
        },
14056
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_strip_insertion_error,
14057
14
            {"Strip insertion error", "btatt.glucose_measurement.sensor_status_annunciation.strip_insertion_error",
14058
14
            FT_BOOLEAN, 16, NULL, 0x0008,
14059
14
            NULL, HFILL}
14060
14
        },
14061
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_size_insufficient,
14062
14
            {"Sample size for blood or control solution insufficient at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.size_insufficient",
14063
14
            FT_BOOLEAN, 16, NULL, 0x0004,
14064
14
            NULL, HFILL}
14065
14
        },
14066
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_fault,
14067
14
            {"Sensor malfunction or faulting at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.fault",
14068
14
            FT_BOOLEAN, 16, NULL, 0x0002,
14069
14
            NULL, HFILL}
14070
14
        },
14071
14
        {&hf_btatt_glucose_measurement_sensor_status_annunciation_battery_low,
14072
14
            {"Device battery low at time of measurement", "btatt.glucose_measurement.sensor_status_annunciation.battery_low",
14073
14
            FT_BOOLEAN, 16, NULL, 0x0001,
14074
14
            NULL, HFILL}
14075
14
        },
14076
14
        {&hf_btatt_bond_management_feature,
14077
14
            {"Bond Management Feature", "btatt.bond_management_feature",
14078
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
14079
14
            NULL, HFILL}
14080
14
        },
14081
14
        {&hf_btatt_bond_management_feature_feature_extension,
14082
14
            {"Feature Extension", "btatt.bond_management_feature.feature_extension",
14083
14
            FT_BOOLEAN, 24, NULL, 0x800000,
14084
14
            NULL, HFILL}
14085
14
        },
14086
14
        {&hf_btatt_bond_management_feature_reserved,
14087
14
            {"Reserved", "btatt.bond_management_feature.reserved",
14088
14
            FT_UINT24, BASE_HEX, NULL, 0x780000,
14089
14
            NULL, HFILL}
14090
14
        },
14091
14
        {&hf_btatt_bond_management_feature_identify_yourself,
14092
14
            {"Identify Yourself", "btatt.bond_management_feature.identify_yourself",
14093
14
            FT_BOOLEAN, 24, NULL, 0x040000,
14094
14
            NULL, HFILL}
14095
14
        },
14096
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_9,
14097
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.9",
14098
14
            FT_BOOLEAN, 24, NULL, 0x020000,
14099
14
            NULL, HFILL}
14100
14
        },
14101
14
        {&hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_le_transport_only_server,
14102
14
            {"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",
14103
14
            FT_BOOLEAN, 24, NULL, 0x010000,
14104
14
            NULL, HFILL}
14105
14
        },
14106
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_8,
14107
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.8",
14108
14
            FT_BOOLEAN, 24, NULL, 0x008000,
14109
14
            NULL, HFILL}
14110
14
        },
14111
14
        {&hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_transport_only_server,
14112
14
            {"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",
14113
14
            FT_BOOLEAN, 24, NULL, 0x004000,
14114
14
            NULL, HFILL}
14115
14
        },
14116
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_7,
14117
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.7",
14118
14
            FT_BOOLEAN, 24, NULL, 0x002000,
14119
14
            NULL, HFILL}
14120
14
        },
14121
14
        {&hf_btatt_bond_management_feature_remove_all_but_the_active_bond_on_br_edr_and_le_server,
14122
14
            {"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",
14123
14
            FT_BOOLEAN, 24, NULL, 0x001000,
14124
14
            NULL, HFILL}
14125
14
        },
14126
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_6,
14127
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.6",
14128
14
            FT_BOOLEAN, 24, NULL, 0x000800,
14129
14
            NULL, HFILL}
14130
14
        },
14131
14
        {&hf_btatt_bond_management_feature_remove_all_bonds_on_le_transport_only_server,
14132
14
            {"Remove all bonds on server (LE transport only)", "btatt.bond_management_feature.remove_all_bonds_on_le_transport_only_server",
14133
14
            FT_BOOLEAN, 24, NULL, 0x000400,
14134
14
            NULL, HFILL}
14135
14
        },
14136
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_5,
14137
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.5",
14138
14
            FT_BOOLEAN, 24, NULL, 0x000200,
14139
14
            NULL, HFILL}
14140
14
        },
14141
14
        {&hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_transport_only_server,
14142
14
            {"Remove all bonds on server (BR/EDR transport only)", "btatt.bond_management_feature.remove_all_bonds_on_br_edr_transport_only_server",
14143
14
            FT_BOOLEAN, 24, NULL, 0x000100,
14144
14
            NULL, HFILL}
14145
14
        },
14146
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_4,
14147
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.4",
14148
14
            FT_BOOLEAN, 24, NULL, 0x000080,
14149
14
            NULL, HFILL}
14150
14
        },
14151
14
        {&hf_btatt_bond_management_feature_remove_all_bonds_on_br_edr_and_le_server,
14152
14
            {"Remove all bonds on server (BR/EDR and LE)", "btatt.bond_management_feature.remove_all_bonds_on_br_edr_and_le_server",
14153
14
            FT_BOOLEAN, 24, NULL, 0x000040,
14154
14
            NULL, HFILL}
14155
14
        },
14156
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_3,
14157
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.3",
14158
14
            FT_BOOLEAN, 24, NULL, 0x000020,
14159
14
            NULL, HFILL}
14160
14
        },
14161
14
        {&hf_btatt_bond_management_feature_delete_bond_of_current_le_transport_only_connection,
14162
14
            {"Delete bond of current connection (LE transport only)", "btatt.bond_management_feature.delete_bond_of_current_le_transport_only_connection",
14163
14
            FT_BOOLEAN, 24, NULL, 0x000010,
14164
14
            NULL, HFILL}
14165
14
        },
14166
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_2,
14167
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.2",
14168
14
            FT_BOOLEAN, 24, NULL, 0x000008,
14169
14
            NULL, HFILL}
14170
14
        },
14171
14
        {&hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_transport_only_connection,
14172
14
            {"Delete bond of current connection (BR/EDR transport only)", "btatt.bond_management_feature.delete_bond_of_current_br_edr_transport_only_connection",
14173
14
            FT_BOOLEAN, 24, NULL, 0x000004,
14174
14
            NULL, HFILL}
14175
14
        },
14176
14
        {&hf_btatt_bond_management_feature_authorization_code_required_for_feature_above_1,
14177
14
            {"Authorization Code Required for Feature Above", "btatt.bond_management_feature.authorization_code_required_for_feature_above.1",
14178
14
            FT_BOOLEAN, 24, NULL, 0x000002,
14179
14
            NULL, HFILL}
14180
14
        },
14181
14
        {&hf_btatt_bond_management_feature_delete_bond_of_current_br_edr_and_le_connection,
14182
14
            {"Delete Bond of current connection (BR/EDR and LE)", "btatt.bond_management_feature.delete_bond_of_current_br_edr_and_le_connection",
14183
14
            FT_BOOLEAN, 24, NULL, 0x000001,
14184
14
            NULL, HFILL}
14185
14
        },
14186
14
        {&hf_btatt_bond_management_feature_nth,
14187
14
            {"Extended Features", "btatt.bond_management_feature.nth",
14188
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14189
14
            NULL, HFILL}
14190
14
        },
14191
14
        {&hf_btatt_bond_management_feature_nth_feature_extension,
14192
14
            {"Feature Extension", "btatt.bond_management_feature.nth.feature_extension",
14193
14
            FT_BOOLEAN, 8, NULL, 0x80,
14194
14
            NULL, HFILL}
14195
14
        },
14196
14
        {&hf_btatt_bond_management_feature_nth_reserved,
14197
14
            {"Reserved", "btatt.bond_management_feature.nth.reserved",
14198
14
            FT_UINT8, BASE_HEX, NULL, 0x7F,
14199
14
            NULL, HFILL}
14200
14
        },
14201
14
        {&hf_btatt_bond_management_control_point_opcode,
14202
14
            {"Opcode", "btatt.bond_management_control_point.opcode",
14203
14
            FT_UINT8, BASE_HEX, VALS(bond_management_control_point_opcode_vals), 0x0,
14204
14
            NULL, HFILL}
14205
14
        },
14206
14
        {&hf_btatt_bond_management_control_point_authorization_code,
14207
14
            {"Authorization Code", "btatt.bond_management_control_point.authorization_code",
14208
14
            FT_STRING, BASE_NONE, NULL, 0x0,
14209
14
            NULL, HFILL}
14210
14
        },
14211
14
        {&hf_btatt_temperature_measurement_flags,
14212
14
            {"Sensor Status Annunciation", "btatt.temperature_measurement.flags",
14213
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14214
14
            NULL, HFILL}
14215
14
        },
14216
14
        {&hf_btatt_temperature_measurement_flags_reserved,
14217
14
            {"Reserved", "btatt.temperature_measurement.flags.reserved",
14218
14
            FT_UINT8, BASE_HEX, NULL, 0xF8,
14219
14
            NULL, HFILL}
14220
14
        },
14221
14
        {&hf_btatt_temperature_measurement_flags_temperature_type,
14222
14
            {"Temperature Type", "btatt.temperature_measurement.flags.temperature_type",
14223
14
            FT_BOOLEAN, 8, NULL, 0x04,
14224
14
            NULL, HFILL}
14225
14
        },
14226
14
        {&hf_btatt_temperature_measurement_flags_timestamp,
14227
14
            {"Timestamp", "btatt.temperature_measurement.flags.timestamp",
14228
14
            FT_BOOLEAN, 8, NULL, 0x02,
14229
14
            NULL, HFILL}
14230
14
        },
14231
14
        {&hf_btatt_temperature_measurement_flags_temperature_unit,
14232
14
            {"Temperature Unit", "btatt.temperature_measurement.flags.temperature_unit",
14233
14
            FT_UINT8, BASE_HEX, VALS(temperature_measurement_flags_temperature_unit_vals), 0x01,
14234
14
            NULL, HFILL}
14235
14
        },
14236
14
        {&hf_btatt_temperature_measurement_value_celsius,
14237
14
            {"Value [Celsius]", "btatt.temperature_measurement.value.celsius",
14238
14
            FT_IEEE_11073_FLOAT, BASE_NONE, NULL, 0x00,
14239
14
            NULL, HFILL}
14240
14
        },
14241
14
        {&hf_btatt_temperature_measurement_value_fahrenheit,
14242
14
            {"Value [Fahrenheit]", "btatt.temperature_measurement.value.fahrenheit",
14243
14
            FT_IEEE_11073_FLOAT, BASE_NONE, NULL, 0x00,
14244
14
            NULL, HFILL}
14245
14
        },
14246
14
        {&hf_btatt_temperature_measurement_timestamp,
14247
14
            {"Timestamp", "btatt.temperature_measurement.timestamp",
14248
14
            FT_NONE, BASE_NONE, NULL, 0x0,
14249
14
            NULL, HFILL}
14250
14
        },
14251
14
        {&hf_btatt_glucose_measurement_context_flags,
14252
14
            {"Glucose Measurement Context", "btatt.glucose_measurement_context.flags",
14253
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14254
14
            NULL, HFILL}
14255
14
        },
14256
14
        {&hf_btatt_glucose_measurement_context_flags_extended_flags,
14257
14
            {"Extended Flags", "btatt.glucose_measurement_context.flags.extended_flags",
14258
14
            FT_BOOLEAN, 8, NULL, 0x80,
14259
14
            NULL, HFILL}
14260
14
        },
14261
14
        {&hf_btatt_glucose_measurement_context_flags_hba1c,
14262
14
            {"HbA1c", "btatt.glucose_measurement_context.flags.hba1c",
14263
14
            FT_BOOLEAN, 8, NULL, 0x40,
14264
14
            NULL, HFILL}
14265
14
        },
14266
14
        {&hf_btatt_glucose_measurement_context_flags_medication_value_units,
14267
14
            {"Medication Value Units", "btatt.glucose_measurement_context.flags.medication_value_units",
14268
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_flags_medication_value_units_vals), 0x20,
14269
14
            NULL, HFILL}
14270
14
        },
14271
14
        {&hf_btatt_glucose_measurement_context_flags_medication_id_and_medication,
14272
14
            {"Medication ID And Medication", "btatt.glucose_measurement_context.flags.medication_id_and_medication",
14273
14
            FT_BOOLEAN, 8, NULL, 0x10,
14274
14
            NULL, HFILL}
14275
14
        },
14276
14
        {&hf_btatt_glucose_measurement_context_flags_exercise_duration_and_exercise_intensity,
14277
14
            {"Exercise Duration And Exercise Intensity", "btatt.glucose_measurement_context.flags.exercise_duration_and_exercise_intensity",
14278
14
            FT_BOOLEAN, 8, NULL, 0x08,
14279
14
            NULL, HFILL}
14280
14
        },
14281
14
        {&hf_btatt_glucose_measurement_context_flags_tester_health,
14282
14
            {"Tester Health", "btatt.glucose_measurement_context.flags.tester_health",
14283
14
            FT_BOOLEAN, 8, NULL, 0x04,
14284
14
            NULL, HFILL}
14285
14
        },
14286
14
        {&hf_btatt_glucose_measurement_context_flags_meal,
14287
14
            {"Meal", "btatt.glucose_measurement_context.flags.meal",
14288
14
            FT_BOOLEAN, 8, NULL, 0x02,
14289
14
            NULL, HFILL}
14290
14
        },
14291
14
        {&hf_btatt_glucose_measurement_context_flags_carbohydrate_id_and_carbohydrate,
14292
14
            {"Carbohydrate ID And Carbohydrate", "btatt.glucose_measurement_context.flags.carbohydrate_id_and_carbohydrate",
14293
14
            FT_BOOLEAN, 8, NULL, 0x01,
14294
14
            NULL, HFILL}
14295
14
        },
14296
14
        {&hf_btatt_glucose_measurement_context_sequence_number,
14297
14
            {"Sequence Number", "btatt.glucose_measurement_context.sequence_number",
14298
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14299
14
            NULL, HFILL}
14300
14
        },
14301
14
        {&hf_btatt_glucose_measurement_context_extended_flags,
14302
14
            {"Extended Flags", "btatt.glucose_measurement_context.extended_flags",
14303
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14304
14
            NULL, HFILL}
14305
14
        },
14306
14
        {&hf_btatt_glucose_measurement_context_extended_flags_reserved,
14307
14
            {"Reserved", "btatt.glucose_measurement_context.extended_flags.reserved",
14308
14
            FT_UINT8, BASE_HEX, NULL, 0xFF,
14309
14
            NULL, HFILL}
14310
14
        },
14311
14
        {&hf_btatt_glucose_measurement_context_carbohydrate_id,
14312
14
            {"Carbohydrate ID", "btatt.glucose_measurement_context.carbohydrate_id",
14313
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_carbohydrate_id_vals), 0x0,
14314
14
            NULL, HFILL}
14315
14
        },
14316
14
        {&hf_btatt_glucose_measurement_context_carbohydrate_kg,
14317
14
            {"Carbohydrate [kg]", "btatt.glucose_measurement_context.carbohydrate.kg",
14318
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14319
14
            NULL, HFILL}
14320
14
        },
14321
14
        {&hf_btatt_glucose_measurement_context_meal,
14322
14
            {"Meal", "btatt.glucose_measurement_context.meal",
14323
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_meal_vals), 0x0,
14324
14
            NULL, HFILL}
14325
14
        },
14326
14
        {&hf_btatt_glucose_measurement_context_tester_health,
14327
14
            {"Tester and Health", "btatt.glucose_measurement_context.tester_and_health",
14328
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14329
14
            NULL, HFILL}
14330
14
        },
14331
14
        {&hf_btatt_glucose_measurement_context_tester,
14332
14
            {"Tester", "btatt.glucose_measurement_context.tester_and_health.tester",
14333
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_tester_vals), 0xF0,
14334
14
            NULL, HFILL}
14335
14
        },
14336
14
        {&hf_btatt_glucose_measurement_context_health,
14337
14
            {"Health", "btatt.glucose_measurement_context.tester_and_health.health",
14338
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_health_vals), 0x0F,
14339
14
            NULL, HFILL}
14340
14
        },
14341
14
        {&hf_btatt_glucose_measurement_context_exercise_duration,
14342
14
            {"Exercise Duration", "btatt.glucose_measurement_context.exercise_duration",
14343
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14344
14
            NULL, HFILL}
14345
14
        },
14346
14
        {&hf_btatt_glucose_measurement_context_exercise_intensity,
14347
14
            {"Exercise Intensity", "btatt.glucose_measurement_context.exercise_intensity",
14348
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
14349
14
            NULL, HFILL}
14350
14
        },
14351
14
        {&hf_btatt_glucose_measurement_context_medication_id,
14352
14
            {"Medication ID", "btatt.glucose_measurement_context.medication_id",
14353
14
            FT_UINT8, BASE_HEX, VALS(glucose_measurement_context_medication_id_vals), 0x0,
14354
14
            NULL, HFILL}
14355
14
        },
14356
14
        {&hf_btatt_glucose_measurement_context_medication_l,
14357
14
            {"Medication [l]", "btatt.glucose_measurement_context.medication.l",
14358
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14359
14
            NULL, HFILL}
14360
14
        },
14361
14
        {&hf_btatt_glucose_measurement_context_medication_kg,
14362
14
            {"Medication [kg]", "btatt.glucose_measurement_context.medication.kg",
14363
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14364
14
            NULL, HFILL}
14365
14
        },
14366
14
        {&hf_btatt_glucose_measurement_context_hba1c,
14367
14
            {"HbA1c", "btatt.glucose_measurement_context.hba1c",
14368
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14369
14
            NULL, HFILL}
14370
14
        },
14371
14
        {&hf_btatt_blood_pressure_measurement_flags,
14372
14
            {"Flags", "btatt.blood_pressure_measurement.flags",
14373
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14374
14
            NULL, HFILL}
14375
14
        },
14376
14
        {&hf_btatt_blood_pressure_measurement_flags_reserved,
14377
14
            {"Reserved", "btatt.blood_pressure_measurement.flags.reserved",
14378
14
            FT_UINT8, BASE_HEX, NULL, 0xE0,
14379
14
            NULL, HFILL}
14380
14
        },
14381
14
        {&hf_btatt_blood_pressure_measurement_flags_measurement_status,
14382
14
            {"Measurement Status", "btatt.blood_pressure_measurement.flags.measurement_status",
14383
14
            FT_BOOLEAN, 8, NULL, 0x10,
14384
14
            NULL, HFILL}
14385
14
        },
14386
14
        {&hf_btatt_blood_pressure_measurement_flags_user_id,
14387
14
            {"User ID", "btatt.blood_pressure_measurement.flags.user_id",
14388
14
            FT_BOOLEAN, 8, NULL, 0x08,
14389
14
            NULL, HFILL}
14390
14
        },
14391
14
        {&hf_btatt_blood_pressure_measurement_flags_pulse_rate,
14392
14
            {"Pulse Rate", "btatt.blood_pressure_measurement.flags.pulse_rate",
14393
14
            FT_BOOLEAN, 8, NULL, 0x04,
14394
14
            NULL, HFILL}
14395
14
        },
14396
14
        {&hf_btatt_blood_pressure_measurement_flags_timestamp,
14397
14
            {"Timestamp", "btatt.blood_pressure_measurement.flags.timestamp",
14398
14
            FT_BOOLEAN, 8, NULL, 0x02,
14399
14
            NULL, HFILL}
14400
14
        },
14401
14
        {&hf_btatt_blood_pressure_measurement_flags_unit,
14402
14
            {"Unit", "btatt.blood_pressure_measurement.flags.unit",
14403
14
            FT_UINT8, BASE_HEX, VALS(blood_pressure_measurement_unit_vals), 0x01,
14404
14
            NULL, HFILL}
14405
14
        },
14406
14
        {&hf_btatt_blood_pressure_measurement_compound_value_systolic_kpa,
14407
14
            {"Systolic [kPa]", "btatt.blood_pressure_measurement.compound_value.systolic.kpa",
14408
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14409
14
            NULL, HFILL}
14410
14
        },
14411
14
        {&hf_btatt_blood_pressure_measurement_compound_value_diastolic_kpa,
14412
14
            {"Diastolic [kPa]", "btatt.blood_pressure_measurement.compound_value.diastolic.kpa",
14413
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14414
14
            NULL, HFILL}
14415
14
        },
14416
14
        {&hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_kpa,
14417
14
            {"Arterial Pressure [kPa]", "btatt.blood_pressure_measurement.compound_value.arterial_pressure.kpa",
14418
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14419
14
            NULL, HFILL}
14420
14
        },
14421
14
        {&hf_btatt_blood_pressure_measurement_compound_value_systolic_mmhg,
14422
14
            {"Systolic [mmHg]", "btatt.blood_pressure_measurement.compound_value.systolic.mmhg",
14423
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14424
14
            NULL, HFILL}
14425
14
        },
14426
14
        {&hf_btatt_blood_pressure_measurement_compound_value_diastolic_mmhg,
14427
14
            {"Diastolic [mmHg]", "btatt.blood_pressure_measurement.compound_value.diastolic.mmhg",
14428
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14429
14
            NULL, HFILL}
14430
14
        },
14431
14
        {&hf_btatt_blood_pressure_measurement_compound_value_mean_arterial_pressure_mmhg,
14432
14
            {"Arterial Pressure [mmHg]", "btatt.blood_pressure_measurement.compound_value.arterial_pressure.mmhg",
14433
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14434
14
            NULL, HFILL}
14435
14
        },
14436
14
        {&hf_btatt_blood_pressure_measurement_timestamp,
14437
14
            {"Timestamp", "btatt.blood_pressure_measurement.compound_value.timestamp",
14438
14
            FT_NONE, BASE_NONE, NULL, 0x0,
14439
14
            NULL, HFILL}
14440
14
        },
14441
14
        {&hf_btatt_blood_pressure_measurement_pulse_rate,
14442
14
            {"Pulse Rate", "btatt.blood_pressure_measurement.pulse_rate",
14443
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
14444
14
            NULL, HFILL}
14445
14
        },
14446
14
        {&hf_btatt_blood_pressure_measurement_user_id,
14447
14
            {"User ID", "btatt.blood_pressure_measurement.user_id",
14448
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14449
14
            NULL, HFILL}
14450
14
        },
14451
14
        {&hf_btatt_blood_pressure_measurement_status,
14452
14
            {"Measurement Status", "btatt.blood_pressure_measurement.status",
14453
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
14454
14
            NULL, HFILL}
14455
14
        },
14456
14
        {&hf_btatt_blood_pressure_measurement_status_reserved,
14457
14
            {"Reserved", "btatt.blood_pressure_measurement.status.reserved",
14458
14
            FT_UINT16, BASE_HEX, NULL, 0xFFC0,
14459
14
            NULL, HFILL}
14460
14
        },
14461
14
        {&hf_btatt_blood_pressure_measurement_status_improper_measurement_position,
14462
14
            {"Improper Measurement Position", "btatt.blood_pressure_measurement.status.improper_measurement_position",
14463
14
            FT_BOOLEAN, 16, NULL, 0x0020,
14464
14
            NULL, HFILL}
14465
14
        },
14466
14
        {&hf_btatt_blood_pressure_measurement_status_pulse_rate_range_detection,
14467
14
            {"Pulse_Rate Range Detection", "btatt.blood_pressure_measurement.status.pulse_rate_range_detection",
14468
14
            FT_UINT16, BASE_HEX, VALS(blood_pressure_measurement_status_pulse_rate_range_detection_vals), 0x0018,
14469
14
            NULL, HFILL}
14470
14
        },
14471
14
        {&hf_btatt_blood_pressure_measurement_status_irregular_pulse,
14472
14
            {"Irregular Pulse", "btatt.blood_pressure_measurement.status.irregular_pulse",
14473
14
            FT_BOOLEAN, 16, NULL, 0x0004,
14474
14
            NULL, HFILL}
14475
14
        },
14476
14
        {&hf_btatt_blood_pressure_measurement_status_cuff_fit_too_loose,
14477
14
            {"Cuff Fit too Loose", "btatt.blood_pressure_measurement.status.cuff_fit_too_loose",
14478
14
            FT_BOOLEAN, 16, NULL, 0x0002,
14479
14
            NULL, HFILL}
14480
14
        },
14481
14
        {&hf_btatt_blood_pressure_measurement_status_body_movement,
14482
14
            {"Body Movement", "btatt.blood_pressure_measurement.status.body_movement",
14483
14
            FT_BOOLEAN, 16, NULL, 0x0001,
14484
14
            NULL, HFILL}
14485
14
        },
14486
14
        {&hf_btatt_heart_rate_measurement_flags,
14487
14
            {"Flags", "btatt.heart_rate_measurement.flags",
14488
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14489
14
            NULL, HFILL}
14490
14
        },
14491
14
        {&hf_btatt_heart_rate_measurement_flags_reserved,
14492
14
            {"Reserved", "btatt.heart_rate_measurement.flags.reserved",
14493
14
            FT_UINT8, BASE_HEX, NULL, 0xE0,
14494
14
            NULL, HFILL}
14495
14
        },
14496
14
        {&hf_btatt_heart_rate_measurement_flags_rr_interval,
14497
14
            {"RR Interval", "btatt.heart_rate_measurement.flags.rr_interval",
14498
14
            FT_BOOLEAN, 8, NULL, 0x10,
14499
14
            NULL, HFILL}
14500
14
        },
14501
14
        {&hf_btatt_heart_rate_measurement_flags_energy_expended,
14502
14
            {"Energy Expended", "btatt.heart_rate_measurement.flags.energy_expended",
14503
14
            FT_BOOLEAN, 8, NULL, 0x08,
14504
14
            NULL, HFILL}
14505
14
        },
14506
14
        {&hf_btatt_heart_rate_measurement_flags_sensor_contact_status_support,
14507
14
            {"Sensor Support", "btatt.heart_rate_measurement.flags.sensor_contact_status.support",
14508
14
            FT_BOOLEAN, 8, NULL, 0x04,
14509
14
            NULL, HFILL}
14510
14
        },
14511
14
        {&hf_btatt_heart_rate_measurement_flags_sensor_contact_status_contact,
14512
14
            {"Sensor Contact", "btatt.heart_rate_measurement.flags.sensor_contact_status.contact",
14513
14
            FT_BOOLEAN, 8, NULL, 0x02,
14514
14
            NULL, HFILL}
14515
14
        },
14516
14
        {&hf_btatt_heart_rate_measurement_flags_value_16,
14517
14
            {"Value is UINT16", "btatt.heart_rate_measurement.flags.value_16",
14518
14
            FT_BOOLEAN, 8, NULL, 0x01,
14519
14
            NULL, HFILL}
14520
14
        },
14521
14
        {&hf_btatt_heart_rate_measurement_value_8,
14522
14
            {"Value", "btatt.heart_rate_measurement.value.8",
14523
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
14524
14
            NULL, HFILL}
14525
14
        },
14526
14
        {&hf_btatt_heart_rate_measurement_value_16,
14527
14
            {"Value", "btatt.heart_rate_measurement.value.16",
14528
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14529
14
            NULL, HFILL}
14530
14
        },
14531
14
        {&hf_btatt_heart_rate_measurement_energy_expended,
14532
14
            {"Energy Expended", "btatt.heart_rate_measurement.energy_expended",
14533
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14534
14
            NULL, HFILL}
14535
14
        },
14536
14
        {&hf_btatt_heart_rate_measurement_rr_intervals,
14537
14
            {"RR Intervals", "btatt.heart_rate_measurement.rr_intervals",
14538
14
            FT_NONE, BASE_NONE, NULL, 0x0,
14539
14
            NULL, HFILL}
14540
14
        },
14541
14
        {&hf_btatt_heart_rate_measurement_rr_interval,
14542
14
            {"RR Interval", "btatt.heart_rate_measurement.rr_interval",
14543
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14544
14
            NULL, HFILL}
14545
14
        },
14546
14
        {&hf_btatt_record_access_control_point_opcode,
14547
14
            {"Opcode", "btatt.record_access_control_point.opcode",
14548
14
            FT_UINT8, BASE_DEC, VALS(record_access_control_point_opcode_vals), 0x0,
14549
14
            NULL, HFILL}
14550
14
        },
14551
14
        {&hf_btatt_record_access_control_point_operator,
14552
14
            {"Operator", "btatt.record_access_control_point.operator",
14553
14
            FT_UINT8, BASE_DEC, VALS(record_access_control_point_operator_vals), 0x0,
14554
14
            NULL, HFILL}
14555
14
        },
14556
14
        {&hf_btatt_record_access_control_point_operand,
14557
14
            {"Operand", "btatt.record_access_control_point.operand",
14558
14
            FT_NONE, BASE_NONE, NULL, 0x0,
14559
14
            NULL, HFILL}
14560
14
        },
14561
14
        {&hf_btatt_record_access_control_point_operand_filter_type,
14562
14
            {"Filter Type", "btatt.record_access_control_point.operand.filter_type",
14563
14
            FT_UINT8, BASE_DEC, VALS(record_access_control_point_operand_filter_type_vals), 0x0,
14564
14
            NULL, HFILL}
14565
14
        },
14566
14
        {&hf_btatt_record_access_control_point_operand_min_time_offset,
14567
14
            {"Min Time Offset", "btatt.record_access_control_point_operand.min_time_offset",
14568
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14569
14
            NULL, HFILL}
14570
14
        },
14571
14
        {&hf_btatt_record_access_control_point_operand_max_time_offset,
14572
14
            {"Max Time Offset", "btatt.record_access_control_point_operand.max_time_offset",
14573
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14574
14
            NULL, HFILL}
14575
14
        },
14576
14
        {&hf_btatt_record_access_control_point_operand_number_of_records,
14577
14
            {"Number of Records", "btatt.record_access_control_point_operand.number_of_records",
14578
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14579
14
            NULL, HFILL}
14580
14
        },
14581
14
        {&hf_btatt_record_access_control_point_request_opcode,
14582
14
            {"Request Opcode", "btatt.record_access_control_point.request_opcode",
14583
14
            FT_UINT8, BASE_DEC, VALS(record_access_control_point_opcode_vals), 0x0,
14584
14
            NULL, HFILL}
14585
14
        },
14586
14
        {&hf_btatt_record_access_control_point_response_code,
14587
14
            {"Response Opcode", "btatt.record_access_control_point.response_code",
14588
14
            FT_UINT8, BASE_DEC, VALS(record_access_control_point_response_code_vals), 0x0,
14589
14
            NULL, HFILL}
14590
14
        },
14591
14
        {&hf_btatt_value_trigger_setting_condition,
14592
14
            {"Condition", "btatt.value_trigger_setting.condition",
14593
14
            FT_UINT8, BASE_DEC, VALS(value_trigger_setting_condition_vals), 0x0,
14594
14
            NULL, HFILL}
14595
14
        },
14596
14
        {&hf_btatt_value_trigger_setting_analog,
14597
14
            {"Analog", "btatt.value_trigger_setting.analog",
14598
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14599
14
            NULL, HFILL}
14600
14
        },
14601
14
        {&hf_btatt_value_trigger_setting_analog_one,
14602
14
            {"Analog One", "btatt.value_trigger_setting.analog_one",
14603
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14604
14
            NULL, HFILL}
14605
14
        },
14606
14
        {&hf_btatt_value_trigger_setting_analog_two,
14607
14
            {"Analog Two", "btatt.value_trigger_setting.analog_two",
14608
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14609
14
            NULL, HFILL}
14610
14
        },
14611
14
        {&hf_btatt_digital,
14612
14
            {"Digital", "btatt.digital",
14613
14
            FT_UINT8, BASE_DEC, VALS(digital_vals), 0x0,
14614
14
            NULL, HFILL}
14615
14
        },
14616
14
        {&hf_btatt_digital_output,
14617
14
            {"Digital Output", "btatt.digital_output",
14618
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
14619
14
            NULL, HFILL}
14620
14
        },
14621
14
        {&hf_btatt_analog,
14622
14
            {"Analog", "btatt.analog",
14623
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
14624
14
            NULL, HFILL}
14625
14
        },
14626
14
        {&hf_btatt_analog_output,
14627
14
            {"Analog Output", "btatt.analog_output",
14628
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
14629
14
            NULL, HFILL}
14630
14
        },
14631
14
        {&hf_btatt_location_name,
14632
14
            {"Location Name", "btatt.location_name",
14633
14
            FT_STRING, BASE_NONE, NULL, 0x0,
14634
14
            NULL, HFILL}
14635
14
        },
14636
14
        {&hf_btatt_uncertainty,
14637
14
            {"Uncertainty", "btatt.uncertainty",
14638
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14639
14
            NULL, HFILL}
14640
14
        },
14641
14
        {&hf_btatt_uncertainty_reserved,
14642
14
            {"Reserved", "btatt.uncertainty.reserved",
14643
14
            FT_UINT8, BASE_HEX, NULL, 0x80,
14644
14
            NULL, HFILL}
14645
14
        },
14646
14
        {&hf_btatt_uncertainty_precision,
14647
14
            {"Precision", "btatt.uncertainty.precision",
14648
14
            FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_precision_vals), 0x70,
14649
14
            NULL, HFILL}
14650
14
        },
14651
14
        {&hf_btatt_uncertainty_update_time,
14652
14
            {"Update Time", "btatt.uncertainty.update_time",
14653
14
            FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_update_time_vals), 0x0E,
14654
14
            NULL, HFILL}
14655
14
        },
14656
14
        {&hf_btatt_uncertainty_stationary,
14657
14
            {"Stationary", "btatt.uncertainty.stationary",
14658
14
            FT_UINT8, BASE_HEX, VALS(btatt_ips_uncertainty_stationary_vals), 0x01,
14659
14
            NULL, HFILL}
14660
14
        },
14661
14
        {&hf_btatt_latitude,
14662
14
            {"Latitude", "btatt.latitude",
14663
14
            FT_INT32, BASE_DEC, NULL, 0x0,
14664
14
            NULL, HFILL}
14665
14
        },
14666
14
        {&hf_btatt_longitude,
14667
14
            {"Longitude", "btatt.longitude",
14668
14
            FT_INT32, BASE_DEC, NULL, 0x0,
14669
14
            NULL, HFILL}
14670
14
        },
14671
14
        {&hf_btatt_local_north_coordinate,
14672
14
            {"Local North Coordinate", "btatt.local_north_coordinate",
14673
14
            FT_INT16, BASE_DEC, NULL, 0x0,
14674
14
            NULL, HFILL}
14675
14
        },
14676
14
        {&hf_btatt_local_east_coordinate,
14677
14
            {"Local East Coordinate", "btatt.local_east_coordinate",
14678
14
            FT_INT16, BASE_DEC, NULL, 0x0,
14679
14
            NULL, HFILL}
14680
14
        },
14681
14
        {&hf_btatt_floor_number,
14682
14
            {"Floor Number", "btatt.floor_number",
14683
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
14684
14
            NULL, HFILL}
14685
14
        },
14686
14
        {&hf_btatt_altitude,
14687
14
            {"Altitude", "btatt.altitude",
14688
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14689
14
            NULL, HFILL}
14690
14
        },
14691
14
        {&hf_btatt_indoor_positioning_configuration,
14692
14
            {"Indoor Positioning Configuration", "btatt.indoor_positioning_configuration",
14693
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14694
14
            NULL, HFILL}
14695
14
        },
14696
14
        {&hf_btatt_indoor_positioning_configuration_reserved,
14697
14
            {"Reserved", "btatt.indoor_positioning_configuration.reserved",
14698
14
            FT_UINT8, BASE_HEX, NULL, 0x80,
14699
14
            NULL, HFILL}
14700
14
        },
14701
14
        {&hf_btatt_indoor_positioning_configuration_location_name,
14702
14
            {"Location Name", "btatt.indoor_positioning_configuration.location_name",
14703
14
            FT_BOOLEAN, 8, NULL, 0x40,
14704
14
            NULL, HFILL}
14705
14
        },
14706
14
        {&hf_btatt_indoor_positioning_configuration_uncertainty,
14707
14
            {"Uncertainty", "btatt.indoor_positioning_configuration.uncertainty",
14708
14
            FT_BOOLEAN, 8, NULL, 0x20,
14709
14
            NULL, HFILL}
14710
14
        },
14711
14
        {&hf_btatt_indoor_positioning_configuration_floor_number,
14712
14
            {"Floor Number", "btatt.indoor_positioning_configuration.floor_number",
14713
14
            FT_BOOLEAN, 8, NULL, 0x10,
14714
14
            NULL, HFILL}
14715
14
        },
14716
14
        {&hf_btatt_indoor_positioning_configuration_altitude,
14717
14
            {"Altitude", "btatt.indoor_positioning_configuration.altitude",
14718
14
            FT_BOOLEAN, 8, NULL, 0x08,
14719
14
            NULL, HFILL}
14720
14
        },
14721
14
        {&hf_btatt_indoor_positioning_configuration_tx_power,
14722
14
            {"Tx Power", "btatt.indoor_positioning_configuration.tx_power",
14723
14
            FT_BOOLEAN, 8, NULL, 0x04,
14724
14
            NULL, HFILL}
14725
14
        },
14726
14
        {&hf_btatt_indoor_positioning_configuration_coordinate_system,
14727
14
            {"Coordinate System", "btatt.indoor_positioning_configuration.coordinate_system",
14728
14
            FT_UINT8, BASE_HEX, VALS(btatt_ips_coordinate_system), 0x02,
14729
14
            NULL, HFILL}
14730
14
        },
14731
14
        {&hf_btatt_indoor_positioning_configuration_coordinates,
14732
14
            {"Coordinates", "btatt.indoor_positioning_configuration.coordinates",
14733
14
            FT_BOOLEAN, 8, NULL, 0x01,
14734
14
            NULL, HFILL}
14735
14
        },
14736
14
        {&hf_btatt_number_of_digitals,
14737
14
            {"Number of Digitals", "btatt.number_of_digitals",
14738
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
14739
14
            NULL, HFILL}
14740
14
        },
14741
14
        {&hf_btatt_time_trigger_setting_condition,
14742
14
            {"Condition", "btatt.time_trigger_setting.condition",
14743
14
            FT_UINT8, BASE_HEX, VALS(time_trigger_setting_condition_vals), 0x0,
14744
14
            NULL, HFILL}
14745
14
        },
14746
14
        {&hf_btatt_time_trigger_setting_value,
14747
14
            {"Value", "btatt.time_trigger_setting.value",
14748
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
14749
14
            NULL, HFILL}
14750
14
        },
14751
14
        {&hf_btatt_time_trigger_setting_value_count,
14752
14
            {"Count", "btatt.time_trigger_setting.count",
14753
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14754
14
            NULL, HFILL}
14755
14
        },
14756
14
        {&hf_btatt_time_trigger_setting_value_time_interval,
14757
14
            {"Time Interval", "btatt.time_trigger_setting.time_interval",
14758
14
            FT_UINT24, BASE_DEC, NULL, 0x0,
14759
14
            NULL, HFILL}
14760
14
        },
14761
14
        {&hf_btatt_rsc_measurement_flags,
14762
14
            {"Flags", "btatt.rsc_measurement.flags",
14763
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14764
14
            NULL, HFILL}
14765
14
        },
14766
14
        {&hf_btatt_rsc_measurement_flags_reserved,
14767
14
            {"Reserved", "btatt.rsc_measurement.flags.reserved",
14768
14
            FT_UINT8, BASE_HEX, NULL, 0xF8,
14769
14
            NULL, HFILL}
14770
14
        },
14771
14
        {&hf_btatt_rsc_measurement_flags_type_of_movement,
14772
14
            {"Type of Movement", "btatt.rsc_measurement.flags.type_of_movement",
14773
14
            FT_UINT8, BASE_HEX, VALS(rsc_measurement_flags_type_of_movement_vals), 0x04,
14774
14
            NULL, HFILL}
14775
14
        },
14776
14
        {&hf_btatt_rsc_measurement_flags_total_distance_present,
14777
14
            {"Total Distance Present", "btatt.rsc_measurement.flags.total_distance_present",
14778
14
            FT_BOOLEAN, 8, NULL, 0x02,
14779
14
            NULL, HFILL}
14780
14
        },
14781
14
        {&hf_btatt_rsc_measurement_flags_instantaneous_stride_length_present,
14782
14
            {"Instantaneous Stride Length Present", "btatt.rsc_measurement.flags.instantaneous_stride_length_present",
14783
14
            FT_BOOLEAN, 8, NULL, 0x01,
14784
14
            NULL, HFILL}
14785
14
        },
14786
14
        {&hf_btatt_rsc_measurement_instantaneous_speed,
14787
14
            {"Instantaneous Speed", "btatt.rsc_measurement.instantaneous_speed",
14788
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14789
14
            NULL, HFILL}
14790
14
        },
14791
14
        {&hf_btatt_rsc_measurement_instantaneous_cadence,
14792
14
            {"Instantaneous Cadence", "btatt.rsc_measurement.instantaneous_cadence",
14793
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
14794
14
            NULL, HFILL}
14795
14
        },
14796
14
        {&hf_btatt_rsc_measurement_instantaneous_stride_length,
14797
14
            {"Instantaneous Stride Length", "btatt.rsc_measurement.instantaneous_stride_length",
14798
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14799
14
            NULL, HFILL}
14800
14
        },
14801
14
        {&hf_btatt_rsc_measurement_total_distance,
14802
14
            {"Total Distance", "btatt.rsc_measurement.total_distance",
14803
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
14804
14
            NULL, HFILL}
14805
14
        },
14806
14
        {&hf_btatt_sc_control_point_opcode,
14807
14
            {"Opcode", "btatt.sc_control_point.opcode",
14808
14
            FT_UINT8, BASE_HEX, VALS(sc_control_point_opcode_vals), 0x0,
14809
14
            NULL, HFILL}
14810
14
        },
14811
14
        {&hf_btatt_sc_control_point_request_opcode,
14812
14
            {"Request Opcode", "btatt.sc_control_point.request_opcode",
14813
14
            FT_UINT8, BASE_HEX, VALS(sc_control_point_opcode_vals), 0x0,
14814
14
            NULL, HFILL}
14815
14
        },
14816
14
        {&hf_btatt_sc_control_point_cumulative_value,
14817
14
            {"Cumulative Value", "btatt.sc_control_point.cumulative_value",
14818
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
14819
14
            NULL, HFILL}
14820
14
        },
14821
14
        {&hf_btatt_sc_control_point_response_value,
14822
14
            {"Response Value", "btatt.sc_control_point.response_value",
14823
14
            FT_UINT8, BASE_HEX, VALS(sc_control_point_response_value_vals), 0x0,
14824
14
            NULL, HFILL}
14825
14
        },
14826
14
        {&hf_btatt_cycling_power_measurement_flags,
14827
14
            {"Flags", "btatt.cycling_power_measurement.flags",
14828
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
14829
14
            NULL, HFILL}
14830
14
        },
14831
14
        {&hf_btatt_cycling_power_measurement_flags_reserved,
14832
14
            {"Reserved", "btatt.cycling_power_measurement.flags.reserved",
14833
14
            FT_UINT16, BASE_HEX, NULL, 0xE000,
14834
14
            NULL, HFILL}
14835
14
        },
14836
14
        {&hf_btatt_cycling_power_measurement_flags_offset_compensation_indicator,
14837
14
            {"Offset Compensation Indicator", "btatt.cycling_power_measurement.flags.offset_compensation_indicator",
14838
14
            FT_BOOLEAN, 16, NULL, 0x1000,
14839
14
            NULL, HFILL}
14840
14
        },
14841
14
        {&hf_btatt_cycling_power_measurement_flags_accumulated_energy,
14842
14
            {"Accumulated Energy", "btatt.cycling_power_measurement.flags.accumulated_energy",
14843
14
            FT_BOOLEAN, 16, NULL, 0x0800,
14844
14
            NULL, HFILL}
14845
14
        },
14846
14
        {&hf_btatt_cycling_power_measurement_flags_bottom_dead_spot_angle,
14847
14
            {"Bottom Dead Spot Angle", "btatt.cycling_power_measurement.flags.bottom_dead_spot_angle",
14848
14
            FT_BOOLEAN, 16, NULL, 0x0400,
14849
14
            NULL, HFILL}
14850
14
        },
14851
14
        {&hf_btatt_cycling_power_measurement_flags_top_dead_spot_angle,
14852
14
            {"Top Dead Spot Angle", "btatt.cycling_power_measurement.flags.top_dead_spot_angle",
14853
14
            FT_BOOLEAN, 16, NULL, 0x0200,
14854
14
            NULL, HFILL}
14855
14
        },
14856
14
        {&hf_btatt_cycling_power_measurement_flags_extreme_angles,
14857
14
            {"Extreme_angles", "btatt.cycling_power_measurement.flags.extreme_angles",
14858
14
            FT_BOOLEAN, 16, NULL, 0x0100,
14859
14
            NULL, HFILL}
14860
14
        },
14861
14
        {&hf_btatt_cycling_power_measurement_flags_extreme_torque_magnitudes,
14862
14
            {"Extreme Torque Magnitudes", "btatt.cycling_power_measurement.flags.extreme_torque_magnitudes",
14863
14
            FT_BOOLEAN, 16, NULL, 0x0080,
14864
14
            NULL, HFILL}
14865
14
        },
14866
14
        {&hf_btatt_cycling_power_measurement_flags_extreme_force_magnitudes,
14867
14
            {"Extreme Force Magnitudes", "btatt.cycling_power_measurement.flags.extreme_force_magnitudes",
14868
14
            FT_BOOLEAN, 16, NULL, 0x0040,
14869
14
            NULL, HFILL}
14870
14
        },
14871
14
        {&hf_btatt_cycling_power_measurement_flags_crank_revolution_data,
14872
14
            {"Crank Revolution Data", "btatt.cycling_power_measurement.flags.crank_revolution_data",
14873
14
            FT_BOOLEAN, 16, NULL, 0x0020,
14874
14
            NULL, HFILL}
14875
14
        },
14876
14
        {&hf_btatt_cycling_power_measurement_flags_wheel_revolution_data,
14877
14
            {"Wheel Revolution Data", "btatt.cycling_power_measurement.flags.wheel_revolution_data",
14878
14
            FT_BOOLEAN, 16, NULL, 0x0010,
14879
14
            NULL, HFILL}
14880
14
        },
14881
14
        {&hf_btatt_cycling_power_measurement_flags_accumulated_torque_source,
14882
14
            {"accumulated_torque_source", "btatt.cycling_power_measurement.flags.accumulated_torque_source",
14883
14
            FT_UINT16, BASE_HEX, VALS(cycling_power_measurement_flags_accumulated_torque_source_vals), 0x0008,
14884
14
            NULL, HFILL}
14885
14
        },
14886
14
        {&hf_btatt_cycling_power_measurement_flags_accumulated_torque,
14887
14
            {"Accumulated Torque", "btatt.cycling_power_measurement.flags.accumulated_torque",
14888
14
            FT_BOOLEAN, 16, NULL, 0x0004,
14889
14
            NULL, HFILL}
14890
14
        },
14891
14
        {&hf_btatt_cycling_power_measurement_flags_pedal_power_balance_reference,
14892
14
            {"Pedal Power Balance Reference", "btatt.cycling_power_measurement.flags.pedal_power_balance_reference",
14893
14
            FT_BOOLEAN, 16, NULL, 0x0002,
14894
14
            NULL, HFILL}
14895
14
        },
14896
14
        {&hf_btatt_cycling_power_measurement_flags_pedal_power_balance,
14897
14
            {"Pedal Power Balance", "btatt.cycling_power_measurement.flags.pedal_power_balance",
14898
14
            FT_BOOLEAN, 16, NULL, 0x0001,
14899
14
            NULL, HFILL}
14900
14
        },
14901
14
        {&hf_btatt_cycling_power_measurement_instantaneous_power,
14902
14
            {"Instantaneous Power", "btatt.cycling_power_measurement.instantaneous_power",
14903
14
            FT_INT16, BASE_DEC, NULL, 0x0,
14904
14
            NULL, HFILL}
14905
14
        },
14906
14
        {&hf_btatt_cycling_power_measurement_pedal_power_balance,
14907
14
            {"Pedal Power Balance", "btatt.cycling_power_measurement.pedal_power_balance",
14908
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
14909
14
            NULL, HFILL}
14910
14
        },
14911
14
        {&hf_btatt_cycling_power_measurement_accumulated_torque,
14912
14
            {"Accumulated Torque", "btatt.cycling_power_measurement.accumulated_torque",
14913
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14914
14
            NULL, HFILL}
14915
14
        },
14916
14
        {&hf_btatt_cycling_power_measurement_wheel_revolution_data_cumulative_wheel_revolutions,
14917
14
            {"Wheel Revolution Data Cumulative Wheel Revolutions", "btatt.cycling_power_measurement.wheel_revolution_data_cumulative_wheel_revolutions",
14918
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
14919
14
            NULL, HFILL}
14920
14
        },
14921
14
        {&hf_btatt_cycling_power_measurement_wheel_revolution_data_last_wheel_event_time,
14922
14
            {"Wheel Revolution Data Last Wheel Event Time", "btatt.cycling_power_measurement.wheel_revolution_data_last_wheel_event_time",
14923
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14924
14
            NULL, HFILL}
14925
14
        },
14926
14
        {&hf_btatt_cycling_power_measurement_crank_revolution_data_cumulative_crank_revolutions,
14927
14
            {"Crank Revolution Data Cumulative Crank Revolutions", "btatt.cycling_power_measurement.crank_revolution_data_cumulative_crank_revolutions",
14928
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14929
14
            NULL, HFILL}
14930
14
        },
14931
14
        {&hf_btatt_cycling_power_measurement_crank_revolution_data_last_crank_event_time,
14932
14
            {"Crank Revolution Data Last Crank Event Time", "btatt.cycling_power_measurement.crank_revolution_data_last_crank_event_time",
14933
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14934
14
            NULL, HFILL}
14935
14
        },
14936
14
        {&hf_btatt_cycling_power_measurement_extreme_force_magnitudes_maximum_force_magnitude,
14937
14
            {"Extreme Force Magnitudes Maximum Force Magnitude", "btatt.cycling_power_measurement.extreme_force_magnitudes_maximum_force_magnitude",
14938
14
            FT_INT16, BASE_DEC, NULL, 0x0,
14939
14
            NULL, HFILL}
14940
14
        },
14941
14
        {&hf_btatt_cycling_power_measurement_extreme_force_magnitudes_minimum_force_magnitude,
14942
14
            {"Extreme Force Magnitudes Minimum Force Magnitude", "btatt.cycling_power_measurement.extreme_force_magnitudes_minimum_force_magnitude",
14943
14
            FT_INT16, BASE_DEC, NULL, 0x0,
14944
14
            NULL, HFILL}
14945
14
        },
14946
14
        {&hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_maximum_torque_magnitude,
14947
14
            {"Extreme Torque Magnitudes Maximum Torque Magnitude", "btatt.cycling_power_measurement.extreme_torque_magnitudes_maximum_torque_magnitude",
14948
14
            FT_INT16, BASE_DEC, NULL, 0x0,
14949
14
            NULL, HFILL}
14950
14
        },
14951
14
        {&hf_btatt_cycling_power_measurement_extreme_torque_magnitudes_minimum_torque_magnitude,
14952
14
            {"Extreme Torque Magnitudes Minimum Torque Magnitude", "btatt.cycling_power_measurement.extreme_torque_magnitudes_minimum_torque_magnitude",
14953
14
            FT_INT16, BASE_DEC, NULL, 0x0,
14954
14
            NULL, HFILL}
14955
14
        },
14956
14
        {&hf_btatt_cycling_power_measurement_extreme_angles,
14957
14
            {"Extreme Angles", "btatt.cycling_power_measurement.extreme_angles",
14958
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
14959
14
            NULL, HFILL}
14960
14
        },
14961
14
        {&hf_btatt_cycling_power_measurement_extreme_angles_maximum,
14962
14
            {"Maximum", "btatt.cycling_power_measurement.extreme_angles.maximum",
14963
14
            FT_UINT24, BASE_DEC, NULL, 0xFFF000,
14964
14
            NULL, HFILL}
14965
14
        },
14966
14
        {&hf_btatt_cycling_power_measurement_extreme_angles_minimum,
14967
14
            {"Minimum", "btatt.cycling_power_measurement.extreme_angles.minimum",
14968
14
            FT_UINT24, BASE_DEC, NULL, 0x000FFF,
14969
14
            NULL, HFILL}
14970
14
        },
14971
14
        {&hf_btatt_cycling_power_measurement_top_dead_spot_angle,
14972
14
            {"Top Dead Spot Angle", "btatt.cycling_power_measurement.top_dead_spot_angle",
14973
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14974
14
            NULL, HFILL}
14975
14
        },
14976
14
        {&hf_btatt_cycling_power_measurement_bottom_dead_spot_angle,
14977
14
            {"Bottom Dead Spot Angle", "btatt.cycling_power_measurement.bottom_dead_spot_angle",
14978
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14979
14
            NULL, HFILL}
14980
14
        },
14981
14
        {&hf_btatt_cycling_power_measurement_accumulated_energy,
14982
14
            {"Accumulated Energy", "btatt.cycling_power_measurement.accumulated_energy",
14983
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
14984
14
            NULL, HFILL}
14985
14
        },
14986
14
        {&hf_btatt_csc_measurement_flags,
14987
14
            {"Flags", "btatt.csc_measurement.flags",
14988
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
14989
14
            NULL, HFILL}
14990
14
        },
14991
14
        {&hf_btatt_csc_measurement_flags_reserved,
14992
14
            {"Reserved", "btatt.csc_measurement.flags.reserved",
14993
14
            FT_UINT8, BASE_HEX, NULL, 0xFC,
14994
14
            NULL, HFILL}
14995
14
        },
14996
14
        {&hf_btatt_csc_measurement_flags_crank_revolution_data,
14997
14
            {"Crank Revolution Data", "btatt.csc_measurement.flags.crank_revolution_data",
14998
14
            FT_BOOLEAN, 8, NULL, 0x02,
14999
14
            NULL, HFILL}
15000
14
        },
15001
14
        {&hf_btatt_csc_measurement_flags_wheel_revolution_data,
15002
14
            {"Wheel Revolution Data", "btatt.csc_measurement.flags.wheel_revolution_data",
15003
14
            FT_BOOLEAN, 8, NULL, 0x01,
15004
14
            NULL, HFILL}
15005
14
        },
15006
14
        {&hf_btatt_csc_measurement_cumulative_wheel_revolutions,
15007
14
            {"Cumulative Wheel Revolutions", "btatt.csc_measurement.cumulative_wheel_revolutions",
15008
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
15009
14
            NULL, HFILL}
15010
14
        },
15011
14
        {&hf_btatt_csc_measurement_cumulative_crank_revolutions,
15012
14
            {"Cumulative Crank Revolutions", "btatt.csc_measurement.cumulative_crank_revolutions",
15013
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15014
14
            NULL, HFILL}
15015
14
        },
15016
14
        {&hf_btatt_csc_measurement_last_event_time,
15017
14
            {"Last Event Time", "btatt.csc_measurement.last_event_time",
15018
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15019
14
            NULL, HFILL}
15020
14
        },
15021
14
        {&hf_btatt_cycling_power_vector_flags,
15022
14
            {"Flags", "btatt.csc_measurement.flags",
15023
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
15024
14
            NULL, HFILL}
15025
14
        },
15026
14
        {&hf_btatt_cycling_power_vector_flags_reserved,
15027
14
            {"Reserved", "btatt.csc_measurement.flags.reserved",
15028
14
            FT_UINT8, BASE_HEX, NULL, 0xC0,
15029
14
            NULL, HFILL}
15030
14
        },
15031
14
        {&hf_btatt_cycling_power_vector_flags_instantaneous_measurement_direction,
15032
14
            {"Instantaneous Measurement Direction", "btatt.cycling_power_vector.flags.instantaneous_measurement_direction",
15033
14
            FT_UINT8, BASE_HEX, VALS(cycling_power_vector_flags_instantaneous_measurement_direction_vals), 0x30,
15034
14
            NULL, HFILL}
15035
14
        },
15036
14
        {&hf_btatt_cycling_power_vector_flags_instantaneous_torque_magnitude_array,
15037
14
            {"Instantaneous Torque Magnitude Array", "btatt.cycling_power_vector.flags.instantaneous_torque_magnitude_array",
15038
14
            FT_BOOLEAN, 8, NULL, 0x08,
15039
14
            NULL, HFILL}
15040
14
        },
15041
14
        {&hf_btatt_cycling_power_vector_flags_instantaneous_force_magnitude_array,
15042
14
            {"Instantaneous Force Magnitude Array", "btatt.cycling_power_vector.flags.instantaneous_force_magnitude_array",
15043
14
            FT_BOOLEAN, 8, NULL, 0x04,
15044
14
            NULL, HFILL}
15045
14
        },
15046
14
        {&hf_btatt_cycling_power_vector_flags_first_crank_measurement_angle,
15047
14
            {"First Crank Measurement Angle", "btatt.cycling_power_vector.flags.first_crank_measurement_angle",
15048
14
            FT_BOOLEAN, 8, NULL, 0x02,
15049
14
            NULL, HFILL}
15050
14
        },
15051
14
        {&hf_btatt_cycling_power_vector_flags_crank_revolution_data,
15052
14
            {"Crank Revolution Data", "btatt.cycling_power_vector.flags.crank_revolution_data",
15053
14
            FT_BOOLEAN, 8, NULL, 0x01,
15054
14
            NULL, HFILL}
15055
14
        },
15056
15057
14
        {&hf_btatt_cycling_power_vector_crank_revolution_data_cumulative_crank_revolutions,
15058
14
            {"cumulative_crank_revolutions", "btatt.csc_measurement.cumulative_crank_revolutions",
15059
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15060
14
            NULL, HFILL}
15061
14
        },
15062
14
        {&hf_btatt_cycling_power_vector_crank_revolution_data_last_crank_event_time,
15063
14
            {"Last Crank Event Time", "btatt.csc_measurement.last_crank_event_time",
15064
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15065
14
            NULL, HFILL}
15066
14
        },
15067
14
        {&hf_btatt_cycling_power_vector_first_crank_measurement_angle,
15068
14
            {"First Crank Measurement Angle", "btatt.csc_measurement.first_crank_measurement_angle",
15069
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15070
14
            NULL, HFILL}
15071
14
        },
15072
15073
14
        {&hf_btatt_cycling_power_vector_instantaneous_force_magnitude_array,
15074
14
            {"Instantaneous Force Magnitude Array", "btatt.csc_measurement.instantaneous_force_magnitude_array",
15075
14
            FT_INT16, BASE_DEC, NULL, 0x0,
15076
14
            NULL, HFILL}
15077
14
        },
15078
14
        {&hf_btatt_cycling_power_vector_instantaneous_torque_magnitude_array,
15079
14
            {"Instantaneous Torque Magnitude Array", "btatt.csc_measurement.instantaneous_torque_magnitude_array",
15080
14
            FT_INT16, BASE_DEC, NULL, 0x0,
15081
14
            NULL, HFILL}
15082
14
        },
15083
14
        {&hf_btatt_cycling_power_control_point_opcode,
15084
14
            {"Opcode", "btatt.cycling_power_control_point.opcode",
15085
14
            FT_UINT8, BASE_HEX, VALS(cycling_power_control_point_opcode), 0x0,
15086
14
            NULL, HFILL}
15087
14
        },
15088
14
        {&hf_btatt_cycling_power_control_point_cumulative_value,
15089
14
            {"Cumulative Value", "btatt.cycling_power_control_point.cumulative_value",
15090
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
15091
14
            NULL, HFILL}
15092
14
        },
15093
14
        {&hf_btatt_cycling_power_control_point_sensor_location,
15094
14
            {"Sensor Location", "btatt.cycling_power_control_point.sensor_location",
15095
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15096
14
            NULL, HFILL}
15097
14
        },
15098
14
        {&hf_btatt_cycling_power_control_point_crank_length,
15099
14
            {"Crank Length", "btatt.cycling_power_control_point.crank_length",
15100
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15101
14
            NULL, HFILL}
15102
14
        },
15103
14
        {&hf_btatt_cycling_power_control_point_chain_length,
15104
14
            {"Chain Length", "btatt.cycling_power_control_point.chain_length",
15105
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15106
14
            NULL, HFILL}
15107
14
        },
15108
14
        {&hf_btatt_cycling_power_control_point_chain_weight,
15109
14
            {"Chain Weight", "btatt.cycling_power_control_point.chain_weight",
15110
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15111
14
            NULL, HFILL}
15112
14
        },
15113
14
        {&hf_btatt_cycling_power_control_point_span_length,
15114
14
            {"Span Length", "btatt.cycling_power_control_point.span_length",
15115
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15116
14
            NULL, HFILL}
15117
14
        },
15118
14
        {&hf_btatt_cycling_power_control_point_content_mask,
15119
14
            {"Content Mask", "btatt.cycling_power_control_point.content_mask",
15120
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
15121
14
            NULL, HFILL}
15122
14
        },
15123
14
        {&hf_btatt_cycling_power_control_point_content_mask_reserved,
15124
14
            {"Reserved", "btatt.cycling_power_control_point.content_mask.reserved",
15125
14
            FT_UINT16, BASE_HEX, NULL, 0xFE00,
15126
14
            NULL, HFILL}
15127
14
        },
15128
14
        {&hf_btatt_cycling_power_control_point_content_mask_accumulated_energy,
15129
14
            {"Accumulated Energy", "btatt.cycling_power_control_point.content_mask.accumulated_energy",
15130
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0100,
15131
14
            NULL, HFILL}
15132
14
        },
15133
14
        {&hf_btatt_cycling_power_control_point_content_mask_bottom_dead_spot_angle,
15134
14
            {"Bottom Dead Spot Angle", "btatt.cycling_power_control_point.content_mask.bottom_dead_spot_angle",
15135
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0080,
15136
14
            NULL, HFILL}
15137
14
        },
15138
14
        {&hf_btatt_cycling_power_control_point_content_mask_top_dead_spot_angle,
15139
14
            {"Top Dead Spot Angle", "btatt.cycling_power_control_point.content_mask.top_dead_spot_angle",
15140
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0040,
15141
14
            NULL, HFILL}
15142
14
        },
15143
14
        {&hf_btatt_cycling_power_control_point_content_mask_extreme_angles,
15144
14
            {"Extreme Angles", "btatt.cycling_power_control_point.content_mask.extreme_angles",
15145
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0020,
15146
14
            NULL, HFILL}
15147
14
        },
15148
14
        {&hf_btatt_cycling_power_control_point_content_mask_extreme_magnitudes,
15149
14
            {"Extreme Magnitudes", "btatt.cycling_power_control_point.content_mask.extreme_magnitudes",
15150
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0010,
15151
14
            NULL, HFILL}
15152
14
        },
15153
14
        {&hf_btatt_cycling_power_control_point_content_mask_crank_revolution_data,
15154
14
            {"Crank Revolution Data", "btatt.cycling_power_control_point.content_mask.crank_revolution_data",
15155
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0008,
15156
14
            NULL, HFILL}
15157
14
        },
15158
14
        {&hf_btatt_cycling_power_control_point_content_mask_wheel_revolution_data,
15159
14
            {"Wheel Revolution Data", "btatt.cycling_power_control_point.content_mask.wheel_revolution_data",
15160
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0004,
15161
14
            NULL, HFILL}
15162
14
        },
15163
14
        {&hf_btatt_cycling_power_control_point_content_mask_accumulated_torque,
15164
14
            {"Accumulated Torque", "btatt.cycling_power_control_point.content_mask.accumulated_torque",
15165
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0002,
15166
14
            NULL, HFILL}
15167
14
        },
15168
14
        {&hf_btatt_cycling_power_control_point_content_mask_pedal_power_balance,
15169
14
            {"Pedal Power Balance", "btatt.cycling_power_control_point.content_mask.pedal_power_balance",
15170
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0001,
15171
14
            NULL, HFILL}
15172
14
        },
15173
14
        {&hf_btatt_cycling_power_control_point_request_opcode,
15174
14
            {"Request Opcode", "btatt.cycling_power_control_point.request_opcode",
15175
14
            FT_UINT8, BASE_HEX, VALS(cycling_power_control_point_opcode), 0x0,
15176
14
            NULL, HFILL}
15177
14
        },
15178
14
        {&hf_btatt_cycling_power_control_point_response_value,
15179
14
            {"Response Value", "btatt.cycling_power_control_point.response_value",
15180
14
            FT_UINT8, BASE_HEX, VALS(cycling_power_control_point_response_value), 0x0,
15181
14
            NULL, HFILL}
15182
14
        },
15183
14
        {&hf_btatt_cycling_power_control_point_start_offset_compensation,
15184
14
            {"Start Offset Compensation", "btatt.cycling_power_control_point.start_offset_compensation",
15185
14
            FT_INT16, BASE_DEC, NULL, 0x0,
15186
14
            NULL, HFILL}
15187
14
        },
15188
14
        {&hf_btatt_cycling_power_control_point_sampling_rate,
15189
14
            {"Sampling Rate", "btatt.cycling_power_control_point.sampling_rate",
15190
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15191
14
            NULL, HFILL}
15192
14
        },
15193
14
        {&hf_btatt_cycling_power_control_point_factory_calibration_date,
15194
14
            {"Factory Calibration Date", "btatt.cycling_power_control_point.factory_calibration_date",
15195
14
            FT_NONE, BASE_NONE, NULL, 0x0,
15196
14
            NULL, HFILL}
15197
14
        },
15198
14
        {&hf_btatt_location_and_speed_flags,
15199
14
            {"Flags", "btatt.location_and_speed.flags",
15200
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
15201
14
            NULL, HFILL}
15202
14
        },
15203
14
        {&hf_btatt_location_and_speed_flags_reserved,
15204
14
            {"Reserved", "btatt.location_and_speed.flags.reserved",
15205
14
            FT_UINT16, BASE_HEX, NULL, 0xC000,
15206
14
            NULL, HFILL}
15207
14
        },
15208
14
        {&hf_btatt_location_and_speed_flags_heading_source,
15209
14
            {"Heading Source", "btatt.location_and_speed.flags.heading_source",
15210
14
            FT_BOOLEAN, 16, TFS(&flags_heading_source_tfs), 0x3000,
15211
14
            NULL, HFILL}
15212
14
        },
15213
14
        {&hf_btatt_location_and_speed_flags_elevation_source,
15214
14
            {"Elevation Source", "btatt.location_and_speed.flags.elevation_source",
15215
14
            FT_UINT16, BASE_HEX, VALS(location_and_speed_flags_elevation_source_vals), 0x0C00,
15216
14
            NULL, HFILL}
15217
14
        },
15218
14
        {&hf_btatt_location_and_speed_flags_speed_and_distance_format,
15219
14
            {"Speed_and Distance Format", "btatt.location_and_speed.flags.speed_and_distance_format",
15220
14
            FT_BOOLEAN, 16, TFS(&location_and_speed_flags_speed_and_distance_format_tfs), 0x0200,
15221
14
            NULL, HFILL}
15222
14
        },
15223
14
        {&hf_btatt_location_and_speed_flags_position_status,
15224
14
            {"Position Status", "btatt.location_and_speed.flags.position_status",
15225
14
            FT_UINT16, BASE_HEX, VALS(flags_position_status_vals), 0x0180,
15226
14
            NULL, HFILL}
15227
14
        },
15228
14
        {&hf_btatt_location_and_speed_flags_utc_time,
15229
14
            {"UTC Time Present", "btatt.location_and_speed.flags.utc_time",
15230
14
            FT_BOOLEAN, 16, NULL, 0x0040,
15231
14
            NULL, HFILL}
15232
14
        },
15233
14
        {&hf_btatt_location_and_speed_flags_rolling_time,
15234
14
            {"Rolling Time", "btatt.location_and_speed.flags.rolling_time",
15235
14
            FT_BOOLEAN, 16, NULL, 0x0020,
15236
14
            NULL, HFILL}
15237
14
        },
15238
14
        {&hf_btatt_location_and_speed_flags_heading,
15239
14
            {"Heading", "btatt.location_and_speed.flags.heading",
15240
14
            FT_BOOLEAN, 16, NULL, 0x0010,
15241
14
            NULL, HFILL}
15242
14
        },
15243
14
        {&hf_btatt_location_and_speed_flags_elevation,
15244
14
            {"Elevation", "btatt.location_and_speed.flags.elevation",
15245
14
            FT_BOOLEAN, 16, NULL, 0x0008,
15246
14
            NULL, HFILL}
15247
14
        },
15248
14
        {&hf_btatt_location_and_speed_flags_location,
15249
14
            {"Location", "btatt.location_and_speed.flags.location",
15250
14
            FT_BOOLEAN, 16, NULL, 0x0004,
15251
14
            NULL, HFILL}
15252
14
        },
15253
14
        {&hf_btatt_location_and_speed_flags_total_distance,
15254
14
            {"Total Distance Present", "btatt.location_and_speed.flags.total_distance",
15255
14
            FT_BOOLEAN, 16, NULL, 0x0002,
15256
14
            NULL, HFILL}
15257
14
        },
15258
14
        {&hf_btatt_location_and_speed_flags_instantaneous_speed,
15259
14
            {"Instantaneous Speed", "btatt.location_and_speed.flags.instantaneous_speed",
15260
14
            FT_BOOLEAN, 16, NULL, 0x0001,
15261
14
            NULL, HFILL}
15262
14
        },
15263
14
        {&hf_btatt_location_and_speed_instantaneous_speed,
15264
14
            {"Instantaneous Speed", "btatt.location_and_speed.instantaneous_speed",
15265
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15266
14
            NULL, HFILL}
15267
14
        },
15268
14
        {&hf_btatt_location_and_speed_total_distance,
15269
14
            {"Total Distance", "btatt.location_and_speed.total_distance",
15270
14
            FT_UINT24, BASE_DEC, NULL, 0x0,
15271
14
            NULL, HFILL}
15272
14
        },
15273
14
        {&hf_btatt_location_and_speed_location_longitude,
15274
14
            {"Location Longitude", "btatt.location_and_speed.location.longitude",
15275
14
            FT_INT32, BASE_DEC, NULL, 0x0,
15276
14
            NULL, HFILL}
15277
14
        },
15278
14
        {&hf_btatt_location_and_speed_location_latitude,
15279
14
            {"Location Latitude", "btatt.location_and_speed.location.latitude",
15280
14
            FT_INT32, BASE_DEC, NULL, 0x0,
15281
14
            NULL, HFILL}
15282
14
        },
15283
14
        {&hf_btatt_location_and_speed_elevation,
15284
14
            {"Elevation", "btatt.location_and_speed.elevation",
15285
14
            FT_INT24, BASE_DEC, NULL, 0x0,
15286
14
            NULL, HFILL}
15287
14
        },
15288
14
        {&hf_btatt_location_and_speed_heading,
15289
14
            {"Heading", "btatt.location_and_speed.heading",
15290
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15291
14
            NULL, HFILL}
15292
14
        },
15293
14
        {&hf_btatt_location_and_speed_rolling_time,
15294
14
            {"Rolling Time", "btatt.location_and_speed.rolling_time",
15295
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15296
14
            NULL, HFILL}
15297
14
        },
15298
14
        {&hf_btatt_location_and_speed_utc_time,
15299
14
            {"UTC Time", "btatt.location_and_speed.utc_time",
15300
14
            FT_NONE, BASE_NONE, NULL, 0x0,
15301
14
            NULL, HFILL}
15302
14
        },
15303
14
        {&hf_btatt_navigation_flags,
15304
14
            {"Flags", "btatt.navigation.flags",
15305
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
15306
14
            NULL, HFILL}
15307
14
        },
15308
14
        {&hf_btatt_navigation_flags_reserved,
15309
14
            {"Reserved", "btatt.navigation.flags.reserved",
15310
14
            FT_UINT16, BASE_HEX, NULL, 0xFE00,
15311
14
            NULL, HFILL}
15312
14
        },
15313
14
        {&hf_btatt_navigation_flags_destination_reached,
15314
14
            {"Destination Reached", "btatt.navigation.flags.destination_reached",
15315
14
            FT_BOOLEAN, 16, NULL, 0x0100,
15316
14
            NULL, HFILL}
15317
14
        },
15318
14
        {&hf_btatt_navigation_flags_waypoint_reached,
15319
14
            {"Waypoint Reached", "btatt.navigation.flags.waypoint_reached",
15320
14
            FT_BOOLEAN, 16, NULL, 0x0080,
15321
14
            NULL, HFILL}
15322
14
        },
15323
14
        {&hf_btatt_navigation_flags_navigation_indicator_type,
15324
14
            {"Navigation Indicator Type", "btatt.navigation.flags.navigation_indicator_type",
15325
14
            FT_BOOLEAN, 16, TFS(&navigation_indicator_type_tfs), 0x0040,
15326
14
            NULL, HFILL}
15327
14
        },
15328
14
        {&hf_btatt_navigation_flags_heading_source,
15329
14
            {"Heading Source", "btatt.navigation.flags.heading_source",
15330
14
            FT_BOOLEAN, 16, TFS(&flags_heading_source_tfs), 0x0020,
15331
14
            NULL, HFILL}
15332
14
        },
15333
14
        {&hf_btatt_navigation_flags_position_status,
15334
14
            {"Position Status", "btatt.navigation.flags.position_status",
15335
14
            FT_UINT16, BASE_HEX, VALS(flags_position_status_vals), 0x0018,
15336
14
            NULL, HFILL}
15337
14
        },
15338
14
        {&hf_btatt_navigation_flags_estimated_time_of_arrival,
15339
14
            {"Estimated Time of Arrival", "btatt.navigation.flags.estimated_time_of_arrival",
15340
14
            FT_BOOLEAN, 16, NULL, 0x0004,
15341
14
            NULL, HFILL}
15342
14
        },
15343
14
        {&hf_btatt_navigation_flags_remaining_vertical_distance,
15344
14
            {"Remaining Vertical Distance", "btatt.navigation.flags.remaining_vertical_distance",
15345
14
            FT_BOOLEAN, 16, NULL, 0x0002,
15346
14
            NULL, HFILL}
15347
14
        },
15348
14
        {&hf_btatt_navigation_flags_remaining_distance,
15349
14
            {"Remaining Distance", "btatt.navigation.flags.remaining_distance",
15350
14
            FT_BOOLEAN, 16, NULL, 0x0001,
15351
14
            NULL, HFILL}
15352
14
        },
15353
14
        {&hf_btatt_navigation_bearing,
15354
14
            {"Bearing", "btatt.navigation.bearing",
15355
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15356
14
            NULL, HFILL}
15357
14
        },
15358
14
        {&hf_btatt_navigation_heading,
15359
14
            {"Heading", "btatt.navigation.heading",
15360
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15361
14
            NULL, HFILL}
15362
14
        },
15363
14
        {&hf_btatt_navigation_remaining_distance,
15364
14
            {"Remaining Distance", "btatt.navigation.remaining_distance",
15365
14
            FT_UINT24, BASE_DEC, NULL, 0x0,
15366
14
            NULL, HFILL}
15367
14
        },
15368
14
        {&hf_btatt_navigation_remaining_vertical_distance,
15369
14
            {"Remaining Vertical Distance", "btatt.navigation.remaining_vertical_distance",
15370
14
            FT_INT24, BASE_DEC, NULL, 0x0,
15371
14
            NULL, HFILL}
15372
14
        },
15373
14
        {&hf_btatt_navigation_estimated_time_of_arrival,
15374
14
            {"Estimated Time of Arrival", "btatt.navigation.estimated_time_of_arrival",
15375
14
            FT_NONE, BASE_NONE, NULL, 0x0,
15376
14
            NULL, HFILL}
15377
14
        },
15378
14
        {&hf_btatt_position_quality_flags,
15379
14
            {"Flags", "btatt.position_quality.flags",
15380
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
15381
14
            NULL, HFILL}
15382
14
        },
15383
14
        {&hf_btatt_position_quality_flags_reserved,
15384
14
            {"Reserved", "btatt.position_quality.flags.reserved",
15385
14
            FT_UINT16, BASE_HEX, NULL, 0xFE00,
15386
14
            NULL, HFILL}
15387
14
        },
15388
14
        {&hf_btatt_position_quality_flags_position_status,
15389
14
            {"Position Status", "btatt.position_quality.flags.position_status",
15390
14
            FT_UINT16, BASE_HEX, VALS(flags_position_status_vals), 0x0180,
15391
14
            NULL, HFILL}
15392
14
        },
15393
14
        {&hf_btatt_position_quality_flags_vdop,
15394
14
            {"VDOP", "btatt.position_quality.flags.vdop",
15395
14
            FT_BOOLEAN, 16, NULL, 0x0040,
15396
14
            NULL, HFILL}
15397
14
        },
15398
14
        {&hf_btatt_position_quality_flags_hdop,
15399
14
            {"HDOP", "btatt.position_quality.flags.hdop",
15400
14
            FT_BOOLEAN, 16, NULL, 0x0020,
15401
14
            NULL, HFILL}
15402
14
        },
15403
14
        {&hf_btatt_position_quality_flags_evpe,
15404
14
            {"EVPE", "btatt.position_quality.flags.evpe",
15405
14
            FT_BOOLEAN, 16, NULL, 0x0010,
15406
14
            NULL, HFILL}
15407
14
        },
15408
14
        {&hf_btatt_position_quality_flags_ehpe,
15409
14
            {"EHPE", "btatt.position_quality.flags.ehpe",
15410
14
            FT_BOOLEAN, 16, NULL, 0x0008,
15411
14
            NULL, HFILL}
15412
14
        },
15413
14
        {&hf_btatt_position_quality_flags_time_to_first_fix,
15414
14
            {"Time to First Fix", "btatt.position_quality.flags.time_to_first_fix",
15415
14
            FT_BOOLEAN, 16, NULL, 0x0004,
15416
14
            NULL, HFILL}
15417
14
        },
15418
14
        {&hf_btatt_position_quality_flags_number_of_beacons_in_view,
15419
14
            {"Number of Beacons in View", "btatt.position_quality.flags.number_of_beacons_in_view",
15420
14
            FT_BOOLEAN, 16, NULL, 0x0002,
15421
14
            NULL, HFILL}
15422
14
        },
15423
14
        {&hf_btatt_position_quality_flags_number_of_beacons_in_solution,
15424
14
            {"Number of Beacons_in Solution", "btatt.position_quality.flags.number_of_beacons_in_solution",
15425
14
            FT_BOOLEAN, 16, NULL, 0x0001,
15426
14
            NULL, HFILL}
15427
14
        },
15428
14
        {&hf_btatt_position_quality_number_of_beacons_in_solution,
15429
14
            {"number_of_beacons_in_solution", "btatt.position_quality.number_of_beacons_in_solution",
15430
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15431
14
            NULL, HFILL}
15432
14
        },
15433
14
        {&hf_btatt_position_quality_number_of_beacons_in_view,
15434
14
            {"number_of_beacons_in_view", "btatt.position_quality.number_of_beacons_in_view",
15435
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15436
14
            NULL, HFILL}
15437
14
        },
15438
14
        {&hf_btatt_position_quality_time_to_first_fix,
15439
14
            {"time_to_first_fix", "btatt.position_quality.time_to_first_fix",
15440
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15441
14
            NULL, HFILL}
15442
14
        },
15443
14
        {&hf_btatt_position_quality_ehpe,
15444
14
            {"EHPE", "btatt.position_quality.ehpe",
15445
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
15446
14
            NULL, HFILL}
15447
14
        },
15448
14
        {&hf_btatt_position_quality_evpe,
15449
14
            {"EVPE", "btatt.position_quality.evpe",
15450
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
15451
14
            NULL, HFILL}
15452
14
        },
15453
14
        {&hf_btatt_position_quality_hdop,
15454
14
            {"HDOP", "btatt.position_quality.hdop",
15455
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15456
14
            NULL, HFILL}
15457
14
        },
15458
14
        {&hf_btatt_position_quality_vdop,
15459
14
            {"VDOP", "btatt.position_quality.vdop",
15460
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15461
14
            NULL, HFILL}
15462
14
        },
15463
14
        {&hf_btatt_ln_control_point_opcode,
15464
14
            {"Opcode", "btatt.ln_control_point.opcode",
15465
14
            FT_UINT8, BASE_HEX, VALS(ln_control_point_opcode), 0x0,
15466
14
            NULL, HFILL}
15467
14
        },
15468
14
        {&hf_btatt_ln_control_point_cumulative_value,
15469
14
            {"Cumulative Value", "btatt.ln_control_point.cumulative_value",
15470
14
            FT_UINT24, BASE_DEC, NULL, 0x0,
15471
14
            NULL, HFILL}
15472
14
        },
15473
14
        {&hf_btatt_ln_control_point_content_mask,
15474
14
            {"Content Mask", "btatt.ln_control_point.content_mask",
15475
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
15476
14
            NULL, HFILL}
15477
14
        },
15478
14
        {&hf_btatt_ln_control_point_content_mask_reserved,
15479
14
            {"Reserved", "btatt.ln_control_point.content_mask.reserved",
15480
14
            FT_UINT16, BASE_HEX, NULL, 0xFF80,
15481
14
            NULL, HFILL}
15482
14
        },
15483
14
        {&hf_btatt_ln_control_point_content_mask_utc_time,
15484
14
            {"UTC Time", "btatt.ln_control_point.content_mask.utc_time",
15485
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0040,
15486
14
            NULL, HFILL}
15487
14
        },
15488
14
        {&hf_btatt_ln_control_point_content_mask_rolling_time,
15489
14
            {"Rolling Time", "btatt.ln_control_point.content_mask.rolling_time",
15490
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0020,
15491
14
            NULL, HFILL}
15492
14
        },
15493
14
        {&hf_btatt_ln_control_point_content_mask_heading,
15494
14
            {"Heading", "btatt.ln_control_point.content_mask.heading",
15495
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0010,
15496
14
            NULL, HFILL}
15497
14
        },
15498
14
        {&hf_btatt_ln_control_point_content_mask_elevation,
15499
14
            {"Elevation", "btatt.ln_control_point.content_mask.elevation",
15500
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0008,
15501
14
            NULL, HFILL}
15502
14
        },
15503
14
        {&hf_btatt_ln_control_point_content_mask_location,
15504
14
            {"Location", "btatt.ln_control_point.content_mask.location",
15505
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0004,
15506
14
            NULL, HFILL}
15507
14
        },
15508
14
        {&hf_btatt_ln_control_point_content_mask_total_distance,
15509
14
            {"Total Distance", "btatt.ln_control_point.content_mask.total_distance",
15510
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0002,
15511
14
            NULL, HFILL}
15512
14
        },
15513
14
        {&hf_btatt_ln_control_point_content_mask_instantaneous_speed,
15514
14
            {"Instantaneous Speed", "btatt.ln_control_point.content_mask.instantaneous_speed",
15515
14
            FT_BOOLEAN, 16, TFS(&control_point_mask_value_tfs), 0x0001,
15516
14
            NULL, HFILL}
15517
14
        },
15518
14
        {&hf_btatt_ln_control_point_navigation_control,
15519
14
            {"Navigation Control", "btatt.ln_control_point.navigation_control",
15520
14
            FT_UINT8, BASE_HEX, VALS(ln_control_point_navigation_control_vals), 0x0,
15521
14
            NULL, HFILL}
15522
14
        },
15523
14
        {&hf_btatt_ln_control_point_route_number,
15524
14
            {"Route Number", "btatt.ln_control_point.route_number",
15525
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15526
14
            NULL, HFILL}
15527
14
        },
15528
14
        {&hf_btatt_ln_control_point_fix_rate,
15529
14
            {"Fix Rate", "btatt.ln_control_point.fix_rate",
15530
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15531
14
            NULL, HFILL}
15532
14
        },
15533
14
        {&hf_btatt_ln_control_point_elevation,
15534
14
            {"Elevation", "btatt.ln_control_point.elevation",
15535
14
            FT_INT24, BASE_DEC, NULL, 0x0,
15536
14
            NULL, HFILL}
15537
14
        },
15538
14
        {&hf_btatt_ln_control_point_request_opcode,
15539
14
            {"Request Opcode", "btatt.ln_control_point.request_opcode",
15540
14
            FT_UINT8, BASE_HEX, VALS(ln_control_point_opcode), 0x0,
15541
14
            NULL, HFILL}
15542
14
        },
15543
14
        {&hf_btatt_ln_control_point_response_value,
15544
14
            {"Response Value", "btatt.ln_control_point.response_value",
15545
14
            FT_UINT8, BASE_HEX, VALS(ln_control_point_response_value), 0x0,
15546
14
            NULL, HFILL}
15547
14
        },
15548
14
        {&hf_btatt_ln_control_point_response_value_number_of_routes,
15549
14
            {"Number of Routes", "btatt.ln_control_point.number_of_routes",
15550
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15551
14
            NULL, HFILL}
15552
14
        },
15553
14
        {&hf_btatt_ln_control_point_response_value_name_of_route,
15554
14
            {"Name_of Route", "btatt.ln_control_point.name_of_route",
15555
14
            FT_STRING, BASE_NONE, NULL, 0x0,
15556
14
            NULL, HFILL}
15557
14
        },
15558
14
        {&hf_btatt_body_composition_measurement_flags,
15559
14
            {"Flags", "btatt.body_composition_measurement.flags",
15560
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
15561
14
            NULL, HFILL}
15562
14
        },
15563
14
        {&hf_btatt_body_composition_measurement_flags_reserved,
15564
14
            {"Reserved", "btatt.body_composition_measurement.flags.reserved",
15565
14
            FT_UINT16, BASE_HEX, NULL, 0xE000,
15566
14
            NULL, HFILL}
15567
14
        },
15568
14
        {&hf_btatt_body_composition_measurement_flags_multiple_packet_measurement,
15569
14
            {"Multiple Packet Measurement", "btatt.body_composition_measurement.flags.multiple_packet_measurement",
15570
14
            FT_BOOLEAN, 16, NULL, 0x1000,
15571
14
            NULL, HFILL}
15572
14
        },
15573
14
        {&hf_btatt_body_composition_measurement_flags_height,
15574
14
            {"Height", "btatt.body_composition_measurement.flags.height",
15575
14
            FT_BOOLEAN, 16, NULL, 0x0800,
15576
14
            NULL, HFILL}
15577
14
        },
15578
14
        {&hf_btatt_body_composition_measurement_flags_weight,
15579
14
            {"Weight", "btatt.body_composition_measurement.flags.weight",
15580
14
            FT_BOOLEAN, 16, NULL, 0x0400,
15581
14
            NULL, HFILL}
15582
14
        },
15583
14
        {&hf_btatt_body_composition_measurement_flags_impedance,
15584
14
            {"Impedance", "btatt.body_composition_measurement.flags.impedance",
15585
14
            FT_BOOLEAN, 16, NULL, 0x0200,
15586
14
            NULL, HFILL}
15587
14
        },
15588
14
        {&hf_btatt_body_composition_measurement_flags_body_water_mass,
15589
14
            {"Body Water Mass", "btatt.body_composition_measurement.flags.body_water_mass",
15590
14
            FT_BOOLEAN, 16, NULL, 0x0100,
15591
14
            NULL, HFILL}
15592
14
        },
15593
14
        {&hf_btatt_body_composition_measurement_flags_soft_lean_mass,
15594
14
            {"Soft Lean Mass", "btatt.body_composition_measurement.flags.soft_lean_mass",
15595
14
            FT_BOOLEAN, 16, NULL, 0x0080,
15596
14
            NULL, HFILL}
15597
14
        },
15598
14
        {&hf_btatt_body_composition_measurement_flags_fat_free_mass,
15599
14
            {"Fat Free Mass", "btatt.body_composition_measurement.flags.fat_free_mass",
15600
14
            FT_BOOLEAN, 16, NULL, 0x0040,
15601
14
            NULL, HFILL}
15602
14
        },
15603
14
        {&hf_btatt_body_composition_measurement_flags_muscle_mass,
15604
14
            {"Muscle Mass", "btatt.body_composition_measurement.flags.muscle_mass",
15605
14
            FT_BOOLEAN, 16, NULL, 0x0020,
15606
14
            NULL, HFILL}
15607
14
        },
15608
14
        {&hf_btatt_body_composition_measurement_flags_muscle_percentage,
15609
14
            {"Muscle Percentage", "btatt.body_composition_measurement.flags.muscle_percentage",
15610
14
            FT_BOOLEAN, 16, NULL, 0x0010,
15611
14
            NULL, HFILL}
15612
14
        },
15613
14
        {&hf_btatt_body_composition_measurement_flags_basal_metabolism,
15614
14
            {"Basal Metabolism", "btatt.body_composition_measurement.flags.basal_metabolism",
15615
14
            FT_BOOLEAN, 16, NULL, 0x0008,
15616
14
            NULL, HFILL}
15617
14
        },
15618
14
        {&hf_btatt_body_composition_measurement_flags_user_id,
15619
14
            {"User ID", "btatt.body_composition_measurement.flags.user_id",
15620
14
            FT_BOOLEAN, 16, NULL, 0x0004,
15621
14
            NULL, HFILL}
15622
14
        },
15623
14
        {&hf_btatt_body_composition_measurement_flags_timestamp,
15624
14
            {"Timestamp", "btatt.body_composition_measurement.flags.timestamp",
15625
14
            FT_BOOLEAN, 16, NULL, 0x0002,
15626
14
            NULL, HFILL}
15627
14
        },
15628
14
        {&hf_btatt_body_composition_measurement_flags_measurement_units,
15629
14
            {"Measurement Units", "btatt.body_composition_measurement.flags.measurement_units",
15630
14
            FT_UINT16, BASE_HEX, VALS(body_composition_measurement_flags_measurement_units_vals), 0x0001,
15631
14
            NULL, HFILL}
15632
14
        },
15633
14
        {&hf_btatt_body_composition_measurement_body_fat_percentage,
15634
14
            {"Body Fat Percentage", "btatt.body_composition_measurement.body_fat_percentage",
15635
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15636
14
            NULL, HFILL}
15637
14
        },
15638
14
        {&hf_btatt_body_composition_measurement_timestamp,
15639
14
            {"Timestamp", "btatt.body_composition_measurement.timestamp",
15640
14
            FT_NONE, BASE_NONE, NULL, 0x0,
15641
14
            NULL, HFILL}
15642
14
        },
15643
14
        {&hf_btatt_body_composition_measurement_user_id,
15644
14
            {"User ID", "btatt.body_composition_measurement.user_id",
15645
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15646
14
            NULL, HFILL}
15647
14
        },
15648
14
        {&hf_btatt_body_composition_measurement_basal_metabolism,
15649
14
            {"Basal Metabolism", "btatt.body_composition_measurement.basal_metabolism",
15650
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15651
14
            NULL, HFILL}
15652
14
        },
15653
14
        {&hf_btatt_body_composition_measurement_muscle_percentage,
15654
14
            {"Muscle Percentage", "btatt.body_composition_measurement.muscle_percentage",
15655
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15656
14
            NULL, HFILL}
15657
14
        },
15658
14
        {&hf_btatt_body_composition_measurement_muscle_mass_lb,
15659
14
            {"Muscle Mass [lb]", "btatt.body_composition_measurement.muscle_mass.lb",
15660
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15661
14
            NULL, HFILL}
15662
14
        },
15663
14
        {&hf_btatt_body_composition_measurement_muscle_mass_kg,
15664
14
            {"Muscle Mass [kg]", "btatt.body_composition_measurement.muscle_mass.kg",
15665
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15666
14
            NULL, HFILL}
15667
14
        },
15668
14
        {&hf_btatt_body_composition_measurement_fat_free_mass_lb,
15669
14
            {"Fat Free Mass [lb]", "btatt.body_composition_measurement.fat_free_mass.lb",
15670
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15671
14
            NULL, HFILL}
15672
14
        },
15673
14
        {&hf_btatt_body_composition_measurement_fat_free_mass_kg,
15674
14
            {"Fat Free Mass [kg]", "btatt.body_composition_measurement.fat_free_mass.kg",
15675
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15676
14
            NULL, HFILL}
15677
14
        },
15678
14
        {&hf_btatt_body_composition_measurement_soft_lean_mass_lb,
15679
14
            {"Soft Lean Mass [lb]", "btatt.body_composition_measurement.soft_lean_mass.lb",
15680
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15681
14
            NULL, HFILL}
15682
14
        },
15683
14
        {&hf_btatt_body_composition_measurement_soft_lean_mass_kg,
15684
14
            {"Soft Lean Mass [kg]", "btatt.body_composition_measurement.soft_lean_mass.kg",
15685
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15686
14
            NULL, HFILL}
15687
14
        },
15688
14
        {&hf_btatt_body_composition_measurement_body_water_mass_lb,
15689
14
            {"Body Water Mass [lb]", "btatt.body_composition_measurement.body_water_mass.lb",
15690
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15691
14
            NULL, HFILL}
15692
14
        },
15693
14
        {&hf_btatt_body_composition_measurement_body_water_mass_kg,
15694
14
            {"Body Water Mass [kg]", "btatt.body_composition_measurement.body_water_mass.kg",
15695
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15696
14
            NULL, HFILL}
15697
14
        },
15698
14
        {&hf_btatt_body_composition_measurement_impedance,
15699
14
            {"Impedance", "btatt.body_composition_measurement.impedance",
15700
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15701
14
            NULL, HFILL}
15702
14
        },
15703
14
        {&hf_btatt_body_composition_measurement_weight_lb,
15704
14
            {"Weight [lb]", "btatt.body_composition_measurement.weight.lb",
15705
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15706
14
            NULL, HFILL}
15707
14
        },
15708
14
        {&hf_btatt_body_composition_measurement_weight_kg,
15709
14
            {"Weight [kg]", "btatt.body_composition_measurement.weight.kg",
15710
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15711
14
            NULL, HFILL}
15712
14
        },
15713
14
        {&hf_btatt_body_composition_measurement_height_inches,
15714
14
            {"Height [inches]", "btatt.body_composition_measurement.height.inches",
15715
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15716
14
            NULL, HFILL}
15717
14
        },
15718
14
        {&hf_btatt_body_composition_measurement_height_meter,
15719
14
            {"Height [meter]", "btatt.body_composition_measurement.height.meter",
15720
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15721
14
            NULL, HFILL}
15722
14
        },
15723
14
        {&hf_btatt_weight_measurement_flags,
15724
14
            {"Flags", "btatt.weight_measurement.flags",
15725
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
15726
14
            NULL, HFILL}
15727
14
        },
15728
14
        {&hf_btatt_weight_measurement_flags_reserved,
15729
14
            {"Reserved", "btatt.weight_measurement.flags.reserved",
15730
14
            FT_UINT8, BASE_HEX, NULL, 0xF0,
15731
14
            NULL, HFILL}
15732
14
        },
15733
14
        {&hf_btatt_weight_measurement_flags_bmi_and_height,
15734
14
            {"BMI and Height", "btatt.weight_measurement.flags.bmi_and_height",
15735
14
            FT_BOOLEAN, 8, NULL, 0x08,
15736
14
            NULL, HFILL}
15737
14
        },
15738
14
        {&hf_btatt_weight_measurement_flags_user_id,
15739
14
            {"User ID", "btatt.weight_measurement.flags.user_id",
15740
14
            FT_BOOLEAN, 8, NULL, 0x04,
15741
14
            NULL, HFILL}
15742
14
        },
15743
14
        {&hf_btatt_weight_measurement_flags_timestamp,
15744
14
            {"Timestamp", "btatt.weight_measurement.flags.timestamp",
15745
14
            FT_BOOLEAN, 8, NULL, 0x02,
15746
14
            NULL, HFILL}
15747
14
        },
15748
14
        {&hf_btatt_weight_measurement_flags_measurement_units,
15749
14
            {"Measurement Units", "btatt.weight_measurement.flags.measurement_units",
15750
14
            FT_BOOLEAN, 8, TFS(&weight_measurement_flags_measurement_units_tfs), 0x01,
15751
14
            NULL, HFILL}
15752
14
        },
15753
14
        {&hf_btatt_weight_measurement_weight_lb,
15754
14
            {"Weight [lb]", "btatt.weight_measurement.weight.lb",
15755
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15756
14
            NULL, HFILL}
15757
14
        },
15758
14
        {&hf_btatt_weight_measurement_weight_kg,
15759
14
            {"Weight [kg]", "btatt.weight_measurement.weight.kg",
15760
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15761
14
            NULL, HFILL}
15762
14
        },
15763
14
        {&hf_btatt_weight_measurement_timestamp,
15764
14
            {"Timestamp", "btatt.weight_measurement.timestamp",
15765
14
            FT_NONE, BASE_NONE, NULL, 0x0,
15766
14
            NULL, HFILL}
15767
14
        },
15768
14
        {&hf_btatt_weight_measurement_user_id,
15769
14
            {"User ID", "btatt.weight_measurement.user_id",
15770
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15771
14
            NULL, HFILL}
15772
14
        },
15773
14
        {&hf_btatt_weight_measurement_bmi,
15774
14
            {"BMI", "btatt.weight_measurement.bmi",
15775
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15776
14
            NULL, HFILL}
15777
14
        },
15778
14
        {&hf_btatt_weight_measurement_height_in,
15779
14
            {"Height [in]", "btatt.weight_measurement.height.in",
15780
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15781
14
            NULL, HFILL}
15782
14
        },
15783
14
        {&hf_btatt_weight_measurement_height_m,
15784
14
            {"Height [m]", "btatt.weight_measurement.height.m",
15785
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15786
14
            NULL, HFILL}
15787
14
        },
15788
14
        {&hf_btatt_user_control_point_opcode,
15789
14
            {"Opcode", "btatt.user_control_point.opcode",
15790
14
            FT_UINT8, BASE_HEX, VALS(user_control_point_opcode_vals), 0x0,
15791
14
            NULL, HFILL}
15792
14
        },
15793
14
        {&hf_btatt_user_control_point_request_opcode,
15794
14
            {"Request Opcode", "btatt.user_control_point.request_opcode",
15795
14
            FT_UINT8, BASE_HEX, VALS(user_control_point_opcode_vals), 0x0,
15796
14
            NULL, HFILL}
15797
14
        },
15798
14
        {&hf_btatt_user_control_point_response_value,
15799
14
            {"Response Value", "btatt.user_control_point.response_value",
15800
14
            FT_UINT8, BASE_HEX, VALS(user_control_point_response_value_vals), 0x0,
15801
14
            NULL, HFILL}
15802
14
        },
15803
14
        {&hf_btatt_user_control_point_consent_code,
15804
14
            {"Consent Code", "btatt.user_control_point.consent_code",
15805
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
15806
14
            NULL, HFILL}
15807
14
        },
15808
14
        {&hf_btatt_cgm_measurement_size,
15809
14
            {"Size", "btatt.cgm_measurement.size",
15810
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
15811
14
            NULL, HFILL}
15812
14
        },
15813
14
        {&hf_btatt_cgm_measurement_flags,
15814
14
            {"Flags", "btatt.cgm_measurement.flags",
15815
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
15816
14
            NULL, HFILL}
15817
14
        },
15818
14
        {&hf_btatt_cgm_measurement_flags_cgm_trend_information,
15819
14
            {"CGM Trend Information", "btatt.cgm_measurement.flags.cgm_trend_information",
15820
14
            FT_BOOLEAN, 8, NULL, 0x80,
15821
14
            NULL, HFILL}
15822
14
        },
15823
14
        {&hf_btatt_cgm_measurement_flags_cgm_quality,
15824
14
            {"CGM Quality", "btatt.cgm_measurement.flags.cgm_quality",
15825
14
            FT_BOOLEAN, 8, NULL, 0x40,
15826
14
            NULL, HFILL}
15827
14
        },
15828
14
        {&hf_btatt_cgm_measurement_flags_reserved,
15829
14
            {"Reserved", "btatt.cgm_measurement.flags.reserved",
15830
14
            FT_UINT8, BASE_HEX, NULL, 0x38,
15831
14
            NULL, HFILL}
15832
14
        },
15833
14
        {&hf_btatt_cgm_measurement_flags_sensor_status_annunciation_warning,
15834
14
            {"Sensor Status Annunciation - Warning", "btatt.cgm_measurement.flags.sensor_status_annunciation.warning",
15835
14
            FT_BOOLEAN, 8, NULL, 0x04,
15836
14
            NULL, HFILL}
15837
14
        },
15838
14
        {&hf_btatt_cgm_measurement_flags_sensor_status_annunciation_cal_temp,
15839
14
            {"Sensor Status Annunciation - Cal/Temp", "btatt.cgm_measurement.flags.sensor_status_annunciation.cal_temp",
15840
14
            FT_BOOLEAN, 8, NULL, 0x02,
15841
14
            NULL, HFILL}
15842
14
        },
15843
14
        {&hf_btatt_cgm_measurement_flags_sensor_status_annunciation_status,
15844
14
            {"Sensor Status Annunciation - Status", "btatt.cgm_measurement.flags.sensor_status_annunciation.status",
15845
14
            FT_BOOLEAN, 8, NULL, 0x01,
15846
14
            NULL, HFILL}
15847
14
        },
15848
14
        {&hf_btatt_cgm_measurement_glucose_concentration,
15849
14
            {"Glucose Concentration", "btatt.cgm_measurement.glucose_concentration",
15850
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
15851
14
            NULL, HFILL}
15852
14
        },
15853
14
        {&hf_btatt_cgm_measurement_time_offset,
15854
14
            {"Time Offset", "btatt.cgm_measurement.time_offset",
15855
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
15856
14
            NULL, HFILL}
15857
14
        },
15858
14
        {&hf_btatt_cgm_sensor_status_annunciation,
15859
14
            {"Sensor Status Annunciation", "btatt.cgm.sensor_status_annunciation",
15860
14
            FT_NONE, BASE_NONE, NULL, 0x0,
15861
14
            NULL, HFILL}
15862
14
        },
15863
14
        {&hf_btatt_cgm_sensor_status_annunciation_status,
15864
14
            {"Status", "btatt.cgm.sensor_status_annunciation.status",
15865
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
15866
14
            NULL, HFILL}
15867
14
        },
15868
14
        {&hf_btatt_cgm_sensor_status_annunciation_status_reserved,
15869
14
            {"Reserved", "btatt.cgm.sensor_status_annunciation.status.reserved",
15870
14
            FT_UINT8, BASE_HEX, NULL, 0xC0,
15871
14
            NULL, HFILL}
15872
14
        },
15873
14
        {&hf_btatt_cgm_sensor_status_annunciation_status_general_device_fault_has_occurred_in_the_sensor,
15874
14
            {"General Device Fault has Occurred in the Sensor", "btatt.cgm.sensor_status_annunciation.status.general_device_fault_has_occurred_in_the_sensor",
15875
14
            FT_BOOLEAN, 8, NULL, 0x20,
15876
14
            NULL, HFILL}
15877
14
        },
15878
14
        {&hf_btatt_cgm_sensor_status_annunciation_status_device_specific_alert,
15879
14
            {"Device Specific Alert", "btatt.cgm.sensor_status_annunciation.status.device_specific_alert",
15880
14
            FT_BOOLEAN, 8, NULL, 0x10,
15881
14
            NULL, HFILL}
15882
14
        },
15883
14
        {&hf_btatt_cgm_sensor_status_annunciation_status_sensor_malfunction,
15884
14
            {"Sensor Malfunction", "btatt.cgm.sensor_status_annunciation.status.sensor_malfunction",
15885
14
            FT_BOOLEAN, 8, NULL, 0x08,
15886
14
            NULL, HFILL}
15887
14
        },
15888
14
        {&hf_btatt_cgm_sensor_status_annunciation_status_sensor_type_incorrect_for_device,
15889
14
            {"Sensor Type Incorrect for Device", "btatt.cgm.sensor_status_annunciation.status.sensor_type_incorrect_for_device",
15890
14
            FT_BOOLEAN, 8, NULL, 0x04,
15891
14
            NULL, HFILL}
15892
14
        },
15893
14
        {&hf_btatt_cgm_sensor_status_annunciation_status_device_battery_low,
15894
14
            {"Device Battery Low", "btatt.cgm.sensor_status_annunciation.status.device_battery_low",
15895
14
            FT_BOOLEAN, 8, NULL, 0x02,
15896
14
            NULL, HFILL}
15897
14
        },
15898
14
        {&hf_btatt_cgm_sensor_status_annunciation_status_session_stopped,
15899
14
            {"Session Stopped", "btatt.cgm.sensor_status_annunciation.status.session_stopped",
15900
14
            FT_BOOLEAN, 8, NULL, 0x01,
15901
14
            NULL, HFILL}
15902
14
        },
15903
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp,
15904
14
            {"Cal/Temp", "btatt.cgm.sensor_status_annunciation.cal_temp",
15905
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
15906
14
            NULL, HFILL}
15907
14
        },
15908
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_reserved,
15909
14
            {"Reserved", "btatt.cgm.sensor_status_annunciation.cal_temp.reserved",
15910
14
            FT_UINT8, BASE_HEX, NULL, 0xC0,
15911
14
            NULL, HFILL}
15912
14
        },
15913
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_low_for_valid_test_result_at_time_of_measurement,
15914
14
            {"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",
15915
14
            FT_BOOLEAN, 8, NULL, 0x20,
15916
14
            NULL, HFILL}
15917
14
        },
15918
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_sensor_temperature_too_high_for_valid_test_result_at_time_of_measurement,
15919
14
            {"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",
15920
14
            FT_BOOLEAN, 8, NULL, 0x10,
15921
14
            NULL, HFILL}
15922
14
        },
15923
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_required,
15924
14
            {"Calibration Required", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.calibration_required",
15925
14
            FT_BOOLEAN, 8, NULL, 0x08,
15926
14
            NULL, HFILL}
15927
14
        },
15928
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_recommended,
15929
14
            {"Calibration Recommended", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.calibration_recommended",
15930
14
            FT_BOOLEAN, 8, NULL, 0x04,
15931
14
            NULL, HFILL}
15932
14
        },
15933
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_calibration_not_allowed,
15934
14
            {"Calibration not Allowed", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.calibration_not_allowed",
15935
14
            FT_BOOLEAN, 8, NULL, 0x02,
15936
14
            NULL, HFILL}
15937
14
        },
15938
14
        {&hf_btatt_cgm_sensor_status_annunciation_cal_temp_time_synchronization_between_sensor_and_collector_required,
15939
14
            {"Time Synchronization between Sensor and Collector Required", "btatt.cgm_measurement.sensor_cal_temp_annunciation.cal_temp.time_synchronization_between_sensor_and_collector_required",
15940
14
            FT_BOOLEAN, 8, NULL, 0x01,
15941
14
            NULL, HFILL}
15942
14
        },
15943
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning,
15944
14
            {"Warning", "btatt.cgm.sensor_status_annunciation.warning",
15945
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
15946
14
            NULL, HFILL}
15947
14
        },
15948
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_device_can_process,
15949
14
            {"Sensor Result Higher than the Device Can Process", "btatt.cgm.sensor_status_annunciation.warning.sensor_result_higher_than_the_device_can_process",
15950
14
            FT_BOOLEAN, 8, NULL, 0x80,
15951
14
            NULL, HFILL}
15952
14
        },
15953
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_device_can_process,
15954
14
            {"Sensor Result Lower than the Device Can Process", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_lower_than_the_device_can_process",
15955
14
            FT_BOOLEAN, 8, NULL, 0x40,
15956
14
            NULL, HFILL}
15957
14
        },
15958
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_increase_exceeded,
15959
14
            {"Sensor Rate of Increase Exceeded", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_rate_of_increase_exceeded",
15960
14
            FT_BOOLEAN, 8, NULL, 0x20,
15961
14
            NULL, HFILL}
15962
14
        },
15963
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_rate_of_decrease_exceeded,
15964
14
            {"Sensor Rate of Decrease Exceeded", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_rate_of_decrease_exceeded",
15965
14
            FT_BOOLEAN, 8, NULL, 0x10,
15966
14
            NULL, HFILL}
15967
14
        },
15968
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_hyper_level,
15969
14
            {"Sensor Result Higher than the Hyper Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_higher_than_the_hyper_level",
15970
14
            FT_BOOLEAN, 8, NULL, 0x08,
15971
14
            NULL, HFILL}
15972
14
        },
15973
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_hypo_level,
15974
14
            {"Sensor Result Lower than the Hypo Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_lower_than_the_hypo_level",
15975
14
            FT_BOOLEAN, 8, NULL, 0x04,
15976
14
            NULL, HFILL}
15977
14
        },
15978
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_higher_than_the_patient_high_level,
15979
14
            {"Sensor Result Higher than the Patient High Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_higher_than_the_patient_high_level",
15980
14
            FT_BOOLEAN, 8, NULL, 0x02,
15981
14
            NULL, HFILL}
15982
14
        },
15983
14
        {&hf_btatt_cgm_sensor_status_annunciation_warning_sensor_result_lower_than_the_patient_low_level,
15984
14
            {"Sensor Result Lower than the Patient Low Level", "btatt.cgm_measurement.sensor_warning_annunciation.warning.sensor_result_lower_than_the_patient_low_level",
15985
14
            FT_BOOLEAN, 8, NULL, 0x01,
15986
14
            NULL, HFILL}
15987
14
        },
15988
14
        {&hf_btatt_cgm_measurement_trend_information,
15989
14
            {"Trend Information", "btatt.cgm_measurement.trend_information",
15990
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
15991
14
            NULL, HFILL}
15992
14
        },
15993
14
        {&hf_btatt_cgm_measurement_quality,
15994
14
            {"Quality", "btatt.cgm_measurement.quality",
15995
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
15996
14
            NULL, HFILL}
15997
14
        },
15998
14
        {&hf_btatt_cgm_e2e_crc,
15999
14
            {"E2E-CRC", "btatt.cgm.e2e_crc",
16000
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
16001
14
            NULL, HFILL}
16002
14
        },
16003
14
        {&hf_btatt_cgm_feature_feature,
16004
14
            {"Feature", "btatt.cgm_feature.feature",
16005
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
16006
14
            NULL, HFILL}
16007
14
        },
16008
14
        {&hf_btatt_cgm_feature_feature_reserved,
16009
14
            {"Reserved", "btatt.cgm_feature.feature.reserved",
16010
14
            FT_UINT24, BASE_HEX, NULL, 0xFE0000,
16011
14
            NULL, HFILL}
16012
14
        },
16013
14
        {&hf_btatt_cgm_feature_feature_quality,
16014
14
            {"Quality", "btatt.cgm_feature.feature.quality",
16015
14
            FT_BOOLEAN, 24, NULL, 0x010000,
16016
14
            NULL, HFILL}
16017
14
        },
16018
14
        {&hf_btatt_cgm_feature_feature_trend_information,
16019
14
            {"Trend Information", "btatt.cgm_feature.feature.trend_information",
16020
14
            FT_BOOLEAN, 24, NULL, 0x008000,
16021
14
            NULL, HFILL}
16022
14
        },
16023
14
        {&hf_btatt_cgm_feature_feature_multiple_sessions,
16024
14
            {"Multiple Sessions", "btatt.cgm_feature.feature.multiple_sessions",
16025
14
            FT_BOOLEAN, 24, NULL, 0x004000,
16026
14
            NULL, HFILL}
16027
14
        },
16028
14
        {&hf_btatt_cgm_feature_feature_multiple_bond,
16029
14
            {"Multiple Bond", "btatt.cgm_feature.feature.multiple_bond",
16030
14
            FT_BOOLEAN, 24, NULL, 0x002000,
16031
14
            NULL, HFILL}
16032
14
        },
16033
14
        {&hf_btatt_cgm_feature_feature_e2e_crc,
16034
14
            {"E2E-CRC", "btatt.cgm_feature.feature.e2e_crc",
16035
14
            FT_BOOLEAN, 24, NULL, 0x001000,
16036
14
            NULL, HFILL}
16037
14
        },
16038
14
        {&hf_btatt_cgm_feature_feature_general_device_fault,
16039
14
            {"General Device Fault", "btatt.cgm_feature.feature.general_device_fault",
16040
14
            FT_BOOLEAN, 24, NULL, 0x000800,
16041
14
            NULL, HFILL}
16042
14
        },
16043
14
        {&hf_btatt_cgm_feature_feature_sensor_type_error_detection,
16044
14
            {"Sensor Type Error Detection", "btatt.cgm_feature.feature.sensor_type_error_detection",
16045
14
            FT_BOOLEAN, 24, NULL, 0x000400,
16046
14
            NULL, HFILL}
16047
14
        },
16048
14
        {&hf_btatt_cgm_feature_feature_low_battery_detection,
16049
14
            {"Low Battery Detection", "btatt.cgm_feature.feature.low_battery_detection",
16050
14
            FT_BOOLEAN, 24, NULL, 0x000200,
16051
14
            NULL, HFILL}
16052
14
        },
16053
14
        {&hf_btatt_cgm_feature_feature_sensor_result_high_low_detection,
16054
14
            {"Sensor Result High-Low Detection", "btatt.cgm_feature.feature.sensor_result_high_low_detection",
16055
14
            FT_BOOLEAN, 24, NULL, 0x000100,
16056
14
            NULL, HFILL}
16057
14
        },
16058
14
        {&hf_btatt_cgm_feature_feature_sensor_temperature_high_low_detection,
16059
14
            {"Sensor Temperature High-Low Detection", "btatt.cgm_feature.feature.sensor_temperature_high_low_detection",
16060
14
            FT_BOOLEAN, 24, NULL, 0x000080,
16061
14
            NULL, HFILL}
16062
14
        },
16063
14
        {&hf_btatt_cgm_feature_feature_sensor_malfunction_detection,
16064
14
            {"Sensor Malfunction Detection", "btatt.cgm_feature.feature.sensor_malfunction_detection",
16065
14
            FT_BOOLEAN, 24, NULL, 0x000040,
16066
14
            NULL, HFILL}
16067
14
        },
16068
14
        {&hf_btatt_cgm_feature_feature_device_specific_alert,
16069
14
            {"Device Specific Alert", "btatt.cgm_feature.feature.device_specific_alert",
16070
14
            FT_BOOLEAN, 24, NULL, 0x000020,
16071
14
            NULL, HFILL}
16072
14
        },
16073
14
        {&hf_btatt_cgm_feature_feature_rate_of_increase_decrease_alerts,
16074
14
            {"Rate of Increase Decrease Alerts", "btatt.cgm_feature.feature.rate_of_increase_decrease_alerts",
16075
14
            FT_BOOLEAN, 24, NULL, 0x000010,
16076
14
            NULL, HFILL}
16077
14
        },
16078
14
        {&hf_btatt_cgm_feature_feature_hyper_alerts,
16079
14
            {"Hyper Alerts", "btatt.cgm_feature.feature.hyper_alerts",
16080
14
            FT_BOOLEAN, 24, NULL, 0x000008,
16081
14
            NULL, HFILL}
16082
14
        },
16083
14
        {&hf_btatt_cgm_feature_feature_hypo_alerts,
16084
14
            {"Hypo Alerts", "btatt.cgm_feature.feature.hypo_alerts",
16085
14
            FT_BOOLEAN, 24, NULL, 0x000004,
16086
14
            NULL, HFILL}
16087
14
        },
16088
14
        {&hf_btatt_cgm_feature_feature_patient_high_low_alerts,
16089
14
            {"Patient High-Low Alerts", "btatt.cgm_feature.feature.patient_high_low_alerts",
16090
14
            FT_BOOLEAN, 24, NULL, 0x000002,
16091
14
            NULL, HFILL}
16092
14
        },
16093
14
        {&hf_btatt_cgm_feature_feature_calibration,
16094
14
            {"Calibration", "btatt.cgm_feature.feature.calibration",
16095
14
            FT_BOOLEAN, 24, NULL, 0x000001,
16096
14
            NULL, HFILL}
16097
14
        },
16098
14
        {&hf_btatt_cgm_type_and_sample_location,
16099
14
            {"Type and Sample Location", "btatt.cgm.type_and_sample_location",
16100
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
16101
14
            NULL, HFILL}
16102
14
        },
16103
14
        {&hf_btatt_cgm_type,
16104
14
            {"Type and Sample Location", "btatt.cgm.type_and_sample_location.type",
16105
14
            FT_UINT8, BASE_HEX, VALS(cgm_feature_type_vals), 0xF0,
16106
14
            NULL, HFILL}
16107
14
        },
16108
14
        {&hf_btatt_cgm_sample_location,
16109
14
            {"Sample Location", "btatt.cgm.type_and_sample_location.sample_location",
16110
14
            FT_UINT8, BASE_HEX, VALS(cgm_feature_sample_location_vals), 0x0F,
16111
14
            NULL, HFILL}
16112
14
        },
16113
14
        {&hf_btatt_cgm_time_offset,
16114
14
            {"Time Offset", "btatt.cgm.time_offset",
16115
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16116
14
            NULL, HFILL}
16117
14
        },
16118
14
        {&hf_btatt_cgm_status,
16119
14
            {"Status", "btatt.cgm.status",
16120
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
16121
14
            NULL, HFILL}
16122
14
        },
16123
14
        {&hf_btatt_cgm_session_start_time,
16124
14
            {"Session Start Time", "btatt.cgm.session_start_time",
16125
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16126
14
            NULL, HFILL}
16127
14
        },
16128
14
        {&hf_btatt_cgm_session_run_time,
16129
14
            {"Session Run Time", "btatt.cgm.session_run_time",
16130
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16131
14
            NULL, HFILL}
16132
14
        },
16133
14
        {&hf_btatt_cgm_specific_ops_control_point_opcode,
16134
14
            {"Opcode", "btatt.cgm_specific_ops_control_point.opcode",
16135
14
            FT_UINT8, BASE_HEX, VALS(cgm_specific_ops_control_point_opcode_vals), 0x0,
16136
14
            NULL, HFILL}
16137
14
        },
16138
14
        {&hf_btatt_cgm_specific_ops_control_point_operand,
16139
14
            {"Operand", "btatt.cgm_specific_ops_control_point.operand",
16140
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16141
14
            NULL, HFILL}
16142
14
        },
16143
14
        {&hf_btatt_cgm_specific_ops_control_point_operand_communication_interval,
16144
14
            {"Communication Interval", "btatt.cgm_specific_ops_control_point.operand.communication_interval",
16145
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
16146
14
            NULL, HFILL}
16147
14
        },
16148
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_glucose_concentration,
16149
14
            {"Calibration Glucose Concentration", "btatt.cgm_specific_ops_control_point.operand.calibration_glucose_concentration",
16150
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16151
14
            NULL, HFILL}
16152
14
        },
16153
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_time,
16154
14
            {"Calibration Time", "btatt.cgm_specific_ops_control_point.operand.calibration_time",
16155
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16156
14
            NULL, HFILL}
16157
14
        },
16158
14
        {&hf_btatt_cgm_specific_ops_control_point_next_calibration_time,
16159
14
            {"Next Calibration Time", "btatt.cgm_specific_ops_control_point.operand.next_calibration_time",
16160
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16161
14
            NULL, HFILL}
16162
14
        },
16163
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_data_record_number,
16164
14
            {"Calibration Data Record Number", "btatt.cgm_specific_ops_control_point.operand.calibration_data_record_number",
16165
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16166
14
            NULL, HFILL}
16167
14
        },
16168
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_status,
16169
14
            {"Calibration Status", "btatt.cgm_specific_ops_control_point.operand.calibration_status",
16170
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
16171
14
            NULL, HFILL}
16172
14
        },
16173
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_status_reserved,
16174
14
            {"Reserved", "btatt.cgm_specific_ops_control_point.operand.calibration_status.reserved",
16175
14
            FT_UINT8, BASE_DEC, NULL, 0xF8,
16176
14
            NULL, HFILL}
16177
14
        },
16178
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_status_pending,
16179
14
            {"Pending", "btatt.cgm_specific_ops_control_point.operand.calibration_status.pending",
16180
14
            FT_BOOLEAN, 8, NULL, 0x04,
16181
14
            NULL, HFILL}
16182
14
        },
16183
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_status_out_of_range,
16184
14
            {"Out of Range", "btatt.cgm_specific_ops_control_point.operand.calibration_status.out_of_range",
16185
14
            FT_BOOLEAN, 8, NULL, 0x02,
16186
14
            NULL, HFILL}
16187
14
        },
16188
14
        {&hf_btatt_cgm_specific_ops_control_point_calibration_status_rejected,
16189
14
            {"Rejected", "btatt.cgm_specific_ops_control_point.operand.calibration_status.rejected",
16190
14
            FT_BOOLEAN, 8, NULL, 0x01,
16191
14
            NULL, HFILL}
16192
14
        },
16193
14
        {&hf_btatt_cgm_specific_ops_control_point_operand_calibration_data_record_number,
16194
14
            {"Calibration Data Record Number", "btatt.cgm_specific_ops_control_point.operand.calibration_data_record_number",
16195
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16196
14
            NULL, HFILL}
16197
14
        },
16198
14
        {&hf_btatt_cgm_specific_ops_control_point_operand_alert_level,
16199
14
            {"Alert Level [mg/dL]", "btatt.cgm_specific_ops_control_point.operand.alert_level",
16200
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16201
14
            NULL, HFILL}
16202
14
        },
16203
14
        {&hf_btatt_cgm_specific_ops_control_point_operand_alert_level_rate,
16204
14
            {"Alert Level Rate [mg/dL/min]", "btatt.cgm_specific_ops_control_point.operand.alert_level_rate",
16205
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16206
14
            NULL, HFILL}
16207
14
        },
16208
14
        {&hf_btatt_cgm_specific_ops_control_point_request_opcode,
16209
14
            {"Request Opcode", "btatt.cgm_specific_ops_control_point.request_opcode",
16210
14
            FT_UINT8, BASE_HEX, VALS(cgm_specific_ops_control_point_opcode_vals), 0x0,
16211
14
            NULL, HFILL}
16212
14
        },
16213
14
        {&hf_btatt_cgm_specific_ops_control_point_response_code,
16214
14
            {"Response Code", "btatt.cgm_specific_ops_control_point.response_code",
16215
14
            FT_UINT8, BASE_HEX, VALS(cgm_specific_ops_control_point_response_code_vals), 0x0,
16216
14
            NULL, HFILL}
16217
14
        },
16218
14
        {&hf_btatt_uri,
16219
14
            {"URI", "btatt.uri",
16220
14
            FT_STRING, BASE_NONE, NULL, 0x0,
16221
14
            NULL, HFILL}
16222
14
        },
16223
14
        {&hf_btatt_http_headers,
16224
14
            {"HTTP Headers", "btatt.http_headers",
16225
14
            FT_STRING, BASE_NONE, NULL, 0x0,
16226
14
            NULL, HFILL}
16227
14
        },
16228
14
        {&hf_btatt_http_status_code,
16229
14
            {"HTTP Status Code", "btatt.http_status_code",
16230
14
            FT_UINT16, BASE_DEC, VALS(vals_http_status_code), 0x0,
16231
14
            NULL, HFILL}
16232
14
        },
16233
14
        {&hf_btatt_http_data_status,
16234
14
            {"HTTP Data Status", "btatt.http_data_status",
16235
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
16236
14
            NULL, HFILL}
16237
14
        },
16238
14
        {&hf_btatt_http_data_status_headers_received,
16239
14
            {"Headers Received", "btatt.http_data_status.headers_received",
16240
14
            FT_BOOLEAN, 8, NULL, 0x01,
16241
14
            NULL, HFILL}
16242
14
        },
16243
14
        {&hf_btatt_http_data_status_headers_truncated,
16244
14
            {"Headers Truncated", "btatt.http_data_status.headers_truncated",
16245
14
            FT_BOOLEAN, 8, NULL, 0x02,
16246
14
            NULL, HFILL}
16247
14
        },
16248
14
        {&hf_btatt_http_data_status_body_received,
16249
14
            {"Body Received", "btatt.http_data_status.body_received",
16250
14
            FT_BOOLEAN, 8, NULL, 0x04,
16251
14
            NULL, HFILL}
16252
14
        },
16253
14
        {&hf_btatt_http_data_status_body_truncated,
16254
14
            {"Body Truncated", "btatt.http_data_status.body_truncated",
16255
14
            FT_BOOLEAN, 8, NULL, 0x08,
16256
14
            NULL, HFILL}
16257
14
        },
16258
14
        {&hf_btatt_http_data_status_reserved,
16259
14
            {"Reserved", "btatt.http_data_status.reserved",
16260
14
            FT_UINT8, BASE_HEX, NULL, 0xF0,
16261
14
            NULL, HFILL}
16262
14
        },
16263
14
        {&hf_btatt_http_entity_body,
16264
14
            {"HTTP Entity Body", "btatt.http_entity_body",
16265
14
            FT_STRING, BASE_NONE, NULL, 0x0,
16266
14
            NULL, HFILL}
16267
14
        },
16268
14
        {&hf_btatt_http_control_point_opcode,
16269
14
            {"Opcode", "btatt.control_point.opcode",
16270
14
            FT_UINT8, BASE_HEX, VALS(http_control_point_opcode_vals), 0x0,
16271
14
            NULL, HFILL}
16272
14
        },
16273
14
        {&hf_btatt_https_security,
16274
14
            {"HTTPS Security", "btatt.https_security",
16275
14
            FT_UINT8, BASE_HEX, VALS(https_security_vals), 0x0,
16276
14
            NULL, HFILL}
16277
14
        },
16278
14
        {&hf_btatt_tds_opcode,
16279
14
            {"Opcode", "btatt.tds.opcode",
16280
14
            FT_UINT8, BASE_HEX, VALS(tds_opcode_vals), 0x0,
16281
14
            NULL, HFILL}
16282
14
        },
16283
14
        {&hf_btatt_tds_organization_id,
16284
14
            {"Organization ID", "btatt.tds.organization_id",
16285
14
            FT_UINT8, BASE_HEX, VALS(tds_organization_id_vals), 0x0,
16286
14
            NULL, HFILL}
16287
14
        },
16288
14
        {&hf_btatt_tds_result_code,
16289
14
            {"Result Code", "btatt.tds.result_code",
16290
14
            FT_UINT8, BASE_HEX, VALS(tds_result_code_vals), 0x0,
16291
14
            NULL, HFILL}
16292
14
        },
16293
14
        {&hf_btatt_tds_data,
16294
14
            {"Data", "btatt.tds.data",
16295
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
16296
14
            NULL, HFILL}
16297
14
        },
16298
14
        {&hf_btatt_ots_feature_oacp,
16299
14
            {"OACP Features", "btatt.ots.oacp",
16300
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
16301
14
            NULL, HFILL}
16302
14
        },
16303
14
        {&hf_btatt_ots_feature_oacp_reserved,
16304
14
            {"Reserved", "btatt.ots.oacp.reserved",
16305
14
            FT_BOOLEAN, 32, NULL, 0xFFFFFC00,
16306
14
            NULL, HFILL}
16307
14
        },
16308
14
        {&hf_btatt_ots_feature_oacp_abort,
16309
14
            {"Abort", "btatt.ots.oacp.abort",
16310
14
            FT_BOOLEAN, 32, NULL, 0x00000200,
16311
14
            NULL, HFILL}
16312
14
        },
16313
14
        {&hf_btatt_ots_feature_oacp_patching_of_object,
16314
14
            {"Patching of Object", "btatt.ots.oacp.patching_of_object",
16315
14
            FT_BOOLEAN, 32, NULL, 0x00000100,
16316
14
            NULL, HFILL}
16317
14
        },
16318
14
        {&hf_btatt_ots_feature_oacp_truncation_of_objects,
16319
14
            {"Truncation of Objects", "btatt.ots.oacp.truncation_of_objects",
16320
14
            FT_BOOLEAN, 32, NULL, 0x00000080,
16321
14
            NULL, HFILL}
16322
14
        },
16323
14
        {&hf_btatt_ots_feature_oacp_appending_additional_data_to_object,
16324
14
            {"Appending Additional Data to Object", "btatt.ots.oacp.appending_additional_data_to_object",
16325
14
            FT_BOOLEAN, 32, NULL, 0x00000040,
16326
14
            NULL, HFILL}
16327
14
        },
16328
14
        {&hf_btatt_ots_feature_oacp_write,
16329
14
            {"Write", "btatt.ots.oacp.write",
16330
14
            FT_BOOLEAN, 32, NULL, 0x00000020,
16331
14
            NULL, HFILL}
16332
14
        },
16333
14
        {&hf_btatt_ots_feature_oacp_read,
16334
14
            {"Read", "btatt.ots.oacp.read",
16335
14
            FT_BOOLEAN, 32, NULL, 0x00000010,
16336
14
            NULL, HFILL}
16337
14
        },
16338
14
        {&hf_btatt_ots_feature_oacp_execute,
16339
14
            {"Execute", "btatt.ots.oacp.execute",
16340
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
16341
14
            NULL, HFILL}
16342
14
        },
16343
14
        {&hf_btatt_ots_feature_oacp_calculate_checksum,
16344
14
            {"Calculate Checksum", "btatt.ots.oacp.calculate_checksum",
16345
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
16346
14
            NULL, HFILL}
16347
14
        },
16348
14
        {&hf_btatt_ots_feature_oacp_delete,
16349
14
            {"Delete", "btatt.ots.oacp.delete",
16350
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
16351
14
            NULL, HFILL}
16352
14
        },
16353
14
        {&hf_btatt_ots_feature_oacp_create,
16354
14
            {"Create", "btatt.ots.oacp.create",
16355
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
16356
14
            NULL, HFILL}
16357
14
        },
16358
14
        {&hf_btatt_ots_feature_olcp,
16359
14
            {"OLCP Features", "btatt.ots.olcp",
16360
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
16361
14
            NULL, HFILL}
16362
14
        },
16363
14
        {&hf_btatt_ots_feature_olcp_reserved,
16364
14
            {"Reserved", "btatt.ots.olcp.reserved",
16365
14
            FT_BOOLEAN, 32, NULL, 0xFFFFFFF0,
16366
14
            NULL, HFILL}
16367
14
        },
16368
14
        {&hf_btatt_ots_feature_olcp_clear_marking,
16369
14
            {"Clear Marking", "btatt.ots.olcp.clear_marking",
16370
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
16371
14
            NULL, HFILL}
16372
14
        },
16373
14
        {&hf_btatt_ots_feature_olcp_request_number_of_objects,
16374
14
            {"Request Number of Objects", "btatt.ots.olcp.request_number_of_objects",
16375
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
16376
14
            NULL, HFILL}
16377
14
        },
16378
14
        {&hf_btatt_ots_feature_olcp_order,
16379
14
            {"Order", "btatt.ots.olcp.order",
16380
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
16381
14
            NULL, HFILL}
16382
14
        },
16383
14
        {&hf_btatt_ots_feature_olcp_go_to,
16384
14
            {"Go To", "btatt.ots.olcp.go_to",
16385
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
16386
14
            NULL, HFILL}
16387
14
        },
16388
14
        {&hf_btatt_ots_object_name,
16389
14
            {"Object Name", "btatt.ots.object_name",
16390
14
            FT_STRING, BASE_NONE, NULL, 0x0,
16391
14
            NULL, HFILL}
16392
14
        },
16393
14
        {&hf_btatt_ots_current_size,
16394
14
            {"Current Size", "btatt.ots.current_size",
16395
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16396
14
            NULL, HFILL}
16397
14
        },
16398
14
        {&hf_btatt_ots_allocated_size,
16399
14
            {"Allocated Size", "btatt.ots.allocated_size",
16400
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16401
14
            NULL, HFILL}
16402
14
        },
16403
14
        {&hf_btatt_ots_object_id,
16404
14
            {"Object ID", "btatt.ots.object_id",
16405
14
            FT_UINT48, BASE_HEX, NULL, 0x0,
16406
14
            NULL, HFILL}
16407
14
        },
16408
14
        {&hf_btatt_ots_properties,
16409
14
            {"Properties", "btatt.ots.properties",
16410
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
16411
14
            NULL, HFILL}
16412
14
        },
16413
14
        {&hf_btatt_ots_properties_reserved,
16414
14
            {"Reserved", "btatt.ots.properties.reserved",
16415
14
            FT_BOOLEAN, 32, NULL, 0xFFFFFF00,
16416
14
            NULL, HFILL}
16417
14
        },
16418
14
        {&hf_btatt_ots_properties_mark,
16419
14
            {"Mark", "btatt.ots.properties.mark",
16420
14
            FT_BOOLEAN, 32, NULL, 0x00000080,
16421
14
            NULL, HFILL}
16422
14
        },
16423
14
        {&hf_btatt_ots_properties_patch,
16424
14
            {"Patch", "btatt.ots.properties.patch",
16425
14
            FT_BOOLEAN, 32, NULL, 0x00000040,
16426
14
            NULL, HFILL}
16427
14
        },
16428
14
        {&hf_btatt_ots_properties_truncate,
16429
14
            {"Truncate", "btatt.ots.properties.truncate",
16430
14
            FT_BOOLEAN, 32, NULL, 0x00000020,
16431
14
            NULL, HFILL}
16432
14
        },
16433
14
        {&hf_btatt_ots_properties_append,
16434
14
            {"Append", "btatt.ots.properties.append",
16435
14
            FT_BOOLEAN, 32, NULL, 0x00000010,
16436
14
            NULL, HFILL}
16437
14
        },
16438
14
        {&hf_btatt_ots_properties_write,
16439
14
            {"Write", "btatt.ots.properties.write",
16440
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
16441
14
            NULL, HFILL}
16442
14
        },
16443
14
        {&hf_btatt_ots_properties_read,
16444
14
            {"Read", "btatt.ots.properties.read",
16445
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
16446
14
            NULL, HFILL}
16447
14
        },
16448
14
        {&hf_btatt_ots_properties_execute,
16449
14
            {"Execute", "btatt.ots.properties.execute",
16450
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
16451
14
            NULL, HFILL}
16452
14
        },
16453
14
        {&hf_btatt_ots_properties_delete,
16454
14
            {"Delete", "btatt.ots.properties.delete",
16455
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
16456
14
            NULL, HFILL}
16457
14
        },
16458
14
        {&hf_btatt_ots_flags,
16459
14
            {"Properties", "btatt.ots.flags",
16460
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
16461
14
            NULL, HFILL}
16462
14
        },
16463
14
        {&hf_btatt_ots_flags_reserved,
16464
14
            {"Reserved", "btatt.ots.flags.reserved",
16465
14
            FT_BOOLEAN, 8, NULL, 0xE0,
16466
14
            NULL, HFILL}
16467
14
        },
16468
14
        {&hf_btatt_ots_flags_object_deletion,
16469
14
            {"Object Deletion", "btatt.ots.flags.object_deletion",
16470
14
            FT_BOOLEAN, 8, NULL, 0x10,
16471
14
            NULL, HFILL}
16472
14
        },
16473
14
        {&hf_btatt_ots_flags_object_creation,
16474
14
            {"Object Creation", "btatt.ots.flags.object_creation",
16475
14
            FT_BOOLEAN, 8, NULL, 0x08,
16476
14
            NULL, HFILL}
16477
14
        },
16478
14
        {&hf_btatt_ots_flags_change_occurred_to_the_object_metadata,
16479
14
            {"Change Occurred to the Object Metadata", "btatt.ots.flags.change_occurred_to_the_object_metadata",
16480
14
            FT_BOOLEAN, 8, NULL, 0x04,
16481
14
            NULL, HFILL}
16482
14
        },
16483
14
        {&hf_btatt_ots_flags_change_occurred_to_the_object_contents,
16484
14
            {"Change Occurred to the Object Contents", "btatt.ots.flags.change_occurred_to_the_object_contents",
16485
14
            FT_BOOLEAN, 8, NULL, 0x02,
16486
14
            NULL, HFILL}
16487
14
        },
16488
14
        {&hf_btatt_ots_flags_source_of_change,
16489
14
            {"Source of Change", "btatt.ots.flags.source_of_change",
16490
14
            FT_BOOLEAN, 8, TFS(&tfs_client_server), 0x01,
16491
14
            NULL, HFILL}
16492
14
        },
16493
14
        {&hf_btatt_ots_action_opcode,
16494
14
            {"Opcode", "btatt.ots.action.opcode",
16495
14
            FT_UINT8, BASE_HEX, VALS(ots_action_opcode_vals), 0x0,
16496
14
            NULL, HFILL}
16497
14
        },
16498
14
        {&hf_btatt_ots_size,
16499
14
            {"Size", "btatt.ots.size",
16500
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16501
14
            NULL, HFILL}
16502
14
        },
16503
14
        {&hf_btatt_ots_offset,
16504
14
            {"Offset", "btatt.ots.offset",
16505
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16506
14
            NULL, HFILL}
16507
14
        },
16508
14
        {&hf_btatt_ots_length,
16509
14
            {"Length", "btatt.ots.length",
16510
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16511
14
            NULL, HFILL}
16512
14
        },
16513
14
        {&hf_btatt_ots_execute_data,
16514
14
            {"Execute Data", "btatt.ots.execute_data",
16515
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
16516
14
            NULL, HFILL}
16517
14
        },
16518
14
        {&hf_btatt_ots_action_response_opcode,
16519
14
            {"Response Opcode", "btatt.ots.action.response_opcode",
16520
14
            FT_UINT8, BASE_HEX, VALS(ots_action_opcode_vals), 0x0,
16521
14
            NULL, HFILL}
16522
14
        },
16523
14
        {&hf_btatt_ots_action_result_code,
16524
14
            {"Result Code", "btatt.ots.action.result_code",
16525
14
            FT_UINT8, BASE_HEX, VALS(ots_action_result_code_vals), 0x0,
16526
14
            NULL, HFILL}
16527
14
        },
16528
14
        {&hf_btatt_ots_checksum,
16529
14
            {"Checksum", "btatt.ots.checksum",
16530
14
            FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
16531
14
            NULL, HFILL}
16532
14
        },
16533
14
        {&hf_btatt_ots_list_opcode,
16534
14
            {"Opcode", "btatt.ots.list.opcode",
16535
14
            FT_UINT8, BASE_HEX, VALS(ots_list_opcode_vals), 0x0,
16536
14
            NULL, HFILL}
16537
14
        },
16538
14
        {&hf_btatt_ots_list_order,
16539
14
            {"Order", "btatt.ots.list.order",
16540
14
            FT_UINT8, BASE_HEX, VALS(ots_list_order_vals), 0x0,
16541
14
            NULL, HFILL}
16542
14
        },
16543
14
        {&hf_btatt_ots_list_response_opcode,
16544
14
            {"Response Opcode", "btatt.ots.list.response_opcode",
16545
14
            FT_UINT8, BASE_HEX, VALS(ots_list_opcode_vals), 0x0,
16546
14
            NULL, HFILL}
16547
14
        },
16548
14
        {&hf_btatt_ots_list_result_code,
16549
14
            {"Result Code", "btatt.ots.list.result_code",
16550
14
            FT_UINT8, BASE_HEX, VALS(ots_list_result_code_vals), 0x0,
16551
14
            NULL, HFILL}
16552
14
        },
16553
14
        {&hf_btatt_ots_list_total_number_of_objects,
16554
14
            {"Total Number of Objects", "btatt.ots.list.total_number_of_objects",
16555
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16556
14
            NULL, HFILL}
16557
14
        },
16558
14
        {&hf_btatt_ots_filter,
16559
14
            {"Filter", "btatt.ots.filter",
16560
14
            FT_UINT8, BASE_HEX, VALS(ots_filter_vals), 0x0,
16561
14
            NULL, HFILL}
16562
14
        },
16563
14
        {&hf_btatt_ots_size_from,
16564
14
            {"Size From", "btatt.ots.size_from",
16565
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16566
14
            NULL, HFILL}
16567
14
        },
16568
14
        {&hf_btatt_ots_size_to,
16569
14
            {"Size To", "btatt.ots.size_to",
16570
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
16571
14
            NULL, HFILL}
16572
14
        },
16573
14
        {&hf_btatt_ots_name_string,
16574
14
            {"Name String", "btatt.ots.name_string",
16575
14
            FT_STRING, BASE_NONE, NULL, 0x0,
16576
14
            NULL, HFILL}
16577
14
        },
16578
14
        {&hf_btatt_ots_object_first_created,
16579
14
            {"First Created", "btatt.ots.first_created",
16580
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16581
14
            NULL, HFILL}
16582
14
        },
16583
14
        {&hf_btatt_ots_object_last_modified,
16584
14
            {"Last Modified", "btatt.ots.last_modified",
16585
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16586
14
            NULL, HFILL}
16587
14
        },
16588
14
        {&hf_btatt_plx_spot_check_measurement_flags,
16589
14
            {"Flags", "btatt.plxs.spot_check_measurement.flags",
16590
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
16591
14
            NULL, HFILL}
16592
14
        },
16593
14
        {&hf_btatt_plx_spot_check_measurement_flags_reserved,
16594
14
            {"Reserved", "btatt.plxs.spot_check_measurement.flags.reserved",
16595
14
            FT_UINT8, BASE_HEX, NULL, 0xE0,
16596
14
            NULL, HFILL}
16597
14
        },
16598
14
        {&hf_btatt_plx_spot_check_measurement_flags_device_clock_is_not_set,
16599
14
            {"Device Clock is not Set", "btatt.plxs.spot_check_measurement.flags.device_clock_is_not_set",
16600
14
            FT_BOOLEAN, 8, NULL, 0x10,
16601
14
            NULL, HFILL}
16602
14
        },
16603
14
        {&hf_btatt_plx_spot_check_measurement_flags_pulse_amplitude_index,
16604
14
            {"Pulse Amplitude Index", "btatt.plxs.spot_check_measurement.flags.pulse_amplitude_index",
16605
14
            FT_BOOLEAN, 8, NULL, 0x08,
16606
14
            NULL, HFILL}
16607
14
        },
16608
14
        {&hf_btatt_plx_spot_check_measurement_flags_device_and_sensor_status,
16609
14
            {"Device and Sensor Status", "btatt.plxs.spot_check_measurement.flags.device_and_sensor_status",
16610
14
            FT_BOOLEAN, 8, NULL, 0x04,
16611
14
            NULL, HFILL}
16612
14
        },
16613
14
        {&hf_btatt_plx_spot_check_measurement_flags_measurement_status,
16614
14
            {"Measurement Status", "btatt.plxs.spot_check_measurement.flags.measurement_status",
16615
14
            FT_BOOLEAN, 8, NULL, 0x02,
16616
14
            NULL, HFILL}
16617
14
        },
16618
14
        {&hf_btatt_plx_spot_check_measurement_flags_timestamp,
16619
14
            {"Timestamp", "btatt.plxs.spot_check_measurement.flags.timestamp",
16620
14
            FT_BOOLEAN, 8, NULL, 0x01,
16621
14
            NULL, HFILL}
16622
14
        },
16623
14
        {&hf_btatt_plx_spo2,
16624
14
            {"SpO2", "btatt.plxs.spot_check_measurement.spo2",
16625
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16626
14
            NULL, HFILL}
16627
14
        },
16628
14
        {&hf_btatt_plx_pulse_rate,
16629
14
            {"Pulse Rate", "btatt.plxs.spot_check_measurement.pulse_rate",
16630
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16631
14
            NULL, HFILL}
16632
14
        },
16633
14
        {&hf_btatt_plx_spot_check_measurement_timestamp,
16634
14
            {"Timestamp", "btatt.plxs.spot_check_measurement.timestamp",
16635
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16636
14
            NULL, HFILL}
16637
14
        },
16638
14
        {&hf_btatt_plx_measurement_status,
16639
14
            {"Measurement Status", "btatt.plxs.spot_check_measurement.measurement_status",
16640
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
16641
14
            NULL, HFILL}
16642
14
        },
16643
14
        {&hf_btatt_plx_measurement_status_invalid_measurement_detected,
16644
14
            {"Invalid Measurement Detected", "btatt.plxs.spot_check_measurement.measurement_status.invalid_measurement_detected",
16645
14
            FT_BOOLEAN, 16, NULL, 0x8000,
16646
14
            NULL, HFILL}
16647
14
        },
16648
14
        {&hf_btatt_plx_measurement_status_questionable_measurement_detected,
16649
14
            {"Questionable Measurement Detected", "btatt.plxs.spot_check_measurement.measurement_status.questionable_measurement_detected",
16650
14
            FT_BOOLEAN, 16, NULL, 0x4000,
16651
14
            NULL, HFILL}
16652
14
        },
16653
14
        {&hf_btatt_plx_measurement_status_measurement_unavailable,
16654
14
            {"Measurement Unavailable", "btatt.plxs.spot_check_measurement.measurement_status.measurement_unavailable",
16655
14
            FT_BOOLEAN, 16, NULL, 0x2000,
16656
14
            NULL, HFILL}
16657
14
        },
16658
14
        {&hf_btatt_plx_measurement_status_calibration_ongoing,
16659
14
            {"Calibration Ongoing", "btatt.plxs.spot_check_measurement.measurement_status.calibration_ongoing",
16660
14
            FT_BOOLEAN, 16, NULL, 0x1000,
16661
14
            NULL, HFILL}
16662
14
        },
16663
14
        {&hf_btatt_plx_measurement_status_data_for_testing,
16664
14
            {"Data for Testing", "btatt.plxs.spot_check_measurement.measurement_status.data_for_testing",
16665
14
            FT_BOOLEAN, 16, NULL, 0x0800,
16666
14
            NULL, HFILL}
16667
14
        },
16668
14
        {&hf_btatt_plx_measurement_status_data_for_demonstration,
16669
14
            {"Data for Demonstration", "btatt.plxs.spot_check_measurement.measurement_status.data_for_demonstration",
16670
14
            FT_BOOLEAN, 16, NULL, 0x0400,
16671
14
            NULL, HFILL}
16672
14
        },
16673
14
        {&hf_btatt_plx_measurement_status_data_from_measurement_storage,
16674
14
            {"Data from Measurement Storage", "btatt.plxs.spot_check_measurement.measurement_status.data_from_measurement_storage",
16675
14
            FT_BOOLEAN, 16, NULL, 0x0200,
16676
14
            NULL, HFILL}
16677
14
        },
16678
14
        {&hf_btatt_plx_measurement_status_fully_qualified_data,
16679
14
            {"Fully Qualified Data", "btatt.plxs.spot_check_measurement.measurement_status.fully_qualified_data",
16680
14
            FT_BOOLEAN, 16, NULL, 0x0100,
16681
14
            NULL, HFILL}
16682
14
        },
16683
14
        {&hf_btatt_plx_measurement_status_validated_data,
16684
14
            {"Validated Data", "btatt.plxs.spot_check_measurement.measurement_status.validated_data",
16685
14
            FT_BOOLEAN, 16, NULL, 0x0080,
16686
14
            NULL, HFILL}
16687
14
        },
16688
14
        {&hf_btatt_plx_measurement_status_early_estimated_data,
16689
14
            {"Early Estimated Data", "btatt.plxs.spot_check_measurement.measurement_status.early_estimated_data",
16690
14
            FT_BOOLEAN, 16, NULL, 0x0040,
16691
14
            NULL, HFILL}
16692
14
        },
16693
14
        {&hf_btatt_plx_measurement_status_measurement_ongoing,
16694
14
            {"Measurement Ongoing", "btatt.plxs.spot_check_measurement.measurement_status.measurement_ongoing",
16695
14
            FT_BOOLEAN, 16, NULL, 0x0020,
16696
14
            NULL, HFILL}
16697
14
        },
16698
14
        {&hf_btatt_plx_measurement_status_reserved,
16699
14
            {"Reserved", "btatt.plxs.spot_check_measurement.measurement_status.reserved",
16700
14
            FT_BOOLEAN, 16, NULL, 0x001F,
16701
14
            NULL, HFILL}
16702
14
        },
16703
14
        {&hf_btatt_plx_device_and_sensor_status,
16704
14
            {"Device and Sensor Status", "btatt.plxs.spot_check_measurement.device_and_sensor_status",
16705
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
16706
14
            NULL, HFILL}
16707
14
        },
16708
14
        {&hf_btatt_plx_device_and_sensor_status_reserved,
16709
14
            {"Reserved", "btatt.plxs.spot_check_measurement.device_and_sensor_status.reserved",
16710
14
            FT_UINT24, BASE_HEX, NULL, 0xFF0000,
16711
14
            NULL, HFILL}
16712
14
        },
16713
14
        {&hf_btatt_plx_device_and_sensor_status_sensor_disconnected,
16714
14
            {"Sensor Disconnected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.sensor_disconnected",
16715
14
            FT_BOOLEAN, 24, NULL, 0x008000,
16716
14
            NULL, HFILL}
16717
14
        },
16718
14
        {&hf_btatt_plx_device_and_sensor_status_sensor_malfunctioning,
16719
14
            {"Sensor Malfunctioning", "btatt.plxs.spot_check_measurement.device_and_sensor_status.sensor_malfunctioning",
16720
14
            FT_BOOLEAN, 24, NULL, 0x004000,
16721
14
            NULL, HFILL}
16722
14
        },
16723
14
        {&hf_btatt_plx_device_and_sensor_status_sensor_displaced,
16724
14
            {"Sensor Displaced", "btatt.plxs.spot_check_measurement.device_and_sensor_status.sensor_displaced",
16725
14
            FT_BOOLEAN, 24, NULL, 0x002000,
16726
14
            NULL, HFILL}
16727
14
        },
16728
14
        {&hf_btatt_plx_device_and_sensor_status_unknown_sensor_connected,
16729
14
            {"Unknown Sensor Connected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.unknown_sensor_connected",
16730
14
            FT_BOOLEAN, 24, NULL, 0x001000,
16731
14
            NULL, HFILL}
16732
14
        },
16733
14
        {&hf_btatt_plx_device_and_sensor_status_sensor_unconnected_to_user,
16734
14
            {"Unconnected to User", "btatt.plxs.spot_check_measurement.device_and_sensor_status.unconnected_to_user",
16735
14
            FT_BOOLEAN, 24, NULL, 0x000800,
16736
14
            NULL, HFILL}
16737
14
        },
16738
14
        {&hf_btatt_plx_device_and_sensor_status_sensor_interference_detected,
16739
14
            {"Interference Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.interference_detected",
16740
14
            FT_BOOLEAN, 24, NULL, 0x000400,
16741
14
            NULL, HFILL}
16742
14
        },
16743
14
        {&hf_btatt_plx_device_and_sensor_status_signal_analysis_ongoing,
16744
14
            {"Signal Analysis Ongoing", "btatt.plxs.spot_check_measurement.device_and_sensor_status.signal_analysis_ongoing",
16745
14
            FT_BOOLEAN, 24, NULL, 0x000200,
16746
14
            NULL, HFILL}
16747
14
        },
16748
14
        {&hf_btatt_plx_device_and_sensor_status_questionable_pulse_detected,
16749
14
            {"Questionable Pulse Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.questionable_pulse_detected",
16750
14
            FT_BOOLEAN, 24, NULL, 0x000100,
16751
14
            NULL, HFILL}
16752
14
        },
16753
14
        {&hf_btatt_plx_device_and_sensor_status_non_pulsatile_signal_detected,
16754
14
            {"Non Pulsatile Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.non_pulsatile_signal_detected",
16755
14
            FT_BOOLEAN, 24, NULL, 0x000080,
16756
14
            NULL, HFILL}
16757
14
        },
16758
14
        {&hf_btatt_plx_device_and_sensor_status_erratic_signal_detected,
16759
14
            {"Erratic Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.erratic_signal_detected",
16760
14
            FT_BOOLEAN, 24, NULL, 0x000040,
16761
14
            NULL, HFILL}
16762
14
        },
16763
14
        {&hf_btatt_plx_device_and_sensor_status_low_perfusion_detected,
16764
14
            {"Low Perfusion Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.low_perfusion_detected",
16765
14
            FT_BOOLEAN, 24, NULL, 0x000020,
16766
14
            NULL, HFILL}
16767
14
        },
16768
14
        {&hf_btatt_plx_device_and_sensor_status_poor_signal_detected,
16769
14
            {"Poor Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.poor_signal_detected",
16770
14
            FT_BOOLEAN, 24, NULL, 0x000010,
16771
14
            NULL, HFILL}
16772
14
        },
16773
14
        {&hf_btatt_plx_device_and_sensor_status_inadequate_signal_detected,
16774
14
            {"Inadequate Signal Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.inadequate_signal_detected",
16775
14
            FT_BOOLEAN, 24, NULL, 0x000008,
16776
14
            NULL, HFILL}
16777
14
        },
16778
14
        {&hf_btatt_plx_device_and_sensor_status_signal_processing_irregularity_detected,
16779
14
            {"Signal Processing Irregularity Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.signal_processing_irregularity_detected",
16780
14
            FT_BOOLEAN, 24, NULL, 0x000004,
16781
14
            NULL, HFILL}
16782
14
        },
16783
14
        {&hf_btatt_plx_device_and_sensor_status_equipment_malfunction_detected,
16784
14
            {"Equipment Malfunction Detected", "btatt.plxs.spot_check_measurement.device_and_sensor_status.equipment_malfunction_detected",
16785
14
            FT_BOOLEAN, 24, NULL, 0x000002,
16786
14
            NULL, HFILL}
16787
14
        },
16788
14
        {&hf_btatt_plx_device_and_sensor_status_extended_display_update_ongoing,
16789
14
            {"Extended Display Update Ongoing", "btatt.plxs.spot_check_measurement.device_and_sensor_status.extended_display_update_ongoing",
16790
14
            FT_BOOLEAN, 24, NULL, 0x000001,
16791
14
            NULL, HFILL}
16792
14
        },
16793
14
        {&hf_btatt_plx_pulse_amplitude_index,
16794
14
            {"Pulse Amplitude Index", "btatt.plxs.spot_check_measurement.pulse_amplitude_index",
16795
14
            FT_IEEE_11073_SFLOAT, BASE_NONE, NULL, 0x0,
16796
14
            NULL, HFILL}
16797
14
        },
16798
14
        {&hf_btatt_plx_spo2pr_spot_check,
16799
14
            {"SpO2PR Spot Check", "btatt.plxs.spo2pr_spot_check",
16800
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16801
14
            NULL, HFILL}
16802
14
        },
16803
14
        {&hf_btatt_plx_spo2pr_normal,
16804
14
            {"SpO2PR Normal", "btatt.plxs.spo2pr_normal",
16805
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16806
14
            NULL, HFILL}
16807
14
        },
16808
14
        {&hf_btatt_plx_spo2pr_fast,
16809
14
            {"SpO2PR Fast", "btatt.plxs.spo2pr_fast",
16810
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16811
14
            NULL, HFILL}
16812
14
        },
16813
14
        {&hf_btatt_plx_spo2pr_slow,
16814
14
            {"SpO2PR Slow", "btatt.plxs.spo2pr_slow",
16815
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16816
14
            NULL, HFILL}
16817
14
        },
16818
14
        {&hf_btatt_plx_continuous_measurement_flags,
16819
14
            {"Flags", "btatt.plxs.continuous_measurement.flags",
16820
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
16821
14
            NULL, HFILL}
16822
14
        },
16823
14
        {&hf_btatt_plx_continuous_measurement_flags_reserved,
16824
14
            {"Reserved", "btatt.plxs.continuous_measurement.flags.reserved",
16825
14
            FT_UINT8, BASE_HEX, NULL, 0xE0,
16826
14
            NULL, HFILL}
16827
14
        },
16828
14
        {&hf_btatt_plx_continuous_measurement_flags_pulse_amplitude_index,
16829
14
            {"Pulse Amplitude Index", "btatt.plxs.continuous_measurement.flags.pulse_amplitude_index",
16830
14
            FT_BOOLEAN, 8, NULL, 0x10,
16831
14
            NULL, HFILL}
16832
14
        },
16833
14
        {&hf_btatt_plx_continuous_measurement_flags_device_and_sensor_status,
16834
14
            {"Device and Sensor Status", "btatt.plxs.continuous_measurement.flags.device_and_sensor_status",
16835
14
            FT_BOOLEAN, 8, NULL, 0x08,
16836
14
            NULL, HFILL}
16837
14
        },
16838
14
        {&hf_btatt_plx_continuous_measurement_flags_measurement_status,
16839
14
            {"Measurement Status", "btatt.plxs.continuous_measurement.flags.measurement_status",
16840
14
            FT_BOOLEAN, 8, NULL, 0x04,
16841
14
            NULL, HFILL}
16842
14
        },
16843
14
        {&hf_btatt_plx_continuous_measurement_flags_spo2pr_slow,
16844
14
            {"SpO2PR-Slow", "btatt.plxs.continuous_measurement.flags.spo2pr_slow",
16845
14
            FT_BOOLEAN, 8, NULL, 0x02,
16846
14
            NULL, HFILL}
16847
14
        },
16848
14
        {&hf_btatt_plx_continuous_measurement_flags_spo2pr_fast,
16849
14
            {"SpO2PR-Fast", "btatt.plxs.continuous_measurement.flags.spo2pr_fast",
16850
14
            FT_BOOLEAN, 8, NULL, 0x01,
16851
14
            NULL, HFILL}
16852
14
        },
16853
16854
14
        {&hf_btatt_plx_features_supported_features,
16855
14
            {"Supported Features", "btatt.plxs.features.supported_features",
16856
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
16857
14
            NULL, HFILL}
16858
14
        },
16859
14
        {&hf_btatt_plx_features_supported_features_reserved,
16860
14
            {"Reserved", "btatt.plxs.features.supported_features.reserved",
16861
14
            FT_UINT16, BASE_HEX, NULL, 0xFF00,
16862
14
            NULL, HFILL}
16863
14
        },
16864
14
        {&hf_btatt_plx_features_supported_features_multiple_bonds,
16865
14
            {"Multiple Bonds", "btatt.plxs.features.supported_features.multiple_bonds",
16866
14
            FT_BOOLEAN, 16, NULL, 0x0080,
16867
14
            NULL, HFILL}
16868
14
        },
16869
14
        {&hf_btatt_plx_features_supported_features_pulse_amplitude_index,
16870
14
            {"Pulse Amplitude Index", "btatt.plxs.features.supported_features.pulse_amplitude_index",
16871
14
            FT_BOOLEAN, 16, NULL, 0x0040,
16872
14
            NULL, HFILL}
16873
14
        },
16874
14
        {&hf_btatt_plx_features_supported_features_spo2pr_slow,
16875
14
            {"SpO2PR-Slow", "btatt.plxs.features.supported_features.spo2pr_slow",
16876
14
            FT_BOOLEAN, 16, NULL, 0x0020,
16877
14
            NULL, HFILL}
16878
14
        },
16879
14
        {&hf_btatt_plx_features_supported_features_spo2pr_fast,
16880
14
            {"SpO2PR-Fast", "btatt.plxs.features.supported_features.spo2pr_fast",
16881
14
            FT_BOOLEAN, 16, NULL, 0x0010,
16882
14
            NULL, HFILL}
16883
14
        },
16884
14
        {&hf_btatt_plx_features_supported_features_timestamp_storage_for_spot_check,
16885
14
            {"Timestamp Storage for Spot-Check", "btatt.plxs.features.supported_features.timestamp_storage_for_spot_check",
16886
14
            FT_BOOLEAN, 16, NULL, 0x0008,
16887
14
            NULL, HFILL}
16888
14
        },
16889
14
        {&hf_btatt_plx_features_supported_features_measurement_storage_for_spot_check,
16890
14
            {"Measurement Storage for Spot-Check", "btatt.plxs.features.supported_features.measurement_storage_for_spot_check",
16891
14
            FT_BOOLEAN, 16, NULL, 0x0004,
16892
14
            NULL, HFILL}
16893
14
        },
16894
14
        {&hf_btatt_plx_features_supported_features_device_and_sensor_status,
16895
14
            {"Device and Sensor Status", "btatt.plxs.features.supported_features.device_and_sensor_status",
16896
14
            FT_BOOLEAN, 16, NULL, 0x0002,
16897
14
            NULL, HFILL}
16898
14
        },
16899
14
        {&hf_btatt_plx_features_supported_features_measurement_status,
16900
14
            {"Measurement Status", "btatt.plxs.features.supported_features.measurement_status",
16901
14
            FT_BOOLEAN, 16, NULL, 0x0001,
16902
14
            NULL, HFILL}
16903
14
        },
16904
14
        {&hf_btatt_valid_range_lower_inclusive_value,
16905
14
            {"Lower Inclusive Value", "btatt.valid_range.lower_inclusive_value",
16906
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16907
14
            NULL, HFILL}
16908
14
        },
16909
14
        {&hf_btatt_valid_range_upper_inclusive_value,
16910
14
            {"Upper Inclusive Value", "btatt.valid_range.upper_inclusive_value",
16911
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16912
14
            NULL, HFILL}
16913
14
        },
16914
14
        {&hf_btatt_regulatory_certification_data_list_count,
16915
14
            {"Count", "btatt.regulatory_certification_data_list.count",
16916
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16917
14
            NULL, HFILL}
16918
14
        },
16919
14
        {&hf_btatt_regulatory_certification_data_list_length,
16920
14
            {"Length", "btatt.regulatory_certification_data_list.length",
16921
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16922
14
            NULL, HFILL}
16923
14
        },
16924
14
        {&hf_btatt_regulatory_certification_data_list_item,
16925
14
            {"Item", "btatt.regulatory_certification_data_list.item",
16926
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16927
14
            NULL, HFILL}
16928
14
        },
16929
14
        {&hf_btatt_regulatory_certification_data_list_item_body,
16930
14
            {"Authorizing Body", "btatt.regulatory_certification_data_list.item.authorization_body",
16931
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
16932
14
            NULL, HFILL}
16933
14
        },
16934
14
        {&hf_btatt_regulatory_certification_data_list_item_body_structure_type,
16935
14
            {"Authorizing Body Structure Type", "btatt.regulatory_certification_data_list.item.authorization_body_structure_type",
16936
14
            FT_UINT8, BASE_DEC, VALS(regulatory_certification_data_list_item_body_structure_type_vals), 0x0,
16937
14
            NULL, HFILL}
16938
14
        },
16939
14
        {&hf_btatt_regulatory_certification_data_list_item_body_structure_length,
16940
14
            {"Authorizing Body Structure Length", "btatt.regulatory_certification_data_list.item.length",
16941
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16942
14
            NULL, HFILL}
16943
14
        },
16944
14
        {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data,
16945
14
            {"Authorizing Body Data", "btatt.regulatory_certification_data_list.item.authorizing_body_data",
16946
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16947
14
            NULL, HFILL}
16948
14
        },
16949
14
        {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_major_ig_version,
16950
14
            {"Major IG Version", "btatt.regulatory_certification_data_list.item.authorizing_body_data.major_ig_version",
16951
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
16952
14
            NULL, HFILL}
16953
14
        },
16954
14
        {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_minor_ig_version,
16955
14
            {"Minor IG Version", "btatt.regulatory_certification_data_list.item.authorizing_body_data.minor_ig_version",
16956
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
16957
14
            NULL, HFILL}
16958
14
        },
16959
14
        {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_count,
16960
14
            {"Certification Data List LCount", "btatt.regulatory_certification_data_list.item.certified_device_class_list.count",
16961
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16962
14
            NULL, HFILL}
16963
14
        },
16964
14
        {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list_length,
16965
14
            {"Certification Data List Length", "btatt.regulatory_certification_data_list.item.certified_device_class_list.length",
16966
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16967
14
            NULL, HFILL}
16968
14
        },
16969
14
        {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certification_data_list,
16970
14
            {"Certification Data List", "btatt.regulatory_certification_data_list.item.certified_device_class_list",
16971
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16972
14
            NULL, HFILL}
16973
14
        },
16974
14
        {&hf_btatt_regulatory_certification_data_list_item_authorizing_body_data_certified_device_class,
16975
14
            {"Certified Device Class", "btatt.regulatory_certification_data_list.item.certified_device_class_list.entry",
16976
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
16977
14
            NULL, HFILL}
16978
14
        },
16979
14
        {&hf_btatt_regulatory_certification_data_list_item_regulation_bit_field_type,
16980
14
            {"Regulation Bit Field Type", "btatt.regulatory_certification_data_list.item.regulation_bit_field_type",
16981
14
            FT_UINT16, BASE_HEX, NULL, 0xFFFF,
16982
14
            NULL, HFILL}
16983
14
        },
16984
14
        {&hf_btatt_regulatory_certification_data_list_item_data,
16985
14
            {"Data", "btatt.regulatory_certification_data_list.item.data",
16986
14
            FT_NONE, BASE_NONE, NULL, 0x0,
16987
14
            NULL, HFILL}
16988
14
        },
16989
14
        {&hf_btatt_timezone_information,
16990
14
            {"Timezone Information", "btatt.timezone_information",
16991
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
16992
14
            NULL, HFILL}
16993
14
        },
16994
14
        {&hf_btatt_timezone_information_information,
16995
14
            {"Information", "btatt.timezone_information.information",
16996
14
            FT_UINT8, BASE_DEC, VALS(timezone_information_vals), 0x7F,
16997
14
            NULL, HFILL}
16998
14
        },
16999
14
        {&hf_btatt_timezone_information_information_type,
17000
14
            {"Type", "btatt.timezone_information.information_type",
17001
14
            FT_BOOLEAN, 8, TFS(&timezone_information_type_tfs), 0x80,
17002
14
            NULL, HFILL}
17003
14
        },
17004
14
        {&hf_btatt_temperature_celsius,
17005
14
            {"Temperature Celsius", "btatt.temperature_celsius",
17006
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
17007
14
            NULL, HFILL}
17008
14
        },
17009
14
        {&hf_btatt_temperature_fahrenheit,
17010
14
            {"Temperature Fahrenheit", "btatt.temperature_fahrenheit",
17011
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
17012
14
            NULL, HFILL}
17013
14
        },
17014
14
        {&hf_btatt_removable,
17015
14
            {"Removable", "btatt.removable",
17016
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
17017
14
            NULL, HFILL}
17018
14
        },
17019
14
        {&hf_btatt_removable_reserved,
17020
14
            {"Reserved", "btatt.removable.reserved",
17021
14
            FT_UINT8, BASE_HEX, NULL, 0xFC,
17022
14
            NULL, HFILL}
17023
14
        },
17024
14
        {&hf_btatt_removable_removable,
17025
14
            {"Removable", "btatt.removable.removable",
17026
14
            FT_UINT8, BASE_HEX, VALS(removable_removable_vals), 0x03,
17027
14
            NULL, HFILL}
17028
14
        },
17029
14
        {&hf_btatt_service_required,
17030
14
            {"Service Required", "btatt.service_required",
17031
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
17032
14
            NULL, HFILL}
17033
14
        },
17034
14
        {&hf_btatt_service_required_reserved,
17035
14
            {"Reserved", "btatt.service_required.reserved",
17036
14
            FT_UINT8, BASE_HEX, NULL, 0xFC,
17037
14
            NULL, HFILL}
17038
14
        },
17039
14
        {&hf_btatt_service_required_service_required,
17040
14
            {"Service Required", "btatt.service_required.service_required",
17041
14
            FT_UINT8, BASE_HEX, VALS(service_required_service_required_vals), 0x03,
17042
14
            NULL, HFILL}
17043
14
        },
17044
14
        {&hf_btatt_scientific_temperature_celsius,
17045
14
            {"Scientific Temperature Celsius", "btatt.scientific_temperature_celsius",
17046
14
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
17047
14
            NULL, HFILL}
17048
14
        },
17049
14
        {&hf_btatt_string,
17050
14
            {"String", "btatt.string",
17051
14
            FT_STRING, BASE_NONE, NULL, 0x0,
17052
14
            NULL, HFILL}
17053
14
        },
17054
14
        {&hf_btatt_network_availability,
17055
14
            {"Network Availability", "btatt.network_availability",
17056
14
            FT_UINT8, BASE_HEX, VALS(network_availability_vals), 0x0,
17057
14
            NULL, HFILL}
17058
14
        },
17059
14
        {&hf_btatt_fitness_machine_features,
17060
14
            {"Fitness Machine Features", "btatt.fitness_machine_features",
17061
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
17062
14
            NULL, HFILL}
17063
14
        },
17064
14
        {&hf_btatt_fitness_machine_features_reserved,
17065
14
            {"Reserved", "btatt.fitness_machine_features.reserved",
17066
14
            FT_UINT32, BASE_HEX, NULL, 0xFFFE0000,
17067
14
            NULL, HFILL}
17068
14
        },
17069
14
        {&hf_btatt_fitness_machine_features_user_data_retention,
17070
14
            {"User Data Retention", "btatt.fitness_machine_features.user_data_retention",
17071
14
            FT_BOOLEAN, 32, NULL, 0x00010000,
17072
14
            NULL, HFILL}
17073
14
        },
17074
14
        {&hf_btatt_fitness_machine_features_force_on_belt_and_power_output,
17075
14
            {"Force on Belt_and Power Output", "btatt.fitness_machine_features.force_on_belt_and_power_output",
17076
14
            FT_BOOLEAN, 32, NULL, 0x00008000,
17077
14
            NULL, HFILL}
17078
14
        },
17079
14
        {&hf_btatt_fitness_machine_features_power_measurement,
17080
14
            {"Power Measurement", "btatt.fitness_machine_features.power_measurement",
17081
14
            FT_BOOLEAN, 32, NULL, 0x00004000,
17082
14
            NULL, HFILL}
17083
14
        },
17084
14
        {&hf_btatt_fitness_machine_features_remaining_time,
17085
14
            {"Remaining Time", "btatt.fitness_machine_features.remaining_time",
17086
14
            FT_BOOLEAN, 32, NULL, 0x00002000,
17087
14
            NULL, HFILL}
17088
14
        },
17089
14
        {&hf_btatt_fitness_machine_features_elapsed_time,
17090
14
            {"Elapsed Time", "btatt.fitness_machine_features.elapsed_time",
17091
14
            FT_BOOLEAN, 32, NULL, 0x00001000,
17092
14
            NULL, HFILL}
17093
14
        },
17094
14
        {&hf_btatt_fitness_machine_features_metabolic_equivalent,
17095
14
            {"Metabolic Equivalent", "btatt.fitness_machine_features.metabolic_equivalent",
17096
14
            FT_BOOLEAN, 32, NULL, 0x00000800,
17097
14
            NULL, HFILL}
17098
14
        },
17099
14
        {&hf_btatt_fitness_machine_features_heart_rate_measurement,
17100
14
            {"Heart Rate Measurement", "btatt.fitness_machine_features.heart_rate_measurement",
17101
14
            FT_BOOLEAN, 32, NULL, 0x00000400,
17102
14
            NULL, HFILL}
17103
14
        },
17104
14
        {&hf_btatt_fitness_machine_features_expended_energy,
17105
14
            {"Expended Energy", "btatt.fitness_machine_features.expended_energy",
17106
14
            FT_BOOLEAN, 32, NULL, 0x00000200,
17107
14
            NULL, HFILL}
17108
14
        },
17109
14
        {&hf_btatt_fitness_machine_features_stride_count,
17110
14
            {"Stride Count", "btatt.fitness_machine_features.stride_count",
17111
14
            FT_BOOLEAN, 32, NULL, 0x00000100,
17112
14
            NULL, HFILL}
17113
14
        },
17114
14
        {&hf_btatt_fitness_machine_features_resistance_level,
17115
14
            {"Resistance Level", "btatt.fitness_machine_features.resistance_level",
17116
14
            FT_BOOLEAN, 32, NULL, 0x00000080,
17117
14
            NULL, HFILL}
17118
14
        },
17119
14
        {&hf_btatt_fitness_machine_features_step_count,
17120
14
            {"Step Count", "btatt.fitness_machine_features.step_count",
17121
14
            FT_BOOLEAN, 32, NULL, 0x00000040,
17122
14
            NULL, HFILL}
17123
14
        },
17124
14
        {&hf_btatt_fitness_machine_features_pace,
17125
14
            {"Pace", "btatt.fitness_machine_features.pace",
17126
14
            FT_BOOLEAN, 32, NULL, 0x00000020,
17127
14
            NULL, HFILL}
17128
14
        },
17129
14
        {&hf_btatt_fitness_machine_features_elevation_gain,
17130
14
            {"Elevation Gain", "btatt.fitness_machine_features.elevation_gain",
17131
14
            FT_BOOLEAN, 32, NULL, 0x00000010,
17132
14
            NULL, HFILL}
17133
14
        },
17134
14
        {&hf_btatt_fitness_machine_features_inclination,
17135
14
            {"Inclination", "btatt.fitness_machine_features.inclination",
17136
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
17137
14
            NULL, HFILL}
17138
14
        },
17139
14
        {&hf_btatt_fitness_machine_features_total_distance,
17140
14
            {"Total Distance", "btatt.fitness_machine_features.total_distance",
17141
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
17142
14
            NULL, HFILL}
17143
14
        },
17144
14
        {&hf_btatt_fitness_machine_features_cadence,
17145
14
            {"Cadence", "btatt.fitness_machine_features.cadence",
17146
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
17147
14
            NULL, HFILL}
17148
14
        },
17149
14
        {&hf_btatt_fitness_machine_features_average_speed,
17150
14
            {"Average Speed", "btatt.fitness_machine_features.average_speed",
17151
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
17152
14
            NULL, HFILL}
17153
14
        },
17154
14
        {&hf_btatt_target_setting_features,
17155
14
            {"Target Setting Features", "btatt.target_setting_features",
17156
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
17157
14
            NULL, HFILL}
17158
14
        },
17159
14
        {&hf_btatt_target_setting_features_reserved,
17160
14
            {"Reserved", "btatt.target_setting_features.reserved",
17161
14
            FT_UINT32, BASE_HEX, NULL, 0xFFFE0000,
17162
14
            NULL, HFILL}
17163
14
        },
17164
14
        {&hf_btatt_target_setting_features_targeted_cadence_configuration,
17165
14
            {"Targeted Cadence Configuration", "btatt.target_setting_features.targeted_cadence_configuration",
17166
14
            FT_BOOLEAN, 32, NULL, 0x00010000,
17167
14
            NULL, HFILL}
17168
14
        },
17169
14
        {&hf_btatt_target_setting_features_spin_down_control,
17170
14
            {"Spin Down Control", "btatt.target_setting_features.spin_down_control",
17171
14
            FT_BOOLEAN, 32, NULL, 0x00008000,
17172
14
            NULL, HFILL}
17173
14
        },
17174
14
        {&hf_btatt_target_setting_features_wheel_circumference_configuration,
17175
14
            {"Wheel Circumference Configuration", "btatt.target_setting_features.wheel_circumference_configuration",
17176
14
            FT_BOOLEAN, 32, NULL, 0x00004000,
17177
14
            NULL, HFILL}
17178
14
        },
17179
14
        {&hf_btatt_target_setting_features_indoor_bike_simulation_parameters,
17180
14
            {"Indoor Bike Simulation Parameters", "btatt.target_setting_features.indoor_bike_simulation_parameters",
17181
14
            FT_BOOLEAN, 32, NULL, 0x00002000,
17182
14
            NULL, HFILL}
17183
14
        },
17184
14
        {&hf_btatt_target_setting_features_targeted_time_in_five_heart_rate_zones_configuration,
17185
14
            {"Targeted Time in Five Heart Rate Zones Configuration", "btatt.target_setting_features.targeted_time_in_five_heart_rate_zones_configuration",
17186
14
            FT_BOOLEAN, 32, NULL, 0x00001000,
17187
14
            NULL, HFILL}
17188
14
        },
17189
14
        {&hf_btatt_target_setting_features_targeted_time_in_three_heart_rate_zones_configuration,
17190
14
            {"Targeted Time in Three Heart Rate Zones Configuration", "btatt.target_setting_features.targeted_time_in_three_heart_rate_zones_configuration",
17191
14
            FT_BOOLEAN, 32, NULL, 0x00000800,
17192
14
            NULL, HFILL}
17193
14
        },
17194
14
        {&hf_btatt_target_setting_features_targeted_time_in_two_heart_rate_zones_configuration,
17195
14
            {"Targeted Time in Two Heart Rate Zones Configuration", "btatt.target_setting_features.targeted_time_in_two_heart_rate_zones_configuration",
17196
14
            FT_BOOLEAN, 32, NULL, 0x00000400,
17197
14
            NULL, HFILL}
17198
14
        },
17199
14
        {&hf_btatt_target_setting_features_targeted_training_time_configuration,
17200
14
            {"Targeted Training Time Configuration", "btatt.target_setting_features.targeted_training_time_configuration",
17201
14
            FT_BOOLEAN, 32, NULL, 0x00000200,
17202
14
            NULL, HFILL}
17203
14
        },
17204
14
        {&hf_btatt_target_setting_features_targeted_distance_configuration,
17205
14
            {"Targeted Distance Configuration", "btatt.target_setting_features.targeted_distance_configuration",
17206
14
            FT_BOOLEAN, 32, NULL, 0x00000100,
17207
14
            NULL, HFILL}
17208
14
        },
17209
14
        {&hf_btatt_target_setting_features_targeted_stride_number_configuration,
17210
14
            {"Targeted Stride Number Configuration", "btatt.target_setting_features.targeted_stride_number_configuration",
17211
14
            FT_BOOLEAN, 32, NULL, 0x00000080,
17212
14
            NULL, HFILL}
17213
14
        },
17214
14
        {&hf_btatt_target_setting_features_targeted_step_number_configuration,
17215
14
            {"Targeted Step Number Configuration", "btatt.target_setting_features.targeted_step_number_configuration",
17216
14
            FT_BOOLEAN, 32, NULL, 0x00000040,
17217
14
            NULL, HFILL}
17218
14
        },
17219
14
        {&hf_btatt_target_setting_features_targeted_expended_energy_configuration,
17220
14
            {"Targeted Expended Energy Configuration", "btatt.target_setting_features.targeted_expended_energy_configuration",
17221
14
            FT_BOOLEAN, 32, NULL, 0x00000020,
17222
14
            NULL, HFILL}
17223
14
        },
17224
14
        {&hf_btatt_target_setting_features_heart_rate_target_setting,
17225
14
            {"Heart Rate Target Setting", "btatt.target_setting_features.heart_rate_target_setting",
17226
14
            FT_BOOLEAN, 32, NULL, 0x00000010,
17227
14
            NULL, HFILL}
17228
14
        },
17229
14
        {&hf_btatt_target_setting_features_power_target_setting,
17230
14
            {"Power Target Setting", "btatt.target_setting_features.power_target_setting",
17231
14
            FT_BOOLEAN, 32, NULL, 0x00000008,
17232
14
            NULL, HFILL}
17233
14
        },
17234
14
        {&hf_btatt_target_setting_features_resistance_target_setting,
17235
14
            {"Resistance Target Setting", "btatt.target_setting_features.resistance_target_setting",
17236
14
            FT_BOOLEAN, 32, NULL, 0x00000004,
17237
14
            NULL, HFILL}
17238
14
        },
17239
14
        {&hf_btatt_target_setting_features_inclination_target_setting,
17240
14
            {"Inclination Target Setting", "btatt.target_setting_features.inclination_target_setting",
17241
14
            FT_BOOLEAN, 32, NULL, 0x00000002,
17242
14
            NULL, HFILL}
17243
14
        },
17244
14
        {&hf_btatt_target_setting_features_speed_target_setting,
17245
14
            {"Speed Target Setting", "btatt.target_setting_features.speed_target_setting",
17246
14
            FT_BOOLEAN, 32, NULL, 0x00000001,
17247
14
            NULL, HFILL}
17248
14
        },
17249
14
        {&hf_btatt_training_status_flags,
17250
14
            {"Training Status Flags", "btatt.training_status",
17251
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
17252
14
            NULL, HFILL}
17253
14
        },
17254
14
        {&hf_btatt_training_status_flags_reserved,
17255
14
            {"Reserved", "btatt.training_status.reserved",
17256
14
            FT_UINT8, BASE_HEX, NULL, 0xFC,
17257
14
            NULL, HFILL}
17258
14
        },
17259
14
        {&hf_btatt_training_status_flags_extended_string,
17260
14
            {"Extended String", "btatt.training_status.extended_string",
17261
14
            FT_BOOLEAN, 8, NULL, 0x02,
17262
14
            NULL, HFILL}
17263
14
        },
17264
14
        {&hf_btatt_training_status_flags_training_status_string,
17265
14
            {"Training Status String", "btatt.training_status.training_status_string",
17266
14
            FT_BOOLEAN, 8, NULL, 0x01,
17267
14
            NULL, HFILL}
17268
14
        },
17269
14
        {&hf_btatt_training_status_status,
17270
14
            {"Status", "btatt.training_status.status",
17271
14
            FT_UINT8, BASE_HEX, VALS(training_status_status_vals), 0x0,
17272
14
            NULL, HFILL}
17273
14
        },
17274
14
        {&hf_btatt_training_status_status_string,
17275
14
            {"Status String", "btatt.training_status.status_string",
17276
14
            FT_STRING, BASE_NONE, NULL, 0x0,
17277
14
            NULL, HFILL}
17278
14
        },
17279
14
        {&hf_btatt_supported_speed_range_minimum_speed,
17280
14
            {"Minimum Speed", "btatt.supported_speed_range.minimum_speed",
17281
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17282
14
            NULL, HFILL}
17283
14
        },
17284
14
        {&hf_btatt_supported_speed_range_maximum_speed,
17285
14
            {"Maximum Speed", "btatt.supported_speed_range.maximum_speed",
17286
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17287
14
            NULL, HFILL}
17288
14
        },
17289
14
        {&hf_btatt_supported_speed_range_minimum_increment,
17290
14
            {"Minimum Increment", "btatt.supported_speed_range.minimum_increment",
17291
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17292
14
            NULL, HFILL}
17293
14
        },
17294
14
        {&hf_btatt_supported_inclination_range_minimum_inclination,
17295
14
            {"Minimum Inclination", "btatt.supported_inclination_range.minimum_inclination",
17296
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_percentage), 0x0,
17297
14
            NULL, HFILL}
17298
14
        },
17299
14
        {&hf_btatt_supported_inclination_range_maximum_inclination,
17300
14
            {"Maximum Inclination", "btatt.supported_inclination_range.maximum_inclination",
17301
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_percentage), 0x0,
17302
14
            NULL, HFILL}
17303
14
        },
17304
14
        {&hf_btatt_supported_inclination_range_minimum_increment,
17305
14
            {"Minimum Increment", "btatt.supported_inclination_range.minimum_increment",
17306
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_percentage), 0x0,
17307
14
            NULL, HFILL}
17308
14
        },
17309
14
        {&hf_btatt_supported_resistance_level_range_minimum_resistance_level,
17310
14
            {"Minimum Resistance Level", "btatt.supported_resistance_level_range.minimum_resistance_level",
17311
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
17312
14
            NULL, HFILL}
17313
14
        },
17314
14
        {&hf_btatt_supported_resistance_level_range_maximum_resistance_level,
17315
14
            {"Maximum Resistance Level", "btatt.supported_resistance_level_range.maximum_resistance_level",
17316
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_unitless), 0x0,
17317
14
            NULL, HFILL}
17318
14
        },
17319
14
        {&hf_btatt_supported_resistance_level_range_minimum_increment,
17320
14
            {"Minimum Increment", "btatt.supported_resistance_level_range.minimum_increment",
17321
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_unitless), 0x0,
17322
14
            NULL, HFILL}
17323
14
        },
17324
14
        {&hf_btatt_supported_heart_rate_range_minimum_heart_rate,
17325
14
            {"Minimum Heart Rate", "btatt.supported_heart_rate_range.minimum_heart_rate",
17326
14
            FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17327
14
            NULL, HFILL}
17328
14
        },
17329
14
        {&hf_btatt_supported_heart_rate_range_maximum_heart_rate,
17330
14
            {"Maximum Heart Rate", "btatt.supported_heart_rate_range.maximum_heart_rate",
17331
14
            FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17332
14
            NULL, HFILL}
17333
14
        },
17334
14
        {&hf_btatt_supported_heart_rate_range_minimum_increment,
17335
14
            {"Minimum Increment", "btatt.supported_heart_rate_range.minimum_increment",
17336
14
            FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17337
14
            NULL, HFILL}
17338
14
        },
17339
14
        {&hf_btatt_supported_power_range_minimum_power,
17340
14
            {"Minimum Power", "btatt.supported_power_range.minimum_power",
17341
14
            FT_INT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17342
14
            NULL, HFILL}
17343
14
        },
17344
14
        {&hf_btatt_supported_power_range_maximum_power,
17345
14
            {"Maximum Power", "btatt.supported_power_range.maximum_power",
17346
14
            FT_INT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17347
14
            NULL, HFILL}
17348
14
        },
17349
14
        {&hf_btatt_supported_power_range_minimum_increment,
17350
14
            {"Minimum Increment", "btatt.supported_power_range.minimum_increment",
17351
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17352
14
            NULL, HFILL}
17353
14
        },
17354
14
        {&hf_btatt_fitness_machine_status_opcode,
17355
14
            {"Opcode", "btatt.fitness_machine_status.opcode",
17356
14
            FT_UINT8, BASE_HEX, VALS(fitness_machine_status_opcode_vals), 0x0,
17357
14
            NULL, HFILL}
17358
14
        },
17359
14
        {&hf_btatt_fitness_machine_control_information,
17360
14
            {"Control Information", "btatt.fitness_machine.control_information",
17361
14
            FT_UINT8, BASE_HEX, VALS(fitness_machine_control_information_vals), 0x0,
17362
14
            NULL, HFILL}
17363
14
        },
17364
14
        {&hf_btatt_fitness_machine_spin_down_status,
17365
14
            {"Spin Down Status", "btatt.fitness_machine.spin_down_status",
17366
14
            FT_UINT8, BASE_HEX, VALS(fitness_machine_spin_down_status_vals), 0x0,
17367
14
            NULL, HFILL}
17368
14
        },
17369
14
        {&hf_btatt_fitness_machine_speed,
17370
14
            {"Speed", "btatt.fitness_machine.speed",
17371
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_km_h), 0x0,
17372
14
            NULL, HFILL}
17373
14
        },
17374
14
        {&hf_btatt_fitness_machine_incline,
17375
14
            {"Inclination", "btatt.fitness_machine.inclination",
17376
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_tenth_percentage), 0x0,
17377
14
            NULL, HFILL}
17378
14
        },
17379
14
        {&hf_btatt_fitness_machine_resistance_level,
17380
14
            {"Resistance Level", "btatt.fitness_machine.resistance_level",
17381
14
            FT_UINT8, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_unitless), 0x0,
17382
14
            NULL, HFILL}
17383
14
        },
17384
14
        {&hf_btatt_fitness_machine_power,
17385
14
            {"Power", "btatt.fitness_machine.power",
17386
14
            FT_INT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_watt), 0x0,
17387
14
            NULL, HFILL}
17388
14
        },
17389
14
        {&hf_btatt_fitness_machine_heart_rate,
17390
14
            {"Heart Rate", "btatt.fitness_machine.heart_rate",
17391
14
            FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_bpm), 0x0,
17392
14
            NULL, HFILL}
17393
14
        },
17394
14
        {&hf_btatt_fitness_machine_expended_energy,
17395
14
            {"Expended Energy", "btatt.fitness_machine.expended_energy",
17396
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_calorie), 0x0,
17397
14
            NULL, HFILL}
17398
14
        },
17399
14
        {&hf_btatt_fitness_machine_number_of_steps,
17400
14
            {"Number of Steps", "btatt.fitness_machine.number_of_steps",
17401
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
17402
14
            NULL, HFILL}
17403
14
        },
17404
14
        {&hf_btatt_fitness_machine_number_of_strides,
17405
14
            {"Number of Strides", "btatt.fitness_machine.number_of_strides",
17406
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
17407
14
            NULL, HFILL}
17408
14
        },
17409
14
        {&hf_btatt_fitness_machine_distance,
17410
14
            {"Distance", "btatt.fitness_machine.distance",
17411
14
            FT_UINT24, BASE_DEC | BASE_UNIT_STRING, UNS(&units_meters), 0x0,
17412
14
            NULL, HFILL}
17413
14
        },
17414
14
        {&hf_btatt_fitness_machine_training_time,
17415
14
            {"Training Time", "btatt.fitness_machine.training_time",
17416
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17417
14
            NULL, HFILL}
17418
14
        },
17419
14
        {&hf_btatt_fitness_machine_wheel_circumference,
17420
14
            {"Wheel Circumference", "btatt.fitness_machine.wheel_circumference",
17421
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_tenth_milimeters), 0x0,
17422
14
            NULL, HFILL}
17423
14
        },
17424
14
        {&hf_btatt_fitness_machine_cadence,
17425
14
            {"Cadence", "btatt.fitness_machine.cadence",
17426
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(base_unsigned_one_half_half_minute), 0x0,
17427
14
            NULL, HFILL}
17428
14
        },
17429
14
        {&hf_btatt_fitness_machine_wind_speed,
17430
14
            {"Wind Speed", "btatt.fitness_machine.wind_speed",
17431
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_thousandth_meters_per_seconds), 0x0,
17432
14
            NULL, HFILL}
17433
14
        },
17434
14
        {&hf_btatt_fitness_machine_grade,
17435
14
            {"Grade", "btatt.fitness_machine.grade",
17436
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(base_signed_one_hundredth_percentage), 0x0,
17437
14
            NULL, HFILL}
17438
14
        },
17439
14
        {&hf_btatt_fitness_machine_coefficient_of_rolling_resistance,
17440
14
            {"Coefficient_of Rolling Resistance", "btatt.fitness_machine.coefficient_of_rolling_resistance",
17441
14
            FT_UINT8, BASE_CUSTOM, CF_FUNC(base_unsigned_one_ten_thousandth_unitless), 0x0,
17442
14
            NULL, HFILL}
17443
14
        },
17444
14
        {&hf_btatt_fitness_machine_wind_resistance_coefficient,
17445
14
            {"Wind Resistance Coefficient", "btatt.fitness_machine.wind_resistance_coefficient",
17446
14
            FT_UINT8, BASE_CUSTOM, CF_FUNC(base_unsigned_one_hundredth_kg_per_meter), 0x0,
17447
14
            NULL, HFILL}
17448
14
        },
17449
14
        {&hf_btatt_fitness_machine_targeted_time_in_fat_burn_zone,
17450
14
            {"Targeted Time in Fat Burn Zone", "btatt.fitness_machine.targeted_time_in_fat_burn_zone",
17451
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17452
14
            NULL, HFILL}
17453
14
        },
17454
14
        {&hf_btatt_fitness_machine_targeted_time_in_fitness_zone,
17455
14
            {"Targeted Time in Fitness Zone", "btatt.fitness_machine.targeted_time_in_fitness_zone",
17456
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17457
14
            NULL, HFILL}
17458
14
        },
17459
14
        {&hf_btatt_fitness_machine_targeted_time_in_very_light_zone,
17460
14
            {"Targeted Time in Very Light Zone", "btatt.fitness_machine.targeted_time_in_very_light_zone",
17461
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17462
14
            NULL, HFILL}
17463
14
        },
17464
14
        {&hf_btatt_fitness_machine_targeted_time_in_light_zone,
17465
14
            {"Targeted Time in Light Zone", "btatt.fitness_machine.targeted_time_in_light_zone",
17466
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17467
14
            NULL, HFILL}
17468
14
        },
17469
14
        {&hf_btatt_fitness_machine_targeted_time_in_moderate_zone,
17470
14
            {"Targeted Time in Moderate Zone", "btatt.fitness_machine.targeted_time_in_moderate_zone",
17471
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17472
14
            NULL, HFILL}
17473
14
        },
17474
14
        {&hf_btatt_fitness_machine_targeted_time_in_hard_zone,
17475
14
            {"Targeted Time in Hard Zone", "btatt.fitness_machine.targeted_time_in_hard_zone",
17476
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17477
14
            NULL, HFILL}
17478
14
        },
17479
14
        {&hf_btatt_fitness_machine_targeted_time_in_maximum_zone,
17480
14
            {"Targeted Time in Maximum Zone", "btatt.fitness_machine.targeted_time_in_maximum_zone",
17481
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
17482
14
            NULL, HFILL}
17483
14
        },
17484
14
        {&hf_btatt_volume_setting,
17485
14
            {"Volume Setting", "btatt.volume_control.volume_setting",
17486
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
17487
14
            NULL, HFILL}
17488
14
        },
17489
14
        {&hf_btatt_volume_mute,
17490
14
            {"Mute", "btatt.volume_control.mute",
17491
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
17492
14
            NULL, HFILL}
17493
14
        },
17494
14
        {&hf_btatt_volume_change_counter,
17495
14
            {"Change counter", "btatt.volume_control.change_counter",
17496
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
17497
14
            NULL, HFILL}
17498
14
        },
17499
14
        {&hf_btatt_volume_control_point_procedure,
17500
14
            {"Volume Control Point Procedure", "btatt.volume_control.procedure",
17501
14
            FT_UINT8, BASE_HEX, VALS(ots_volume_control_point_procedure_vals), 0x0,
17502
14
            NULL, HFILL}
17503
14
        },
17504
14
        {&hf_btatt_volume_flags,
17505
14
            {"Flags", "btatt.volume_control.volume_flags",
17506
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
17507
14
            NULL, HFILL}
17508
14
        },
17509
14
        {&hf_request_in_frame,
17510
14
            {"Request in Frame", "btatt.request_in_frame",
17511
14
            FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0x0,
17512
14
            NULL, HFILL}
17513
14
        },
17514
14
        {&hf_response_in_frame,
17515
14
            {"Response in Frame", "btatt.response_in_frame",
17516
14
            FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
17517
14
            NULL, HFILL}
17518
14
        },
17519
        /* Reassembly fields. */
17520
14
        { &hf_btatt_fragments,
17521
14
          { "Message fragments",              "btatt.fragments",
17522
14
            FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17523
14
        { &hf_btatt_fragment,
17524
14
          { "Message fragment",               "btatt.fragment",
17525
14
            FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17526
14
        { &hf_btatt_fragment_overlap,
17527
14
          { "Message fragment overlap",       "btatt.fragment.overlap",
17528
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17529
14
        { &hf_btatt_fragment_overlap_conflicts,
17530
14
          { "Message fragment overlapping with conflicting data", "btatt.fragment.overlap.conflicts",
17531
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17532
14
        { &hf_btatt_fragment_multiple_tails,
17533
14
          { "Message has multiple tail fragments", "btatt.fragment.multiple_tails",
17534
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17535
14
        { &hf_btatt_fragment_too_long_fragment,
17536
14
          { "Message fragment too long",      "btatt.fragment.too_long_fragment",
17537
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17538
14
        { &hf_btatt_fragment_error,
17539
14
          { "Message defragmentation error",  "btatt.fragment.error",
17540
14
            FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17541
14
        { &hf_btatt_fragment_count,
17542
14
          { "Message fragment count",         "btatt.fragment.count",
17543
14
            FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
17544
14
        { &hf_btatt_reassembled_in,
17545
14
          { "Reassembled in",                 "btatt.reassembled.in",
17546
14
            FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }},
17547
14
        { &hf_btatt_reassembled_length,
17548
14
          { "Reassembled msg length",     "btatt.reassembled.length",
17549
14
            FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
17550
14
        { &hf_btatt_reassembled_data,
17551
14
          { "Reassembled msg ata",     "btatt.reassembled.data",
17552
14
            FT_BYTES, SEP_SPACE, NULL, 0x00, NULL, HFILL }},
17553
14
    };
17554
17555
    /* Setup protocol subtree array */
17556
14
    static int *ett[] = {
17557
14
        &ett_btatt,
17558
14
        &ett_btatt_list,
17559
14
        &ett_btatt_value,
17560
14
        &ett_btatt_opcode,
17561
14
        &ett_btatt_handle,
17562
14
        &ett_btatt_characteristic_properties,
17563
        /* reassembly subtree */
17564
14
        &ett_btatt_fragment,
17565
14
        &ett_btatt_fragments,
17566
14
    };
17567
17568
14
    static ei_register_info ei[] = {
17569
14
        { &ei_btatt_uuid_format_unknown,    { "btatt.uuid_format.unknown",            PI_PROTOCOL,  PI_WARN, "Unknown format", EXPFILL }},
17570
14
        { &ei_btatt_handle_too_few,         { "btatt.handle.too_few",                 PI_PROTOCOL,  PI_WARN, "Too few handles, should be 2 or more", EXPFILL }},
17571
14
        { &ei_btatt_mtu_exceeded,           { "btatt.mtu.exceeded",                   PI_PROTOCOL,  PI_WARN, "Packet size exceed current ATT_MTU", EXPFILL }},
17572
14
        { &ei_btatt_mtu_full,               { "btatt.mtu.full",                       PI_PROTOCOL,  PI_NOTE, "Reached ATT_MTU. Attribute value may be longer.", EXPFILL }},
17573
14
        { &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 }},
17574
14
        { &ei_btatt_cgm_size_too_small,     { "btatt.cgm_measurement.size.too_small", PI_PROTOCOL,  PI_WARN, "Size too small (6 or greater)", EXPFILL }},
17575
14
        { &ei_btatt_opcode_invalid_request, { "btatt.opcode.invalid_request" ,        PI_PROTOCOL,  PI_WARN, "Invalid request", EXPFILL }},
17576
14
        { &ei_btatt_opcode_invalid_response,{ "btatt.opcode.invalid_response",        PI_PROTOCOL,  PI_WARN, "Invalid response", EXPFILL }},
17577
14
        { &ei_btatt_invalid_usage,          { "btatt.invalid_usage",                  PI_PROTOCOL,  PI_WARN, "Invalid usage of this characteristic with this opcode", EXPFILL }},
17578
14
        { &ei_btatt_invalid_length,         { "btatt.invalid_length",                 PI_PROTOCOL,  PI_WARN, "Invalid length", EXPFILL }},
17579
14
        { &ei_btatt_bad_data,               { "btatt.bad_data",                       PI_PROTOCOL,  PI_WARN, "Bad Data", EXPFILL }},
17580
14
        { &ei_btatt_unexpected_data,        { "btatt.unexpected_data",                PI_PROTOCOL,  PI_WARN, "Unexpected Data", EXPFILL }},
17581
14
        { &ei_btatt_undecoded,              { "btatt.undecoded",                      PI_UNDECODED, PI_NOTE, "Undecoded", EXPFILL }},
17582
14
    };
17583
17584
14
    static build_valid_func btatt_handle_da_build_value[1] = {btatt_handle_value};
17585
14
    static decode_as_value_t btatt_handle_da_values = {btatt_handle_prompt, 1, btatt_handle_da_build_value};
17586
14
    static decode_as_t btatt_handle_da = {"btatt", "btatt.handle",
17587
14
            1, 0, &btatt_handle_da_values, NULL, NULL,
17588
14
            decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL, NULL, NULL };
17589
17590
    /* Register the protocol name and description */
17591
14
    proto_btatt = proto_register_protocol("Bluetooth Attribute Protocol", "BT ATT", "btatt");
17592
17593
14
    btatt_handle = register_dissector("btatt", dissect_btatt, proto_btatt);
17594
17595
14
    att_handle_dissector_table = register_dissector_table("btatt.handle", "BT ATT Handle", proto_btatt, FT_UINT16, BASE_HEX);
17596
14
    att_service_dissector_table = register_dissector_table("btatt.service", "BT ATT Service", proto_btatt, FT_UINT16, BASE_HEX);
17597
17598
    /* Required function calls to register the header fields and subtrees used */
17599
14
    proto_register_field_array(proto_btatt, hf, array_length(hf));
17600
14
    proto_register_subtree_array(ett, array_length(ett));
17601
14
    expert_btatt = expert_register_protocol(proto_btatt);
17602
14
    expert_register_field_array(expert_btatt, ei, array_length(ei));
17603
17604
14
    mtus = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17605
14
    requests = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17606
14
    fragments = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17607
14
    handle_to_uuid = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
17608
17609
14
    module = prefs_register_protocol_subtree("Bluetooth", proto_btatt, NULL);
17610
14
    prefs_register_static_text_preference(module, "att.version",
17611
14
            "Bluetooth Protocol ATT version from Core 4.0",
17612
14
            "Version of protocol supported by this dissector.");
17613
17614
14
    register_decode_as(&btatt_handle_da);
17615
17616
14
    btatt_tap_handles = register_tap("btatt.handles");
17617
14
}
17618
17619
void
17620
proto_reg_handoff_btatt(void)
17621
14
{
17622
14
    int                 i_array;
17623
17624
14
    http_handle = find_dissector_add_dependency("http", proto_btatt);
17625
14
    usb_hid_boot_keyboard_input_report_handle  = find_dissector_add_dependency("usbhid.boot_report.keyboard.input", proto_btatt);
17626
14
    usb_hid_boot_keyboard_output_report_handle = find_dissector_add_dependency("usbhid.boot_report.keyboard.output", proto_btatt);
17627
14
    usb_hid_boot_mouse_input_report_handle     = find_dissector_add_dependency("usbhid.boot_report.mouse.input", proto_btatt);
17628
14
    btmesh_proxy_handle                        = find_dissector_add_dependency("btmesh.proxy", proto_btatt);
17629
17630
14
    dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_ATT, btatt_handle);
17631
14
    dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_EATT, btatt_handle);
17632
14
    dissector_add_uint("btl2cap.cid", BTL2CAP_FIXED_CID_ATT, btatt_handle);
17633
17634
20.4k
    for (i_array = 0; btatt_handle_strings[i_array].name != NULL; i_array += 1) {
17635
20.4k
        const char *name;
17636
20.4k
        const char *short_name;
17637
20.4k
        const char *abbrev;
17638
20.4k
        unsigned    uuid = btatt_handle_strings[i_array].value;
17639
20.4k
        dissector_handle_t  handle_tmp;
17640
20.4k
        int                 proto_tmp;
17641
17642
20.4k
        if (uuid < 0x1800) {
17643
0
            continue;
17644
0
        }
17645
17646
        // Skip Units (0x27xx) and Members (0xFxxx)
17647
20.4k
        if (((uuid & 0xFF00) == 0x2700) ||
17648
18.6k
            ((uuid & 0xF000) == 0xF000))
17649
11.6k
        {
17650
11.6k
            continue;
17651
11.6k
        }
17652
17653
8.82k
        name = btatt_handle_strings[i_array].name;
17654
8.82k
        short_name = btatt_handle_strings[i_array].short_name;
17655
8.82k
        abbrev = btatt_handle_strings[i_array].abbrev;
17656
17657
8.82k
        proto_tmp = proto_register_protocol_in_name_only(name, short_name, abbrev, proto_btatt, FT_BYTES);
17658
8.82k
        handle_tmp = register_dissector_with_data(abbrev, dissect_btgatt, proto_tmp, GUINT_TO_POINTER(uuid));
17659
17660
8.82k
        dissector_add_for_decode_as("btatt.handle", handle_tmp);
17661
8.82k
    }
17662
14
}
17663
17664
void
17665
proto_register_btgatt(void)
17666
14
{
17667
14
    static hf_register_info hf[] = {
17668
14
        {&hf_gatt_nordic_uart_tx,
17669
14
            {"UART Tx", "btgatt.nordic.uart_tx",
17670
14
            FT_STRING, BASE_NONE, NULL, 0x0,
17671
14
            NULL, HFILL}
17672
14
        },
17673
14
        {&hf_gatt_nordic_uart_rx,
17674
14
            {"UART Rx", "btgatt.nordic.uart_rx",
17675
14
            FT_STRING, BASE_NONE, NULL, 0x0,
17676
14
            NULL, HFILL}
17677
14
        },
17678
14
        {&hf_gatt_nordic_dfu_packet,
17679
14
            {"Packet", "btgatt.nordic.dfu.packet",
17680
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
17681
14
            NULL, HFILL}
17682
14
        },
17683
14
        {&hf_gatt_nordic_dfu_control_point_opcode,
17684
14
            {"Opcode", "btgatt.nordic.dfu.control_point.opcode",
17685
14
            FT_UINT8, BASE_DEC, VALS(nordic_dfu_control_point_opcode_vals), 0x0,
17686
14
            NULL, HFILL}
17687
14
        },
17688
14
        {&hf_gatt_nordic_dfu_control_point_init_packet,
17689
14
            {"Init Packet", "btgatt.nordic.dfu.control_point.init_packet",
17690
14
            FT_UINT8, BASE_HEX, VALS(nordic_dfu_control_point_init_packet_vals), 0x0,
17691
14
            NULL, HFILL}
17692
14
        },
17693
14
        {&hf_gatt_nordic_dfu_control_point_image_type,
17694
14
            {"Image Type", "btgatt.nordic.dfu.control_point.image_type",
17695
14
            FT_UINT8, BASE_HEX, VALS(nordic_dfu_control_point_image_type_vals), 0x0,
17696
14
            NULL, HFILL}
17697
14
        },
17698
14
        {&hf_gatt_nordic_dfu_control_point_number_of_bytes,
17699
14
            {"Number of Bytes of Firmware Image Received", "btgatt.nordic.dfu.control_point.number_of_bytes",
17700
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
17701
14
            NULL, HFILL}
17702
14
        },
17703
14
        {&hf_gatt_nordic_dfu_control_point_number_of_packets,
17704
14
            {"Number of Packets", "btgatt.nordic.dfu.control_point.number_of_packets",
17705
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
17706
14
            NULL, HFILL}
17707
14
        },
17708
14
        {&hf_gatt_nordic_dfu_control_point_request_opcode,
17709
14
            {"Request Opcode", "btgatt.nordic.dfu.control_point.request_opcode",
17710
14
            FT_UINT8, BASE_DEC, VALS(nordic_dfu_control_point_opcode_vals), 0x0,
17711
14
            NULL, HFILL}
17712
14
        },
17713
14
        {&hf_gatt_nordic_dfu_control_point_response_value,
17714
14
            {"Response Value", "btgatt.nordic.dfu.control_point.response_value",
17715
14
            FT_UINT8, BASE_DEC, VALS(nordic_dfu_control_point_response_value_vals), 0x0,
17716
14
            NULL, HFILL}
17717
14
        },
17718
14
        {&hf_gatt_microbit_accelerometer_data,
17719
14
            {"Accelerometer Data", "btgatt.microbit.accelerometer.data",
17720
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
17721
14
            NULL, HFILL}
17722
14
        },
17723
14
        {&hf_gatt_microbit_accelerometer_x,
17724
14
            {"X axis", "btgatt.microbit.accelerometer.x",
17725
14
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
17726
14
            "Accelerometer X axis", HFILL}
17727
14
        },
17728
14
        {&hf_gatt_microbit_accelerometer_y,
17729
14
            {"Y axis", "btgatt.microbit.accelerometer.y",
17730
14
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
17731
14
            "Accelerometer Y axis", HFILL}
17732
14
        },
17733
14
        {&hf_gatt_microbit_accelerometer_z,
17734
14
            {"Z axis", "btgatt.microbit.accelerometer.z",
17735
14
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
17736
14
            "Accelerometer Z axis", HFILL}
17737
14
        },
17738
14
        {&hf_gatt_microbit_accelerometer_period,
17739
14
            {"Accelerometer Period", "btgatt.microbit.accelerometer.period",
17740
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
17741
14
            NULL, HFILL}
17742
14
        },
17743
14
        {&hf_gatt_microbit_magnetometer_data,
17744
14
            {"Magnetometer Data", "btgatt.microbit.magnetometer.data",
17745
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
17746
14
            NULL, HFILL}
17747
14
        },
17748
14
        {&hf_gatt_microbit_magnetometer_x,
17749
14
            {"X axis", "btgatt.microbit.magnetometer.x",
17750
14
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
17751
14
            "Magnetometer X axis", HFILL}
17752
14
        },
17753
14
        {&hf_gatt_microbit_magnetometer_y,
17754
14
            {"Y axis", "btgatt.microbit.magnetometer.y",
17755
14
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
17756
14
            "Magnetometer Y axis", HFILL}
17757
14
        },
17758
14
        {&hf_gatt_microbit_magnetometer_z,
17759
14
            {"Z axis", "btgatt.microbit.magnetometer.z",
17760
14
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
17761
14
            "Magnetometer Z axis", HFILL}
17762
14
        },
17763
14
        {&hf_gatt_microbit_magnetometer_period,
17764
14
            {"Magnetometer Period", "btgatt.microbit.magnetometer.period",
17765
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
17766
14
            NULL, HFILL}
17767
14
        },
17768
14
        {&hf_gatt_microbit_magnetometer_bearing,
17769
14
            {"Magnetometer Bearing", "btgatt.microbit.magnetometer.bearing",
17770
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_degree_bearing), 0x0,
17771
14
            NULL, HFILL}
17772
14
        },
17773
14
        {&hf_gatt_microbit_button_a_state,
17774
14
            {"Button A", "btgatt.microbit.button.a",
17775
14
            FT_UINT8, BASE_DEC, VALS(btgatt_microbit_button_state_vals), 0x0,
17776
14
            NULL, HFILL}
17777
14
        },
17778
14
        {&hf_gatt_microbit_button_b_state,
17779
14
            {"Button B", "btgatt.microbit.button.b",
17780
14
            FT_UINT8, BASE_DEC, VALS(btgatt_microbit_button_state_vals), 0x0,
17781
14
            NULL, HFILL}
17782
14
        },
17783
14
        {&hf_gatt_microbit_pin_data,
17784
14
            {"Pin Data", "btgatt.microbit.pin_data",
17785
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
17786
14
            NULL, HFILL}
17787
14
        },
17788
14
        {&hf_gatt_microbit_pin_number,
17789
14
            {"Pin Number", "btgatt.microbit.pin_data.number",
17790
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
17791
14
            NULL, HFILL}
17792
14
        },
17793
14
        {&hf_gatt_microbit_pin_value,
17794
14
            {"Pin Value", "btgatt.microbit.pin_data.value",
17795
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
17796
14
            NULL, HFILL}
17797
14
        },
17798
14
        {&hf_gatt_microbit_pin_ad_config,
17799
14
            {"Pin AD Configuration", "btgatt.microbit.pin_ad_config.value",
17800
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
17801
14
            NULL, HFILL}
17802
14
        },
17803
14
        {&hf_gatt_microbit_ad_pin0,
17804
14
            {"Pin 0", "btgatt.microbit.pin_ad_config.pin0",
17805
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00001,
17806
14
            NULL, HFILL}
17807
14
        },
17808
14
        {&hf_gatt_microbit_ad_pin1,
17809
14
            {"Pin 1", "btgatt.microbit.pin_ad_config.pin1",
17810
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00002,
17811
14
            NULL, HFILL}
17812
14
        },
17813
14
        {&hf_gatt_microbit_ad_pin2,
17814
14
            {"Pin 2", "btgatt.microbit.pin_ad_config.pin2",
17815
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00004,
17816
14
            NULL, HFILL}
17817
14
        },
17818
14
        {&hf_gatt_microbit_ad_pin3,
17819
14
            {"Pin 3", "btgatt.microbit.pin_ad_config.pin3",
17820
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00008,
17821
14
            NULL, HFILL}
17822
14
        },
17823
14
        {&hf_gatt_microbit_ad_pin4,
17824
14
            {"Pin 4", "btgatt.microbit.pin_ad_config.pin4",
17825
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00010,
17826
14
            NULL, HFILL}
17827
14
        },
17828
14
        {&hf_gatt_microbit_ad_pin5,
17829
14
            {"Pin 5", "btgatt.microbit.pin_ad_config.pin5",
17830
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00020,
17831
14
            NULL, HFILL}
17832
14
        },
17833
14
        {&hf_gatt_microbit_ad_pin6,
17834
14
            {"Pin 6", "btgatt.microbit.pin_ad_config.pin6",
17835
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00040,
17836
14
            NULL, HFILL}
17837
14
        },
17838
14
        {&hf_gatt_microbit_ad_pin7,
17839
14
            {"Pin 7", "btgatt.microbit.pin_ad_config.pin7",
17840
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00080,
17841
14
            NULL, HFILL}
17842
14
        },
17843
14
        {&hf_gatt_microbit_ad_pin8,
17844
14
            {"Pin 8", "btgatt.microbit.pin_ad_config.pin8",
17845
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00100,
17846
14
            NULL, HFILL}
17847
14
        },
17848
14
        {&hf_gatt_microbit_ad_pin9,
17849
14
            {"Pin 9", "btgatt.microbit.pin_ad_config.pin9",
17850
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00200,
17851
14
            NULL, HFILL}
17852
14
        },
17853
14
        {&hf_gatt_microbit_ad_pin10,
17854
14
            {"Pin 10", "btgatt.microbit.pin_ad_config.pin10",
17855
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00400,
17856
14
            NULL, HFILL}
17857
14
        },
17858
14
        {&hf_gatt_microbit_ad_pin11,
17859
14
            {"Pin 11", "btgatt.microbit.pin_ad_config.pin11",
17860
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x00800,
17861
14
            NULL, HFILL}
17862
14
        },
17863
14
        {&hf_gatt_microbit_ad_pin12,
17864
14
            {"Pin 12", "btgatt.microbit.pin_ad_config.pin12",
17865
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x01000,
17866
14
            NULL, HFILL}
17867
14
        },
17868
14
        {&hf_gatt_microbit_ad_pin13,
17869
14
            {"Pin 13", "btgatt.microbit.pin_ad_config.pin13",
17870
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x02000,
17871
14
            NULL, HFILL}
17872
14
        },
17873
14
        {&hf_gatt_microbit_ad_pin14,
17874
14
            {"Pin 14", "btgatt.microbit.pin_ad_config.pin14",
17875
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x04000,
17876
14
            NULL, HFILL}
17877
14
        },
17878
14
        {&hf_gatt_microbit_ad_pin15,
17879
14
            {"Pin 15", "btgatt.microbit.pin_ad_config.pin15",
17880
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x08000,
17881
14
            NULL, HFILL}
17882
14
        },
17883
14
        {&hf_gatt_microbit_ad_pin16,
17884
14
            {"Pin 16", "btgatt.microbit.pin_ad_config.pin16",
17885
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x10000,
17886
14
            NULL, HFILL}
17887
14
        },
17888
14
        {&hf_gatt_microbit_ad_pin17,
17889
14
            {"Pin 17", "btgatt.microbit.pin_ad_config.pin17",
17890
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x20000,
17891
14
            NULL, HFILL}
17892
14
        },
17893
14
        {&hf_gatt_microbit_ad_pin18,
17894
14
            {"Pin 18", "btgatt.microbit.pin_ad_config.pin18",
17895
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x40000,
17896
14
            NULL, HFILL}
17897
14
        },
17898
14
        {&hf_gatt_microbit_ad_pin19,
17899
14
            {"Pin 19", "btgatt.microbit.pin_ad_config.pin19",
17900
14
            FT_BOOLEAN, 20, TFS(&microbit_ad_tfs), 0x80000,
17901
14
            NULL, HFILL}
17902
14
        },
17903
14
        {&hf_gatt_microbit_pin_io_config,
17904
14
            {"Pin IO Configuration", "btgatt.microbit.pin_io_config.value",
17905
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
17906
14
            NULL, HFILL}
17907
14
        },
17908
14
        {&hf_gatt_microbit_io_pin0,
17909
14
            {"Pin 0", "btgatt.microbit.pin_io_config.pin0",
17910
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00001,
17911
14
            NULL, HFILL}
17912
14
        },
17913
14
        {&hf_gatt_microbit_io_pin1,
17914
14
            {"Pin 1", "btgatt.microbit.pin_io_config.pin1",
17915
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00002,
17916
14
            NULL, HFILL}
17917
14
        },
17918
14
        {&hf_gatt_microbit_io_pin2,
17919
14
            {"Pin 2", "btgatt.microbit.pin_io_config.pin2",
17920
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00004,
17921
14
            NULL, HFILL}
17922
14
        },
17923
14
        {&hf_gatt_microbit_io_pin3,
17924
14
            {"Pin 3", "btgatt.microbit.pin_io_config.pin3",
17925
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00008,
17926
14
            NULL, HFILL}
17927
14
        },
17928
14
        {&hf_gatt_microbit_io_pin4,
17929
14
            {"Pin 4", "btgatt.microbit.pin_io_config.pin4",
17930
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00010,
17931
14
            NULL, HFILL}
17932
14
        },
17933
14
        {&hf_gatt_microbit_io_pin5,
17934
14
            {"Pin 5", "btgatt.microbit.pin_io_config.pin5",
17935
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00020,
17936
14
            NULL, HFILL}
17937
14
        },
17938
14
        {&hf_gatt_microbit_io_pin6,
17939
14
            {"Pin 6", "btgatt.microbit.pin_io_config.pin6",
17940
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00040,
17941
14
            NULL, HFILL}
17942
14
        },
17943
14
        {&hf_gatt_microbit_io_pin7,
17944
14
            {"Pin 7", "btgatt.microbit.pin_io_config.pin7",
17945
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00080,
17946
14
            NULL, HFILL}
17947
14
        },
17948
14
        {&hf_gatt_microbit_io_pin8,
17949
14
            {"Pin 8", "btgatt.microbit.pin_io_config.pin8",
17950
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00100,
17951
14
            NULL, HFILL}
17952
14
        },
17953
14
        {&hf_gatt_microbit_io_pin9,
17954
14
            {"Pin 9", "btgatt.microbit.pin_io_config.pin9",
17955
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00200,
17956
14
            NULL, HFILL}
17957
14
        },
17958
14
        {&hf_gatt_microbit_io_pin10,
17959
14
            {"Pin 10", "btgatt.microbit.pin_io_config.pin10",
17960
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00400,
17961
14
            NULL, HFILL}
17962
14
        },
17963
14
        {&hf_gatt_microbit_io_pin11,
17964
14
            {"Pin 11", "btgatt.microbit.pin_io_config.pin11",
17965
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x00800,
17966
14
            NULL, HFILL}
17967
14
        },
17968
14
        {&hf_gatt_microbit_io_pin12,
17969
14
            {"Pin 12", "btgatt.microbit.pin_io_config.pin12",
17970
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x01000,
17971
14
            NULL, HFILL}
17972
14
        },
17973
14
        {&hf_gatt_microbit_io_pin13,
17974
14
            {"Pin 13", "btgatt.microbit.pin_io_config.pin13",
17975
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x02000,
17976
14
            NULL, HFILL}
17977
14
        },
17978
14
        {&hf_gatt_microbit_io_pin14,
17979
14
            {"Pin 14", "btgatt.microbit.pin_io_config.pin14",
17980
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x04000,
17981
14
            NULL, HFILL}
17982
14
        },
17983
14
        {&hf_gatt_microbit_io_pin15,
17984
14
            {"Pin 15", "btgatt.microbit.pin_io_config.pin15",
17985
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x08000,
17986
14
            NULL, HFILL}
17987
14
        },
17988
14
        {&hf_gatt_microbit_io_pin16,
17989
14
            {"Pin 16", "btgatt.microbit.pin_io_config.pin16",
17990
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x10000,
17991
14
            NULL, HFILL}
17992
14
        },
17993
14
        {&hf_gatt_microbit_io_pin17,
17994
14
            {"Pin 17", "btgatt.microbit.pin_io_config.pin17",
17995
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x20000,
17996
14
            NULL, HFILL}
17997
14
        },
17998
14
        {&hf_gatt_microbit_io_pin18,
17999
14
            {"Pin 18", "btgatt.microbit.pin_io_config.pin18",
18000
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x40000,
18001
14
            NULL, HFILL}
18002
14
        },
18003
14
        {&hf_gatt_microbit_io_pin19,
18004
14
            {"Pin 19", "btgatt.microbit.pin_io_config.pin19",
18005
14
            FT_BOOLEAN, 20, TFS(&microbit_io_tfs), 0x80000,
18006
14
            NULL, HFILL}
18007
14
        },
18008
14
        {&hf_gatt_microbit_pwm_control,
18009
14
            {"PWM Control", "btgatt.microbit.pwm_control",
18010
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
18011
14
            NULL, HFILL}
18012
14
        },
18013
14
        {&hf_gatt_microbit_led_matrix,
18014
14
            {"LED Matrix", "btgatt.microbit.led_matrix",
18015
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
18016
14
            NULL, HFILL}
18017
14
        },
18018
14
        {&hf_gatt_microbit_led_text,
18019
14
            {"LED Text", "btgatt.microbit.led_text",
18020
14
            FT_STRING, BASE_NONE, NULL, 0x0,
18021
14
            NULL, HFILL}
18022
14
        },
18023
14
        {&hf_gatt_microbit_scrolling_delay,
18024
14
            {"Scrolling Delay", "btgatt.microbit.scrolling_delay",
18025
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
18026
14
            NULL, HFILL}
18027
14
        },
18028
14
        {&hf_gatt_microbit_microbit_requirements,
18029
14
            {"MicroBit Requirements", "btgatt.microbit.microbit_requirements",
18030
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
18031
14
            NULL, HFILL}
18032
14
        },
18033
14
        {&hf_gatt_microbit_microbit_event,
18034
14
            {"MicroBit Event", "btgatt.microbit.microbit_event",
18035
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
18036
14
            NULL, HFILL}
18037
14
        },
18038
14
        {&hf_gatt_microbit_client_requirements,
18039
14
            {"Client Requirements", "btgatt.microbit.client_requirements",
18040
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
18041
14
            NULL, HFILL}
18042
14
        },
18043
14
        {&hf_gatt_microbit_client_event,
18044
14
            {"Client Event", "btgatt.microbit.client_event",
18045
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
18046
14
            NULL, HFILL}
18047
14
        },
18048
14
        {&hf_gatt_microbit_dfu_control,
18049
14
            {"DFU Control", "btgatt.microbit.dfu_control",
18050
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
18051
14
            NULL, HFILL}
18052
14
        },
18053
14
        {&hf_gatt_microbit_temperature_value,
18054
14
            {"Temperature", "btgatt.microbit.temperature.value",
18055
14
            FT_INT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_degree_celsius), 0x0,
18056
14
            NULL, HFILL}
18057
14
        },
18058
14
        {&hf_gatt_microbit_temperature_period,
18059
14
            {"Temperature Period", "btgatt.microbit.temperature.period",
18060
14
            FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0,
18061
14
            NULL, HFILL}
18062
14
        }
18063
14
    };
18064
18065
18066
14
    static int *ett[] = {
18067
14
        &ett_btgatt,
18068
14
        &ett_btgatt_microbit_accelerometer,
18069
14
        &ett_btgatt_microbit_magnetometer,
18070
14
        &ett_btgatt_microbit_pin_data,
18071
14
        &ett_btgatt_microbit_pin_ad_config,
18072
14
        &ett_btgatt_microbit_pin_io_config,
18073
14
    };
18074
18075
14
    proto_btgatt = proto_register_protocol("Bluetooth GATT Attribute Protocol", "BT GATT", "btgatt");
18076
18077
14
    btgatt_handle = register_dissector_with_data("btgatt", dissect_btgatt, proto_btgatt, NULL);
18078
18079
14
    proto_register_field_array(proto_btgatt, hf, array_length(hf));
18080
14
    proto_register_subtree_array(ett, array_length(ett));
18081
14
}
18082
18083
void
18084
proto_reg_handoff_btgatt(void)
18085
14
{
18086
14
    static const struct uuid_dissectors_t {
18087
14
        const char * const uuid;
18088
14
              char * const short_name;
18089
14
              bool long_attr;
18090
18091
14
        int (* const dissect_func)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
18092
14
    } uuid_dissectors[] = {
18093
14
        { "6e400001-b5a3-f393-e0a9-e50e24dcca9e", "Nordic UART Service",      false, NULL },
18094
14
        { "6e400002-b5a3-f393-e0a9-e50e24dcca9e", "Nordic UART Tx",           false, dissect_btgatt_nordic_uart_tx },
18095
14
        { "6e400003-b5a3-f393-e0a9-e50e24dcca9e", "Nordic UART Rx",           false, dissect_btgatt_nordic_uart_rx },
18096
14
        { "00001530-1212-efde-1523-785feabcd123", "Nordic DFU Service",       false, NULL },
18097
14
        { "00001531-1212-efde-1523-785feabcd123", "Nordic DFU Control Point", false, dissect_btgatt_nordic_dfu_control_point },
18098
14
        { "00001532-1212-efde-1523-785feabcd123", "Nordic DFU Packet",        false, dissect_btgatt_nordic_dfu_packet },
18099
18100
        /* BBC micro:bit profile - https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html */
18101
14
        { "e95d0753-251d-470a-a062-fa1922dfa9a8", "micro:bit Accelerometer Service", false, NULL },
18102
14
        { "e95dca4b-251d-470a-a062-fa1922dfa9a8", "micro:bit Accelerometer Data",    false, dissect_btgatt_microbit_accelerometer_data },
18103
14
        { "e95dfb24-251d-470a-a062-fa1922dfa9a8", "micro:bit Accelerometer Period",  false, dissect_btgatt_microbit_accelerometer_period },
18104
14
        { "e95df2d8-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Service",  false, NULL },
18105
14
        { "e95dfb11-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Data",     false, dissect_btgatt_microbit_magnetometer_data },
18106
14
        { "e95d386c-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Period",   false, dissect_btgatt_microbit_magnetometer_period },
18107
14
        { "e95d9715-251d-470a-a062-fa1922dfa9a8", "micro:bit Magnetometer Bearing",  false, dissect_btgatt_microbit_magnetometer_bearing },
18108
14
        { "e95d9882-251d-470a-a062-fa1922dfa9a8", "micro:bit Button Service",        false, NULL },
18109
14
        { "e95dda90-251d-470a-a062-fa1922dfa9a8", "micro:bit Button A State",        false, dissect_btgatt_microbit_button_a_state },
18110
14
        { "e95dda91-251d-470a-a062-fa1922dfa9a8", "micro:bit Button B State",        false, dissect_btgatt_microbit_button_b_state },
18111
14
        { "e95d127b-251d-470a-a062-fa1922dfa9a8", "micro:bit IO Pin Service",        false, NULL },
18112
14
        { "e95d8d00-251d-470a-a062-fa1922dfa9a8", "micro:bit Pin Data",              false, dissect_btgatt_microbit_pin_data },
18113
14
        { "e95d5899-251d-470a-a062-fa1922dfa9a8", "micro:bit Pin AD Configuration",  false, dissect_btgatt_microbit_pin_ad_config },
18114
14
        { "e95db9fe-251d-470a-a062-fa1922dfa9a8", "micro:bit Pin IO Configuration",  false, dissect_btgatt_microbit_pin_io_config },
18115
14
        { "e95dd822-251d-470a-a062-fa1922dfa9a8", "micro:bit PWM Control",           false, dissect_btgatt_microbit_pwm_control },
18116
14
        { "e95dd91d-251d-470a-a062-fa1922dfa9a8", "micro:bit LED Service",           false, NULL },
18117
14
        { "e95d7b77-251d-470a-a062-fa1922dfa9a8", "micro:bit LED Matrix State",      false, dissect_btgatt_microbit_led_matrix },
18118
14
        { "e95d93ee-251d-470a-a062-fa1922dfa9a8", "micro:bit LED Text",              false, dissect_btgatt_microbit_led_text },
18119
14
        { "e95d0d2d-251d-470a-a062-fa1922dfa9a8", "micro:bit Scrolling Delay",       false, dissect_btgatt_microbit_scrolling_delay },
18120
14
        { "e95d93af-251d-470a-a062-fa1922dfa9a8", "micro:bit Event Service",         false, NULL },
18121
14
        { "e95db84c-251d-470a-a062-fa1922dfa9a8", "micro:bit MicroBit Requirements", false, dissect_btgatt_microbit_microbit_requirements },
18122
14
        { "e95d9775-251d-470a-a062-fa1922dfa9a8", "micro:bit MicroBit Event",        false, dissect_btgatt_microbit_microbit_event },
18123
14
        { "e95d23c4-251d-470a-a062-fa1922dfa9a8", "micro:bit Client Requirements",   false, dissect_btgatt_microbit_client_requirements },
18124
14
        { "e95d5404-251d-470a-a062-fa1922dfa9a8", "micro:bit Client Event",          false, dissect_btgatt_microbit_client_event },
18125
14
        { "e95d93b0-251d-470a-a062-fa1922dfa9a8", "micro:bit DFU Control Service",   false, NULL },
18126
14
        { "e95d93b1-251d-470a-a062-fa1922dfa9a8", "micro:bit DFU Control",           false, dissect_btgatt_microbit_dfu_control },
18127
14
        { "e95d6100-251d-470a-a062-fa1922dfa9a8", "micro:bit Temperature Service",   false, NULL },
18128
14
        { "e95d9250-251d-470a-a062-fa1922dfa9a8", "micro:bit Temperature",           false, dissect_btgatt_microbit_temperature_value },
18129
14
        { "e95d1b25-251d-470a-a062-fa1922dfa9a8", "micro:bit Temperature Period",    false, dissect_btgatt_microbit_temperature_period },
18130
18131
14
        { NULL, NULL, false, NULL },
18132
14
    };
18133
18134
504
    for (int i = 0; uuid_dissectors[i].uuid; i++) {
18135
490
        bluetooth_add_custom_uuid(uuid_dissectors[i].uuid, uuid_dissectors[i].short_name, uuid_dissectors[i].long_attr);
18136
18137
490
        if (uuid_dissectors[i].dissect_func) {
18138
350
            dissector_handle_t handle = create_dissector_handle_with_name_and_description(
18139
350
                uuid_dissectors[i].dissect_func, proto_btgatt,
18140
                NULL, uuid_dissectors[i].short_name);
18141
350
            dissector_add_string("bluetooth.uuid", uuid_dissectors[i].uuid, handle);
18142
350
        }
18143
490
    }
18144
14
}
18145
18146
/*
18147
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
18148
 *
18149
 * Local variables:
18150
 * c-basic-offset: 4
18151
 * tab-width: 8
18152
 * indent-tabs-mode: nil
18153
 * End:
18154
 *
18155
 * vi: set shiftwidth=4 tabstop=8 expandtab:
18156
 * :indentSize=4:tabSize=8:noTabs=true:
18157
 */