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 v3 5/9] monitor: Fix TX power and CTE Type of LE PA Report
Date: Thu, 19 Nov 2026 09:16:17 +0100	[thread overview]
Message-ID: <20261119081621.112623-6-rolandschober1968@gmail.com> (raw)
In-Reply-To: <20261119081621.112623-1-rolandschober1968@gmail.com>

The LE Periodic Advertising Report decoder prints TX_Power 0x7f, which
means that the information is not available, as a power of 127 dBm. It
names CTE_Type 0x01 an AoA Constant Tone Extension, but 0x01 is the AoD
Constant Tone Extension with 1 us slots, and it pads the value with a
space:

        TX power: 127 dbm (0x7f)
        CTE Type: AoA Constant Tone Extension with 1us slots (0x 1)

Decode them as the specification defines them:

        TX power: not available (0x7f)
        CTE Type: AoD Constant Tone Extension with 1us slots (0x01)

Fixes: 5441a5b91a08 ("monitor: Decode LE Periodic Advertising Report Event")
Fixes: f1354119897a ("monitor: Update periodic sync commands.")
Assisted-by: Claude:claude-opus-5-5
---
 monitor/packet.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index f358563b0..d926efe28 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -13924,7 +13924,10 @@ static void le_pa_report_evt(struct timeval *tv, uint16_t index,
 	const char *str;
 
 	print_field("Sync handle: %d", evt->handle);
-	print_power_level(evt->tx_power, NULL);
+	if (evt->tx_power == 127)
+		print_field("TX power: not available (0x7f)");
+	else
+		print_power_level(evt->tx_power, NULL);
 	if (evt->rssi == 127)
 		print_field("RSSI: not available (0x%2.2x)",
 						(uint8_t) evt->rssi);
@@ -13940,7 +13943,7 @@ static void le_pa_report_evt(struct timeval *tv, uint16_t index,
 		str = "AoA Constant Tone Extension";
 		break;
 	case 0x01:
-		str = "AoA Constant Tone Extension with 1us slots";
+		str = "AoD Constant Tone Extension with 1us slots";
 		break;
 	case 0x02:
 		str = "AoD Constant Tone Extension with 2us slots";
@@ -13953,7 +13956,7 @@ static void le_pa_report_evt(struct timeval *tv, uint16_t index,
 		break;
 	}
 
-	print_field("CTE Type: %s (0x%2x)", str, evt->cte_type);
+	print_field("CTE Type: %s (0x%2.2x)", str, evt->cte_type);
 
 	switch (evt->data_status) {
 	case 0x00:
-- 
2.47.3


  parent reply	other threads:[~2026-11-19  8:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  8:16 [PATCH BlueZ v3 0/9] monitor: Decode Periodic Advertising with Responses Roland Schober
2026-11-19  8:16 ` [PATCH BlueZ v3 1/9] monitor: Fix handle decoding of status_handle_rsp Roland Schober
2026-11-19  9:53   ` monitor: Decode Periodic Advertising with Responses bluez.test.bot
2026-11-19  8:16 ` [PATCH BlueZ v3 2/9] monitor: Fix data length of LE PA Report decoding Roland Schober
2026-11-19  8:16 ` [PATCH BlueZ v3 3/9] monitor: Fix PHY decoding of LE Ext Create Connection Roland Schober
2026-11-19  8:16 ` [PATCH BlueZ v3 4/9] monitor: Fix advertising handle of LE PA commands Roland Schober
2026-11-19  8:16 ` Roland Schober [this message]
2026-11-19  8:16 ` [PATCH BlueZ v3 6/9] monitor: Fix LE PAST Received decoding Roland Schober
2026-11-19  8:16 ` [PATCH BlueZ v3 7/9] monitor: Split LE PA Report decoding into helpers Roland Schober
2026-11-19  8:16 ` [PATCH BlueZ v3 8/9] monitor: Add PAwR HCI commands decoding Roland Schober
2026-11-19  8:16 ` [PATCH BlueZ v3 9/9] monitor: Add PAwR HCI events decoding Roland Schober
2026-11-19 16:18 ` [PATCH BlueZ v3 0/9] 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=20261119081621.112623-6-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.