aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Møller Madsen <almomadk@gmail.com>2017-02-05 16:03:34 +0100
committerAnders Broman <a.broman58@gmail.com>2017-02-07 05:28:22 +0000
commit6e761f0ac00395ed8c964ac0414e0dc704f54d23 (patch)
tree17ff1f824300b8e720ef45845768a55abeb64375
parent1ec2a69c8a133d1f524bd146bbf3d9814bd62077 (diff)
Add dissection of Bluetooth 5.0 AE related HCI commands
Added the following batch of HCI commands: LE Read Maximum Advertising Data Length LE Read Number of Supported Advertising Sets LE Remove Advertising Set LE Set Periodic Advertising Data LE Set Periodic Advertising Enable LE Set Extended Scan Parameters LE Set Extended Scan Enable LE Extended Create Connection Corrected min/max interval field sizes of LE Set Extended Advertising Parameters command and updated LE Set Extended Advertising Enable command to use subtree for each set. Change-Id: Id9c08189a76a0a4adc89b669b50d832f68a929aa Signed-off-by: Allan Møller Madsen <almomadk@gmail.com> Reviewed-on: https://code.wireshark.org/review/19958 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-bthci_cmd.c387
-rw-r--r--epan/dissectors/packet-bthci_evt.c32
2 files changed, 386 insertions, 33 deletions
diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c
index 2266fec4fd..0d0908f679 100644
--- a/epan/dissectors/packet-bthci_cmd.c
+++ b/epan/dissectors/packet-bthci_cmd.c
@@ -352,8 +352,20 @@ static int hf_bthci_cmd_le_peer_irk = -1;
static int hf_bthci_cmd_le_local_irk = -1;
static int hf_bthci_cmd_le_address_resolution_enable = -1;
static int hf_bthci_cmd_le_rpa_timeout = -1;
+static int hf_bthci_cmd_advertising_ext_interval_min = -1;
+static int hf_bthci_cmd_advertising_ext_interval_max = -1;
static int hf_bthci_cmd_advertising_handle = -1;
-static int hf_bthci_cmd_advertising_event_properties = -1;
+static int hf_bthci_cmd_advertising_properties = -1;
+static int hf_bthci_cmd_advertising_properties_reserved = -1;
+static int hf_bthci_cmd_advertising_properties_connectable = -1;
+static int hf_bthci_cmd_advertising_properties_scannable = -1;
+static int hf_bthci_cmd_advertising_properties_directed = -1;
+static int hf_bthci_cmd_advertising_properties_hdc_connectable_directed = -1;
+static int hf_bthci_cmd_advertising_properties_legacy_adv = -1;
+static int hf_bthci_cmd_advertising_properties_anonymous_adv = -1;
+static int hf_bthci_cmd_advertising_properties_incl_txpower = -1;
+static int hf_bthci_cmd_periodic_advertising_properties = -1;
+static int hf_bthci_cmd_periodic_advertising_properties_reserved = -1;
static int hf_bthci_cmd_primary_advertising_phy = -1;
static int hf_bthci_cmd_sec_adv_max_skip = -1;
static int hf_bthci_cmd_secondary_advertising_phy = -1;
@@ -361,6 +373,7 @@ static int hf_bthci_cmd_advertising_sid = -1;
static int hf_bthci_cmd_scan_req_notif_en = -1;
static int hf_bthci_cmd_le_adv_data_operation = -1;
static int hf_bthci_cmd_le_adv_data_frag_pref = -1;
+static int hf_bthci_cmd_le_adv_set = -1;
static int hf_bthci_cmd_le_adv_en_sets = -1;
static int hf_bthci_cmd_le_adv_duration = -1;
static int hf_bthci_cmd_le_adv_max_extended_events = -1;
@@ -379,7 +392,19 @@ static int hf_bthci_cmd_phy_options_coding =-1;
static int hf_bthci_cmd_phy_options_reserved =- 1;
static int hf_bthci_cmd_phy = -1;
static int hf_bthci_cmd_modulation_index = -1;
-
+static int hf_bthci_cmd_le_scan_phys = -1;
+static int hf_bthci_cmd_le_scan_phys_reserved = -1;
+static int hf_bthci_cmd_le_scan_phys_le_coded = -1;
+static int hf_bthci_cmd_le_scan_phys_le_1m = -1;
+static int hf_bthci_cmd_le_scan_phy_param = -1;
+static int hf_bthci_cmd_le_scan_duration = -1;
+static int hf_bthci_cmd_le_scan_period = -1;
+static int hf_bthci_cmd_le_init_phys = -1;
+static int hf_bthci_cmd_le_phys_reserved = -1;
+static int hf_bthci_cmd_le_phys_le_coded = -1;
+static int hf_bthci_cmd_le_phys_le_2m = -1;
+static int hf_bthci_cmd_le_phys_le_1m = -1;
+static int hf_bthci_cmd_le_init_phy_param = -1;
static const int *hfx_bthci_cmd_le_event_mask[] = {
&hf_bthci_cmd_le_event_mask_le_reserved,
@@ -398,6 +423,24 @@ static const int *hfx_bthci_cmd_le_event_mask[] = {
NULL
};
+static const int *hfx_bthci_cmd_adv_properties[] = {
+ &hf_bthci_cmd_advertising_properties_reserved,
+ &hf_bthci_cmd_advertising_properties_incl_txpower,
+ &hf_bthci_cmd_advertising_properties_anonymous_adv,
+ &hf_bthci_cmd_advertising_properties_legacy_adv,
+ &hf_bthci_cmd_advertising_properties_hdc_connectable_directed,
+ &hf_bthci_cmd_advertising_properties_directed,
+ &hf_bthci_cmd_advertising_properties_scannable,
+ &hf_bthci_cmd_advertising_properties_connectable,
+ NULL
+};
+
+static const int *hfx_bthci_cmd_periodic_adv_properties[] = {
+ &hf_bthci_cmd_periodic_advertising_properties_reserved,
+ &hf_bthci_cmd_advertising_properties_incl_txpower,
+ NULL
+};
+
static const int *hfx_btcmd_all_phys[] = {
&hf_bthci_cmd_all_phys_reserved,
&hf_bthci_cmd_all_phys_rx_pref,
@@ -419,6 +462,21 @@ static const int *hfx_btcmd_phy_options[] = {
NULL
};
+static const int *hfx_btcmd_le_scan_phys[] = {
+ &hf_bthci_cmd_le_scan_phys_reserved,
+ &hf_bthci_cmd_le_scan_phys_le_coded,
+ &hf_bthci_cmd_le_scan_phys_le_1m,
+ NULL
+};
+
+static const int *hfx_btcmd_le_phys[] = {
+ &hf_bthci_cmd_le_phys_reserved,
+ &hf_bthci_cmd_le_phys_le_coded,
+ &hf_bthci_cmd_le_phys_le_2m,
+ &hf_bthci_cmd_le_phys_le_1m,
+ NULL
+};
+
static expert_field ei_command_undecoded = EI_INIT;
static expert_field ei_command_unknown_command = EI_INIT;
static expert_field ei_command_parameter_unexpected = EI_INIT;
@@ -433,7 +491,10 @@ static gint ett_cod_mask = -1;
static gint ett_flow_spec_subtree = -1;
static gint ett_le_channel_map = -1;
static gint ett_le_event_mask = -1;
+static gint ett_adv_properties = -1;
+static gint ett_adv_sets = -1;
static gint ett_phys_flags = -1;
+static gint ett_scan_init_phy_param = -1;
static gint proto_btcommon = -1;
static gint hf_btcommon_eir_ad_entry = -1;
@@ -1790,19 +1851,6 @@ static const value_string tds_transport_state_vals[] = {
{0, NULL }
};
-static const value_string cmd_le_primary_advertising_phy[] = {
- { 0x01, "Primary advertisement PHY is LE 1M" },
- { 0x03, "Primary advertisement PHY is LE Coded" },
- { 0, NULL }
-};
-
-static const value_string cmd_le_secondary_advertising_phy[] = {
- { 0x01, "Secondary advertisement PHY is LE 1M" },
- { 0x02, "Secondary advertisement PHY is LE 2M" },
- { 0x03, "Secondary advertisement PHY is LE Coded" },
- { 0, NULL }
-};
-
static const value_string cmd_le_adv_data_operation[] = {
{ 0x00, "Intermediate fragment of fragmented data" },
{ 0x01, "First fragment of fragmented data" },
@@ -3604,22 +3652,22 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
offset++;
break;
- case 0x035: /* LE Set Advertising Set Random Address */
+ case 0x0035: /* LE Set Advertising Set Random Address */
proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset+=1;
offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, FALSE, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
break;
- case 0x036: /* LE Set Extended Advertising Parameters */
+ case 0x0036: /* LE Set Extended Advertising Parameters */
proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset+=1;
- proto_tree_add_item(tree, hf_bthci_cmd_advertising_event_properties, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_advertising_properties, ett_adv_properties, hfx_bthci_cmd_adv_properties, ENC_LITTLE_ENDIAN);
offset+=2;
- item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_min, tvb, offset, 3, ENC_LITTLE_ENDIAN);
- proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ item = proto_tree_add_item(tree, hf_bthci_cmd_advertising_ext_interval_min, tvb, offset, 3, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letoh24(tvb, offset)*0.625);
offset+=3;
- item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_max, tvb, offset, 3, ENC_LITTLE_ENDIAN);
- proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ item = proto_tree_add_item(tree, hf_bthci_cmd_advertising_ext_interval_max, tvb, offset, 3, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letoh24(tvb, offset)*0.625);
offset+=3;
proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_1, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_bthci_cmd_le_advts_channel_map_2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -3646,8 +3694,8 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
offset++;
break;
- case 0x037: /* LE Set Extended Advertising Data */
- case 0x038: /* LE Set Extended Scan Response Data */
+ case 0x0037: /* LE Set Extended Advertising Data */
+ case 0x0038: /* LE Set Extended Scan Response Data */
{
proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset+=1;
@@ -3671,7 +3719,7 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
}
break;
- case 0x039: /* LE Set Extended Advertising Enable */
+ case 0x0039: /* LE Set Extended Advertising Enable */
{
proto_tree_add_item(tree, hf_bthci_cmd_le_advts_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset++;
@@ -3681,12 +3729,149 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
offset++;
for (int i = 0; i< number_of_sets; i++) {
+ sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_le_adv_set, tvb, offset, 4, "Set, Handle: %u", tvb_get_guint8(tvb, offset));
+ sub_tree = proto_item_add_subtree(sub_item, ett_adv_sets);
+ proto_tree_add_item(sub_tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset+=1;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_adv_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*10.0);
+ offset+=2;
+ proto_tree_add_item(sub_tree, hf_bthci_cmd_le_adv_max_extended_events, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset+=1;
+ }
+ }
+ break;
+
+ case 0x003C: /* LE Remove Advertising Set */
+ proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset+=1;
+ break;
+
+ case 0x003E: /* LE Set Periodic Advertising Parameters */
proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset+=1;
- proto_tree_add_item(tree, hf_bthci_cmd_le_adv_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*1.25);
offset+=2;
- proto_tree_add_item(tree, hf_bthci_cmd_le_adv_max_extended_events, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ item = proto_tree_add_item(tree, hf_bthci_cmd_le_advts_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*1.25);
+ offset+=2;
+ proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_periodic_advertising_properties, ett_adv_properties,
+ hfx_bthci_cmd_periodic_adv_properties, ENC_LITTLE_ENDIAN);
+ offset+=2;
+ break;
+
+ case 0x003F: /* LE Set Periodic Advertising Data */
+ {
+ proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset+=1;
+ proto_tree_add_item(tree, hf_bthci_cmd_le_adv_data_operation, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset+=1;
+
+ bluetooth_eir_ad_data_t *ad_data;
+ ad_data = wmem_new0(wmem_packet_scope(), bluetooth_eir_ad_data_t);
+ ad_data->interface_id = bluetooth_data->interface_id;
+ ad_data->adapter_id = bluetooth_data->adapter_id;
+ ad_data->bd_addr = NULL;
+
+ guint8 data_length = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_bthci_cmd_le_data_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, data_length), pinfo, tree, ad_data);
+ save_local_device_name_from_eir_ad(tvb, offset, pinfo, data_length, bluetooth_data);
+ offset += data_length;
+ }
+ break;
+
+ case 0x0040: /* LE Set Periodic Advertising Enable */
+ proto_tree_add_item(tree, hf_bthci_cmd_le_advts_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_bthci_cmd_advertising_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset+=1;
+ break;
+
+ case 0x0041: /* LE Set Extended Scan Parameters */
+ {
+ proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_bthci_cmd_le_scan_filter_policy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ guint8 scanning_phys = tvb_get_guint8(tvb, offset);
+ proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_scan_phys, ett_scan_init_phy_param, hfx_btcmd_le_scan_phys, ENC_NA);
+ offset += 1;
+ for (int i = 1; i < 0x08; i <<=1) {
+ if (scanning_phys & i) {
+ sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_le_scan_phy_param, tvb, offset, 5, "Scanning PHY: %s",
+ val_to_str_const(i, cmd_le_phy_vals, "Unknown"));
+ sub_tree = proto_item_add_subtree(sub_item, ett_scan_init_phy_param);
+ proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ offset+=2;
+ }
+ }
+ }
+ break;
+
+ case 0x0042: /* LE Set Extended Scan Enable */
+ proto_tree_add_item(tree, hf_bthci_cmd_le_scan_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_bthci_cmd_le_filter_dublicates, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ item = proto_tree_add_item(tree, hf_bthci_cmd_le_scan_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*10.0);
+ offset+=2;
+ item = proto_tree_add_item(tree, hf_bthci_cmd_le_scan_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g sec)", tvb_get_letohs(tvb, offset)*1.28);
+ offset+=2;
+ break;
+
+ case 0x0043: /* LE Extended Create Connection */
+ {
+ proto_tree_add_item(tree, hf_bthci_cmd_le_initiator_filter_policy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_bthci_cmd_le_own_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_bthci_cmd_le_peer_address_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ offset = dissect_bd_addr(hf_bthci_cmd_bd_addr, pinfo, tree, tvb, offset, FALSE, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
+ guint8 initiating_phys = tvb_get_guint8(tvb, offset);
+ proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_le_init_phys, ett_scan_init_phy_param, hfx_btcmd_le_phys, ENC_NA);
+ offset += 1;
+ for (int i = 1; i < 0x08; i <<=1) {
+ if (initiating_phys & i) {
+ sub_item = proto_tree_add_none_format(tree, hf_bthci_cmd_le_init_phy_param, tvb, offset, 16, "Initiating PHY: %s",
+ val_to_str_const(i, cmd_le_phy_vals, "Unknown"));
+ sub_tree = proto_item_add_subtree(sub_item, ett_scan_init_phy_param);
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_scan_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_con_interval_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*1.25);
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_con_interval_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*1.25);
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_con_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (number events)");
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g sec)", tvb_get_letohs(tvb, offset)*0.01);
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_min_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ offset+=2;
+ item = proto_tree_add_item(sub_tree, hf_bthci_cmd_le_max_ce_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, " (%g msec)", tvb_get_letohs(tvb, offset)*0.625);
+ offset+=2;
+ }
}
}
break;
@@ -5518,14 +5703,74 @@ proto_register_bthci_cmd(void)
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
- { &hf_bthci_cmd_advertising_event_properties,
- { "Advertising Event Properties", "bthci_cmd.advertising_event_properties",
+ { &hf_bthci_cmd_advertising_ext_interval_min,
+ { "Advertising Interval Min", "bthci_cmd.le_advts_interval_min",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_ext_interval_max,
+ { "Advertising Interval Max", "bthci_cmd.le_advts_interval_max",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties,
+ { "Advertising Event Properties", "bthci_cmd.advertising_properties",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_bthci_cmd_advertising_properties_incl_txpower,
+ { "Include Tx Power", "bthci_cmd.adv_properties.txpower",
+ FT_BOOLEAN, 16, NULL, 0x40,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties_anonymous_adv,
+ { "Anonymous Advertisement", "bthci_cmd.adv_properties.anonymous_adv",
+ FT_BOOLEAN, 16, NULL, 0x20,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties_legacy_adv,
+ { "Use Legacy PDUs", "bthci_cmd.adv_properties.legacy_adv",
+ FT_BOOLEAN, 16, NULL, 0x10,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties_hdc_connectable_directed,
+ { "High Duty Cycle Connectable Directed", "bthci_cmd.adv_properties.hdc_connectable_directed",
+ FT_BOOLEAN, 16, NULL, 0x08,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties_directed,
+ { "Directed", "bthci_cmd.adv_properties.directed",
+ FT_BOOLEAN, 16, NULL, 0x04,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties_scannable,
+ { "Scannable", "bthci_cmd.adv_properties.scannable",
+ FT_BOOLEAN, 16, NULL, 0x02,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties_connectable,
+ { "Connectable", "bthci_cmd.adv_properties.connectable",
+ FT_BOOLEAN, 16, NULL, 0x01,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_advertising_properties_reserved,
+ { "Reserved", "bthci_cmd.adv_properties.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0xFF80,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_periodic_advertising_properties,
+ { "Periodic Advertising Properties", "bthci_cmd.periodic_adv_properties",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_periodic_advertising_properties_reserved,
+ { "Reserved", "bthci_cmd.periodic_adv_properties.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0xFFBF,
+ NULL, HFILL }
+ },
{ &hf_bthci_cmd_primary_advertising_phy,
{ "Primary Advertising PHY", "bthci_cmd.primary_advertising_phy",
- FT_UINT8, BASE_HEX, VALS(cmd_le_primary_advertising_phy), 0x0,
+ FT_UINT8, BASE_HEX, VALS(cmd_le_phy_vals), 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_sec_adv_max_skip,
@@ -5535,7 +5780,7 @@ proto_register_bthci_cmd(void)
},
{ &hf_bthci_cmd_secondary_advertising_phy,
{ "Secondary Advertising PHY", "bthci_cmd.secondary_advertising_phy",
- FT_UINT8, BASE_HEX, VALS(cmd_le_secondary_advertising_phy), 0x0,
+ FT_UINT8, BASE_HEX, VALS(cmd_le_phy_vals), 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_advertising_sid,
@@ -5558,6 +5803,11 @@ proto_register_bthci_cmd(void)
FT_UINT8, BASE_HEX, VALS(cmd_le_adv_data_frag_pref), 0x0,
NULL, HFILL }
},
+ { &hf_bthci_cmd_le_adv_set,
+ { "Advertising Set", "bthci_cmd.le_adv_set",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_bthci_cmd_le_adv_en_sets,
{ "Number of Sets", "bthci_cmd.adv_num_sets",
FT_UINT8, BASE_DEC, NULL, 0x0,
@@ -5647,7 +5897,75 @@ proto_register_bthci_cmd(void)
{ "Modulation Index", "bthci_cmd.modulation_index",
FT_UINT8, BASE_HEX, VALS(cmd_le_modulation_index_vals), 0x0,
NULL, HFILL }
- }
+ },
+ { &hf_bthci_cmd_le_scan_phys,
+ { "Scanning PHYs", "bthci_cmd.le_scan_phys",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_scan_phys_le_1m,
+ { "LE 1M", "bthci_cmd.le_scan_phys.le_1m",
+ FT_BOOLEAN, 8, NULL, 0x1,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_scan_phys_le_coded,
+ { "LE Coded", "bthci_cmd.le_scan_phys.le_coded",
+ FT_BOOLEAN, 8, NULL, 0x4,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_scan_phys_reserved,
+ { "Reserved", "bthci_cmd.le_scan_phys.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xFA,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_scan_phy_param,
+ { "Scanning PHY", "bthci_cmd.le_scan_phy_param",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_scan_duration,
+ { "Duration", "bthci_cmd.scan_duration",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_scan_period,
+ { "Period", "bthci_cmd.scan_period",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_init_phys,
+ { "Initiating PHYs", "bthci_cmd.le_init_phys",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_phys_le_1m,
+ { "LE 1M", "bthci_cmd.le_phys.le_1m",
+ FT_BOOLEAN, 8, NULL, 0x1,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_phys_le_2m,
+ { "LE 2M", "bthci_cmd.le_phys.le_2m",
+ FT_BOOLEAN, 8, NULL, 0x2,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_phys_le_coded,
+ { "LE Coded", "bthci_cmd.le_phys.le_coded",
+ FT_BOOLEAN, 8, NULL, 0x4,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_phys_reserved,
+ { "Reserved", "bthci_cmd.le_phys.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xF8,
+ NULL, HFILL }
+ },
+ { &hf_bthci_cmd_le_init_phy_param,
+ { "Initiating PHY", "bthci_cmd.le_init_phy_param",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+
+
+
};
static ei_register_info ei[] = {
@@ -5664,7 +5982,10 @@ proto_register_bthci_cmd(void)
&ett_flow_spec_subtree,
&ett_le_channel_map,
&ett_le_event_mask,
- &ett_phys_flags
+ &ett_adv_properties,
+ &ett_adv_sets,
+ &ett_phys_flags,
+ &ett_scan_init_phy_param
};
/* Decode As handling */
diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c
index 7ed41b4102..5da1e8d42f 100644
--- a/epan/dissectors/packet-bthci_evt.c
+++ b/epan/dissectors/packet-bthci_evt.c
@@ -418,6 +418,8 @@ static int hf_bthci_evt_le_address_type = -1;
static int hf_bthci_evt_le_rssi = -1;
static int hf_bthci_evt_le_tx_phy = -1;
static int hf_bthci_evt_le_rx_phy = -1;
+static int hf_bthci_evt_max_adv_data_length = -1;
+static int hf_bthci_evt_num_supported_adv_sets = -1;
static const int *hfx_bthci_evt_le_features[] = {
&hf_bthci_evt_le_features_encryption,
@@ -4253,6 +4255,26 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
break;
}
+ case 0x203A: /* LE Read Maximum Advertising Data Length */
+ {
+ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data);
+ offset += 1;
+ proto_tree_add_item(tree, hf_bthci_evt_max_adv_data_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+ break;
+ }
+
+ case 0x203B: /* LE Read Number of Supported Advertising Sets */
+ {
+ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data);
+ offset += 1;
+ proto_tree_add_item(tree, hf_bthci_evt_num_supported_adv_sets, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset += 1;
+ break;
+ }
+
case 0x0441: /* Set Connectionless Slave Broadcast */
case 0x0442: /* Set Connectionless Slave Broadcast Receive */
case 0x0C70: /* Set MWS Signaling */
@@ -7457,6 +7479,16 @@ proto_register_bthci_evt(void)
{ "Rx PHY", "bthci_evt.le_rx_phy",
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
NULL, HFILL }
+ },
+ { &hf_bthci_evt_max_adv_data_length,
+ { "Maximum Advertising Data Length", "bthci_evt.max_adv_data_length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_bthci_evt_num_supported_adv_sets,
+ { "Number of Supported Advertising Sets", "bthci_evt.num_supported_adv_sets",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
}
};