aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-bthci_evt.c32
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.cpp6
2 files changed, 37 insertions, 1 deletions
diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c
index de94562675..9795aa9ad4 100644
--- a/epan/dissectors/packet-bthci_evt.c
+++ b/epan/dissectors/packet-bthci_evt.c
@@ -889,6 +889,7 @@ dissect_bthci_evt_connect_complete(tvbuff_t *tvb, int offset, packet_info *pinfo
proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
status = tvb_get_guint8(tvb, offset);
+ send_hci_summary_status_tap(status, pinfo, bluetooth_data);
offset += 1;
connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
@@ -1704,6 +1705,7 @@ dissect_bthci_evt_command_status(tvbuff_t *tvb, int offset, packet_info *pinfo,
tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE;
tap_hci_summary->ogf = ogf;
tap_hci_summary->ocf = opcode & 0x03ff;
+ tap_hci_summary->event = 0x0f; /* Command Status */
if (try_val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext))
tap_hci_summary->name = val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x");
else
@@ -2324,6 +2326,25 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
if (out_opcode)
*out_opcode = opcode;
+ if (have_tap_listener(bluetooth_hci_summary_tap)) {
+ bluetooth_hci_summary_tap_t *tap_hci_summary;
+
+ tap_hci_summary = wmem_new(wmem_packet_scope(), bluetooth_hci_summary_tap_t);
+
+ tap_hci_summary->interface_id = bluetooth_data->interface_id;
+ tap_hci_summary->adapter_id = bluetooth_data->adapter_id;
+
+ tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE;
+ tap_hci_summary->ogf = ogf;
+ tap_hci_summary->ocf = opcode & 0x03ff;
+ tap_hci_summary->event = 0x0e; /* Command Complete */
+ if (try_val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext))
+ tap_hci_summary->name = val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x");
+ else
+ tap_hci_summary->name = NULL;
+ tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
+ }
+
interface_id = bluetooth_data->interface_id;
adapter_id = bluetooth_data->adapter_id;
frame_number = pinfo->num;
@@ -3259,6 +3280,17 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
offset += 2;
break;
+ case 0x100b: /* Read Local Supported Codecs */
+ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
+ status = tvb_get_guint8(tvb, offset);
+ send_hci_summary_status_tap(status, pinfo, bluetooth_data);
+ offset += 1;
+
+/* TODO: Implement */
+ proto_tree_add_expert(tree, pinfo, &ei_event_undecoded, tvb, offset, tvb_captured_length_remaining(tvb, offset));
+ offset += tvb_reported_length_remaining(tvb, offset);
+
+ break;
case 0x1007: /* Read Country Code */
proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
diff --git a/ui/qt/bluetooth_hci_summary_dialog.cpp b/ui/qt/bluetooth_hci_summary_dialog.cpp
index db479190c4..fffe12a449 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.cpp
+++ b/ui/qt/bluetooth_hci_summary_dialog.cpp
@@ -371,8 +371,10 @@ gboolean BluetoothHciSummaryDialog::tapPacket(void *tapinfo_ptr, packet_info *pi
for (int i_item = 0; i_item < main_item->childCount(); i_item +=1) {
if (main_item->child(i_item)->text(column_number_opcode) == QString("").sprintf("0x%04X", tap_hci->ogf << 10 | tap_hci->ocf)) {
item = main_item->child(i_item);
- if (tap_hci->type == BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE && tap_hci->name)
+ if (tap_hci->type == BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE && tap_hci->name) {
item->setText(column_number_name, tap_hci->name);
+ item->setText(column_number_occurrence, QString::number(item->text(column_number_occurrence).toInt() - 1));
+ }
break;
}
}
@@ -410,6 +412,8 @@ gboolean BluetoothHciSummaryDialog::tapPacket(void *tapinfo_ptr, packet_info *pi
frame_item->setText(column_number_ogf, QString("").sprintf("0x%02X", tap_hci->ogf));
frame_item->setText(column_number_ocf, QString("").sprintf("0x%04X", tap_hci->ocf));
frame_item->setText(column_number_opcode, QString("").sprintf("0x%04X", tap_hci->ogf << 10 | tap_hci->ocf));
+ if (tap_hci->type == BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE)
+ frame_item->setText(column_number_event, QString("").sprintf("0x%02X", tap_hci->event));
item->addChild(frame_item);
item_data = wmem_new(wmem_file_scope(), item_data_t);