diff options
author | Michael Mann <mmann78@netscape.net> | 2014-01-12 02:29:51 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-01-12 02:29:51 +0000 |
commit | 11a61d757d25c8e47b95c9dd2c1309df78ded7ed (patch) | |
tree | b0eab612cda9b5fb2bbad998b8739cb15a0a91b1 /epan/dissectors | |
parent | c071a1c7286eb9789dc5c96bb45ab75c75c3ecb4 (diff) |
Bluetooth/Ubertooth improvements. Bug 9606 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9606)
From Michal Labedzki
1. Bluetooth: Implement the rest of fields in Low Energy Link Layer dissector
2. Bluetooth: Merge all UUIDs together
3. Bluetooth: Extract LE Channel MAP to separate dissector
4. Ubertooth: Dissect CC2400 registers
svn path=/trunk/; revision=54700
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-bluetooth-hci.h | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-btatt.c | 124 | ||||
-rw-r--r-- | epan/dissectors/packet-btavctp.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-btbnep.c | 9 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_cmd.c | 766 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_evt.c | 17 | ||||
-rw-r--r-- | epan/dissectors/packet-btl2cap.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-btle.c | 409 | ||||
-rw-r--r-- | epan/dissectors/packet-btobex.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-btrfcomm.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-btsdp.c | 123 | ||||
-rw-r--r-- | epan/dissectors/packet-btsdp.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ubertooth.c | 2022 |
13 files changed, 3105 insertions, 385 deletions
diff --git a/epan/dissectors/packet-bluetooth-hci.h b/epan/dissectors/packet-bluetooth-hci.h index c1929accfb..08d19477da 100644 --- a/epan/dissectors/packet-bluetooth-hci.h +++ b/epan/dissectors/packet-bluetooth-hci.h @@ -61,12 +61,13 @@ extern value_string_ext bthci_cmd_input_data_format_vals_ext; extern value_string_ext bthci_cmd_input_sample_size_vals_ext; extern value_string_ext bthci_cmd_air_coding_format_vals_ext; extern value_string_ext bthci_cmd_status_vals_ext; -extern value_string_ext bthci_cmd_service_class_type_vals_ext; extern value_string_ext bthci_cmd_eir_data_type_vals_ext; extern value_string_ext bthci_cmd_auth_req_vals_ext; extern value_string_ext bthci_cmd_appearance_vals_ext; extern value_string_ext bthci_evt_comp_id_ext; +extern value_string_ext bt_sig_uuid_vals_ext; + extern const value_string bthci_cmd_io_capability_vals[]; extern const value_string bthci_cmd_oob_data_present_vals[]; extern const value_string bthci_cmd_address_types_vals[]; diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c index c12cd88c47..25ca55f51c 100644 --- a/epan/dissectors/packet-btatt.c +++ b/epan/dissectors/packet-btatt.c @@ -33,6 +33,8 @@ #include <epan/packet.h> #include <epan/prefs.h> #include <epan/expert.h> + +#include "packet-bluetooth-hci.h" #include "packet-btl2cap.h" /* Initialize the protocol and registered fields */ @@ -128,120 +130,6 @@ static const value_string error_vals[] = { {0x0, NULL} }; -static const value_string uuid_vals[] = { - /* Services - http://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx */ - {0x1800, "Generic Access"}, - {0x1801, "Generic Attribute"}, - {0x1802, "Immediate Alert"}, - {0x1803, "Link Loss"}, - {0x1804, "Tx Power"}, - {0x1805, "Current Time Service"}, - {0x1806, "Reference Time Update Service"}, - {0x1807, "Next DST Change Service"}, - {0x1808, "Glucose"}, - {0x1809, "Health Thermometer"}, - {0x180a, "Device Information"}, - {0x180d, "Heart Rate"}, - {0x180e, "Phone Alert Status Service"}, - {0x180f, "Battery Service"}, - {0x1810, "Blood Pressure"}, - {0x1811, "Alert Notification Service"}, - {0x1812, "Human Interface Device"}, - {0x1813, "Scan Parameters"}, - {0x1814, "Running Speed and Cadence"}, - {0x1816, "Cycling Speed and Cadence"}, - /* Declarations - http://developer.bluetooth.org/gatt/declarations/Pages/DeclarationsHome.aspx */ - {0x2800, "GATT Primary Service Declaration"}, - {0x2801, "GATT Secondary Service Declaration"}, - {0x2802, "GATT Include Declaration"}, - {0x2803, "GATT Characteristic Declaration"}, - /* Descriptors - http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx */ - {0x2900, "Characteristic Extended Properties"}, - {0x2901, "Characteristic User Description"}, - {0x2902, "Client Characteristic Configuration"}, - {0x2903, "Server Characteristic Configuration"}, - {0x2904, "Characteristic Presentation Format"}, - {0x2905, "Characteristic Aggregate Format"}, - {0x2906, "Valid Range"}, - {0x2907, "External Report Reference"}, - {0x2908, "Report Reference"}, - /* Characteristics - http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx */ - {0x2a00, "Device Name"}, - {0x2a01, "Appearance"}, - {0x2a02, "Peripheral Privacy Flag"}, - {0x2a03, "Reconnection Address"}, - {0x2a04, "Peripheral Preferred Connection Parameters"}, - {0x2a05, "Service Changed"}, - {0x2a06, "Alert Level"}, - {0x2a07, "Tx Power Level"}, - {0x2a08, "Date Time"}, - {0x2a09, "Day of Week"}, - {0x2a0a, "Day Date Time"}, - {0x2a0c, "Exact Time 256"}, - {0x2a0d, "DST Offset"}, - {0x2a0e, "Time Zone"}, - {0x2a0f, "Local Time Information"}, - {0x2a11, "Time with DST"}, - {0x2a12, "Time Accuracy"}, - {0x2a13, "Time Source"}, - {0x2a14, "Reference Time Information"}, - {0x2a16, "Time Update Control Point"}, - {0x2a17, "Time Update State"}, - {0x2a18, "Glucose Measurement"}, - {0x2a19, "Battery Level"}, - {0x2a1c, "Temperature Measurement"}, - {0x2a1d, "Temperature Type"}, - {0x2a1e, "Intermediate Temperature"}, - {0x2a21, "Measurement Interval"}, - {0x2a22, "Boot Keyboard Input Report"}, - {0x2a23, "System ID"}, - {0x2a24, "Model Number String"}, - {0x2a25, "Serial Number String"}, - {0x2a26, "Firmware Revision String"}, - {0x2a27, "Hardware Revision String"}, - {0x2a28, "Software Revision String"}, - {0x2a29, "Manufacturer Name String"}, - {0x2a2a, "IEEE 11073-20601 Reg. Cert. Data List"}, - {0x2a2b, "Current Time"}, - {0x2a31, "Scan Refresh"}, - {0x2a32, "Boot Keyboard Output Report"}, - {0x2a33, "Boot Mouse Input Report"}, - {0x2a34, "Glucose Measurement Context"}, - {0x2a35, "Blood Pressure Measurement"}, - {0x2a36, "Intermediate Cuff Pressure"}, - {0x2a37, "Heart Rate Measurement"}, - {0x2a38, "Body Sensor Location"}, - {0x2a39, "Heart Rate Control Point"}, - {0x2a3f, "Alert Status"}, - {0x2a40, "Ringer Control Point"}, - {0x2a41, "Ringer Setting"}, - {0x2a42, "Alert Category ID Bit Mask"}, - {0x2a43, "Alert Category ID"}, - {0x2a44, "Alert Notification Control Point"}, - {0x2a45, "Unread Alert Status"}, - {0x2a46, "New Alert"}, - {0x2a47, "Supported New Alert Category"}, - {0x2a48, "Supported Unread Alert Category"}, - {0x2a49, "Blood Pressure Feature"}, - {0x2a4a, "HID Information"}, - {0x2a4b, "Report Map"}, - {0x2a4c, "HID Control Point"}, - {0x2a4d, "Report"}, - {0x2a4e, "Protocol Mode"}, - {0x2a4f, "Scan Interval Window"}, - {0x2a50, "PnP ID"}, - {0x2a51, "Glucose Feature"}, - {0x2a52, "Record Access Control Point"}, - {0x2a53, "RSC Measurement"}, - {0x2a54, "RSC Feature"}, - {0x2a55, "SC Control Point"}, - {0x2a5b, "CSC Measurement"}, - {0x2a5c, "CSC Feature"}, - {0x2a5d, "Sensor Location"}, - {0x0, NULL} -}; -static value_string_ext uuid_vals_ext = VALUE_STRING_EXT_INIT(uuid_vals); - static const value_string uuid_format_vals[] = { {0x01, "16-bit UUIDs"}, {0x02, "128-bit UUIDs"}, @@ -357,7 +245,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U case 0x06: /* Find By Type Value Request */ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s, Handles: 0x%04x..0x%04x", - val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &uuid_vals_ext, "<unknown>"), + val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &bt_sig_uuid_vals_ext, "<unknown>"), tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2)); proto_tree_add_item(st, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -388,7 +276,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U case 0x08: /* Read By Type Request */ case 0x10: /* Read By Group Type Request */ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s, Handles: 0x%04x..0x%04x", - val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &uuid_vals_ext, "<unknown>"), + val_to_str_ext_const(tvb_get_letohs(tvb, offset+4), &bt_sig_uuid_vals_ext, "<unknown>"), tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2)); proto_tree_add_item(st, hf_btatt_starting_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -403,7 +291,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U else if (tvb_length_remaining(tvb, offset) == 16) { item = proto_tree_add_item(st, hf_btatt_uuid128, tvb, offset, 16, ENC_NA); proto_item_append_text(item, " (%s)", val_to_str_ext_const(tvb_get_letohs(tvb, offset), - &uuid_vals_ext, "<unknown>")); + &bt_sig_uuid_vals_ext, "<unknown>")); offset += 16; } break; @@ -615,7 +503,7 @@ proto_register_btatt(void) }, {&hf_btatt_uuid16, {"UUID", "btatt.uuid16", - FT_UINT16, BASE_HEX |BASE_EXT_STRING, &uuid_vals_ext, 0x0, + FT_UINT16, BASE_HEX |BASE_EXT_STRING, &bt_sig_uuid_vals_ext, 0x0, NULL, HFILL} }, {&hf_btatt_uuid128, diff --git a/epan/dissectors/packet-btavctp.c b/epan/dissectors/packet-btavctp.c index fe3d68ece4..d4b8301900 100644 --- a/epan/dissectors/packet-btavctp.c +++ b/epan/dissectors/packet-btavctp.c @@ -32,6 +32,7 @@ #include <epan/wmem/wmem.h> #include <epan/decode_as.h> +#include "packet-bluetooth-hci.h" #include "packet-btl2cap.h" #include "packet-btsdp.h" #include "packet-btavctp.h" @@ -440,7 +441,7 @@ proto_register_btavctp(void) }, { &hf_btavctp_pid, { "Profile Identifier", "btavctp.pid", - FT_UINT16, BASE_HEX|BASE_EXT_STRING, &vs_service_classes_ext, 0x00, + FT_UINT16, BASE_HEX|BASE_EXT_STRING, &bt_sig_uuid_vals_ext, 0x00, NULL, HFILL } }, { &hf_btavctp_number_of_packets, diff --git a/epan/dissectors/packet-btbnep.c b/epan/dissectors/packet-btbnep.c index a214459918..fa74836398 100644 --- a/epan/dissectors/packet-btbnep.c +++ b/epan/dissectors/packet-btbnep.c @@ -31,6 +31,7 @@ #include <epan/etypes.h> #include <epan/expert.h> +#include "packet-bluetooth-hci.h" #include "packet-btl2cap.h" #include "packet-btsdp.h" @@ -178,17 +179,17 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) pitem = proto_tree_add_item(tree, hf_btbnep_destination_service_uuid, tvb, offset, uuid_size, ENC_NA); uuid_dst = tvb_get_ntohs(tvb, offset); - proto_item_append_text(pitem, " (%s)", val_to_str_ext(uuid_dst, &vs_service_classes_ext, "Unknown uuid")); + proto_item_append_text(pitem, " (%s)", val_to_str_ext(uuid_dst, &bt_sig_uuid_vals_ext, "Unknown uuid")); offset += uuid_size; pitem = proto_tree_add_item(tree, hf_btbnep_source_service_uuid, tvb, offset, uuid_size, ENC_NA); uuid_src = tvb_get_ntohs(tvb, offset); - proto_item_append_text(pitem, " (%s)", val_to_str_ext(uuid_src, &vs_service_classes_ext, "Unknown uuid")); + proto_item_append_text(pitem, " (%s)", val_to_str_ext(uuid_src, &bt_sig_uuid_vals_ext, "Unknown uuid")); offset += uuid_size; col_append_fstr(pinfo->cinfo, COL_INFO, " - dst: <%s>, src: <%s>", - val_to_str_ext(uuid_dst, &vs_service_classes_ext, "Unknown uuid"), - val_to_str_ext(uuid_src, &vs_service_classes_ext, "Unknown uuid")); + val_to_str_ext(uuid_dst, &bt_sig_uuid_vals_ext, "Unknown uuid"), + val_to_str_ext(uuid_src, &bt_sig_uuid_vals_ext, "Unknown uuid")); break; case 0x02: /* Setup Connection Response */ proto_tree_add_item(tree, hf_btbnep_setup_connection_response_message, tvb, offset, 2, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c index 95e3bc1656..f576fdea5e 100644 --- a/epan/dissectors/packet-bthci_cmd.c +++ b/epan/dissectors/packet-bthci_cmd.c @@ -334,6 +334,7 @@ static gint ett_bthci_cmd = -1; static gint ett_opcode = -1; static gint ett_cod_mask = -1; static gint ett_flow_spec_subtree = -1; +static gint ett_le_channel_map = -1; static gint proto_btcommon = -1; static gint hf_btcommon_eir_ad_entry = -1; @@ -421,6 +422,46 @@ static gint hf_btcommon_cod_minor_device_class_wearable = -1; static gint hf_btcommon_cod_minor_device_class_toy = -1; static gint hf_btcommon_cod_minor_device_class_health = -1; static gint hf_btcommon_cod_minor_device_class_unknown = -1; +static gint hf_btcommon_le_channel_map_0 = -1; +static gint hf_btcommon_le_channel_map_1 = -1; +static gint hf_btcommon_le_channel_map_2 = -1; +static gint hf_btcommon_le_channel_map_3 = -1; +static gint hf_btcommon_le_channel_map_4 = -1; +static gint hf_btcommon_le_channel_map_5 = -1; +static gint hf_btcommon_le_channel_map_6 = -1; +static gint hf_btcommon_le_channel_map_7 = -1; +static gint hf_btcommon_le_channel_map_8 = -1; +static gint hf_btcommon_le_channel_map_9 = -1; +static gint hf_btcommon_le_channel_map_10 = -1; +static gint hf_btcommon_le_channel_map_11 = -1; +static gint hf_btcommon_le_channel_map_12 = -1; +static gint hf_btcommon_le_channel_map_13 = -1; +static gint hf_btcommon_le_channel_map_14 = -1; +static gint hf_btcommon_le_channel_map_15 = -1; +static gint hf_btcommon_le_channel_map_16 = -1; +static gint hf_btcommon_le_channel_map_17 = -1; +static gint hf_btcommon_le_channel_map_18 = -1; +static gint hf_btcommon_le_channel_map_19 = -1; +static gint hf_btcommon_le_channel_map_20 = -1; +static gint hf_btcommon_le_channel_map_21 = -1; +static gint hf_btcommon_le_channel_map_22 = -1; +static gint hf_btcommon_le_channel_map_23 = -1; +static gint hf_btcommon_le_channel_map_24 = -1; +static gint hf_btcommon_le_channel_map_25 = -1; +static gint hf_btcommon_le_channel_map_26 = -1; +static gint hf_btcommon_le_channel_map_27 = -1; +static gint hf_btcommon_le_channel_map_28 = -1; +static gint hf_btcommon_le_channel_map_29 = -1; +static gint hf_btcommon_le_channel_map_30 = -1; +static gint hf_btcommon_le_channel_map_31 = -1; +static gint hf_btcommon_le_channel_map_32 = -1; +static gint hf_btcommon_le_channel_map_33 = -1; +static gint hf_btcommon_le_channel_map_34 = -1; +static gint hf_btcommon_le_channel_map_35 = -1; +static gint hf_btcommon_le_channel_map_36 = -1; +static gint hf_btcommon_le_channel_map_37 = -1; +static gint hf_btcommon_le_channel_map_38 = -1; +static gint hf_btcommon_le_channel_map_39 = -1; static gint ett_cod = -1; static gint ett_eir_ad = -1; @@ -432,12 +473,357 @@ static expert_field ei_eir_ad_unknown = EI_INIT; static dissector_handle_t btcommon_cod_handle; static dissector_handle_t btcommon_eir_handle; static dissector_handle_t btcommon_ad_handle; +static dissector_handle_t btcommon_le_channel_map_handle; static dissector_handle_t bthci_cmd_handle; extern value_string_ext ext_usb_vendors_vals; extern value_string_ext ext_usb_products_vals; extern value_string_ext did_vendor_id_source_vals_ext; +static const value_string bt_sig_uuid_vals[] = { + /* Protocol Identifiers - https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery */ + { 0x0001, "SDP" }, + { 0x0002, "UDP" }, + { 0x0003, "RFCOMM" }, + { 0x0004, "TCP" }, + { 0x0005, "TCS-BIN" }, + { 0x0006, "TCS-AT" }, + { 0x0007, "ATT" }, + { 0x0008, "OBEX" }, + { 0x0009, "IP" }, + { 0x000A, "FTP" }, + { 0x000C, "HTTP" }, + { 0x000E, "WSP" }, + { 0x000F, "BNEP" }, + { 0x0010, "UPNP" }, + { 0x0011, "HIDP" }, + { 0x0012, "Hardcopy Control Channel" }, + { 0x0014, "Hardcopy Data Channel" }, + { 0x0016, "Hardcopy Notification" }, + { 0x0017, "AVCTP" }, + { 0x0019, "AVDTP" }, + { 0x001B, "CMPT" }, + { 0x001D, "UDI C-Plane" }, /* unofficial */ + { 0x001E, "MCAP Control Channel" }, + { 0x001F, "MCAP Data Channel" }, + { 0x0100, "L2CAP" }, + /* Traditional Services - https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery */ + { 0x1000, "Service Discovery Server Service Class ID" }, + { 0x1001, "Browse Group Descriptor Service Class ID" }, + { 0x1002, "Public Browse Group" }, + { 0x1101, "Serial Port" }, + { 0x1102, "LAN Access Using PPP" }, + { 0x1103, "Dialup Networking" }, + { 0x1104, "IrMC Sync" }, + { 0x1105, "OBEX Object Push" }, + { 0x1106, "OBEX File Transfer" }, + { 0x1107, "IrMC Sync Command" }, + { 0x1108, "Headset" }, + { 0x1109, "Cordless Telephony" }, + { 0x110A, "Audio Source" }, + { 0x110B, "Audio Sink" }, + { 0x110C, "A/V Remote Control Target" }, + { 0x110D, "Advanced Audio Distribution" }, + { 0x110E, "A/V Remote Control" }, + { 0x110F, "Video Conferencing" }, + { 0x1110, "Intercom" }, + { 0x1111, "Fax" }, + { 0x1112, "Headset Audio Gateway" }, + { 0x1113, "WAP" }, + { 0x1114, "WAP Client" }, + { 0x1115, "PANU" }, + { 0x1116, "NAP" }, + { 0x1117, "GN" }, + { 0x1118, "Direct Printing" }, + { 0x1119, "Reference Printing" }, + { 0x111A, "Imaging" }, + { 0x111B, "Imaging Responder" }, + { 0x111C, "Imaging Automatic Archive" }, + { 0x111D, "Imaging Referenced Objects" }, + { 0x111E, "Handsfree" }, + { 0x111F, "Handsfree Audio Gateway" }, + { 0x1120, "Direct Printing Reference Objects Service" }, + { 0x1121, "Reflected UI" }, + { 0x1122, "Basic Printing" }, + { 0x1123, "Printing Status" }, + { 0x1124, "Human Interface Device Service" }, + { 0x1125, "Hardcopy Cable Replacement" }, + { 0x1126, "HCR Print" }, + { 0x1127, "HCR Scan" }, + { 0x1128, "Common ISDN Access" }, + { 0x1129, "Video Conferencing GW" }, + { 0x112A, "UDI MT" }, + { 0x112B, "UDI TA" }, + { 0x112C, "Audio/Video" }, + { 0x112D, "SIM Access" }, + { 0x112E, "Phonebook Access Client" }, + { 0x112F, "Phonebook Access Server" }, + { 0x1130, "Phonebook Access Profile" }, + { 0x1131, "Headset HS" }, + { 0x1132, "Message Access Server" }, + { 0x1133, "Message Notification Server" }, + { 0x1134, "Message Access Profile" }, + { 0x1135, "Global Navigation Satellite System" }, + { 0x1136, "Global Navigation Satellite System Server" }, + { 0x1137, "3D Display" }, + { 0x1138, "3D Glasses" }, + { 0x1139, "3D Synchronization Profile" }, + { 0x113A, "Multi-Profile" }, + { 0x113B, "Multi-Profile SC" }, + { 0x1200, "PnP Information" }, + { 0x1201, "Generic Networking" }, + { 0x1202, "Generic File Transfer" }, + { 0x1203, "Generic Audio" }, + { 0x1204, "Generic Telephony" }, + { 0x1205, "UPNP Service" }, + { 0x1206, "UPNP IP Service" }, + { 0x1300, "ESDP UPNP_IP PAN" }, + { 0x1301, "ESDP UPNP IP LAP" }, + { 0x1302, "ESDP UPNP L2CAP" }, + { 0x1303, "Video Source" }, + { 0x1304, "Video Sink" }, + { 0x1305, "Video Distribution" }, + { 0x1400, "Health Device Profile" }, + { 0x1401, "Health Device Source" }, + { 0x1402, "Health Device Sink" }, + /* LE Services - https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx */ + { 0x1800, "Generic Access Profile" }, + { 0x1801, "Generic Attribute Profile" }, + { 0x1802, "Immediate Alert" }, + { 0x1803, "Link Loss" }, + { 0x1804, "Tx Power" }, + { 0x1805, "Current Time Service" }, + { 0x1806, "Reference Time Update Service" }, + { 0x1807, "Next DST Change Service" }, + { 0x1808, "Glucose" }, + { 0x1809, "Health Thermometer" }, + { 0x180A, "Device Information" }, + { 0x180D, "Heart Rate" }, + { 0x180E, "Phone Alert Status Service" }, + { 0x180F, "Battery Service" }, + { 0x1810, "Blood Pressure" }, + { 0x1811, "Alert Notification Service" }, + { 0x1812, "Human Interface Device" }, + { 0x1813, "Scan Parameters" }, + { 0x1814, "Running Speed and Cadence" }, + { 0x1816, "Cycling Speed and Cadence" }, + { 0x1818, "Cycling Power" }, + { 0x1819, "Location and Navigation" }, + /* Units - http://developer.bluetooth.org/gatt/declarations/Pages/DeclarationsHome.aspx */ + { 0x2700, "unitless" }, + { 0x2701, "length (metre)" }, + { 0x2702, "mass (kilogram)" }, + { 0x2703, "time (second)" }, + { 0x2704, "electric current (ampere)" }, + { 0x2705, "thermodynamic temperature (kelvin)" }, + { 0x2706, "amount of substance (mole)" }, + { 0x2707, "luminous intensity (candela)" }, + { 0x2710, "area (square metres)" }, + { 0x2711, "volume (cubic metres)" }, + { 0x2712, "velocity (metres per second)" }, + { 0x2713, "acceleration (metres per second squared)" }, + { 0x2714, "wavenumber (reciprocal metre)" }, + { 0x2715, "density (kilogram per cubic metre)" }, + { 0x2716, "surface density (kilogram per square metre)" }, + { 0x2717, "specific volume (cubic metre per kilogram)" }, + { 0x2718, "current density (ampere per square metre)" }, + { 0x2719, "magnetic field strength (ampere per metre)" }, + { 0x271A, "amount concentration (mole per cubic metre)" }, + { 0x271B, "mass concentration (kilogram per cubic metre)" }, + { 0x271C, "luminance (candela per square metre)" }, + { 0x271D, "refractive index" }, + { 0x271E, "relative permeability" }, + { 0x2720, "plane angle (radian)" }, + { 0x2721, "solid angle (steradian)" }, + { 0x2722, "frequency (hertz)" }, + { 0x2723, "force (newton)" }, + { 0x2724, "pressure (pascal)" }, + { 0x2725, "energy (joule)" }, + { 0x2726, "power (watt)" }, + { 0x2727, "electric charge (coulomb)" }, + { 0x2728, "electric potential difference (volt)" }, + { 0x2729, "capacitance (farad)" }, + { 0x272A, "electric resistance (ohm)" }, + { 0x272B, "electric conductance (siemens)" }, + { 0x272C, "magnetic flex (weber)" }, + { 0x272D, "magnetic flex density (tesla)" }, + { 0x272E, "inductance (henry)" }, + { 0x272F, "Celsius temperature (degree Celsius)" }, + { 0x2730, "luminous flux (lumen)" }, + { 0x2731, "illuminance (lux)" }, + { 0x2732, "activity referred to a radionuclide (becquerel)" }, + { 0x2733, "absorbed dose (gray)" }, + { 0x2734, "dose equivalent (sievert)" }, + { 0x2735, "catalytic activity (katal)" }, + { 0x2740, "dynamic viscosity (pascal second)" }, + { 0x2741, "moment of force (newton metre)" }, + { 0x2742, "surface tension (newton per metre)" }, + { 0x2743, "angular velocity (radian per second)" }, + { 0x2744, "angular acceleration (radian per second squared)" }, + { 0x2745, "heat flux density (watt per square metre)" }, + { 0x2746, "heat capacity (joule per kelvin)" }, + { 0x2747, "specific heat capacity (joule per kilogram kelvin)" }, + { 0x2748, "specific energy (joule per kilogram)" }, + { 0x2749, "thermal conductivity (watt per metre kelvin)" }, + { 0x274A, "energy density (joule per cubic metre)" }, + { 0x274B, "electric field strength (volt per metre)" }, + { 0x274C, "electric charge density (coulomb per cubic metre)" }, + { 0x274D, "surface charge density (coulomb per square metre)" }, + { 0x274E, "electric flux density (coulomb per square metre)" }, + { 0x274F, "permittivity (farad per metre)" }, + { 0x2750, "permeability (henry per metre)" }, + { 0x2751, "molar energy (joule per mole)" }, + { 0x2752, "molar entropy (joule per mole kelvin)" }, + { 0x2753, "exposure (coulomb per kilogram)" }, + { 0x2754, "absorbed dose rate (gray per second)" }, + { 0x2755, "radiant intensity (watt per steradian)" }, + { 0x2756, "radiance (watt per square metre steradian)" }, + { 0x2757, "catalytic activity concentration (katal per cubic metre)" }, + { 0x2760, "time (minute)" }, + { 0x2761, "time (hour)" }, + { 0x2762, "time (day)" }, + { 0x2763, "plane angle (degree)" }, + { 0x2764, "plane angle (minute)" }, + { 0x2765, "plane angle (second)" }, + { 0x2766, "area (hectare)" }, + { 0x2767, "volume (litre)" }, + { 0x2768, "mass (tonne)" }, + { 0x2780, "pressure (bar)" }, + { 0x2781, "pressure (millimetre of mercury)" }, + { 0x2782, "length (angstrom)" }, + { 0x2783, "length (nautical mile)" }, + { 0x2784, "area (barn)" }, + { 0x2785, "velocity (knot)" }, + { 0x2786, "logarithmic radio quantity (neper)" }, + { 0x2787, "logarithmic radio quantity (bel)" }, + { 0x27A0, "length (yard)" }, + { 0x27A1, "length (parsec)" }, + { 0x27A2, "length (inch)" }, + { 0x27A3, "length (foot)" }, + { 0x27A4, "length (mile)" }, + { 0x27A5, "pressure (pound-force per square inch)" }, + { 0x27A6, "velocity (kilometre per hour)" }, + { 0x27A7, "velocity (mile per hour)" }, + { 0x27A8, "angular velocity (revolution per minute)" }, + { 0x27A9, "energy (gram calorie)" }, + { 0x27AA, "energy (kilogram calorie)" }, + { 0x27AB, "energy (kilowatt hour)" }, + { 0x27AC, "thermodynamic temperature (degree Fahrenheit)" }, + { 0x27AD, "percentage" }, + { 0x27AE, "per mille" }, + { 0x27AF, "period (beats per minute)" }, + { 0x27B0, "electric charge (ampere hours)" }, + { 0x27B1, "mass density (milligram per decilitre)" }, + { 0x27B2, "mass density (millimole per litre)" }, + { 0x27B3, "time (year)" }, + { 0x27B4, "time (month)" }, + { 0x27B5, "concentration (count per cubic metre)" }, + { 0x27B6, "irradiance (watt per square metre)" }, + { 0x27B7, "milliliter (per kilogram per minute)" }, + { 0x27B8, "mass (pound)" }, + /* Declarations - http://developer.bluetooth.org/gatt/declarations/Pages/DeclarationsHome.aspx */ + { 0x2800, "GATT Primary Service Declaration" }, + { 0x2801, "GATT Secondary Service Declaration" }, + { 0x2802, "GATT Include Declaration" }, + { 0x2803, "GATT Characteristic Declaration" }, + /* Descriptors - http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx */ + { 0x2900, "Characteristic Extended Properties" }, + { 0x2901, "Characteristic User Description" }, + { 0x2902, "Client Characteristic Configuration" }, + { 0x2903, "Server Characteristic Configuration" }, + { 0x2904, "Characteristic Presentation Format" }, + { 0x2905, "Characteristic Aggregate Format" }, + { 0x2906, "Valid Range" }, + { 0x2907, "External Report Reference" }, + { 0x2908, "Report Reference" }, + /* Characteristics - http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx */ + { 0x2A00, "Device Name" }, + { 0x2A01, "Appearance" }, + { 0x2A02, "Peripheral Privacy Flag" }, + { 0x2A03, "Reconnection Address" }, + { 0x2A04, "Peripheral Preferred Connection Parameters" }, + { 0x2A05, "Service Changed" }, + { 0x2A06, "Alert Level" }, + { 0x2A07, "Tx Power Level" }, + { 0x2A08, "Date Time" }, + { 0x2A09, "Day of Week" }, + { 0x2A0A, "Day Date Time" }, + { 0x2A0C, "Exact Time 256" }, + { 0x2A0D, "DST Offset" }, + { 0x2A0E, "Time Zone" }, + { 0x2A0F, "Local Time Information" }, + { 0x2A11, "Time with DST" }, + { 0x2A12, "Time Accuracy" }, + { 0x2A13, "Time Source" }, + { 0x2A14, "Reference Time Information" }, + { 0x2A16, "Time Update Control Point" }, + { 0x2A17, "Time Update State" }, + { 0x2A18, "Glucose Measurement" }, + { 0x2A19, "Battery Level" }, + { 0x2A1C, "Temperature Measurement" }, + { 0x2A1D, "Temperature Type" }, + { 0x2A1E, "Intermediate Temperature" }, + { 0x2A21, "Measurement Interval" }, + { 0x2A22, "Boot Keyboard Input Report" }, + { 0x2A23, "System ID" }, + { 0x2A24, "Model Number String" }, + { 0x2A25, "Serial Number String" }, + { 0x2A26, "Firmware Revision String" }, + { 0x2A27, "Hardware Revision String" }, + { 0x2A28, "Software Revision String" }, + { 0x2A29, "Manufacturer Name String" }, + { 0x2A2A, "IEEE 11073-20601 Regulatory Certification Data List" }, + { 0x2A2B, "Current Time" }, + { 0x2A31, "Scan Refresh" }, + { 0x2A32, "Boot Keyboard Output Report" }, + { 0x2A33, "Boot Mouse Input Report" }, + { 0x2A34, "Glucose Measurement Context" }, + { 0x2A35, "Blood Pressure Measurement" }, + { 0x2A36, "Intermediate Cuff Pressure" }, + { 0x2A37, "Heart Rate Measurement" }, + { 0x2A38, "Body Sensor Location" }, + { 0x2A39, "Heart Rate Control Point" }, + { 0x2A3F, "Alert Status" }, + { 0x2A40, "Ringer Control Point" }, + { 0x2A41, "Ringer Setting" }, + { 0x2A42, "Alert Category ID Bit Mask" }, + { 0x2A43, "Alert Category ID" }, + { 0x2A44, "Alert Notification Control Point" }, + { 0x2A45, "Unread Alert Status" }, + { 0x2A46, "New Alert" }, + { 0x2A47, "Supported New Alert Category" }, + { 0x2A48, "Supported Unread Alert Category" }, + { 0x2A49, "Blood Pressure Feature" }, + { 0x2A4A, "HID Information" }, + { 0x2A4B, "Report Map" }, + { 0x2A4C, "HID Control Point" }, + { 0x2A4D, "Report" }, + { 0x2A4E, "Protocol Mode" }, + { 0x2A4F, "Scan Interval Window" }, + { 0x2A50, "PnP ID" }, + { 0x2A51, "Glucose Feature" }, + { 0x2A52, "Record Access Control Point" }, + { 0x2A53, "RSC Measurement" }, + { 0x2A54, "RSC Feature" }, + { 0x2A55, "SC Control Point" }, + { 0x2A5B, "CSC Measurement" }, + { 0x2A5C, "CSC Feature" }, + { 0x2A5D, "Sensor Location" }, + { 0x2A63, "Cycling Power Measurement" }, + { 0x2A64, "Cycling Power Vector" }, + { 0x2A65, "Cycling Power Feature" }, + { 0x2A66, "Cycling Power Control Point" }, + { 0x2A67, "Location and Speed" }, + { 0x2A68, "Navigation" }, + { 0x2A69, "Position Quality" }, + { 0x2A6A, "LN Feature" }, + { 0x2A6B, "LN Control Point" }, + /* SDO Uuids - https://www.bluetooth.org/en-us/specification/assigned-numbers/sdo-16-bit-uuids */ + { 0xFFFE, "Alliance for Wireless Power" }, + { 0, NULL } +}; +value_string_ext bt_sig_uuid_vals_ext = VALUE_STRING_EXT_INIT(bt_sig_uuid_vals); + static const value_string bthci_ogf_vals[] = { { 0x01, "Link Control Commands" }, { 0x02, "Link Policy Commands" }, @@ -953,98 +1339,6 @@ static const value_string bthci_cmd_cod_minor_device_class_health_vals[] = { }; value_string_ext bthci_cmd_cod_minor_device_class_health_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_cod_minor_device_class_health_vals); -static const value_string bthci_cmd_service_class_type_vals[] = { - {0x1000, "Service Discovery Server Service"}, - {0x1001, "Browse Group Descriptor Service"}, - {0x1002, "Public Browse Group"}, - {0x1101, "Serial Port"}, - {0x1102, "LAN Access Using PPP"}, - {0x1103, "Dialup Networking"}, - {0x1104, "IrMC Sync"}, - {0x1105, "OBEX Object Push"}, - {0x1106, "OBEX File Transfer"}, - {0x1107, "IrMC Sync Command"}, - {0x1108, "Headset"}, - {0x1109, "Cordless Telephony"}, - {0x110A, "Audio Source"}, - {0x110B, "Audio Sink"}, - {0x110C, "A/V Remote Control Target"}, - {0x110D, "Advanced Audio Distribution"}, - {0x110E, "A/V Remote Control"}, - {0x110F, "Video Conferencing"}, - {0x1110, "Intercom"}, - {0x1111, "Fax"}, - {0x1112, "Headset Audio Gateway"}, - {0x1113, "WAP"}, - {0x1114, "WAP Client"}, - {0x1115, "PANU"}, - {0x1116, "NAP"}, - {0x1117, "GN"}, - {0x1118, "Direct Printing"}, - {0x1119, "Reference Printing"}, - {0x111A, "Imaging"}, - {0x111B, "Imaging Responder"}, - {0x111C, "Imaging Automatic Archive"}, - {0x111D, "Imaging Referenced Objects"}, - {0x111E, "Handsfree"}, - {0x111F, "Handsfree Audio Gateway"}, - {0x1120, "Direct Printing Reference Objects Service"}, - {0x1121, "Reflected UI"}, - {0x1122, "Basic Printing"}, - {0x1123, "Printing Status"}, - {0x1124, "Human Interface Device Service"}, - {0x1125, "Hardcopy Cable Replacement"}, - {0x1126, "HCR Print"}, - {0x1127, "HCR Scan"}, - {0x1128, "Common ISDN Access"}, - {0x1129, "Video Conferencing GW"}, - {0x112A, "UDI_MT"}, - {0x112B, "UDI_TA"}, - {0x112C, "Audio/Video"}, - {0x112D, "SIM Access"}, - {0x112E, "Phonebook Access - PCE"}, - {0x112F, "Phonebook Access - PSE"}, - {0x1130, "Phonebook Access"}, - {0x1200, "PnP Information"}, - {0x1201, "Generic Networking"}, - {0x1202, "Generic File Transfer"}, - {0x1203, "Generic Audio"}, - {0x1204, "Generic Telephony"}, - {0x1205, "UPNP Service"}, - {0x1206, "UPNP IP Service"}, - {0x1300, "ESDP_UPNP_IP_PAN"}, - {0x1301, "ESDP_UPNP_IP_LAP"}, - {0x1302, "ESDP_UPNP_L2CAP"}, - {0x1303, "Video Source"}, - {0x1304, "Video Sink"}, - {0x1305, "Video Distribution"}, - /* LE services */ - {0x1800, "Generic Access"}, - {0x1801, "Generic Attribute"}, - {0x1802, "Immediate Alert"}, - {0x1803, "Link Loss"}, - {0x1804, "Tx Power"}, - {0x1805, "Current Time"}, - {0x1806, "Reference Time Update"}, - {0x1807, "Next DST Change"}, - {0x1808, "Glucose"}, - {0x1809, "Health Thermometer"}, - {0x180a, "Device Information"}, - {0x180b, ""}, - {0x180c, ""}, - {0x180d, "Heart Rate"}, - {0x180e, "Phone Alert Status"}, - {0x180f, "Battery"}, - {0x1810, "Blood Pressure"}, - {0x1811, "Alert Notification"}, - {0x1812, "Human Interface Device"}, - {0x1813, "Scan Parameters"}, - {0x1814, "Running Speed and Cadence"}, - {0x1816, "Cycling Speed and Cadence"}, - {0, NULL} -}; -value_string_ext bthci_cmd_service_class_type_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_service_class_type_vals); - static const value_string bthci_cmd_eir_data_type_vals[] = { {0x01, "Flags" }, {0x02, "16-bit Service Class UUIDs (incomplete)" }, @@ -2798,7 +3092,9 @@ dissect_testing_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre static gint dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint16 cmd_ocf, hci_data_t *hci_data) { - proto_item *item; + proto_item *item; + proto_item *sub_item; + proto_tree *sub_tree; switch(cmd_ocf) { @@ -2939,8 +3235,12 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, break; case 0x0014: /* LE Set Host Channel Classification */ - proto_tree_add_item(tree, hf_bthci_cmd_le_channel_map, tvb, offset, 2, ENC_NA); - offset+=5; + sub_item = proto_tree_add_item(tree, hf_bthci_cmd_le_channel_map, tvb, offset, 5, ENC_NA); + sub_tree = proto_item_add_subtree(sub_item, ett_le_channel_map); + + call_dissector(btcommon_le_channel_map_handle, tvb_new_subset(tvb, offset, 5, 5), pinfo, sub_tree); + offset += 5; + break; case 0x0015: /* LE Read Channel Map */ @@ -4563,7 +4863,8 @@ proto_register_bthci_cmd(void) &ett_opcode, &ett_cod, &ett_cod_mask, - &ett_flow_spec_subtree + &ett_flow_spec_subtree, + &ett_le_channel_map }; /* Dynamically fill "bthci_cmd_opcode_vals" */ @@ -4683,7 +4984,7 @@ dissect_eir_ad_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) while (offset < end_offset) { if (tvb_get_ntohs(tvb, offset) == 0x0000) { sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_uuid_32, tvb, offset, 4, ENC_NA); - proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(tvb_get_ntohs(tvb, offset + 2), &vs_service_classes_ext, "Unknown")); + proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(tvb_get_ntohs(tvb, offset + 2), &bt_sig_uuid_vals_ext, "Unknown")); } else { sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_custom_uuid, tvb, offset, 4, ENC_NA); @@ -4717,7 +5018,7 @@ dissect_eir_ad_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_get_ntohl(tvb, offset + 4) == 0x1000 && tvb_get_ntoh64(tvb, offset + 8) == G_GUINT64_CONSTANT(0x800000805F9B34FB)) { sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_uuid_128, tvb, offset, 16, ENC_NA); - proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(tvb_get_ntohs(tvb, offset + 2), &vs_service_classes_ext, "Unknown")); + proto_item_append_text(sub_item, " (%s)", val_to_str_ext_const(tvb_get_ntohs(tvb, offset + 2), &bt_sig_uuid_vals_ext, "Unknown")); } else { sub_item = proto_tree_add_item(entry_tree, hf_btcommon_eir_ad_custom_uuid, tvb, offset, 16, ENC_NA); @@ -5063,10 +5364,67 @@ dissect_btcommon_eir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * return dissect_eir_ad_data(tvb, pinfo, main_tree); } +static gint +dissect_btcommon_le_channel_map(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) +{ + gint offset = 0; + + proto_tree_add_item(tree, hf_btcommon_le_channel_map_39, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_38, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_37, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_36, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_35, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_34, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_33, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_32, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_btcommon_le_channel_map_31, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_30, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_29, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_28, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_27, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_26, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_25, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_24, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_btcommon_le_channel_map_23, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_22, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_21, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_20, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_19, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_18, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_17, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_16, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_btcommon_le_channel_map_15, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_14, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_13, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_12, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_11, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_10, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_9, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_8, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_btcommon_le_channel_map_7, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_6, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_5, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_4, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_3, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_2, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_1, tvb, offset, 1, ENC_NA); + proto_tree_add_item(tree, hf_btcommon_le_channel_map_0, tvb, offset, 1, ENC_NA); + offset += 1; + + return offset; +} + void proto_register_btcommon(void) { - module_t *module; expert_module_t *expert_module; static hf_register_info hf[] = { @@ -5142,12 +5500,12 @@ proto_register_btcommon(void) }, { &hf_btcommon_eir_ad_uuid_16, { "UUID 16", "btcommon.eir_ad.entry.uuid_16", - FT_UINT16, BASE_HEX | BASE_EXT_STRING, &vs_service_classes_ext, 0x0, + FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bt_sig_uuid_vals_ext, 0x0, NULL, HFILL } }, { &hf_btcommon_eir_ad_uuid_32, { "UUID 32", "btcommon.eir_ad.entry.uuid_32", - FT_UINT32, BASE_HEX | BASE_EXT_STRING, &vs_service_classes_ext, 0x0, + FT_UINT32, BASE_HEX | BASE_EXT_STRING, &bt_sig_uuid_vals_ext, 0x0, NULL, HFILL } }, { &hf_btcommon_eir_ad_uuid_128, @@ -5495,6 +5853,206 @@ proto_register_btcommon(void) FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL } }, + { &hf_btcommon_le_channel_map_39, + { "RF Channel 39 (2480 MHz - Advertising - 39)", "btcommon.le_channel_map.39", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_38, + { "RF Channel 38 (2478 MHz - Data - 36)", "btcommon.le_channel_map.38", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_37, + { "RF Channel 37 (2476 MHz - Data - 35)", "btcommon.le_channel_map.37", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_36, + { "RF Channel 36 (2474 MHz - Data - 34)", "btcommon.le_channel_map.36", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_35, + { "RF Channel 35 (2472 MHz - Data - 33)", "btcommon.le_channel_map.35", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_34, + { "RF Channel 34 (2470 MHz - Data - 32)", "btcommon.le_channel_map.34", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_33, + { "RF Channel 33 (2468 MHz - Data - 31)", "btcommon.le_channel_map.33", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_32, + { "RF Channel 32 (2466 MHz - Data - 30)", "btcommon.le_channel_map.32", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_31, + { "RF Channel 31 (2464 MHz - Data - 29)", "btcommon.le_channel_map.31", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_30, + { "RF Channel 30 (2462 MHz - Data - 28)", "btcommon.le_channel_map.30", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_29, + { "RF Channel 29 (2460 MHz - Data - 27)", "btcommon.le_channel_map.29", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_28, + { "RF Channel 28 (2458 MHz - Data - 26)", "btcommon.le_channel_map.28", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_27, + { "RF Channel 27 (2456 MHz - Data - 25)", "btcommon.le_channel_map.27", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_26, + { "RF Channel 26 (2454 MHz - Data - 24)", "btcommon.le_channel_map.26", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_25, + { "RF Channel 25 (2452 MHz - Data - 23)", "btcommon.le_channel_map.25", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_24, + { "RF Channel 24 (2450 MHz - Data - 22)", "btcommon.le_channel_map.24", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_23, + { "RF Channel 23 (2448 MHz - Data - 21)", "btcommon.le_channel_map.23", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_22, + { "RF Channel 22 (2446 MHz - Data - 20)", "btcommon.le_channel_map.22", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_21, + { "RF Channel 21 (2444 MHz - Data - 19)", "btcommon.le_channel_map.21", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_20, + { "RF Channel 20 (2442 MHz - Data - 18)", "btcommon.le_channel_map.20", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_19, + { "RF Channel 19 (2440 MHz - Data - 17)", "btcommon.le_channel_map.19", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_18, + { "RF Channel 18 (2438 MHz - Data - 16)", "btcommon.le_channel_map.18", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_17, + { "RF Channel 17 (2436 MHz - Data - 15)", "btcommon.le_channel_map.17", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_16, + { "RF Channel 16 (2434 MHz - Data - 14)", "btcommon.le_channel_map.16", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_15, + { "RF Channel 15 (2432 MHz - Data - 13)", "btcommon.le_channel_map.15", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_14, + { "RF Channel 14 (2430 MHz - Data - 12)", "btcommon.le_channel_map.14", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_13, + { "RF Channel 13 (2428 MHz - Data - 11)", "btcommon.le_channel_map.13", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_12, + { "RF Channel 12 (2426 MHz - Advertising - 38)", "btcommon.le_channel_map.12", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_11, + { "RF Channel 11 (2424 MHz - Data - 10)", "btcommon.le_channel_map.11", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_10, + { "RF Channel 10 (2422 MHz - Data - 9)", "btcommon.le_channel_map.10", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_9, + { "RF Channel 9 (2420 MHz - Data - 8)", "btcommon.le_channel_map.9", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_8, + { "RF Channel 8 (2418 MHz - Data - 7)", "btcommon.le_channel_map.8", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_7, + { "RF Channel 7 (2416 MHz - Data - 6)", "btcommon.le_channel_map.7", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_6, + { "RF Channel 6 (2414 MHz - Data - 5)", "btcommon.le_channel_map.6", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_5, + { "RF Channel 5 (2412 MHz - Data - 4)", "btcommon.le_channel_map.5", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_4, + { "RF Channel 4 (2410 MHz - Data - 3)", "btcommon.le_channel_map.4", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_3, + { "RF Channel 3 (2408 MHz - Data - 2)", "btcommon.le_channel_map.3", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_2, + { "RF Channel 2 (2406 MHz - Data - 1)", "btcommon.le_channel_map.2", + FT_BOOLEAN, 8, NULL, 0x04, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_1, + { "RF Channel 1 (2404 MHz - Data - 0)", "btcommon.le_channel_map.1", + FT_BOOLEAN, 8, NULL, 0x02, + NULL, HFILL } + }, + { &hf_btcommon_le_channel_map_0, + { "RF Channel 0 (2402 MHz - Advertising - 37)", "btcommon.le_channel_map.0", + FT_BOOLEAN, 8, NULL, 0x01, + NULL, HFILL } + }, }; static gint *ett[] = { @@ -5515,14 +6073,10 @@ proto_register_btcommon(void) expert_module = expert_register_protocol(proto_btcommon); expert_register_field_array(expert_module, ei, array_length(ei)); - module = prefs_register_protocol(proto_btcommon, NULL); - prefs_register_static_text_preference(module, "hci_cmd.version", - "Bluetooth EIR/AD version: 4.0 (Core)", - "Version of protocol supported by this dissector."); - btcommon_ad_handle = new_register_dissector("btcommon.eir_ad.ad", dissect_btcommon_ad, proto_btcommon); btcommon_eir_handle = new_register_dissector("btcommon.eir_ad.eir", dissect_btcommon_eir, proto_btcommon); btcommon_cod_handle = new_register_dissector("btcommon.cod", dissect_btcommon_cod, proto_btcommon); + btcommon_le_channel_map_handle = new_register_dissector("btcommon.le_channel_map", dissect_btcommon_le_channel_map, proto_btcommon); } /* diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c index 40e427451c..6799f7e8a7 100644 --- a/epan/dissectors/packet-bthci_evt.c +++ b/epan/dissectors/packet-bthci_evt.c @@ -48,6 +48,7 @@ static dissector_handle_t bthci_evt_handle; static dissector_handle_t btcommon_cod_handle; static dissector_handle_t btcommon_eir_handle; static dissector_handle_t btcommon_ad_handle; +static dissector_handle_t btcommon_le_channel_map_handle; /* Initialize the protocol and registered fields */ static int proto_bthci_evt = -1; @@ -357,6 +358,7 @@ static gint ett_opcode = -1; static gint ett_lmp_subtree = -1; static gint ett_ptype_subtree = -1; static gint ett_le_state_subtree = -1; +static gint ett_le_channel_map = -1; extern value_string_ext ext_usb_vendors_vals; extern value_string_ext ext_usb_products_vals; @@ -492,6 +494,7 @@ static const value_string evt_lmp_vers_nr[] = { {0x04, "2.1 + EDR"}, {0x05, "3.0 + HS"}, {0x06, "4.0"}, + {0x07, "4.1"}, {0, NULL } }; @@ -506,6 +509,7 @@ static const value_string evt_hci_vers_nr[] = { {0x04, "2.1 + EDR"}, {0x05, "3.0 + HS"}, {0x06, "4.0"}, + {0x07, "4.1"}, {0, NULL } }; @@ -2880,11 +2884,18 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x2015: /* LE Read Channel Map */ { + proto_item *sub_item; + proto_tree *sub_tree; + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - proto_tree_add_item(tree, hf_bthci_evt_le_channel_map, tvb, offset, 1, ENC_NA); + + sub_item = proto_tree_add_item(tree, hf_bthci_evt_le_channel_map, tvb, offset, 5, ENC_NA); + sub_tree = proto_item_add_subtree(sub_item, ett_le_channel_map); + + call_dissector(btcommon_le_channel_map_handle, tvb_new_subset(tvb, offset, 5, 5), pinfo, sub_tree); offset += 5; break; } @@ -5149,7 +5160,8 @@ proto_register_bthci_evt(void) &ett_opcode, &ett_lmp_subtree, &ett_ptype_subtree, - &ett_le_state_subtree + &ett_le_state_subtree, + &ett_le_channel_map }; /* Register the protocol name and description */ @@ -5181,6 +5193,7 @@ proto_reg_handoff_bthci_evt(void) btcommon_cod_handle = find_dissector("btcommon.cod"); btcommon_eir_handle = find_dissector("btcommon.eir_ad.eir"); btcommon_ad_handle = find_dissector("btcommon.eir_ad.ad"); + btcommon_le_channel_map_handle = find_dissector("btcommon.le_channel_map"); } /* diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c index 078b7ec662..a3b90fdf10 100644 --- a/epan/dissectors/packet-btl2cap.c +++ b/epan/dissectors/packet-btl2cap.c @@ -550,7 +550,7 @@ dissect_connrequest(tvbuff_t *tvb, int offset, packet_info *pinfo, uuid = get_service_uuid(pinfo, l2cap_data, psm, (pinfo->p2p_dir == P2P_DIR_RECV) ? TRUE : FALSE); if (uuid) { - psm_str = val_to_str_ext_const(uuid, &vs_service_classes_ext, "Unknown PSM"); + psm_str = val_to_str_ext_const(uuid, &bt_sig_uuid_vals_ext, "Unknown PSM"); proto_item_append_text(item, " (%s)", psm_str); } } @@ -1376,7 +1376,7 @@ dissect_b_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, psm_item = proto_tree_add_uint(btl2cap_tree, hf_btl2cap_psm_dynamic, tvb, offset, 0, psm); if (uuid) proto_item_append_text(psm_item, ": %s", - val_to_str_ext_const(uuid, &vs_service_classes_ext, "Unknown service")); + val_to_str_ext_const(uuid, &bt_sig_uuid_vals_ext, "Unknown service")); } PROTO_ITEM_SET_GENERATED(psm_item); @@ -1541,7 +1541,7 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, psm_item = proto_tree_add_uint(btl2cap_tree, hf_btl2cap_psm_dynamic, tvb, offset, 0, psm); if (uuid) proto_item_append_text(psm_item, " (%s)", - val_to_str_ext_const(uuid, &vs_service_classes_ext, "Unknown service")); + val_to_str_ext_const(uuid, &bt_sig_uuid_vals_ext, "Unknown service")); } PROTO_ITEM_SET_GENERATED(psm_item); diff --git a/epan/dissectors/packet-btle.c b/epan/dissectors/packet-btle.c index b316a1aa88..07741af7a0 100644 --- a/epan/dissectors/packet-btle.c +++ b/epan/dissectors/packet-btle.c @@ -71,17 +71,57 @@ static int hf_data_header_sequence_number = -1; static int hf_data_header_next_expected_sequence_number = -1; static int hf_control_opcode = -1; static int hf_l2cap_fragment = -1; -static int hf_control_data = -1; +static int hf_control_reject_opcode = -1; +static int hf_control_error_code = -1; +static int hf_control_unknown_type = -1; +static int hf_control_version_number = -1; +static int hf_control_company_id = -1; +static int hf_control_subversion_number = -1; +static int hf_control_feature_set = -1; +static int hf_control_feature_set_le_encryption = -1; +static int hf_control_feature_set_connection_parameters_request_procedure = -1; +static int hf_control_feature_set_extended_reject_indication = -1; +static int hf_control_feature_set_slave_initiated_features_exchange = -1; +static int hf_control_feature_set_le_ping = -1; +static int hf_control_feature_set_reserved_5_7 = -1; +static int hf_control_feature_set_reserved = -1; +static int hf_control_window_size = -1; +static int hf_control_window_offset = -1; +static int hf_control_interval = -1; +static int hf_control_latency = -1; +static int hf_control_timeout = -1; +static int hf_control_instant = -1; +static int hf_control_interval_min = -1; +static int hf_control_interval_max = -1; +static int hf_control_preffered_periodicity = -1; +static int hf_control_reference_connection_event_count = -1; +static int hf_control_offset_0 = -1; +static int hf_control_offset_1 = -1; +static int hf_control_offset_2 = -1; +static int hf_control_offset_3 = -1; +static int hf_control_offset_4 = -1; +static int hf_control_offset_5 = -1; +static int hf_control_channel_map = -1; +static int hf_control_random_number = -1; +static int hf_control_encrypted_diversifier = -1; +static int hf_control_master_session_key_diversifier = -1; +static int hf_control_master_session_initialization_vector = -1; +static int hf_control_slave_session_key_diversifier = -1; +static int hf_control_slave_session_initialization_vector = -1; static gint ett_btle = -1; static gint ett_advertising_header = -1; static gint ett_link_layer_data = -1; static gint ett_data_header = -1; +static gint ett_features = -1; +static gint ett_channel_map = -1; +static gint ett_scan_response_data = -1; static expert_field ei_unknown_data = EI_INIT; static dissector_handle_t btle_handle; static dissector_handle_t btcommon_ad_handle; +static dissector_handle_t btcommon_le_channel_map_handle; static dissector_handle_t btl2cap_handle; static const value_string pdu_type_vals[] = { @@ -142,6 +182,14 @@ static const value_string control_opcode_vals[] = { }; static value_string_ext control_opcode_vals_ext = VALUE_STRING_EXT_INIT(control_opcode_vals); +/* Taken from https://www.bluetooth.org/en-us/specification/assigned-numbers/link-layer */ +static const value_string ll_version_number_vals[] = { + {0x06, "4.0"}, + {0x07, "4.1"}, + {0, NULL } +}; +static value_string_ext ll_version_number_vals_ext = VALUE_STRING_EXT_INIT(ll_version_number_vals); + void proto_register_btle(void); void proto_reg_handoff_btle(void); @@ -169,6 +217,8 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ { proto_item *btle_item; proto_tree *btle_tree; + proto_item *sub_item; + proto_tree *sub_tree; gint offset = 0; guint32 access_address; guint8 length; @@ -229,8 +279,10 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ case 0x06: /* ADV_SCAN_IND */ offset = dissect_bd_addr(hf_advertising_address, btle_tree, tvb, offset); - next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset) - 3, tvb_length_remaining(tvb, offset) - 3); - call_dissector(btcommon_ad_handle, next_tvb, pinfo, btle_tree); + if (tvb_length_remaining(tvb, offset) > 3) { + next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset) - 3, tvb_length_remaining(tvb, offset) - 3); + call_dissector(btcommon_ad_handle, next_tvb, pinfo, btle_tree); + } offset += tvb_length_remaining(tvb, offset) - 3; @@ -248,7 +300,14 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ case 0x04: /* SCAN_RSP */ offset = dissect_bd_addr(hf_advertising_address, btle_tree, tvb, offset); - proto_tree_add_item(btle_tree, hf_scan_response_data, tvb, offset, tvb_length_remaining(tvb, offset) - 3, ENC_NA); + sub_item = proto_tree_add_item(btle_tree, hf_scan_response_data, tvb, offset, tvb_length_remaining(tvb, offset) - 3, ENC_NA); + sub_tree = proto_item_add_subtree(sub_item, ett_scan_response_data); + + if (tvb_length_remaining(tvb, offset) > 3) { + next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset) - 3, tvb_length_remaining(tvb, offset) - 3); + call_dissector(btcommon_ad_handle, next_tvb, pinfo, sub_tree); + } + offset += tvb_length_remaining(tvb, offset) - 3; break; @@ -280,7 +339,10 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ proto_tree_add_item(link_layer_data_tree, hf_link_layer_data_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - proto_tree_add_item(link_layer_data_tree, hf_link_layer_data_channel_map, tvb, offset, 5, ENC_NA); + sub_item = proto_tree_add_item(link_layer_data_tree, hf_link_layer_data_channel_map, tvb, offset, 5, ENC_NA); + sub_tree = proto_item_add_subtree(sub_item, ett_channel_map); + + call_dissector(btcommon_le_channel_map_handle, tvb_new_subset(tvb, offset, 5, 5), pinfo, sub_tree); offset += 5; proto_tree_add_item(link_layer_data_tree, hf_link_layer_data_hop, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -348,13 +410,13 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ acl_data->remote_bd_addr_id = 0; next_tvb = tvb_new_subset(tvb, offset, length, length); - call_dissector_with_data(btl2cap_handle, next_tvb, pinfo, btle_tree, acl_data); + call_dissector_with_data(btl2cap_handle, next_tvb, pinfo, tree, acl_data); offset += length; } } break; case 0x03: /* Control PDU */ - proto_tree_add_item(tree, hf_control_opcode, tvb, offset, 1, ENC_NA); + proto_tree_add_item(btle_tree, hf_control_opcode, tvb, offset, 1, ENC_NA); control_opcode = tvb_get_guint8(tvb, offset); offset += 1; @@ -375,24 +437,143 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ break; case 0x00: /* LL_CONNECTION_UPDATE_REQ */ + proto_tree_add_item(btle_tree, hf_control_window_size, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(btle_tree, hf_control_window_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_instant, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + break; case 0x01: /* LL_CHANNEL_MAP_REQ */ + sub_item = proto_tree_add_item(btle_tree, hf_control_channel_map, tvb, offset, 5, ENC_NA); + sub_tree = proto_item_add_subtree(sub_item, ett_channel_map); + + call_dissector(btcommon_le_channel_map_handle, tvb_new_subset(tvb, offset, 5, 5), pinfo, sub_tree); + offset += 5; + + proto_tree_add_item(btle_tree, hf_control_instant, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + break; case 0x02: /* LL_TERMINATE_IND */ + case 0x0D: /* LL_REJECT_IND */ + proto_tree_add_item(btle_tree, hf_control_error_code, tvb, offset, 1, ENC_NA); + offset += 1; + + break; case 0x03: /* LL_ENC_REQ */ + proto_tree_add_item(btle_tree, hf_control_random_number, tvb, offset, 8, ENC_LITTLE_ENDIAN); + offset += 8; + + proto_tree_add_item(btle_tree, hf_control_encrypted_diversifier, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_master_session_key_diversifier, tvb, offset, 8, ENC_LITTLE_ENDIAN); + offset += 8; + + proto_tree_add_item(btle_tree, hf_control_master_session_initialization_vector, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + + break; case 0x04: /* LL_ENC_RSP */ + proto_tree_add_item(btle_tree, hf_control_slave_session_key_diversifier, tvb, offset, 8, ENC_LITTLE_ENDIAN); + offset += 8; + + proto_tree_add_item(btle_tree, hf_control_slave_session_initialization_vector, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + + break; case 0x07: /* LL_UNKNOWN_RSP */ + proto_tree_add_item(btle_tree, hf_control_unknown_type, tvb, offset, 1, ENC_NA); + offset += 1; + + break; case 0x08: /* LL_FEATURE_REQ */ case 0x09: /* LL_FEATURE_RSP */ - case 0x0C: /* LL_VERSION_IND */ - case 0x0D: /* LL_REJECT_IND */ case 0x0E: /* LL_SLAVE_FEATURE_REQ */ + sub_item = proto_tree_add_item(btle_tree, hf_control_feature_set, tvb, offset, 8, ENC_LITTLE_ENDIAN); + sub_tree = proto_item_add_subtree(sub_item, ett_features); + + proto_tree_add_item(sub_tree, hf_control_feature_set_le_encryption, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_control_feature_set_connection_parameters_request_procedure, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_control_feature_set_extended_reject_indication, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_control_feature_set_slave_initiated_features_exchange, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_control_feature_set_le_ping, tvb, offset, 1, ENC_NA); + proto_tree_add_item(sub_tree, hf_control_feature_set_reserved_5_7, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(sub_tree, hf_control_feature_set_reserved, tvb, offset, 7, ENC_NA); + offset += 7; + + break; + case 0x0C: /* LL_VERSION_IND */ + proto_tree_add_item(btle_tree, hf_control_version_number, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(btle_tree, hf_control_company_id, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_subversion_number, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + break; case 0x0F: /* LL_CONNECTION_PARAM_REQ */ case 0x10: /* LL_CONNECTION_PARAM_RSP */ + proto_tree_add_item(btle_tree, hf_control_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_preffered_periodicity, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(btle_tree, hf_control_reference_connection_event_count, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_offset_0, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_offset_1, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_offset_2, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_offset_3, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_offset_4, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(btle_tree, hf_control_offset_5, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + break; case 0x11: /* LL_REJECT_IND_EXT */ -/* TODO: Implement above cases */ - if (tvb_length_remaining(tvb, offset) > 3) { - proto_tree_add_item(tree, hf_control_data, tvb, offset, tvb_length_remaining(tvb, offset) - 3, ENC_NA); - offset += tvb_length_remaining(tvb, offset) - 3; - } + proto_tree_add_item(btle_tree, hf_control_reject_opcode, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(btle_tree, hf_control_error_code, tvb, offset, 1, ENC_NA); + offset += 1; break; default: @@ -551,17 +732,17 @@ proto_register_btle(void) }, { &hf_data_header_next_expected_sequence_number, { "Next Expected Sequence Number", "btle.data_header.next_expected_sequence_number", - FT_UINT8, BASE_DEC, NULL, 0x04, + FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL } }, { &hf_data_header_sequence_number, { "Sequence Number", "btle.data_header.sequence_number", - FT_UINT8, BASE_DEC, NULL, 0x08, + FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL } }, { &hf_data_header_more_data, { "More Data", "btle.data_header.more_data", - FT_UINT8, BASE_DEC, NULL, 0x10, + FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL } }, { &hf_data_header_length, @@ -579,16 +760,196 @@ proto_register_btle(void) FT_UINT8, BASE_HEX | BASE_EXT_STRING, &control_opcode_vals_ext, 0x0, NULL, HFILL } }, - { &hf_l2cap_fragment, - { "L2CAP Fragment", "btle.l2cap_data", + { &hf_control_reject_opcode, + { "Reject Opcode", "btle.control.reject_opcode", + FT_UINT8, BASE_HEX | BASE_EXT_STRING, &control_opcode_vals_ext, 0x0, + NULL, HFILL } + }, + { &hf_control_unknown_type, + { "Unknown Type", "btle.control.unknown_type", + FT_UINT8, BASE_HEX | BASE_EXT_STRING, &control_opcode_vals_ext, 0x0, + NULL, HFILL } + }, + { &hf_control_error_code, + { "Error Code", "btle.control.error_code", + FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_status_vals_ext, 0x0, + NULL, HFILL } + }, + { &hf_control_version_number, + { "Version Number", "btle.control.version_number", + FT_UINT8, BASE_HEX | BASE_EXT_STRING, &ll_version_number_vals_ext, 0x0, + NULL, HFILL } + }, + { &hf_control_company_id, + { "Company Id", "btle.control.company_id", + FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_evt_comp_id_ext, 0x0, + NULL, HFILL } + }, + { &hf_control_subversion_number, + { "Subversion Number", "btle.control.subversion_number", + FT_UINT16, BASE_HEX, NULL, 0x1F, + NULL, HFILL } + }, + { &hf_control_feature_set, + { "Feature Set", "btle.control.feature_set", + FT_UINT64, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_feature_set_le_encryption, + { "LE Encryption", "btle.control.feature_set.le_encryption", + FT_BOOLEAN, 8, NULL, 0x80, + NULL, HFILL } + }, + { &hf_control_feature_set_connection_parameters_request_procedure, + { "Connection Parameters Request Procedure", "btle.control.feature_set.connection_parameters_request_procedure", + FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL } + }, + { &hf_control_feature_set_extended_reject_indication, + { "Extended Reject Indication", "btle.control.feature_set.extended_reject_indication", + FT_BOOLEAN, 8, NULL, 0x20, + NULL, HFILL } + }, + { &hf_control_feature_set_slave_initiated_features_exchange, + { "Slave Initiated Features Exchange", "btle.control.feature_set.slave_initiated_features_exchange", + FT_BOOLEAN, 8, NULL, 0x10, + NULL, HFILL } + }, + { &hf_control_feature_set_le_ping, + { "LE Ping", "btle.control.feature_set.le_ping", + FT_BOOLEAN, 8, NULL, 0x08, + NULL, HFILL } + }, + { &hf_control_feature_set_reserved_5_7, + { "Reseved", "btle.control.feature_set.reserved_5_7", + FT_BOOLEAN, 8, NULL, 0x07, + NULL, HFILL } + }, + { &hf_control_feature_set_reserved, + { "Reserved", "btle.control.feature_set.reserved", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, - { &hf_control_data, - { "Control Data", "btle.control_data", + { &hf_control_window_size, + { "Window Size", "btle.control.window_size", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_window_offset, + { "Window Offset", "btle.control.window_offset", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_interval, + { "Interval", "btle.control.interval", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_latency, + { "Latency", "btle.control.latency", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_timeout, + { "Timeout", "btle.control.timeout", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_instant, + { "Instant", "btle.control.instant", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_interval_min, + { "Interval Min", "btle.control.interval.min", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_interval_max, + { "Interval Max", "btle.control.interval.max", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_preffered_periodicity, + { "Preffered Periodicity", "btle.control.preffered_periodicity", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_reference_connection_event_count, + { "Reference Connection Event Count","btle.control.reference_connection_event_count", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_offset_0, + { "Offset 0", "btle.control.offset.0", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_offset_1, + { "Offset 1", "btle.control.offset.1", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_offset_2, + { "Offset 2", "btle.control.offset.2", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_offset_3, + { "Offset 3", "btle.control.offset.3", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_offset_4, + { "Offset 4", "btle.control.offset.4", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_offset_5, + { "Offset 5", "btle.control.offset.5", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_channel_map, + { "Channel Map", "btle.control.channel_map", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_control_random_number, + { "Random Number", "btle.control.random_number", + FT_UINT64, BASE_DEC_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_encrypted_diversifier, + { "Encrypted Diversifier", "btle.control.encrypted_diversifier", + FT_UINT16, BASE_DEC_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_master_session_key_diversifier, + { "Master Session Key Diversifier", "btle.control.master_session_key_diversifier", + FT_UINT64, BASE_DEC_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_slave_session_key_diversifier, + { "Slave Session Key Diversifier", "btle.control.slave_session_key_diversifier", + FT_UINT64, BASE_DEC_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_master_session_initialization_vector, + { "Master Session Initialization Vector", "btle.control.master_session_initialization_vector", + FT_UINT32, BASE_DEC_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_control_slave_session_initialization_vector, + { "Slave Session Initialization Vector", "btle.control.slave_session_initialization_vector", + FT_UINT64, BASE_DEC_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_l2cap_fragment, + { "L2CAP Fragment", "btle.l2cap_data", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, { &hf_crc, { "CRC", "btle.crc", FT_UINT24, BASE_HEX, NULL, 0x0, @@ -604,7 +965,10 @@ proto_register_btle(void) &ett_btle, &ett_advertising_header, &ett_link_layer_data, - &ett_data_header + &ett_data_header, + &ett_features, + &ett_channel_map, + &ett_scan_response_data }; proto_btle = proto_register_protocol("Bluetooth Low Energy Link Layer", @@ -627,6 +991,7 @@ void proto_reg_handoff_btle(void) { btcommon_ad_handle = find_dissector("btcommon.eir_ad.ad"); + btcommon_le_channel_map_handle = find_dissector("btcommon.le_channel_map"); btl2cap_handle = find_dissector("btl2cap"); dissector_add_uint("wtap_encap", WTAP_ENCAP_BLUETOOTH_LE_LL, btle_handle); diff --git a/epan/dissectors/packet-btobex.c b/epan/dissectors/packet-btobex.c index eae8262a3c..40ceefe8ca 100644 --- a/epan/dissectors/packet-btobex.c +++ b/epan/dissectors/packet-btobex.c @@ -33,6 +33,7 @@ #include <epan/expert.h> #include <epan/wmem/wmem.h> +#include "packet-bluetooth-hci.h" #include "packet-btrfcomm.h" #include "packet-btl2cap.h" #include "packet-btsdp.h" @@ -1979,7 +1980,7 @@ proto_register_btobex(void) }, { &hf_bip_application_parameter_data_service_id, { "Service ID", "btobex.parameter.value.service_id", - FT_UINT16, BASE_HEX | BASE_EXT_STRING, &vs_service_classes_ext, 0x00, + FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bt_sig_uuid_vals_ext, 0x00, NULL, HFILL } }, { &hf_bip_application_parameter_data_store_flag, diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c index e59cf79ac9..894b6aa83c 100644 --- a/epan/dissectors/packet-btrfcomm.c +++ b/epan/dissectors/packet-btrfcomm.c @@ -39,6 +39,7 @@ #include <epan/wmem/wmem.h> #include <epan/decode_as.h> +#include "packet-bluetooth-hci.h" #include "packet-btsdp.h" #include "packet-btl2cap.h" #include "packet-btrfcomm.h" @@ -682,7 +683,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data val_to_str_const(frame_type, vs_frame_type_short, "Unknown"), dlci >> 1); if (dlci && (frame_type == 0x2f)) col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ", - val_to_str_ext_const(service_info->uuid.bt_uuid, &vs_service_classes_ext, "Unknown")); + val_to_str_ext_const(service_info->uuid.bt_uuid, &bt_sig_uuid_vals_ext, "Unknown")); /* UID frame */ if ((frame_type == 0xef) && dlci && pf_flag) { diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c index f6833ec2f5..3d6bbfaeb8 100644 --- a/epan/dissectors/packet-btsdp.c +++ b/epan/dissectors/packet-btsdp.c @@ -41,9 +41,9 @@ #include <epan/strutil.h> #include <epan/to_str.h> +#include "packet-bluetooth-hci.h" #include "packet-btsdp.h" #include "packet-btl2cap.h" -#include "packet-bluetooth-hci.h" static gint proto_btsdp = -1; @@ -801,119 +801,6 @@ static const value_string descriptor_list_type_vals[] = { { 0, NULL } }; - -/* service UUIDs */ -static const value_string vs_service_classes[] = { - { 0x0001, "SDP" }, - { 0x0002, "UDP" }, - { 0x0003, "RFCOMM" }, - { 0x0004, "TCP" }, - { 0x0005, "TCS-BIN" }, - { 0x0006, "TCS-AT" }, - { 0x0007, "ATT" }, - { 0x0008, "OBEX" }, - { 0x0009, "IP" }, - { 0x000A, "FTP" }, - { 0x000C, "HTTP" }, - { 0x000E, "WSP" }, - { 0x000F, "BNEP" }, - { 0x0010, "UPNP" }, - { 0x0011, "HIDP" }, - { 0x0012, "Hardcopy Control Channel" }, - { 0x0014, "Hardcopy Data Channel" }, - { 0x0016, "Hardcopy Notification" }, - { 0x0017, "AVCTP" }, - { 0x0019, "AVDTP" }, - { 0x001B, "CMPT" }, - { 0x001D, "UDI C-Plane" }, /* unofficial */ - { 0x001E, "MCAP Control Channel" }, - { 0x001F, "MCAP Data Channel" }, - { 0x0100, "L2CAP" }, - { 0x1000, "Service Discovery Server Service Class ID" }, - { 0x1001, "Browse Group Descriptor Service Class ID" }, - { 0x1002, "Public Browse Group" }, - { 0x1101, "Serial Port" }, - { 0x1102, "LAN Access Using PPP" }, - { 0x1103, "Dialup Networking" }, - { 0x1104, "IrMC Sync" }, - { 0x1105, "OBEX Object Push" }, - { 0x1106, "OBEX File Transfer" }, - { 0x1107, "IrMC Sync Command" }, - { 0x1108, "Headset" }, - { 0x1109, "Cordless Telephony" }, - { 0x110A, "Audio Source" }, - { 0x110B, "Audio Sink" }, - { 0x110C, "A/V Remote Control Target" }, - { 0x110D, "Advanced Audio Distribution" }, - { 0x110E, "A/V Remote Control" }, - { 0x110F, "Video Conferencing" }, - { 0x1110, "Intercom" }, - { 0x1111, "Fax" }, - { 0x1112, "Headset Audio Gateway" }, - { 0x1113, "WAP" }, - { 0x1114, "WAP Client" }, - { 0x1115, "PANU" }, - { 0x1116, "NAP" }, - { 0x1117, "GN" }, - { 0x1118, "Direct Printing" }, - { 0x1119, "Reference Printing" }, - { 0x111A, "Imaging" }, - { 0x111B, "Imaging Responder" }, - { 0x111C, "Imaging Automatic Archive" }, - { 0x111D, "Imaging Referenced Objects" }, - { 0x111E, "Handsfree" }, - { 0x111F, "Handsfree Audio Gateway" }, - { 0x1120, "Direct Printing Reference Objects Service" }, - { 0x1121, "Reflected UI" }, - { 0x1122, "Basic Printing" }, - { 0x1123, "Printing Status" }, - { 0x1124, "Human Interface Device Service" }, - { 0x1125, "Hardcopy Cable Replacement" }, - { 0x1126, "HCR Print" }, - { 0x1127, "HCR Scan" }, - { 0x1128, "Common ISDN Access" }, - { 0x1129, "Video Conferencing GW" }, - { 0x112A, "UDI MT" }, - { 0x112B, "UDI TA" }, - { 0x112C, "Audio/Video" }, - { 0x112D, "SIM Access" }, - { 0x112E, "Phonebook Access Client" }, - { 0x112F, "Phonebook Access Server" }, - { 0x1130, "Phonebook Access Profile" }, - { 0x1131, "Headset HS" }, - { 0x1132, "Message Access Server" }, - { 0x1133, "Message Notification Server" }, - { 0x1134, "Message Access Profile" }, - { 0x1135, "Global Navigation Satellite System" }, - { 0x1136, "Global Navigation Satellite System Server" }, - { 0x1137, "3D Display" }, - { 0x1138, "3D Glasses" }, - { 0x1139, "3D Synchronization Profile" }, - { 0x113A, "Multi-Profile" }, - { 0x113B, "Multi-Profile SC" }, - { 0x1200, "PnP Information" }, - { 0x1201, "Generic Networking" }, - { 0x1202, "Generic File Transfer" }, - { 0x1203, "Generic Audio" }, - { 0x1204, "Generic Telephony" }, - { 0x1205, "UPNP Service" }, - { 0x1206, "UPNP IP Service" }, - { 0x1300, "ESDP UPNP_IP PAN" }, - { 0x1301, "ESDP UPNP IP LAP" }, - { 0x1302, "ESDP UPNP L2CAP" }, - { 0x1303, "Video Source" }, - { 0x1304, "Video Sink" }, - { 0x1305, "Video Distribution" }, - { 0x1400, "Health Device Profile" }, - { 0x1401, "Health Device Source" }, - { 0x1402, "Health Device Sink" }, - { 0x1800, "Generic Access Profile" }, - { 0x1801, "Generic Attribute Profile" }, - { 0, NULL } -}; - -value_string_ext vs_service_classes_ext = VALUE_STRING_EXT_INIT(vs_service_classes); - static const value_string vs_error_code[] = { { 0x0001, "Invalid/Unsupported SDP Version" }, { 0x0002, "Invalid Service Record Handle" }, @@ -994,7 +881,7 @@ static gchar * print_uuid(uuid_t *uuid) { if (uuid->bt_uuid) { - return wmem_strdup(wmem_packet_scope(), val_to_str_const(uuid->bt_uuid, vs_service_classes, "Unknown")); + return wmem_strdup(wmem_packet_scope(), val_to_str_ext_const(uuid->bt_uuid, &bt_sig_uuid_vals_ext, "Unknown")); } else { guint i_uuid; @@ -1245,7 +1132,7 @@ dissect_uuid(proto_tree *tree, tvbuff_t *tvb, gint offset, gint size, uuid_t *uu } else if (size == 16 && tvb_get_ntohs(tvb, offset) == 0x0000 && tvb_get_ntohl(tvb, offset + 4) == 0x1000 && tvb_get_ntoh64(tvb, offset + 8) == G_GUINT64_CONSTANT(0x800000805F9B34FB)) { item = proto_tree_add_item(tree, hf_data_element_value_uuid_128, tvb, offset, size, ENC_NA); uuid->bt_uuid = tvb_get_ntohs(tvb, offset + 2); - proto_item_append_text(item, " (%s)", val_to_str_const(uuid->bt_uuid, vs_service_classes, "Unknown")); + proto_item_append_text(item, " (%s)", val_to_str_ext_const(uuid->bt_uuid, &bt_sig_uuid_vals_ext, "Unknown")); } else { guint i_uuid; item = proto_tree_add_item(tree, hf_data_element_value_uuid, tvb, offset, size, ENC_NA); @@ -4522,12 +4409,12 @@ proto_register_btsdp(void) }, { &hf_data_element_value_uuid_16, { "Value: UUID", "btsdp.data_element.value.uuid_16", - FT_UINT16, BASE_HEX, VALS(vs_service_classes), 0, + FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bt_sig_uuid_vals_ext, 0, NULL, HFILL } }, { &hf_data_element_value_uuid_32, { "Value: UUID", "btsdp.data_element.value.uuid_32", - FT_UINT32, BASE_HEX, VALS(vs_service_classes), 0, + FT_UINT32, BASE_HEX | BASE_EXT_STRING, &bt_sig_uuid_vals_ext, 0, NULL, HFILL } }, { &hf_data_element_value_uuid_128, diff --git a/epan/dissectors/packet-btsdp.h b/epan/dissectors/packet-btsdp.h index 9e95d0230d..03e4120506 100644 --- a/epan/dissectors/packet-btsdp.h +++ b/epan/dissectors/packet-btsdp.h @@ -214,8 +214,6 @@ typedef struct _custom_uuid_t { extern const custom_uuid_t custom_uuid[]; -extern value_string_ext vs_service_classes_ext; - extern service_info_t* btsdp_get_service_info(wmem_tree_key_t* key); #endif diff --git a/epan/dissectors/packet-ubertooth.c b/epan/dissectors/packet-ubertooth.c index 8a8b61e443..4c1890d546 100644 --- a/epan/dissectors/packet-ubertooth.c +++ b/epan/dissectors/packet-ubertooth.c @@ -96,12 +96,235 @@ static int hf_usb_rx_packet_channel = -1; static int hf_spectrum_entry = -1; static int hf_frequency = -1; static int hf_rssi = -1; +static int hf_cc2400_value = -1; +static int hf_cc2400_main_resetn = -1; +static int hf_cc2400_main_reserved_14_10 = -1; +static int hf_cc2400_main_fs_force_en = -1; +static int hf_cc2400_main_rxn_tx = -1; +static int hf_cc2400_main_reserved_7_4 = -1; +static int hf_cc2400_main_reserved_3 = -1; +static int hf_cc2400_main_reserved_2 = -1; +static int hf_cc2400_main_xosc16m_bypass = -1; +static int hf_cc2400_main_xosc16m_en = -1; +static int hf_cc2400_fsctrl_reserved = -1; +static int hf_cc2400_fsctrl_lock_threshold = -1; +static int hf_cc2400_fsctrl_cal_done = -1; +static int hf_cc2400_fsctrl_cal_running = -1; +static int hf_cc2400_fsctrl_lock_length = -1; +static int hf_cc2400_fsctrl_lock_status = -1; +static int hf_cc2400_fsdiv_reserved = -1; +static int hf_cc2400_fsdiv_frequency = -1; +static int hf_cc2400_fsdiv_freq_high = -1; +static int hf_cc2400_fsdiv_freq = -1; +static int hf_cc2400_mdmctrl_reserved = -1; +static int hf_cc2400_mdmctrl_mod_offset = -1; +static int hf_cc2400_mdmctrl_mod_dev = -1; +static int hf_cc2400_agcctrl_vga_gain = -1; +static int hf_cc2400_agcctrl_reserved = -1; +static int hf_cc2400_agcctrl_agc_locked = -1; +static int hf_cc2400_agcctrl_agc_lock = -1; +static int hf_cc2400_agcctrl_agc_sync_lock = -1; +static int hf_cc2400_agcctrl_vga_gain_oe = -1; +static int hf_cc2400_frend_reserved_15_4 = -1; +static int hf_cc2400_frend_reserved_3 = -1; +static int hf_cc2400_frend_pa_level = -1; +static int hf_cc2400_rssi_rssi_val = -1; +static int hf_cc2400_rssi_rssi_cs_thres = -1; +static int hf_cc2400_rssi_rssi_filt = -1; +static int hf_cc2400_freqest_rx_freq_offset = -1; +static int hf_cc2400_freqest_reserved = -1; +static int hf_cc2400_iocfg_reserved = -1; +static int hf_cc2400_iocfg_gio6_cfg = -1; +static int hf_cc2400_iocfg_gio1_cfg = -1; +static int hf_cc2400_iocfg_hssd_src = -1; +static int hf_cc2400_fsmtc_tc_rxon2agcen = -1; +static int hf_cc2400_fsmtc_tc_paon2switch = -1; +static int hf_cc2400_fsmtc_res = -1; +static int hf_cc2400_fsmtc_tc_txend2switch = -1; +static int hf_cc2400_fsmtc_tc_txend2paoff = -1; +static int hf_cc2400_reserved_0x0C_res_15_5 = -1; +static int hf_cc2400_reserved_0x0C_res_4_0 = -1; +static int hf_cc2400_manand_vga_reset_n = -1; +static int hf_cc2400_manand_lock_status = -1; +static int hf_cc2400_manand_balun_ctrl = -1; +static int hf_cc2400_manand_rxtx = -1; +static int hf_cc2400_manand_pre_pd = -1; +static int hf_cc2400_manand_pa_n_pd = -1; +static int hf_cc2400_manand_pa_p_pd = -1; +static int hf_cc2400_manand_dac_lpf_pd = -1; +static int hf_cc2400_manand_bias_pd = -1; +static int hf_cc2400_manand_xosc16m_pd = -1; +static int hf_cc2400_manand_chp_pd = -1; +static int hf_cc2400_manand_fs_pd = -1; +static int hf_cc2400_manand_adc_pd = -1; +static int hf_cc2400_manand_vga_pd = -1; +static int hf_cc2400_manand_rxbpf_pd = -1; +static int hf_cc2400_manand_lnamix_pd = -1; +static int hf_cc2400_fsmstate_reserved_15_13 = -1; +static int hf_cc2400_fsmstate_fsm_state_bkpt = -1; +static int hf_cc2400_fsmstate_reserved_7_5 = -1; +static int hf_cc2400_fsmstate_fsm_cur_state = -1; +static int hf_cc2400_adctst_reserved_15 = -1; +static int hf_cc2400_adctst_adc_i = -1; +static int hf_cc2400_adctst_reserved_7 = -1; +static int hf_cc2400_adctst_adc_q = -1; +static int hf_cc2400_rxbpftst_reserved = -1; +static int hf_cc2400_rxbpftst_rxbpf_cap_oe = -1; +static int hf_cc2400_rxbpftst_rxbpf_cap_o = -1; +static int hf_cc2400_rxbpftst_rxbpf_cap_res = -1; +static int hf_cc2400_pamtst_reserved_15_13 = -1; +static int hf_cc2400_pamtst_vc_in_test_en = -1; +static int hf_cc2400_pamtst_atestmod_pd = -1; +static int hf_cc2400_pamtst_atestmod_mode = -1; +static int hf_cc2400_pamtst_reserved_7 = -1; +static int hf_cc2400_pamtst_txmix_cap_array = -1; +static int hf_cc2400_pamtst_txmix_current = -1; +static int hf_cc2400_pamtst_pa_current = -1; +static int hf_cc2400_lmtst_reserved = -1; +static int hf_cc2400_lmtst_rxmix_hgm = -1; +static int hf_cc2400_lmtst_rxmix_tail = -1; +static int hf_cc2400_lmtst_rxmix_vcm = -1; +static int hf_cc2400_lmtst_rxmix_current = -1; +static int hf_cc2400_lmtst_lna_cap_array = -1; +static int hf_cc2400_lmtst_lna_lowgain = -1; +static int hf_cc2400_lmtst_lna_gain = -1; +static int hf_cc2400_lmtst_lna_current = -1; +static int hf_cc2400_manor_vga_reset_n = -1; +static int hf_cc2400_manor_lock_status = -1; +static int hf_cc2400_manor_balun_ctrl = -1; +static int hf_cc2400_manor_rxtx = -1; +static int hf_cc2400_manor_pre_pd = -1; +static int hf_cc2400_manor_pa_n_pd = -1; +static int hf_cc2400_manor_pa_p_pd = -1; +static int hf_cc2400_manor_dac_lpf_pd = -1; +static int hf_cc2400_manor_bias_pd = -1; +static int hf_cc2400_manor_xosc16m_pd = -1; +static int hf_cc2400_manor_chp_pd = -1; +static int hf_cc2400_manor_fs_pd = -1; +static int hf_cc2400_manor_adc_pd = -1; +static int hf_cc2400_manor_vga_pd = -1; +static int hf_cc2400_manor_rxbpf_pd = -1; +static int hf_cc2400_manor_lnamix_pd = -1; +static int hf_cc2400_mdmtst0_reserved = -1; +static int hf_cc2400_mdmtst0_tx_prng = -1; +static int hf_cc2400_mdmtst0_tx_1mhz_offset_n = -1; +static int hf_cc2400_mdmtst0_invert_data = -1; +static int hf_cc2400_mdmtst0_afc_adjust_on_packet = -1; +static int hf_cc2400_mdmtst0_afc_settling = -1; +static int hf_cc2400_mdmtst0_afc_delta = -1; +static int hf_cc2400_mdmtst1_reserved = -1; +static int hf_cc2400_mdmtst1_bsync_threshold = -1; +static int hf_cc2400_dactst_reserved = -1; +static int hf_cc2400_dactst_dac_src = -1; +static int hf_cc2400_dactst_dac_i_o = -1; +static int hf_cc2400_dactst_dac_q_o = -1; +static int hf_cc2400_agctst0_agc_settle_blank_dn = -1; +static int hf_cc2400_agctst0_agc_win_size = -1; +static int hf_cc2400_agctst0_agc_settle_peak = -1; +static int hf_cc2400_agctst0_agc_settle_adc = -1; +static int hf_cc2400_agctst0_agc_attempts = -1; +static int hf_cc2400_agctst1_reserved = -1; +static int hf_cc2400_agctst1_agc_var_gain_sat = -1; +static int hf_cc2400_agctst1_agc_settle_blank_up = -1; +static int hf_cc2400_agctst1_peakdet_cur_boost = -1; +static int hf_cc2400_agctst1_agc_mult_slow = -1; +static int hf_cc2400_agctst1_agc_settle_fixed = -1; +static int hf_cc2400_agctst1_agc_settle_var = -1; +static int hf_cc2400_agctst2_reserved = -1; +static int hf_cc2400_agctst2_agc_backend_blanking = -1; +static int hf_cc2400_agctst2_agc_adjust_m3db = -1; +static int hf_cc2400_agctst2_agc_adjust_m1db = -1; +static int hf_cc2400_agctst2_agc_adjust_p3db = -1; +static int hf_cc2400_agctst2_agc_adjust_p1db = -1; +static int hf_cc2400_fstst0_rxmixbuf_cur = -1; +static int hf_cc2400_fstst0_txmixbuf_cur = -1; +static int hf_cc2400_fstst0_vco_array_settle_long = -1; +static int hf_cc2400_fstst0_vco_array_oe = -1; +static int hf_cc2400_fstst0_vco_array_o = -1; +static int hf_cc2400_fstst0_vco_array_res = -1; +static int hf_cc2400_fstst1_rxbpf_locur = -1; +static int hf_cc2400_fstst1_rxbpf_midcur = -1; +static int hf_cc2400_fstst1_vco_current_ref = -1; +static int hf_cc2400_fstst1_vco_current_k = -1; +static int hf_cc2400_fstst1_vc_dac_en = -1; +static int hf_cc2400_fstst1_vc_dac_val = -1; +static int hf_cc2400_fstst2_reserved = -1; +static int hf_cc2400_fstst2_vco_curcal_speed = -1; +static int hf_cc2400_fstst2_vco_current_oe = -1; +static int hf_cc2400_fstst2_vco_current_o = -1; +static int hf_cc2400_fstst2_vco_current_res = -1; +static int hf_cc2400_fstst3_reserved = -1; +static int hf_cc2400_fstst3_chp_test_up = -1; +static int hf_cc2400_fstst3_chp_test_dn = -1; +static int hf_cc2400_fstst3_chp_disable = -1; +static int hf_cc2400_fstst3_pd_delay = -1; +static int hf_cc2400_fstst3_chp_step_period = -1; +static int hf_cc2400_fstst3_stop_chp_current = -1; +static int hf_cc2400_fstst3_start_chp_current = -1; +static int hf_cc2400_manfidl_partnum = -1; +static int hf_cc2400_manfidl_manfid = -1; +static int hf_cc2400_manfidh_version = -1; +static int hf_cc2400_manfidh_partnum = -1; +static int hf_cc2400_grmdm_reserved = -1; +static int hf_cc2400_grmdm_sync_errbits_allowed = -1; +static int hf_cc2400_grmdm_pin_mode = -1; +static int hf_cc2400_grmdm_packet_mode = -1; +static int hf_cc2400_grmdm_pre_bytes = -1; +static int hf_cc2400_grmdm_sync_word_size = -1; +static int hf_cc2400_grmdm_crc_on = -1; +static int hf_cc2400_grmdm_data_format = -1; +static int hf_cc2400_grmdm_modulation_format = -1; +static int hf_cc2400_grmdm_tx_gaussian_filter = -1; +static int hf_cc2400_grdec_reserved = -1; +static int hf_cc2400_grdec_ind_saturation = -1; +static int hf_cc2400_grdec_dec_shift = -1; +static int hf_cc2400_grdec_channel_dec = -1; +static int hf_cc2400_grdec_dec_val = -1; +static int hf_cc2400_pktstatus_reserved_15_11 = -1; +static int hf_cc2400_pktstatus_sync_word_received = -1; +static int hf_cc2400_pktstatus_crc_ok = -1; +static int hf_cc2400_pktstatus_reserved_8 = -1; +static int hf_cc2400_pktstatus_reserved_7_0 = -1; +static int hf_cc2400_int_reserved_15_8 = -1; +static int hf_cc2400_int_reserved_7 = -1; +static int hf_cc2400_int_pkt_polarity = -1; +static int hf_cc2400_int_fifo_polarity = -1; +static int hf_cc2400_int_fifo_threshold = -1; +static int hf_cc2400_reserved_0x24_res_15_14 = -1; +static int hf_cc2400_reserved_0x24_res_13_10 = -1; +static int hf_cc2400_reserved_0x24_res_9_7 = -1; +static int hf_cc2400_reserved_0x24_res_6_0 = -1; +static int hf_cc2400_reserved_0x25_res_15_12 = -1; +static int hf_cc2400_reserved_0x25_res_11_0 = -1; +static int hf_cc2400_reserved_0x26_res_15_10 = -1; +static int hf_cc2400_reserved_0x26_res_9_0 = -1; +static int hf_cc2400_reserved_0x27_res_15_8 = -1; +static int hf_cc2400_reserved_0x27_res_7_3 = -1; +static int hf_cc2400_reserved_0x27_res_2_0 = -1; +static int hf_cc2400_reserved_0x28_res_15 = -1; +static int hf_cc2400_reserved_0x28_res_14_13 = -1; +static int hf_cc2400_reserved_0x28_res_12_7 = -1; +static int hf_cc2400_reserved_0x28_res_6_0 = -1; +static int hf_cc2400_reserved_0x29_res_15_8 = -1; +static int hf_cc2400_reserved_0x29_res_7_3 = -1; +static int hf_cc2400_reserved_0x29_res_2_0 = -1; +static int hf_cc2400_reserved_0x2A_res_15_11 = -1; +static int hf_cc2400_reserved_0x2A_res_10 = -1; +static int hf_cc2400_reserved_0x2A_res_9_0 = -1; +static int hf_cc2400_reserved_0x2B_res_15_14 = -1; +static int hf_cc2400_reserved_0x2B_res_13 = -1; +static int hf_cc2400_reserved_0x2B_res_12 = -1; +static int hf_cc2400_reserved_0x2B_res_11_0 = -1; +static int hf_cc2400_syncl = -1; +static int hf_cc2400_synch = -1; static gint ett_ubertooth = -1; static gint ett_command = -1; static gint ett_usb_rx_packet = -1; static gint ett_usb_rx_packet_data = -1; static gint ett_entry = -1; +static gint ett_register_value = -1; +static gint ett_fsdiv_frequency = -1; static expert_field ei_unexpected_response = EI_INIT; static expert_field ei_unknown_data = EI_INIT; @@ -234,7 +457,7 @@ static const value_string register_vals[] = { { 0x07, "FREQEST" }, { 0x08, "IOCFG" }, { 0x0B, "FSMTC" }, - { 0x0C, "RESERVED" }, + { 0x0C, "RESERVED 0x0C" }, { 0x0D, "MANAND" }, { 0x0E, "FSMSTATE" }, { 0x0F, "ADCTST" }, @@ -258,6 +481,14 @@ static const value_string register_vals[] = { { 0x21, "GRDEC" }, { 0x22, "PKTSTATUS" }, { 0x23, "INT" }, + { 0x24, "RESERVED 0x24" }, + { 0x25, "RESERVED 0x25" }, + { 0x26, "RESERVED 0x26" }, + { 0x27, "RESERVED 0x27" }, + { 0x28, "RESERVED 0x28" }, + { 0x29, "RESERVED 0x29" }, + { 0x2A, "RESERVED 0x2A" }, + { 0x2B, "RESERVED 0x2B" }, { 0x2C, "SYNCL" }, { 0x2D, "SYNCH" }, { 0x60, "SXOSCON" }, @@ -271,11 +502,672 @@ static const value_string register_vals[] = { }; static value_string_ext(register_vals_ext) = VALUE_STRING_EXT_INIT(register_vals); +static const value_string register_description_vals[] = { + { 0x00, "Main Control Register" }, + { 0x01, "Frequency Synthesiser Control and Status" }, + { 0x02, "Frequency Synthesiser Frequency Division Control" }, + { 0x03, "Modem Control and Status" }, + { 0x04, "Automatic Gain Control and Status" }, + { 0x05, "Front-end Control Register" }, + { 0x06, "Received Signal Strength Indicator Status and Control Register" }, + { 0x07, "Received Frequency Offset Estimation" }, + { 0x08, "IO Configuration Register" }, + { 0x0B, "Finite State Machine Time Constants" }, + { 0x0C, "Reserved Register Containing Spare Control and Status Bits" }, + { 0x0D, "Manual Signal and Override Register" }, + { 0x0E, "Finite State Machine Information and Breakpoint" }, + { 0x0F, "Analog-to-Digital Converter Test Register" }, + { 0x10, "Receiver Band-pass Filters Test Register" }, + { 0x11, "Power Amplifier and Transmit Mixers Test Register" }, + { 0x12, "Low Noise Amplifier and Receive Mixers Test Register" }, + { 0x13, "Manual Signal or Override Register" }, + { 0x14, "Modem Test Register 0" }, + { 0x15, "Modem Test Register 1" }, + { 0x16, "Digital-to-Analog Converter Test Register" }, + { 0x17, "Automatic Gain Control Test Register 0" }, + { 0x18, "Automatic Gain Control Test Register 1" }, + { 0x19, "Automatic Gain Control Test Register 2" }, + { 0x1A, "Frequency Synthesiser Test Register 0" }, + { 0x1B, "Frequency Synthesiser Test Register 1" }, + { 0x1C, "Frequency Synthesiser Test Register 2" }, + { 0x1D, "Frequency Synthesiser Test Register 3" }, + { 0x1E, "Manufacturer ID, Lower 16 Bit" }, + { 0x1F, "Manufacturer ID, Upper 16 Bit" }, + { 0x20, "Generic Radio Modem Control and Status" }, + { 0x21, "Generic Radio Decimation Control and Status" }, + { 0x22, "Packet Mode Status" }, + { 0x23, "Interrupt Register" }, + { 0x24, "Reserved 0x24" }, + { 0x25, "Reserved 0x25" }, + { 0x26, "Reserved 0x26" }, + { 0x27, "Reserved 0x27" }, + { 0x28, "Reserved 0x28" }, + { 0x29, "Reserved 0x29" }, + { 0x2A, "Reserved 0x2A" }, + { 0x2B, "Reserved 0x2B" }, + { 0x2C, "Sync Word, Lower 16 Bit" }, + { 0x2D, "Sync Word, Upper 16 Bit" }, + { 0x60, "Command Strobe Register: Turn on XOSC" }, + { 0x61, "Command Strobe register: Start and calibrate Frequency Synthesizer and go from RX/TX to a wait mode where the Frequency Synthesizer is running" }, + { 0x62, "Command Strobe register: Start RX" }, + { 0x63, "Command Strobe register: Start TX (turn on Power Amplifier)" }, + { 0x64, "Command Strobe register: Turn off RX/TX and Frequency Synthesizer" }, + { 0x65, "Command Strobe register: Turn off XOSC" }, + { 0x70, "Used to write data to and read data from the 8-bit wide 32 bytes FIFO used to buffer outgoing TX data and incoming RX data in buffered RF mode" }, + { 0x00, NULL } +}; +static value_string_ext(register_description_vals_ext) = VALUE_STRING_EXT_INIT(register_description_vals); + +static const value_string cc2400_grdec_dec_shift_vals[] = { + { 0x00, "0" }, + { 0x01, "1" }, + { 0x02, "-2" }, + { 0x03, "-1" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_grdec_dec_shift_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_grdec_dec_shift_vals); + +static const value_string cc2400_grdec_channel_dec_vals[] = { + { 0x00, "1 MHz (used for 1Mbps and 250 kbps datarates)" }, + { 0x01, "500 kHz (used for 10 kbps data rate)" }, + { 0x02, "250 kHz" }, + { 0x03, "125 kHz" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_grdec_channel_dec_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_grdec_channel_dec_vals); + +static const value_string cc2400_grmdm_pin_mode_vals[] = { + { 0x00, "Unbuffered Mode" }, + { 0x01, "Buffered Mode" }, + { 0x02, "HSSD Test Mode" }, + { 0x03, "Unused" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_grmdm_pin_mode_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_grmdm_pin_mode_vals); + +static const value_string cc2400_grmdm_pre_bytes_vals[] = { + { 0x00, "0" }, + { 0x01, "1" }, + { 0x02, "2" }, + { 0x03, "4" }, + { 0x04, "8" }, + { 0x05, "16" }, + { 0x06, "32" }, + { 0x07, "Infinitely On" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_grmdm_pre_bytes_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_grmdm_pre_bytes_vals); + +static const value_string cc2400_grmdm_sync_word_size_vals[] = { + { 0x00, "The 8 MSB bits of SYNC_WORD" }, + { 0x01, "The 16 MSB bits of SYNC_WORD" }, + { 0x02, "The 24 MSB bits of SYNC_WORD" }, + { 0x03, "The 32 MSB bits of SYNC_WORD" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_grmdm_sync_word_size_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_grmdm_sync_word_size_vals); + +static const value_string cc2400_grmdm_data_format_vals[] = { + { 0x00, "NRZ" }, + { 0x01, "Manchester" }, + { 0x02, "8/10 line-coding (Not applied to preambles or sync words)" }, + { 0x03, "Reserved" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_grmdm_data_format_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_grmdm_data_format_vals); + +static const value_string cc2400_grmdm_modulation_format_vals[] = { + { 0x00, "FSK/GFSK" }, + { 0x01, "Reserved" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_grmdm_modulation_format_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_grmdm_modulation_format_vals); + +static const value_string cc2400_fstst3_pd_delay_vals[] = { + { 0x00, "Short Reset Delay" }, + { 0x01, "Long Reset Delay" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fstst3_pd_delay_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fstst3_pd_delay_vals); + +static const value_string cc2400_fstst3_chp_step_period_vals[] = { + { 0x00, "0.25 us" }, + { 0x01, "0.5 us" }, + { 0x02, "1 us" }, + { 0x03, "4 us" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fstst3_chp_step_period_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fstst3_chp_step_period_vals); + +static const value_string cc2400_fstst2_vco_curcal_speed_vals[] = { + { 0x00, "Normal" }, + { 0x01, "Undefined" }, + { 0x02, "Half Speed" }, + { 0x03, "Undefined" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fstst2_vco_curcal_speed_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fstst2_vco_curcal_speed_vals); + +static const value_string cc2400_fstst1_rxbpf_locur_vals[] = { + { 0x00, "4 uA (nominal)" }, + { 0x01, "3 uA" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fstst1_rxbpf_locur_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fstst1_rxbpf_locur_vals); + +static const value_string cc2400_fstst1_rxbpf_midcur_vals[] = { + { 0x00, "4 uA (nominal)" }, + { 0x01, "3.5 uA" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fstst1_rxbpf_midcur_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fstst1_rxbpf_midcur_vals); + +static const value_string cc2400_fstst1_vc_dac_en_vals[] = { + { 0x00, "Loop filter (closed loop PLL)" }, + { 0x01, "VC DAC(open loop PLL)" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fstst1_vc_dac_en_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fstst1_vc_dac_en_vals); + +static const value_string cc2400_fstst0_rxtxmixbuf_cur_vals[] = { + { 0x00, "690 uA" }, + { 0x01, "980 uA" }, + { 0x02, "1.16 mA (nominal)" }, + { 0x03, "1.44 mA" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fstst0_rxtxmixbuf_cur_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fstst0_rxtxmixbuf_cur_vals); + + +static const value_string cc2400_agctst1_agc_var_gain_sat_vals[] = { + { 0x00, "-1/-3 gain steps" }, + { 0x01, "-3/-5 gain steps" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_agctst1_agc_var_gain_sat_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_agctst1_agc_var_gain_sat_vals); + +static const value_string cc2400_dactst_dac_src_vals[] = { + { 0x00, "Normal Operation (from Mudulator)" }, + { 0x01, "The DAC_I_O and DAC_Q_O override values below" }, + { 0x02, "From ADC" }, + { 0x03, "I/Q after digital down-mixing and channel filtering" }, + { 0x04, "Full-spectrum White Noise (from PRNG)" }, + { 0x05, "RX signal magnitude / frequency filtered (from demodulator)" }, + { 0x06, "RSSI/RX frequency offset estimation" }, + { 0x07, "HSSD module" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_dactst_dac_src_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_dactst_dac_src_vals); + +static const value_string cc2400_mdmtst0_afc_settling_vals[] = { + { 0x00, "1 pair" }, + { 0x01, "2 pairs" }, + { 0x02, "4 pairs" }, + { 0x03, "8 pairs" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_mdmtst0_afc_settling_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_mdmtst0_afc_settling_vals); + +static const value_string cc2400_lmtst_rxmix_tail_vals[] = { + { 0x00, "12 uA" }, + { 0x01, "16 uA (Nominal)" }, + { 0x02, "20 uA" }, + { 0x03, "24 uA" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_lmtst_rxmix_tail_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_lmtst_rxmix_tail_vals); + +static const value_string cc2400_lmtst_rxmix_vcm_vals[] = { + { 0x00, "8 uA mixer current" }, + { 0x01, "12 uA mixer current (Nominal)" }, + { 0x02, "16 uA mixer current" }, + { 0x03, "20 uA mixer current" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_lmtst_rxmix_vcm_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_lmtst_rxmix_vcm_vals); + +static const value_string cc2400_lmtst_rxmix_current_vals[] = { + { 0x00, "360 uA mixer current (x2)" }, + { 0x01, "720 uA mixer current (x2)" }, + { 0x02, "900 uA mixer current (x2) (Nominal)" }, + { 0x03, "1260 uA mixer current (x2)" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_lmtst_rxmix_current_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_lmtst_rxmix_current_vals); + +static const value_string cc2400_lmtst_lna_cap_array_vals[] = { + { 0x00, "Off" }, + { 0x01, "0.1pF (x2) (Nominal)" }, + { 0x02, "0.2pF (x2)" }, + { 0x03, "0.3pF (x2)" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_lmtst_lna_cap_array_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_lmtst_lna_cap_array_vals); + +static const value_string cc2400_lmtst_lna_lowgain_vals[] = { + { 0x00, "19 dB (Nominal)" }, + { 0x01, "7 dB" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_lmtst_lna_lowgain_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_lmtst_lna_lowgain_vals); + +static const value_string cc2400_lmtst_lna_gain_vals[] = { + { 0x00, "Off (Nominal)" }, + { 0x01, "100 uA LNA current" }, + { 0x02, "300 uA LNA current" }, + { 0x03, "1000 uA LNA current" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_lmtst_lna_gain_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_lmtst_lna_gain_vals); + +static const value_string cc2400_lmtst_lna_current_vals[] = { + { 0x00, "240 uA LNA current (x2)" }, + { 0x01, "480 uA LNA current (x2)" }, + { 0x02, "640 uA LNA current (x2) (Nominal)" }, + { 0x03, "1280 uA LNA current (x2)" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_lmtst_lna_current_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_lmtst_lna_current_vals); + +static const value_string cc2400_pamtst_atestmod_mode_vals[] = { + { 0x00, "Outputs I (ATEST2) and Q (ATEST1) from RxMIX" }, + { 0x01, "Inputs I (ATEST2) and Q (ATEST1) to BPF" }, + { 0x02, "Outputs I (ATEST2) and Q (ATEST1) from VGA" }, + { 0x03, "Inputs I (ATEST2) and Q (ATEST1) to ADC" }, + { 0x04, "Outputs I (ATEST2) and Q (ATEST1) from LPF" }, + { 0x05, "Inputs I (ATEST2) and Q (ATEST1) to TxMIX" }, + { 0x06, "Outputs P (ATEST2) and N (ATEST1) from Prescaler" }, + { 0x07, "Connects TX IF to RX IF and simultaneously the ATEST1 pin to the internal VC node" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_pamtst_atestmod_mode_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_pamtst_atestmod_mode_vals); + +static const value_string cc2400_pamtst_txmix_current_vals[] = { + { 0x00, "1.72 mA" }, + { 0x01, "1.88 mA" }, + { 0x02, "2.05 mA" }, + { 0x03, "2.21 mA" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_pamtst_txmix_current_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_pamtst_txmix_current_vals); + +static const value_string cc2400_pamtst_pa_current_vals[] = { + { 0x00, "-3 current adjustment" }, + { 0x01, "-2 current adjustment" }, + { 0x02, "-1 current adjustment" }, + { 0x03, "Nominal Setting" }, + { 0x04, "+1 current adjustment" }, + { 0x05, "+2 current adjustment" }, + { 0x06, "+3 current adjustment" }, + { 0x07, "+4 current adjustment" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_pamtst_pa_current_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_pamtst_pa_current_vals); + +static const value_string cc2400_iocfg_hssd_src_vals[] = { + { 0x00, "Off" }, + { 0x01, "Output AGC status (gain setting / peak detector status / accumulator value)" }, + { 0x02, "Output ADC I and Q values" }, + { 0x03, "Output I/Q after digital down-mixing and channel filtering" }, + { 0x04, "Output RX signal magnitude / frequency unfiltered (from demodulator)" }, + { 0x05, "Output RX signal magnitude / frequency filtered (from demodulator)" }, + { 0x06, "Output RSSI / RX frequency offset estimation" }, + { 0x07, "Input DAC values" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_iocfg_hssd_src_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_iocfg_hssd_src_vals); + +static const value_string cc2400_rssi_rssi_filt_vals[] = { + { 0x00, "0 bits (no filtering)" }, + { 0x01, "1 bit" }, + { 0x02, "4 bits" }, + { 0x03, "8 bits" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_rssi_rssi_filt_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_rssi_rssi_filt_vals); + +static const value_string cc2400_fsctlr_lock_threshold_vals[] = { + { 0x00, "64" }, + { 0x01, "128" }, + { 0x02, "256" }, + { 0x03, "512" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fsctlr_lock_threshold_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fsctlr_lock_threshold_vals); + +static const value_string cc2400_fsctlr_lock_length_vals[] = { + { 0x00, "2 CLK_PRE Periods" }, + { 0x01, "4 CLK_PRE Periods" }, + { 0x00, NULL } +}; +static value_string_ext(cc2400_fsctlr_lock_length_vals_ext) = VALUE_STRING_EXT_INIT(cc2400_fsctlr_lock_length_vals); void proto_register_ubertooth(void); void proto_reg_handoff_ubertooth(void); +static void +dissect_cc2400_register(proto_tree *tree, tvbuff_t *tvb, gint offset, guint8 register_id) +{ + proto_item *sub_item; + proto_item *sub_tree; + + switch (register_id) { + case 0x00: /* MAIN */ + proto_tree_add_item(tree, hf_cc2400_main_resetn, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_reserved_14_10, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_fs_force_en, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_rxn_tx, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_reserved_7_4, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_reserved_3, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_reserved_2, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_xosc16m_bypass, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_main_xosc16m_en, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x01: /* FSCTRL */ + proto_tree_add_item(tree, hf_cc2400_fsctrl_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsctrl_lock_threshold, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsctrl_cal_done, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsctrl_cal_running, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsctrl_lock_length, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsctrl_lock_status, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x02: /* FSDIV */ + proto_tree_add_item(tree, hf_cc2400_fsdiv_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + sub_item = proto_tree_add_item(tree, hf_cc2400_fsdiv_frequency, tvb, offset, 2, ENC_BIG_ENDIAN); + sub_tree = proto_item_add_subtree(sub_item, ett_fsdiv_frequency); + + proto_tree_add_item(sub_tree, hf_cc2400_fsdiv_freq_high, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_cc2400_fsdiv_freq, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x03: /* MDMCTRL */ + proto_tree_add_item(tree, hf_cc2400_mdmctrl_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmctrl_mod_offset, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmctrl_mod_dev, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x04: /* AGCCTRL */ + proto_tree_add_item(tree, hf_cc2400_agcctrl_vga_gain, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agcctrl_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agcctrl_agc_locked, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agcctrl_agc_lock, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agcctrl_agc_sync_lock, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agcctrl_vga_gain_oe, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x05: /* FREND */ + proto_tree_add_item(tree, hf_cc2400_frend_reserved_15_4, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_frend_reserved_3, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_frend_pa_level, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x06: /* RSSI */ + proto_tree_add_item(tree, hf_cc2400_rssi_rssi_val, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_rssi_rssi_cs_thres, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_rssi_rssi_filt, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x07: /* FREQEST */ + proto_tree_add_item(tree, hf_cc2400_freqest_rx_freq_offset, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_freqest_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x08: /* IOCFG */ + proto_tree_add_item(tree, hf_cc2400_iocfg_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_iocfg_gio6_cfg, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_iocfg_gio1_cfg, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_iocfg_hssd_src, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x0B: /* FSMTC */ + proto_tree_add_item(tree, hf_cc2400_fsmtc_tc_rxon2agcen, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsmtc_tc_paon2switch, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsmtc_res, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsmtc_tc_txend2switch, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsmtc_tc_txend2paoff, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x0C: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x0C_res_15_5, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x0C_res_4_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x0D: /* MANAND */ + proto_tree_add_item(tree, hf_cc2400_manand_vga_reset_n, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_lock_status, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_balun_ctrl, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_rxtx, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_pre_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_pa_n_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_pa_p_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_dac_lpf_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_bias_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_xosc16m_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_chp_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_fs_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_adc_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_vga_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_rxbpf_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manand_lnamix_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x0E: /* FSMSTATE */ + proto_tree_add_item(tree, hf_cc2400_fsmstate_reserved_15_13, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsmstate_fsm_state_bkpt, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsmstate_reserved_7_5, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fsmstate_fsm_cur_state, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x0F: /* ADCTST */ + proto_tree_add_item(tree, hf_cc2400_adctst_reserved_15, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_adctst_adc_i, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_adctst_reserved_7, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_adctst_adc_q, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x10: /* RXBPFTST */ + proto_tree_add_item(tree, hf_cc2400_rxbpftst_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_rxbpftst_rxbpf_cap_oe, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_rxbpftst_rxbpf_cap_o, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_rxbpftst_rxbpf_cap_res, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x11: /* PAMTST */ + proto_tree_add_item(tree, hf_cc2400_pamtst_reserved_15_13, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pamtst_vc_in_test_en, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pamtst_atestmod_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pamtst_atestmod_mode, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pamtst_reserved_7, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pamtst_txmix_cap_array, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pamtst_txmix_current, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pamtst_pa_current, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x12: /* LMTST */ + proto_tree_add_item(tree, hf_cc2400_lmtst_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_rxmix_hgm, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_rxmix_tail, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_rxmix_vcm, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_rxmix_current, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_lna_cap_array, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_lna_lowgain, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_lna_gain, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_lmtst_lna_current, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x13: /* MANOR */ + proto_tree_add_item(tree, hf_cc2400_manor_vga_reset_n, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_lock_status, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_balun_ctrl, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_rxtx, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_pre_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_pa_n_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_pa_p_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_dac_lpf_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_bias_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_xosc16m_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_chp_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_fs_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_adc_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_vga_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_rxbpf_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manor_lnamix_pd, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x14: /* MDMTST0 */ + proto_tree_add_item(tree, hf_cc2400_mdmtst0_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmtst0_tx_prng, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmtst0_tx_1mhz_offset_n, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmtst0_invert_data, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmtst0_afc_adjust_on_packet, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmtst0_afc_settling, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmtst0_afc_delta, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x15: /* MDMTST1 */ + proto_tree_add_item(tree, hf_cc2400_mdmtst1_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_mdmtst1_bsync_threshold, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x16: /* DACTST */ + proto_tree_add_item(tree, hf_cc2400_dactst_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_dactst_dac_src, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_dactst_dac_i_o, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_dactst_dac_q_o, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x17: /* AGCTST0 */ + proto_tree_add_item(tree, hf_cc2400_agctst0_agc_settle_blank_dn, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst0_agc_win_size, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst0_agc_settle_peak, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst0_agc_settle_adc, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst0_agc_attempts, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x18: /* AGCTST1 */ + proto_tree_add_item(tree, hf_cc2400_agctst1_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst1_agc_var_gain_sat, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst1_agc_settle_blank_up, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst1_peakdet_cur_boost, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst1_agc_mult_slow, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst1_agc_settle_fixed, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst1_agc_settle_var, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x19: /* AGCTST2 */ + proto_tree_add_item(tree, hf_cc2400_agctst2_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst2_agc_backend_blanking, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst2_agc_adjust_m3db, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst2_agc_adjust_m1db, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst2_agc_adjust_p3db, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_agctst2_agc_adjust_p1db, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x1A: /* FSTST0 */ + proto_tree_add_item(tree, hf_cc2400_fstst0_rxmixbuf_cur, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst0_txmixbuf_cur, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst0_vco_array_settle_long, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst0_vco_array_oe, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst0_vco_array_o, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst0_vco_array_res, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x1B: /* FSTST1 */ + proto_tree_add_item(tree, hf_cc2400_fstst1_rxbpf_locur, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst1_rxbpf_midcur, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst1_vco_current_ref, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst1_vco_current_k, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst1_vc_dac_en, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst1_vc_dac_val, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x1C: /* FSTST2 */ + proto_tree_add_item(tree, hf_cc2400_fstst2_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst2_vco_curcal_speed, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst2_vco_current_oe, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst2_vco_current_o, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst2_vco_current_res, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x1D: /* FSTST3 */ + proto_tree_add_item(tree, hf_cc2400_fstst3_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst3_chp_test_up, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst3_chp_test_dn, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst3_chp_disable, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst3_pd_delay, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst3_chp_step_period, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst3_stop_chp_current, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_fstst3_start_chp_current, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x1E: /* MANFIDL */ + proto_tree_add_item(tree, hf_cc2400_manfidl_partnum, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manfidl_manfid, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x1F: /* MANFIDH */ + proto_tree_add_item(tree, hf_cc2400_manfidh_version, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_manfidh_partnum, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x20: /* GRMDM */ + proto_tree_add_item(tree, hf_cc2400_grmdm_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_sync_errbits_allowed, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_pin_mode, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_packet_mode, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_pre_bytes, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_sync_word_size, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_crc_on, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_data_format, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_modulation_format, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grmdm_tx_gaussian_filter, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x21: /* GRDEC */ + proto_tree_add_item(tree, hf_cc2400_grdec_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grdec_ind_saturation, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grdec_dec_shift, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grdec_channel_dec, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_grdec_dec_val, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x22: /* PKTSTATUS */ + proto_tree_add_item(tree, hf_cc2400_pktstatus_reserved_15_11, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pktstatus_sync_word_received, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pktstatus_crc_ok, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pktstatus_reserved_8, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_pktstatus_reserved_7_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x23: /* INT */ + proto_tree_add_item(tree, hf_cc2400_int_reserved_15_8, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_int_reserved_7, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_int_pkt_polarity, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_int_fifo_polarity, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_int_fifo_threshold, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x24: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x24_res_15_14, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x24_res_13_10, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x24_res_9_7, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x24_res_6_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x25: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x25_res_15_12, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x25_res_11_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x26: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x26_res_15_10, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x26_res_9_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x27: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x27_res_15_8, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x27_res_7_3, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x27_res_2_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x28: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x28_res_15, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x28_res_14_13, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x28_res_12_7, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x28_res_6_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x29: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x29_res_15_8, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x29_res_7_3, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x29_res_2_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x2A: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x2A_res_15_11, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x2A_res_10, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x2A_res_9_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x2B: /* Reserved */ + proto_tree_add_item(tree, hf_cc2400_reserved_0x2B_res_15_14, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x2B_res_13, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x2B_res_12, tvb, offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_cc2400_reserved_0x2B_res_11_0, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x2C: /* SYNCL */ + proto_tree_add_item(tree, hf_cc2400_syncl, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + case 0x2D: /* SYNCH */ + proto_tree_add_item(tree, hf_cc2400_synch, tvb, offset, 2, ENC_BIG_ENDIAN); + break; + default: + proto_tree_add_item(tree, hf_cc2400_value, tvb, offset, 2, ENC_BIG_ENDIAN); + } +} + static gint dissect_usb_rx_packet(proto_tree *main_tree, proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, gint offset, gint16 command) { @@ -381,6 +1273,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat proto_item *command_item; proto_item *command_tree; proto_item *sub_item; + proto_item *sub_tree; gint offset = 0; usb_conv_info_t *usb_conv_info = (usb_conv_info_t *)data; gint p2p_dir_save; @@ -548,10 +1441,12 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 53: /* Read Register */ - proto_tree_add_item(main_tree, hf_register, tvb, offset, 2, ENC_LITTLE_ENDIAN); + sub_item = proto_tree_add_item(main_tree, hf_register, tvb, offset, 2, ENC_LITTLE_ENDIAN); register_id = tvb_get_letohs(tvb, offset); col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", val_to_str_ext_const(register_id, ®ister_vals_ext, "Unknown")); + if (try_val_to_str_ext(register_id, ®ister_vals_ext)) + proto_item_append_text(sub_item, " [%s]", val_to_str_ext_const(register_id, ®ister_description_vals_ext, "Unknown")); offset += 2; break; @@ -936,11 +1831,17 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat case 53: /* Read Register */ sub_item = proto_tree_add_uint(main_tree, hf_register, tvb, offset, 0, register_id); PROTO_ITEM_SET_GENERATED(sub_item); + if (try_val_to_str_ext(register_id, ®ister_vals_ext)) + proto_item_append_text(sub_item, " [%s]", val_to_str_ext_const(register_id, ®ister_description_vals_ext, "Unknown")); - proto_tree_add_item(main_tree, hf_register_value, tvb, offset, 2, ENC_BIG_ENDIAN); + + sub_item = proto_tree_add_item(main_tree, hf_register_value, tvb, offset, 2, ENC_BIG_ENDIAN); + sub_tree = proto_item_add_subtree(sub_item, ett_register_value); col_append_fstr(pinfo->cinfo, COL_INFO, " = %s: 0x%04x", val_to_str_ext_const(register_id, ®ister_vals_ext, "Unknown"), - tvb_get_letohs(tvb, offset)); + tvb_get_ntohs(tvb, offset)); + + dissect_cc2400_register(sub_tree, tvb, offset, register_id); offset += 2; break; @@ -1267,7 +2168,1114 @@ proto_register_ubertooth(void) { "Data", "ubertooth.data", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } - } + }, + { &hf_cc2400_value, + { "Value", "ubertooth.register.value", + FT_UINT16, BASE_HEX_DEC, NULL, 0xFFFF, + NULL, HFILL } + }, + { &hf_cc2400_syncl, + { "Synchronisation Word, lower 16 bit", "ubertooth.register.value.syncl", + FT_UINT16, BASE_HEX, NULL, 0x00, + NULL, HFILL } + }, + { &hf_cc2400_synch, + { "Synchronisation Word, upper 16 bit", "ubertooth.register.value.synch", + FT_UINT16, BASE_HEX, NULL, 0x00, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x2B_res_15_14, + { "Reserved [15:14]", "ubertooth.register.value.reserved.0x2B.15_14", + FT_UINT16, BASE_DEC, NULL, 0xC000, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x2B_res_13, + { "Reserved [13]", "ubertooth.register.value.reserved.0x2B.13", + FT_BOOLEAN, 16, NULL, 0x2000, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x2B_res_12, + { "Reserved [12]", "ubertooth.register.value.reserved.0x2B.12", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x2B_res_11_0, + { "Reserved [11:0]", "ubertooth.register.value.reserved.0x2B.11_0", + FT_UINT16, BASE_DEC, NULL, 0x0FFF, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x2A_res_15_11, + { "Reserved [15:11]", "ubertooth.register.value.reserved.0x2A.15_11", + FT_UINT16, BASE_DEC, NULL, 0xF800, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x2A_res_10, + { "Reserved [10]", "ubertooth.register.value.reserved.0x2A.10", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x2A_res_9_0, + { "Reserved [9:0]", "ubertooth.register.value.reserved.0x2A.9_0", + FT_UINT16, BASE_DEC, NULL, 0x03FF, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x29_res_15_8, + { "Reserved [15:8]", "ubertooth.register.value.reserved.0x29.15_8", + FT_UINT16, BASE_DEC, NULL, 0xFF00, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x29_res_7_3, + { "Reserved [7:3]", "ubertooth.register.value.reserved.0x29.7_3", + FT_UINT16, BASE_DEC, NULL, 0x00F8, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x29_res_2_0, + { "Reserved [2:0]", "ubertooth.register.value.reserved.0x29.2_0", + FT_UINT16, BASE_DEC, NULL, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x28_res_15, + { "Reserved [15]", "ubertooth.register.value.reserved.0x28.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x28_res_14_13, + { "Reserved [14:13]", "ubertooth.register.value.reserved.0x28.14_13", + FT_UINT16, BASE_DEC, NULL, 0x6000, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x28_res_12_7, + { "Reserved [12:7]", "ubertooth.register.value.reserved.0x28.12_7", + FT_UINT16, BASE_DEC, NULL, 0x1F80, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x28_res_6_0, + { "Reserved [6:0]", "ubertooth.register.value.reserved.0x28.6_0", + FT_UINT16, BASE_DEC, NULL, 0x007F, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x27_res_15_8, + { "Reserved [15:8]", "ubertooth.register.value.reserved.0x27.15_8", + FT_UINT16, BASE_DEC, NULL, 0xFF00, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x27_res_7_3, + { "Reserved [7:3]", "ubertooth.register.value.reserved.0x27.7_3", + FT_UINT16, BASE_DEC, NULL, 0x00F8, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x27_res_2_0, + { "Reserved [2:0]", "ubertooth.register.value.reserved.0x27.2_0", + FT_UINT16, BASE_DEC, NULL, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x26_res_15_10, + { "Reserved [15:10]", "ubertooth.register.value.reserved.0x26.15_10", + FT_UINT16, BASE_DEC, NULL, 0xFC00, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x26_res_9_0, + { "Reserved [9:0]", "ubertooth.register.value.reserved.0x26.9_0", + FT_UINT16, BASE_DEC, NULL, 0x03FF, + NULL, HFILL } + }, + + { &hf_cc2400_reserved_0x25_res_15_12, + { "Reserved [15:12]", "ubertooth.register.value.reserved.0x25.15_12", + FT_UINT16, BASE_DEC, NULL, 0xF000, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x25_res_11_0, + { "Reserved [11:0]", "ubertooth.register.value.reserved.0x25.11_0", + FT_UINT16, BASE_DEC, NULL, 0x0FFF, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x24_res_15_14, + { "Reserved [15:14]", "ubertooth.register.value.reserved.0x24.15_14", + FT_UINT16, BASE_DEC, NULL, 0xC000, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x24_res_13_10, + { "Reserved [13:10]", "ubertooth.register.value.reserved.0x24.13_10", + FT_UINT16, BASE_DEC, NULL, 0x3C00, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x24_res_9_7, + { "Reserved [9:7]", "ubertooth.register.value.reserved.0x24.9_7", + FT_UINT16, BASE_DEC, NULL, 0x0380, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x24_res_6_0, + { "Reserved [6:0]", "ubertooth.register.value.reserved.0x24.6_0", + FT_UINT16, BASE_DEC, NULL, 0x007F, + NULL, HFILL } + }, + { &hf_cc2400_int_reserved_15_8, + { "Reserved [15:8]", "ubertooth.register.value.int.reserved.15_8", + FT_UINT16, BASE_DEC, NULL, 0xFF00, + NULL, HFILL } + }, + { &hf_cc2400_int_reserved_7, + { "Reserved [7]", "ubertooth.register.value.int.reserved.7", + FT_BOOLEAN, 16, NULL, 0x0080, + NULL, HFILL } + }, + { &hf_cc2400_int_pkt_polarity, + { "PKT Polarity", "ubertooth.register.value.int.pkt_polarity", + FT_BOOLEAN, 16, NULL, 0x0040, + NULL, HFILL } + }, + { &hf_cc2400_int_fifo_polarity, + { "FIFO Polarity", "ubertooth.register.value.int.fifo_polarity", + FT_BOOLEAN, 16, NULL, 0x0020, + NULL, HFILL } + }, + { &hf_cc2400_int_fifo_threshold, + { "FIFO Threshold", "ubertooth.register.value.int.fifo_threshold", + FT_UINT16, BASE_DEC, NULL, 0x001F, + NULL, HFILL } + }, + { &hf_cc2400_main_resetn, + { "Reset N", "ubertooth.register.value.main.resetn", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_main_reserved_14_10, + { "Reserved [14:10]", "ubertooth.register.value.main.reserved.14_10", + FT_UINT16, BASE_DEC, NULL, 0x7C00, + NULL, HFILL } + }, + { &hf_cc2400_main_fs_force_en, + { "Forces Frequency Synthesiser", "ubertooth.register.value.main.fs_force_en", + FT_BOOLEAN, 16, NULL, 0x0200, + NULL, HFILL } + }, + { &hf_cc2400_main_rxn_tx, + { "RxN Tx", "ubertooth.register.value.main.rxn_tx", + FT_BOOLEAN, 16, NULL, 0x0100, + NULL, HFILL } + }, + { &hf_cc2400_main_reserved_7_4, + { "Reserved [7:4]", "ubertooth.register.value.main.reserved.7_4", + FT_UINT16, BASE_DEC, NULL, 0x00F0, + NULL, HFILL } + }, + { &hf_cc2400_main_reserved_3, + { "Reserved [3]", "ubertooth.register.value.main.reserved.3", + FT_BOOLEAN, 16, NULL, 0x0008, + NULL, HFILL } + }, + { &hf_cc2400_main_reserved_2, + { "Reserved [2]", "ubertooth.register.value.main.reserved.2", + FT_BOOLEAN, 16, NULL, 0x0004, + NULL, HFILL } + }, + { &hf_cc2400_main_xosc16m_bypass, + { "Bypass 16 MHz Crystal Oscillator", "ubertooth.register.value.main.xosc16m_bypass", + FT_BOOLEAN, 16, NULL, 0x0002, + NULL, HFILL } + }, + { &hf_cc2400_main_xosc16m_en, + { "Force 16 MHz Crystal Oscillator", "ubertooth.register.value.main.xosc16m_en", + FT_BOOLEAN, 16, NULL, 0x0001, + NULL, HFILL } + }, + { &hf_cc2400_fsctrl_reserved, + { "Reserved [15:6]", "ubertooth.register.value.fsctrl.reserved.15_6", + FT_UINT16, BASE_DEC, NULL, 0xFFC0, + NULL, HFILL } + }, + { &hf_cc2400_fsctrl_lock_threshold, + { "Lock Threshold", "ubertooth.register.value.fsctrl.lock_threshold", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fsctlr_lock_threshold_vals_ext, 0x0030, + NULL, HFILL } + }, + { &hf_cc2400_fsctrl_cal_done, + { "Calibration Done", "ubertooth.register.value.fsctrl.cal_done", + FT_BOOLEAN, 16, NULL, 0x0008, + NULL, HFILL } + }, + { &hf_cc2400_fsctrl_cal_running, + { "Calibration Running", "ubertooth.register.value.fsctrl.cal_running", + FT_BOOLEAN, 16, NULL, 0x0004, + NULL, HFILL } + }, + { &hf_cc2400_fsctrl_lock_length, + { "Lock Length", "ubertooth.register.value.fsctrl.lock_length", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fsctlr_lock_length_vals_ext, 0x0002, + NULL, HFILL } + }, + { &hf_cc2400_fsctrl_lock_status, + { "PLL Lock Status", "ubertooth.register.value.fsctrl.lock_status", + FT_BOOLEAN, 16, NULL, 0x0001, + NULL, HFILL } + }, + { &hf_cc2400_fsdiv_reserved, + { "Reserved [15:12]", "ubertooth.register.value.fsdiv.reserved.15_12", + FT_UINT16, BASE_DEC, NULL, 0xF000, + NULL, HFILL } + }, + { &hf_cc2400_fsdiv_frequency, + { "Frequency", "ubertooth.register.value.fsdiv.frequency", + FT_UINT16, BASE_DEC, NULL, 0x0FFF, + NULL, HFILL } + }, + { &hf_cc2400_fsdiv_freq_high, + { "Frequency High Part", "ubertooth.register.value.fsdiv.frequency.high", + FT_UINT16, BASE_DEC, NULL, 0x0C00, + NULL, HFILL } + }, + { &hf_cc2400_fsdiv_freq, + { "Frequency Lower Part", "ubertooth.register.value.fsdiv.frequency.low", + FT_UINT16, BASE_DEC, NULL, 0x03FF, + NULL, HFILL } + }, + { &hf_cc2400_mdmctrl_reserved, + { "Reserved [15:13]", "ubertooth.register.value.mdmctrl.reserved.15_13", + FT_UINT16, BASE_DEC, NULL, 0xE000, + NULL, HFILL } + }, + { &hf_cc2400_mdmctrl_mod_offset, + { "Modulator Offset", "ubertooth.register.value.mdmctrl.mod_offset", + FT_UINT16, BASE_DEC, NULL, 0x1F80, + NULL, HFILL } + }, + { &hf_cc2400_mdmctrl_mod_dev, + { "Modulator Deviation", "ubertooth.register.value.mdmctrl.mod_dev", + FT_UINT16, BASE_DEC, NULL, 0x007F, + NULL, HFILL } + }, + { &hf_cc2400_agcctrl_vga_gain, + { "VGA Gain", "ubertooth.register.value.agcctrl.vga_gain", + FT_UINT16, BASE_HEX, NULL, 0xFF00, + NULL, HFILL } + }, + { &hf_cc2400_agcctrl_reserved, + { "Reserved [7:4]", "ubertooth.register.value.agcctrl.reserved.7_4", + FT_UINT16, BASE_DEC, NULL, 0x00F0, + NULL, HFILL } + }, + { &hf_cc2400_agcctrl_agc_locked, + { "AGC Locked", "ubertooth.register.value.agcctrl.agc_locked", + FT_BOOLEAN, 16, NULL, 0x0008, + NULL, HFILL } + }, + { &hf_cc2400_agcctrl_agc_lock, + { "AGC Lock", "ubertooth.register.value.agcctrl.agc_lock", + FT_BOOLEAN, 16, NULL, 0x0004, + NULL, HFILL } + }, + { &hf_cc2400_agcctrl_agc_sync_lock, + { "AGC Sync Lock", "ubertooth.register.value.agcctrl.agc_sync_lock", + FT_BOOLEAN, 16, NULL, 0x0002, + NULL, HFILL } + }, + { &hf_cc2400_agcctrl_vga_gain_oe, + { "VGA Gain Override Enable", "ubertooth.register.value.agcctrl.vga_gain_oe", + FT_BOOLEAN, 16, NULL, 0x0001, + NULL, HFILL } + }, + { &hf_cc2400_frend_reserved_15_4, + { "Reserved [15:4]", "ubertooth.register.value.frend.reserved.15_4", + FT_UINT16, BASE_DEC, NULL, 0xFFF0, + NULL, HFILL } + }, + { &hf_cc2400_frend_reserved_3, + { "Reserved [3]", "ubertooth.register.value.frend.reserved.3", + FT_BOOLEAN, 16, NULL, 0x0008, + NULL, HFILL } + }, + { &hf_cc2400_frend_pa_level, + { "Power Amplifier Level", "ubertooth.register.value.frend.pa_level", + FT_UINT16, BASE_DEC, NULL, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_rssi_rssi_val, + { "Avarage RSSI Value", "ubertooth.register.value.rssi.rssi_val", + FT_INT8, BASE_DEC, NULL, 0xFF00, + NULL, HFILL } + }, + { &hf_cc2400_rssi_rssi_cs_thres, + { "RSSI Carrier Sense Threshold", "ubertooth.register.value.rssi.rssi_cs_thres", + FT_INT16, BASE_DEC, NULL, 0x00FC, + NULL, HFILL } + }, + { &hf_cc2400_rssi_rssi_filt, + { "RSSI Averaging Filter Length", "ubertooth.register.value.rssi.rssi_filt", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_rssi_rssi_filt_vals_ext, 0x0003, + NULL, HFILL } + }, + { &hf_cc2400_freqest_rx_freq_offset, + { "Rx Frequence Offset", "ubertooth.register.value.freqest.rx_freq_offset", + FT_INT16, BASE_DEC, NULL, 0xFF00, + NULL, HFILL } + }, + { &hf_cc2400_freqest_reserved, + { "Reserved [7:0]", "ubertooth.register.value.freqest.reserved.7_0", + FT_UINT16, BASE_DEC, NULL, 0x00FF, + NULL, HFILL } + }, + { &hf_cc2400_iocfg_reserved, + { "Reserved [15]", "ubertooth.register.value.iocfg.reserved.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_iocfg_gio6_cfg, + { "GIO6 Configuration", "ubertooth.register.value.iocfg.gio6_cfg", + FT_UINT16, BASE_DEC, NULL, 0x7E00, + NULL, HFILL } + }, + { &hf_cc2400_iocfg_gio1_cfg, + { "GIO1 Configuration", "ubertooth.register.value.iocfg.gio1_cfg", + FT_UINT16, BASE_DEC, NULL, 0x01F8, + NULL, HFILL } + }, + { &hf_cc2400_iocfg_hssd_src, + { "High Speed Serial Data Source", "ubertooth.register.value.iocfg.hssd_src", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_iocfg_hssd_src_vals_ext, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_fsmtc_tc_rxon2agcen, + { "Rx On to AGC Enabled", "ubertooth.register.value.fsmtc.tc_rxon2agcen", + FT_UINT16, BASE_DEC, NULL, 0xE000, + NULL, HFILL } + }, + { &hf_cc2400_fsmtc_tc_paon2switch, + { "Power Amplifier On to Switch", "ubertooth.register.value.fsmtc.tc_paon2switch", + FT_UINT16, BASE_DEC, NULL, 0x1C00, + NULL, HFILL } + }, + { &hf_cc2400_fsmtc_res, + { "Reserved [9:6]", "ubertooth.register.value.fsmtc.reserved.9_6", + FT_UINT16, BASE_DEC, NULL, 0x03C0, + NULL, HFILL } + }, + { &hf_cc2400_fsmtc_tc_txend2switch, + { "Tx End to Switch", "ubertooth.register.value.fsmtc.tc_txend2switch", + FT_UINT16, BASE_DEC, NULL, 0x0038, + NULL, HFILL } + }, + { &hf_cc2400_fsmtc_tc_txend2paoff, + { "Tx End to Power Amplifier Off", "ubertooth.register.value.fsmtc.tc_txend2paoff", + FT_UINT16, BASE_DEC, NULL, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x0C_res_15_5, + { "Reserved [15:5]", "ubertooth.register.value.reserved.0x0C.15_5", + FT_UINT16, BASE_DEC, NULL, 0xFFE0, + NULL, HFILL } + }, + { &hf_cc2400_reserved_0x0C_res_4_0, + { "Reserved [4:0]", "ubertooth.register.value.reserved.0x0C.4_0", + FT_UINT16, BASE_DEC, NULL, 0x001F, + NULL, HFILL } + }, + { &hf_cc2400_manand_vga_reset_n, + { "No VGA Reset", "ubertooth.register.value.manand.vga_reset_n", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_manand_lock_status, + { "Lock Status", "ubertooth.register.value.manand.lock_status", + FT_BOOLEAN, 16, NULL, 0x4000, + NULL, HFILL } + }, + { &hf_cc2400_manand_balun_ctrl, + { "Balun Control", "ubertooth.register.value.manand.balun_ctrl", + FT_BOOLEAN, 16, NULL, 0x2000, + NULL, HFILL } + }, + { &hf_cc2400_manand_rxtx, + { "RxTx", "ubertooth.register.value.manand.rxtx", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_manand_pre_pd, + { "Power Down of Prescaler", "ubertooth.register.value.manand.pre_pd", + FT_BOOLEAN, 16, NULL, 0x0800, + NULL, HFILL } + }, + { &hf_cc2400_manand_pa_n_pd, + { "Power Down of Power Amplifier (negative path)", "ubertooth.register.value.manand.pa_n_pd", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_manand_pa_p_pd, + { "Power Down of Power Amplifier (positive path)", "ubertooth.register.value.manand.pa_p_pd", + FT_BOOLEAN, 16, NULL, 0x0200, + NULL, HFILL } + }, + { &hf_cc2400_manand_dac_lpf_pd, + { "Power Down of Tx DAC", "ubertooth.register.value.manand.dac_lpf_pd", + FT_BOOLEAN, 16, NULL, 0x0100, + NULL, HFILL } + }, + { &hf_cc2400_manand_bias_pd, + { "Power Down control of global bias generator + XOSC clock buffer", "ubertooth.register.value.manand.bias_pd", + FT_BOOLEAN, 16, NULL, 0x0080, + NULL, HFILL } + }, + { &hf_cc2400_manand_xosc16m_pd, + { "Power Down control of 16 MHz XOSC core", "ubertooth.register.value.manand.xosc16m_pd", + FT_BOOLEAN, 16, NULL, 0x0040, + NULL, HFILL } + }, + { &hf_cc2400_manand_chp_pd, + { "Power Down control of Charge Pump", "ubertooth.register.value.manand.chp_pd", + FT_BOOLEAN, 16, NULL, 0x0020, + NULL, HFILL } + }, + { &hf_cc2400_manand_fs_pd, + { "Power Down control of VCO, I/Q generator, LO buffers", "ubertooth.register.value.manand.fs_pd", + FT_BOOLEAN, 16, NULL, 0x0010, + NULL, HFILL } + }, + { &hf_cc2400_manand_adc_pd, + { "Power Down control of the ADC", "ubertooth.register.value.manand.adc_pd", + FT_BOOLEAN, 16, NULL, 0x0008, + NULL, HFILL } + }, + { &hf_cc2400_manand_vga_pd, + { "Power Down control of the VGA", "ubertooth.register.value.manand.vga_pd", + FT_BOOLEAN, 16, NULL, 0x0004, + NULL, HFILL } + }, + { &hf_cc2400_manand_rxbpf_pd, + { "Power Down control of complex band-pass receive filter", "ubertooth.register.value.manand.rxbpf_pd", + FT_BOOLEAN, 16, NULL, 0x0002, + NULL, HFILL } + }, + { &hf_cc2400_manand_lnamix_pd, + { "Power Down control of LNA, down-conversion mixers and front-end bias", "ubertooth.register.value.manand.lnamix_pd", + FT_BOOLEAN, 16, NULL, 0x0001, + NULL, HFILL } + }, + { &hf_cc2400_fsmstate_reserved_15_13, + { "Reserved [15:13]", "ubertooth.register.value.fsmstate.reserved.15_13", + FT_UINT16, BASE_DEC, NULL, 0xE000, + NULL, HFILL } + }, + { &hf_cc2400_fsmstate_fsm_state_bkpt, + { "FSM breakpoint state", "ubertooth.register.value.fsmstate.fsm_state_bkpt", + FT_UINT16, BASE_DEC, NULL, 0x1F00, + NULL, HFILL } + }, + { &hf_cc2400_fsmstate_reserved_7_5, + { "Reserved [7:5]", "ubertooth.register.value.fsmstate.reserved.7_5", + FT_UINT16, BASE_DEC, NULL, 0x00E0, + NULL, HFILL } + }, + { &hf_cc2400_fsmstate_fsm_cur_state, + { "Current state of the finite state machine", "ubertooth.register.value.fsmstate.fsm_cur_state", + FT_UINT16, BASE_DEC, NULL, 0x001F, + NULL, HFILL } + }, + { &hf_cc2400_adctst_reserved_15, + { "Reserved [15]", "ubertooth.register.value.adctst.reserved.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_adctst_adc_i, + { "Current ADC I-branch value", "ubertooth.register.value.adctst.adc_i", + FT_UINT16, BASE_DEC, NULL, 0x7F00, + NULL, HFILL } + }, + { &hf_cc2400_adctst_reserved_7, + { "Reserved [7]", "ubertooth.register.value.adctst.reserved.7", + FT_BOOLEAN, 16, NULL, 0x0080, + NULL, HFILL } + }, + { &hf_cc2400_adctst_adc_q, + { "Current ADC Q-branch value", "ubertooth.register.value.adctst.adc_q", + FT_UINT16, BASE_DEC, NULL, 0x007F, + NULL, HFILL } + }, + { &hf_cc2400_rxbpftst_reserved, + { "Reserved [15]", "ubertooth.register.value.rxbpftst.reserved.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_rxbpftst_rxbpf_cap_oe, + { "RX band-pass filter capacitance calibration override enable", "ubertooth.register.value.rxbpftst.rxbpf_cap_oe", + FT_BOOLEAN, 16, NULL, 0x4000, + NULL, HFILL } + }, + { &hf_cc2400_rxbpftst_rxbpf_cap_o, + { "RX band-pass filter capacitance calibration override value", "ubertooth.register.value.rxbpftst.rxbpf_cap_o", + FT_UINT16, BASE_DEC, NULL, 0x3F80, + NULL, HFILL } + }, + { &hf_cc2400_rxbpftst_rxbpf_cap_res, + { "RX band-pass filter capacitance calibration result", "ubertooth.register.value.rxbpftst.rxbpf_cap_res", + FT_UINT16, BASE_DEC, NULL, 0x007F, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_reserved_15_13, + { "Reserved [15:13]", "ubertooth.register.value.pamtst.reserved.15_13", + FT_UINT16, BASE_DEC, NULL, 0xE000, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_vc_in_test_en, + { "VC in Test En", "ubertooth.register.value.pamtst.vc_in_test_en", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_atestmod_pd, + { "Power down of the analog test module", "ubertooth.register.value.pamtst.atestmod_pd", + FT_BOOLEAN, 16, NULL, 0x0800, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_atestmod_mode, + { "Function of the Analog Test Module", "ubertooth.register.value.pamtst.atestmod_mode", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_pamtst_atestmod_mode_vals_ext, 0x0700, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_reserved_7, + { "Reserved [7]", "ubertooth.register.value.pamtst.reserved.7", + FT_BOOLEAN, 16, NULL, 0x0080, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_txmix_cap_array, + { "Varactor array settings in the transmit mixers", "ubertooth.register.value.pamtst.txmix_cap_array", + FT_UINT16, BASE_DEC, NULL, 0x0060, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_txmix_current, + { "Transmit Mixers Current", "ubertooth.register.value.pamtst.txmix_current", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_pamtst_txmix_current_vals_ext, 0x0018, + NULL, HFILL } + }, + { &hf_cc2400_pamtst_pa_current, + { "Power Amplifier Current", "ubertooth.register.value.pamtst.pa_current", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_pamtst_pa_current_vals_ext, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_reserved, + { "Reserved [15:14]", "ubertooth.register.value.lmtst.reserved.15_14", + FT_UINT16, BASE_DEC, NULL, 0xC000, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_rxmix_hgm, + { "Receiver Mixers High Gain Mode Enable", "ubertooth.register.value.lmtst.rxmix_hgm", + FT_BOOLEAN, 16, NULL, 0x2000, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_rxmix_tail, + { "Receiver Mixers Output Current", "ubertooth.register.value.lmtst.rxmix_tail", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_rxmix_tail_vals_ext, 0x1800, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_rxmix_vcm, + { "Controls VCM level in the mixer feedback loop", "ubertooth.register.value.lmtst.rxmix_vcm", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_rxmix_vcm_vals_ext, 0x0600, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_rxmix_current, + { "Controls current in the mixer", "ubertooth.register.value.lmtst.rxmix_current", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_rxmix_current_vals_ext, 0x0180, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_lna_cap_array, + { "Varactor array setting in the LNA", "ubertooth.register.value.lmtst.lna_cap_array", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_lna_cap_array_vals_ext, 0x0060, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_lna_lowgain, + { "Low gain mode of the LNA", "ubertooth.register.value.lmtst.lna_lowgain", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_lna_lowgain_vals_ext, 0x0010, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_lna_gain, + { "Controls current in the LNA gain compensation branch", "ubertooth.register.value.lmtst.lna_gain", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_lna_gain_vals_ext, 0x000C, + NULL, HFILL } + }, + { &hf_cc2400_lmtst_lna_current, + { "Main current in the LNA", "ubertooth.register.value.lmtst.lna_current", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_lna_current_vals_ext, 0x003, + NULL, HFILL } + }, + { &hf_cc2400_manor_vga_reset_n, + { "No VGA Reset", "ubertooth.register.value.manor.vga_reset_n", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_manor_lock_status, + { "Lock Status", "ubertooth.register.value.manor.lock_status", + FT_BOOLEAN, 16, NULL, 0x4000, + NULL, HFILL } + }, + { &hf_cc2400_manor_balun_ctrl, + { "Balun Control", "ubertooth.register.value.manor.balun_ctrl", + FT_BOOLEAN, 16, NULL, 0x2000, + NULL, HFILL } + }, + { &hf_cc2400_manor_rxtx, + { "RxTx", "ubertooth.register.value.manor.rxtx", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_manor_pre_pd, + { "Power Down of Prescaler", "ubertooth.register.value.manor.pre_pd", + FT_BOOLEAN, 16, NULL, 0x0800, + NULL, HFILL } + }, + { &hf_cc2400_manor_pa_n_pd, + { "Power Down of Power Amplifier (negative path)", "ubertooth.register.value.manor.pa_n_pd", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_manor_pa_p_pd, + { "Power Down of Power Amplifier (positive path)", "ubertooth.register.value.manor.pa_p_pd", + FT_BOOLEAN, 16, NULL, 0x0200, + NULL, HFILL } + }, + { &hf_cc2400_manor_dac_lpf_pd, + { "Power Down of Tx DAC", "ubertooth.register.value.manor.dac_lpf_pd", + FT_BOOLEAN, 16, NULL, 0x0100, + NULL, HFILL } + }, + { &hf_cc2400_manor_bias_pd, + { "Power Down control of global bias generator + XOSC clock buffer", "ubertooth.register.value.manor.bias_pd", + FT_BOOLEAN, 16, NULL, 0x0080, + NULL, HFILL } + }, + { &hf_cc2400_manor_xosc16m_pd, + { "Power Down control of 16 MHz XOSC core", "ubertooth.register.value.manor.xosc16m_pd", + FT_BOOLEAN, 16, NULL, 0x0040, + NULL, HFILL } + }, + { &hf_cc2400_manor_chp_pd, + { "Power Down control of Charge Pump", "ubertooth.register.value.manor.chp_pd", + FT_BOOLEAN, 16, NULL, 0x0020, + NULL, HFILL } + }, + { &hf_cc2400_manor_fs_pd, + { "Power Down control of VCO, I/Q generator, LO buffers", "ubertooth.register.value.manor.fs_pd", + FT_BOOLEAN, 16, NULL, 0x0010, + NULL, HFILL } + }, + { &hf_cc2400_manor_adc_pd, + { "Power Down control of the ADC", "ubertooth.register.value.manor.adc_pd", + FT_BOOLEAN, 16, NULL, 0x0008, + NULL, HFILL } + }, + { &hf_cc2400_manor_vga_pd, + { "Power Down control of the VGA", "ubertooth.register.value.manor.vga_pd", + FT_BOOLEAN, 16, NULL, 0x0004, + NULL, HFILL } + }, + { &hf_cc2400_manor_rxbpf_pd, + { "Power Down control of complex band-pass receive filter", "ubertooth.register.value.manor.rxbpf_pd", + FT_BOOLEAN, 16, NULL, 0x0002, + NULL, HFILL } + }, + { &hf_cc2400_manor_lnamix_pd, + { "Power Down control of LNA, down-conversion mixers and front-end bias", "ubertooth.register.value.manor.lnamix_pd", + FT_BOOLEAN, 16, NULL, 0x0001, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst0_reserved, + { "Reserved [15:14]", "ubertooth.register.value.mdmtst0.reserved.15_14", + FT_UINT16, BASE_DEC, NULL, 0xC000, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst0_tx_prng, + { "Tx PRNG", "ubertooth.register.value.mdmtst0.tx_prng", + FT_BOOLEAN, 16, NULL, 0x2000, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst0_tx_1mhz_offset_n, + { "Tx No 1MHz Offset", "ubertooth.register.value.mdmtst0.tx_1mhz_offset_n", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst0_invert_data, + { "Invert Data", "ubertooth.register.value.mdmtst0.invert_data", + FT_BOOLEAN, 16, NULL, 0x0800, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst0_afc_adjust_on_packet, + { "AFC Adjust on Packet", "ubertooth.register.value.mdmtst0.afc_adjust_on_packet", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst0_afc_settling, + { "AFC Settling", "ubertooth.register.value.mdmtst0.afc_settling", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_mdmtst0_afc_settling_vals_ext, 0x0300, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst0_afc_delta, + { "AFC Delta", "ubertooth.register.value.mdmtst0.afc_delta", + FT_UINT16, BASE_DEC, NULL, 0x00FF, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst1_reserved, + { "Reserved [15:7]", "ubertooth.register.value.mdmtst1.reserved.15_7", + FT_UINT16, BASE_DEC, NULL, 0xFF80, + NULL, HFILL } + }, + { &hf_cc2400_mdmtst1_bsync_threshold, + { "B-Sync Threshold", "ubertooth.register.value.mdmtst1.bsync_threshold", + FT_UINT16, BASE_DEC, NULL, 0x07F, + NULL, HFILL } + }, + { &hf_cc2400_dactst_reserved, + { "Reserved [15]", "ubertooth.register.value.dactst.reserved.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_dactst_dac_src, + { "DAC Source", "ubertooth.register.value.dactst.dac_src", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_dactst_dac_src_vals_ext, 0x7000, + NULL, HFILL } + }, + { &hf_cc2400_dactst_dac_i_o, + { "I-branch DAC Override Value", "ubertooth.register.value.dactst.dac_i_o", + FT_UINT16, BASE_DEC, NULL, 0x0FC0, + NULL, HFILL } + }, + { &hf_cc2400_dactst_dac_q_o, + { "Q-branch DAC Override Value", "ubertooth.register.value.dactst.dac_q_o", + FT_UINT16, BASE_DEC, NULL, 0x003F, + NULL, HFILL } + }, + { &hf_cc2400_agctst0_agc_settle_blank_dn, + { "AGC Settle Blank Down", "ubertooth.register.value.agctst0.agc_settle_blank_down", + FT_UINT16, BASE_DEC, NULL, 0xE000, + "Duration of blanking signal in 8 MHz clock cycles", HFILL } + }, + { &hf_cc2400_agctst0_agc_win_size, + { "AGC Window Size", "ubertooth.register.value.agctst0.agc_win_size", + FT_UINT16, BASE_DEC, NULL, 0x1800, + NULL, HFILL } + }, + { &hf_cc2400_agctst0_agc_settle_peak, + { "AGC Settle Peak Period", "ubertooth.register.value.agctst0.agc_settle_peak", + FT_UINT16, BASE_DEC, NULL, 0x0780, + NULL, HFILL } + }, + { &hf_cc2400_agctst0_agc_settle_adc, + { "AGC Settle ADC Period", "ubertooth.register.value.agctst0.agc_settle_adc", + FT_UINT16, BASE_DEC, NULL, 0x0078, + NULL, HFILL } + }, + { &hf_cc2400_agctst0_agc_attempts, + { "AGC Attempts", "ubertooth.register.value.agctst0.agc_attempts", + FT_UINT16, BASE_DEC, NULL, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_agctst1_reserved, + { "Reserved [15]", "ubertooth.register.value.agctst1.reserved.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_agctst1_agc_var_gain_sat, + { "AGC Variable Gain Stage", "ubertooth.register.value.agctst1.agc_var_gain_sat", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_agctst1_agc_var_gain_sat_vals_ext, 0x4000, + NULL, HFILL } + }, + { &hf_cc2400_agctst1_agc_settle_blank_up, + { "AGC Settle Bank Up", "ubertooth.register.value.agctst1.agc_settle_blank_up", + FT_UINT16, BASE_DEC, NULL, 0x3800, + "Duration of blanking signal in 8 MHz clock cycles", HFILL } + }, + { &hf_cc2400_agctst1_peakdet_cur_boost, + { "Current Peak Detectors Boost", "ubertooth.register.value.agctst1.peakdet_cur_boost", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_agctst1_agc_mult_slow, + { "AGC Timing Multiplier Slow Mode", "ubertooth.register.value.agctst1.agc_mult_slow", + FT_UINT16, BASE_DEC, NULL, 0x03C0, + NULL, HFILL } + }, + { &hf_cc2400_agctst1_agc_settle_fixed, + { "AGC Settling Period Fixed Gain Step", "ubertooth.register.value.agctst1.agc_settle_fixed", + FT_UINT16, BASE_DEC, NULL, 0x003C, + NULL, HFILL } + }, + { &hf_cc2400_agctst1_agc_settle_var, + { "AGC Settling Period Variable Gain Step", "ubertooth.register.value.agctst1.agc_settle_var", + FT_UINT16, BASE_DEC, NULL, 0x0003, + NULL, HFILL } + }, + { &hf_cc2400_agctst2_reserved, + { "Reserved [15:14]", "ubertooth.register.value.agctst2.reserved.15_14", + FT_UINT16, BASE_DEC, NULL, 0xC000, + NULL, HFILL } + }, + { &hf_cc2400_agctst2_agc_backend_blanking, + { "AGC Backend Blanking", "ubertooth.register.value.agctst2.agc_backend_blanking", + FT_UINT16, BASE_DEC, NULL, 0x3000, + NULL, HFILL } + }, + { &hf_cc2400_agctst2_agc_adjust_m3db, + { "AGC Adjust -3db", "ubertooth.register.value.agctst2.agc_adjust_m3db", + FT_UINT16, BASE_DEC, NULL, 0x0E00, + NULL, HFILL } + }, + { &hf_cc2400_agctst2_agc_adjust_m1db, + { "AGC Adjust -1db", "ubertooth.register.value.agctst2.agc_adjust_m1db", + FT_UINT16, BASE_DEC, NULL, 0x01C0, + NULL, HFILL } + }, + { &hf_cc2400_agctst2_agc_adjust_p3db, + { "AGC Adjust +3db", "ubertooth.register.value.agctst2.agc_adjust_p3db", + FT_UINT16, BASE_DEC, NULL, 0x0038, + NULL, HFILL } + }, + { &hf_cc2400_agctst2_agc_adjust_p1db, + { "AGC Adjust +1db", "ubertooth.register.value.agctst2.agc_adjust_p1db", + FT_UINT16, BASE_DEC, NULL, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_fstst0_rxmixbuf_cur, + { "Rx Mixer Buffer Bias Current", "ubertooth.register.value.fstst0.rxmixbuf_cur", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst0_rxtxmixbuf_cur_vals_ext, 0xC000, + NULL, HFILL } + }, + { &hf_cc2400_fstst0_txmixbuf_cur, + { "TX Mixer Buffer Bias Current", "ubertooth.register.value.fstst0.txmixbuf_cur", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst0_rxtxmixbuf_cur_vals_ext, 0x3000, + NULL, HFILL } + }, + { &hf_cc2400_fstst0_vco_array_settle_long, + { "Voltage Controlled Oscillator Array Settle Long", "ubertooth.register.value.fstst0.vco_array_settle_lon", + FT_BOOLEAN, 16, NULL, 0x0800, + NULL, HFILL } + }, + { &hf_cc2400_fstst0_vco_array_oe, + { "Voltage Controlled Oscillator Array Manual Override Enable", "ubertooth.register.value.fstst0.vco_array_oe", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_fstst0_vco_array_o, + { "Voltage Controlled Oscillator Array Override Value", "ubertooth.register.value.fstst0.vco_array_o", + FT_UINT16, BASE_DEC, NULL, 0x03E0, + NULL, HFILL } + }, + { &hf_cc2400_fstst0_vco_array_res, + { "Resulting VCO Array Setting from Last Calibration", "ubertooth.register.value.fstst0.vco_array_res", + FT_UINT16, BASE_DEC, NULL, 0x001F, + NULL, HFILL } + }, + { &hf_cc2400_fstst1_rxbpf_locur, + { "Rx Band-pass Filters LO Bias Current", "ubertooth.register.value.fstst1.rxbpf_locur", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst1_rxbpf_locur_vals_ext, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_fstst1_rxbpf_midcur, + { "Rx Band-pass Filters MID Bias Current", "ubertooth.register.value.fstst1.rxbpf_midcur", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst1_rxbpf_midcur_vals_ext, 0x4000, + NULL, HFILL } + }, + { &hf_cc2400_fstst1_vco_current_ref, + { "VCO Current Reference", "ubertooth.register.value.fstst1.vco_current_ref", + FT_UINT16, BASE_DEC, NULL, 0x3C00, + NULL, HFILL } + }, + { &hf_cc2400_fstst1_vco_current_k, + { "VCO Current Calibration Constant", "ubertooth.register.value.fstst1.vco_current_k", + FT_UINT16, BASE_DEC, NULL, 0x03F0, + NULL, HFILL } + }, + { &hf_cc2400_fstst1_vc_dac_en, + { "VCO Source", "ubertooth.register.value.fstst1.vc_dac_en", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst1_vc_dac_en_vals_ext, 0x0008, + NULL, HFILL } + }, + { &hf_cc2400_fstst1_vc_dac_val, + { "VCO DAC Output Value", "ubertooth.register.value.fstst1.vc_dac_val", + FT_UINT16, BASE_DEC, NULL, 0x0007, + NULL, HFILL } + }, + { &hf_cc2400_fstst2_reserved, + { "Reserved [15]", "ubertooth.register.value.fstst2.reserved.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_fstst2_vco_curcal_speed, + { "Voltage Controlled Oscillator Current Calibration", "ubertooth.register.value.fstst2.vco_curcal_speed", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst2_vco_curcal_speed_vals_ext, 0x6000, + NULL, HFILL } + }, + { &hf_cc2400_fstst2_vco_current_oe, + { "Voltage Controlled Oscillator Current Manual Override Enable", "ubertooth.register.value.fstst2.vco_current_oe", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_fstst2_vco_current_o, + { "Voltage Controlled Oscillator Current Override Value", "ubertooth.register.value.fstst2.vco_current_o", + FT_UINT16, BASE_DEC, NULL, 0x0FC0, + NULL, HFILL } + }, + { &hf_cc2400_fstst2_vco_current_res, + { "Resulting VCO Current Setting from Last Calibration", "ubertooth.register.value.fstst2.vco_current_res", + FT_UINT16, BASE_DEC, NULL, 0x003F, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_reserved, + { "Reserved [15:14]", "ubertooth.register.value.fstst3.reserved.15_14", + FT_UINT16, BASE_DEC, NULL, 0xC000, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_chp_test_up, + { "Charge Pump Test Up", "ubertooth.register.value.fstst3.chp_test_up", + FT_BOOLEAN, 16, NULL, 0x2000, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_chp_test_dn, + { "Charge Pump Test Down", "ubertooth.register.value.fstst3.chp_test_down", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_chp_disable, + { "Charge Pump Disable", "ubertooth.register.value.fstst3.chp_disable", + FT_BOOLEAN, 16, NULL, 0x0800, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_pd_delay, + { "Phase Detector Delay", "ubertooth.register.value.fstst3.pd_delay", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst3_pd_delay_vals_ext, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_chp_step_period, + { "Charge Pump Step Period", "ubertooth.register.value.fstst3.chp_step_period", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_fstst3_chp_step_period_vals_ext, 0x0300, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_stop_chp_current, + { "Stop Charge Pump Current", "ubertooth.register.value.fstst3.stop_chp_current", + FT_UINT16, BASE_DEC, NULL, 0x00F0, + NULL, HFILL } + }, + { &hf_cc2400_fstst3_start_chp_current, + { "Start Charge Pump Current", "ubertooth.register.value.fstst3.start_chp_current", + FT_UINT16, BASE_DEC, NULL, 0x000F, + NULL, HFILL } + }, + + { &hf_cc2400_manfidl_partnum, + { "Part Number [3:0]", "ubertooth.register.value.manfidl.partnum", + FT_UINT16, BASE_DEC, NULL, 0xF000, + NULL, HFILL } + }, + { &hf_cc2400_manfidl_manfid, + { "Manufacturer ID", "ubertooth.register.value.manfidl.manfid", + FT_UINT16, BASE_HEX, NULL, 0x0FFF, + NULL, HFILL } + }, + { &hf_cc2400_manfidh_version, + { "Version", "ubertooth.register.value.manfidh.version", + FT_UINT16, BASE_DEC, NULL, 0xF000, + NULL, HFILL } + }, + { &hf_cc2400_manfidh_partnum, + { "Part Number [15:4]", "ubertooth.register.value.manfidh.partnum", + FT_UINT16, BASE_DEC, NULL, 0x0FFF, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_reserved, + { "Reserved [15]", "ubertooth.register.value.grmdm.reserved.15", + FT_BOOLEAN, 16, NULL, 0x8000, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_sync_errbits_allowed, + { "Sync Error Bits Allowed", "ubertooth.register.value.grmdm.sync_errbits_allowed", + FT_UINT16, BASE_DEC, NULL, 0x6000, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_pin_mode, + { "PIN Mode", "ubertooth.register.value.grmdm.pin_mode", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_grmdm_pin_mode_vals_ext, 0x1800, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_packet_mode, + { "Packet Mode", "ubertooth.register.value.grmdm.packet_mode", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_pre_bytes, + { "Preamble Bytes", "ubertooth.register.value.grmdm.pre_bytes", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_grmdm_pre_bytes_vals_ext, 0x0380, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_sync_word_size, + { "Sync Word Size", "ubertooth.register.value.grmdm.sync_word_size", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_grmdm_sync_word_size_vals_ext, 0x0060, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_crc_on, + { "CRC On", "ubertooth.register.value.grmdm.crc_on", + FT_BOOLEAN, 16, NULL, 0x0010, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_data_format, + { "Data Format", "ubertooth.register.value.grmdm.data_format", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_grmdm_data_format_vals_ext, 0x000C, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_modulation_format, + { "Modulation Format", "ubertooth.register.value.grmdm.modulation_format", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_grmdm_modulation_format_vals_ext, 0x0002, + NULL, HFILL } + }, + { &hf_cc2400_grmdm_tx_gaussian_filter, + { "Tx Gaussian Filter", "ubertooth.register.value.grmdm.tx_gaussian_filter", + FT_BOOLEAN, 16, NULL, 0x0001, + NULL, HFILL } + }, + { &hf_cc2400_grdec_reserved, + { "Reserved [15:13]", "ubertooth.register.value.grdec.reserved.15_13", + FT_UINT16, BASE_DEC, NULL, 0xE000, + NULL, HFILL } + }, + { &hf_cc2400_grdec_ind_saturation, + { "Ind Saturation", "ubertooth.register.value.grdec.ind_saturation", + FT_BOOLEAN, 16, NULL, 0x1000, + NULL, HFILL } + }, + { &hf_cc2400_grdec_dec_shift, + { "Decimation Shift", "ubertooth.register.value.grdec.dec_shift", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_grdec_dec_shift_vals_ext, 0x0C00, + NULL, HFILL } + }, + { &hf_cc2400_grdec_channel_dec, + { "Channel Decimation", "ubertooth.register.value.grdec.channel_dec", + FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_grdec_channel_dec_vals_ext, 0x0300, + NULL, HFILL } + }, + { &hf_cc2400_grdec_dec_val, + { "Decimation Value", "ubertooth.register.value.grdec.dec_val", + FT_UINT16, BASE_DEC, NULL, 0x00FF, + NULL, HFILL } + }, + { &hf_cc2400_pktstatus_reserved_15_11, + { "Reserved [15:11]", "ubertooth.register.value.pktstatus.reserved.15_11", + FT_UINT16, BASE_DEC, NULL, 0xF800, + NULL, HFILL } + }, + { &hf_cc2400_pktstatus_sync_word_received, + { "Sync Word Received", "ubertooth.register.value.pktstatus.sync_word_received", + FT_BOOLEAN, 16, NULL, 0x0400, + NULL, HFILL } + }, + { &hf_cc2400_pktstatus_crc_ok, + { "CRC OK", "ubertooth.register.value.pktstatus.crc_ok", + FT_BOOLEAN, 16, NULL, 0x0200, + NULL, HFILL } + }, + { &hf_cc2400_pktstatus_reserved_8, + { "Reserved [8]", "ubertooth.register.value.pktstatus.reserved.8", + FT_BOOLEAN, 16, NULL, 0x0100, + NULL, HFILL } + }, + { &hf_cc2400_pktstatus_reserved_7_0, + { "Reserved [7:0]", "ubertooth.register.value.pktstatus.reserved.7_0", + FT_UINT16, BASE_DEC, NULL, 0x00FF, + NULL, HFILL } + }, }; static ei_register_info ei[] = { @@ -1281,7 +3289,9 @@ proto_register_ubertooth(void) &ett_command, &ett_usb_rx_packet, &ett_usb_rx_packet_data, - &ett_entry + &ett_entry, + &ett_register_value, + &ett_fsdiv_frequency }; command_info = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope()); |