From: Szymon Czapracki <szymon.czapracki@codecoup.pl>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Czapracki <szymon.czapracki@codecoup.pl>
Subject: [PATCH v2 7/8] monitor: Decode LE Set Default Periodic Adv Sync Transfer Params. command
Date: Wed, 8 Jan 2020 12:47:51 +0100 [thread overview]
Message-ID: <20200108114752.133076-7-szymon.czapracki@codecoup.pl> (raw)
In-Reply-To: <20200108114752.133076-1-szymon.czapracki@codecoup.pl>
< HCI Command: LE Set Default Periodic Advertisng Sync Transfer Parameters (0x08|0x005d) plen 6
Mode: Enabled with report events disabled (0x01)
Skip: 0x00
Sync timeout: 0 msec (0x0000)
Sync CTE type: 0x0000
> HCI Event: Command Status (0x0f) plen 4
LE Set Default Periodic Advertisng Sync Transfer Parameters (0x08|0x005d) ncmd 1
Status: Unknown HCI Command (0x01)
---
monitor/bt.h | 8 ++++++++
monitor/packet.c | 17 +++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/monitor/bt.h b/monitor/bt.h
index 2ec2ea0a7..1859dfb21 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2490,6 +2490,14 @@ struct bt_hci_cmd_periodic_adv_sync_trans_params {
uint8_t cte_type;
} __attribute__ ((packed));
+#define BT_HCI_CMD_DEFAULT_PERIODIC_ADV_SYNC_TRANS_PARAMS 0x205d
+struct bt_hci_cmd_default_periodic_adv_sync_trans_params {
+ uint8_t mode;
+ uint16_t skip;
+ uint16_t sync_timeout;
+ uint8_t cte_type;
+} __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 74c73f145..9d22dfc15 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -7653,6 +7653,19 @@ static void le_periodic_adv_sync_trans_params(const void *data, uint8_t size)
print_create_sync_cte_type(cmd->cte_type);
}
+static void le_set_default_periodic_adv_sync_trans_params(const void *data,
+ uint8_t size)
+{
+ const struct bt_hci_cmd_default_periodic_adv_sync_trans_params *cmd = data;
+
+ print_sync_mode(cmd->mode);
+ print_field("Skip: 0x%2.2x", cmd->skip);
+ print_field("Sync timeout: %d msec (0x%4.4x)",
+ le16_to_cpu(cmd->sync_timeout) * 10,
+ le16_to_cpu(cmd->sync_timeout));
+ print_create_sync_cte_type(cmd->cte_type);
+}
+
struct opcode_data {
uint16_t opcode;
int bit;
@@ -8458,6 +8471,10 @@ static const struct opcode_data opcode_table[] = {
{ 0x205c, 328, "LE Periodic Advertising Sync Transfer Parameters",
le_periodic_adv_sync_trans_params, 8, true,
status_handle_rsp, 3, true},
+ { 0x205d, 329, "LE Set Default Periodic Advertisng Sync Transfer "
+ "Parameters",
+ le_set_default_periodic_adv_sync_trans_params,
+ 6, true, status_rsp, 1, true},
{ }
};
--
2.24.1
next prev 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 ` [PATCH v2 3/8] monitor: Decode LE Set Periodic Advertising Receive Enable command Szymon Czapracki
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 ` Szymon Czapracki [this message]
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-7-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).