linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Szymon Czapracki <szymon.czapracki@codecoup.pl>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Czapracki <szymon.czapracki@codecoup.pl>
Subject: [PATCH v2 3/8] monitor: Decode LE Set Periodic Advertising Receive Enable command
Date: Wed,  8 Jan 2020 12:47:47 +0100	[thread overview]
Message-ID: <20200108114752.133076-3-szymon.czapracki@codecoup.pl> (raw)
In-Reply-To: <20200108114752.133076-1-szymon.czapracki@codecoup.pl>

< HCI Command: LE Periodic Advertising Receive Enable (0x08|0x0059) plen 3
        Sync handle: 0
        Reporting: Enabled (0x01)
> HCI Event: Command Status (0x0f) plen 4
      LE Periodic Advertising Receive Enable (0x08|0x0059) ncmd 1
        Status: Unknown HCI Command (0x01)
---
 monitor/bt.h     |  6 ++++++
 monitor/packet.c | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/monitor/bt.h b/monitor/bt.h
index e14c1771f..bb373b528 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2461,6 +2461,12 @@ struct bt_hci_cmd_le_tx_test_v3 {
 	uint8_t  antenna_ids[0];
 } __attribute__ ((packed));
 
+#define BT_HCI_CMD_SET_PERIODIC_ADV_REC_ENABLE	0x2059
+struct bt_hci_cmd_set_periodic_adv_rec_enable {
+	uint16_t sync_handle;
+	uint8_t  enable;
+} __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 8e5219bef..e5681b5ff 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -7584,6 +7584,14 @@ static void le_tx_test_cmd_v3(const void *data, uint8_t size)
 		print_field("  Antenna ID: %u", cmd->antenna_ids[i]);
 }
 
+static void le_periodic_adv_rec_enable(const void *data, uint8_t size)
+{
+	const struct bt_hci_cmd_le_set_periodic_adv_enable *cmd = data;
+
+	print_field("Sync handle: %d", cmd->handle);
+	print_enable("Reporting", cmd->enable);
+}
+
 struct opcode_data {
 	uint16_t opcode;
 	int bit;
@@ -8377,6 +8385,9 @@ static const struct opcode_data opcode_table[] = {
 	{ 0x2050, 316, "LE Transmitter Test command [v3]",
 				le_tx_test_cmd_v3, 9, false,
 				status_rsp, 1, true },
+	{ 0x2059, 325, "LE Periodic Advertising Receive Enable",
+				le_periodic_adv_rec_enable, 3, true,
+				status_rsp, 1, true },
 	{ }
 };
 
-- 
2.24.1


  parent reply	other threads:[~2020-01-08 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 11:47 [PATCH v2 1/8] monitor: Update periodic sync commands Szymon Czapracki
2020-01-08 11:47 ` [PATCH v2 2/8] monitor: Decode LE Periodic Advertising Sync Transfer Received Event Szymon Czapracki
2020-01-08 11:47 ` Szymon Czapracki [this message]
2020-01-08 11:47 ` [PATCH v2 4/8] monitor: Decode LE Periodic Advertising Sync Transfer command Szymon Czapracki
2020-01-08 11:47 ` [PATCH v2 5/8] monitor: Decode LE Periodic Advertising Set Info " Szymon Czapracki
2020-01-08 11:47 ` [PATCH v2 6/8] monitor: Decode LE Set Periodic Adv Sync Transfer Parameterers command Szymon Czapracki
2020-01-08 11:47 ` [PATCH v2 7/8] monitor: Decode LE Set Default Periodic Adv Sync Transfer Params. command Szymon Czapracki
2020-01-08 11:47 ` [PATCH v2 8/8] monitor: Decode LE CTE Request Failed event Szymon Czapracki
2020-01-09 10:39 ` [PATCH v2 1/8] monitor: Update periodic sync commands Szymon Janc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200108114752.133076-3-szymon.czapracki@codecoup.pl \
    --to=szymon.czapracki@codecoup.pl \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).