[PATCH v2 4/8] monitor: Decode LE Periodic Advertising Sync Transfer command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



< HCI Command: LE Periodic Advertising Sync Transfer (0x08|0x005a) plen 6
        Connection handle: 1
        Service data: 0x0001
        Sync handle: 1
> HCI Event: Command Status (0x0f) plen 4
      LE Periodic Advertising Sync Transfer (0x08|0x005a) ncmd 1
        Status: Unknown HCI Command (0x01)
---
 monitor/bt.h     |  7 +++++++
 monitor/packet.c | 20 ++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/monitor/bt.h b/monitor/bt.h
index bb373b528..efaf80f55 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2467,6 +2467,13 @@ struct bt_hci_cmd_set_periodic_adv_rec_enable {
 	uint8_t  enable;
 } __attribute__ ((packed));
 
+#define BT_HCI_CMD_PERIODIC_SYNC_TRANS	0x205a
+struct bt_hci_cmd_periodic_sync_trans {
+	uint16_t handle;
+	uint16_t service_data;
+	uint16_t sync_handle;
+} __attribute__ ((packed));
+
 #define BT_HCI_EVT_INQUIRY_COMPLETE		0x01
 struct bt_hci_evt_inquiry_complete {
 	uint8_t  status;
diff --git a/monitor/packet.c b/monitor/packet.c
index e5681b5ff..23eb48374 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -4019,6 +4019,14 @@ static void status_rsp(const void *data, uint8_t size)
 	print_status(status);
 }
 
+static void status_handle_rsp(const void *data, uint8_t size)
+{
+	uint8_t status = *((const uint8_t *) data);
+
+	print_status(status);
+	print_field("Connection handle: %d", get_u8(data + 1));
+}
+
 static void status_bdaddr_rsp(const void *data, uint8_t size)
 {
 	uint8_t status = *((const uint8_t *) data);
@@ -7592,6 +7600,15 @@ static void le_periodic_adv_rec_enable(const void *data, uint8_t size)
 	print_enable("Reporting", cmd->enable);
 }
 
+static void le_periodic_adv_sync_trans(const void *data, uint8_t size)
+{
+	const struct bt_hci_cmd_periodic_sync_trans *cmd = data;
+
+	print_field("Connection handle: %d", cmd->handle);
+	print_field("Service data: 0x%4.4x", cmd->service_data);
+	print_field("Sync handle: %d", cmd->sync_handle);
+}
+
 struct opcode_data {
 	uint16_t opcode;
 	int bit;
@@ -8388,6 +8405,9 @@ static const struct opcode_data opcode_table[] = {
 	{ 0x2059, 325, "LE Periodic Advertising Receive Enable",
 				le_periodic_adv_rec_enable, 3, true,
 				status_rsp, 1, true },
+	{ 0x205a, 326, "LE Periodic Advertising Sync Transfer",
+				le_periodic_adv_sync_trans, 6, true,
+				status_handle_rsp, 3, true },
 	{ }
 };
 
-- 
2.24.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux