All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Schober <rolandschober1968@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Roland Schober <rolandschober1968@gmail.com>
Subject: [PATCH BlueZ v4 04/10] monitor: Fix advertising handle of LE PA commands
Date: Fri, 20 Nov 2026 07:38:50 +0100	[thread overview]
Message-ID: <20261120063856.16585-5-rolandschober1968@gmail.com> (raw)
In-Reply-To: <20261120063856.16585-1-rolandschober1968@gmail.com>

The decoders of LE Set Periodic Advertising Parameters, Data and Enable
print the Advertising_Handle with print_handle(), which looks the value
up as a connection handle. With a connection using the same handle,
the advertising set is shown with the peer of that connection:

< HCI Command: LE Set Periodic Advertising Parameters (0x08|0x003e) plen 7
        Handle: 0 (LE-ACL) Address: C0:11:22:33:44:55 (Static)

Print it the way the extended advertising commands do:

        Handle: 0x00

Fixes: 61563bd7b477 ("monitor: Add LE Set Periodic Advertising commands decoding")
Assisted-by: Claude:claude-opus-5-5
---
 monitor/packet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index 9814e0e96..da4e8aa98 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -8704,7 +8704,7 @@ static void le_set_pa_params_cmd(uint16_t index, const void *data, uint8_t size)
 {
 	const struct bt_hci_cmd_le_set_pa_params *cmd = data;
 
-	print_handle(cmd->handle);
+	print_field("Handle: 0x%2.2x", cmd->handle);
 	print_slot_125("Min interval", cmd->min_interval);
 	print_slot_125("Max interval", cmd->max_interval);
 	print_pa_properties(cmd->properties);
@@ -8715,7 +8715,7 @@ static void le_set_pa_data_cmd(uint16_t index, const void *data, uint8_t size)
 	const struct bt_hci_cmd_le_set_pa_data *cmd = data;
 	const char *str;
 
-	print_handle(cmd->handle);
+	print_field("Handle: 0x%2.2x", cmd->handle);
 
 	switch (cmd->operation) {
 	case 0x00:
@@ -8745,7 +8745,7 @@ static void le_set_pa_enable_cmd(uint16_t index, const void *data, uint8_t size)
 	const struct bt_hci_cmd_le_set_pa_enable *cmd = data;
 
 	print_enable("Periodic advertising", cmd->enable);
-	print_handle(cmd->handle);
+	print_field("Handle: 0x%2.2x", cmd->handle);
 }
 
 static const struct bitfield_data ext_scan_phys_table[] = {
-- 
2.47.3


  parent reply	other threads:[~2026-11-20  6:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  6:38 [PATCH BlueZ v4 00/10] monitor: Decode Periodic Advertising with Responses Roland Schober
2026-11-20  6:38 ` [PATCH BlueZ v4 01/10] monitor: Fix handle decoding of status_handle_rsp Roland Schober
2026-11-20 14:51   ` monitor: Decode Periodic Advertising with Responses bluez.test.bot
2026-11-20  6:38 ` [PATCH BlueZ v4 02/10] monitor: Fix data length of LE PA Report decoding Roland Schober
2026-11-20  6:38 ` [PATCH BlueZ v4 03/10] monitor: Fix PHY decoding of LE Ext Create Connection Roland Schober
2026-11-20  6:38 ` Roland Schober [this message]
2026-11-20  6:38 ` [PATCH BlueZ v4 05/10] monitor: Fix TX power and CTE Type of LE PA Report Roland Schober
2026-11-20  6:38 ` [PATCH BlueZ v4 06/10] monitor: Fix LE PAST Received decoding Roland Schober
2026-11-20  6:38 ` [PATCH BlueZ v4 07/10] monitor: Fix byte order of LE PA Sync Handle and Properties Roland Schober
2026-11-20  6:38 ` [PATCH BlueZ v4 08/10] monitor: Split LE PA Report decoding into helpers Roland Schober
2026-11-20  6:38 ` [PATCH BlueZ v4 09/10] monitor: Add PAwR HCI commands decoding Roland Schober
2026-11-20  6:38 ` [PATCH BlueZ v4 10/10] monitor: Add PAwR HCI events decoding Roland Schober
2026-11-20 15:34 ` [PATCH BlueZ v4 00/10] monitor: Decode Periodic Advertising with Responses Luiz Augusto von Dentz

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=20261120063856.16585-5-rolandschober1968@gmail.com \
    --to=rolandschober1968@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.