Skip to contentSkip to conversation

monitor: Fix decoding of HCI CIS Established Event

PATCH Applied Luiz Augusto von Dentz 2 participants 3 messages Jun 21, 2023 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH v2 1/2 monitor: Fix decoding of HCI CIS Established Event

From: Luiz Augusto von Dentz <[email protected]>

The ISO Interval is actually using set using 1.25ms slots:

BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2304:

Time = N * 1.25 ms

---
 monitor/packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
monitor/packet.c +1 -1
index 4473fda29a46..cd567231449e 100644
@@ -11557,7 +11557,7 @@ static void le_cis_established_evt(struct timeval *tv, uint16_t index,
 	print_field("Peripheral to Central Flush Timeout: %u", evt->p_ft);
 	print_field("Central to Peripheral MTU: %u", le16_to_cpu(evt->c_mtu));
 	print_field("Peripheral to Central MTU: %u", le16_to_cpu(evt->p_mtu));
-	print_field("ISO Interval: %u", le16_to_cpu(evt->interval));
+	print_slot_125("ISO Interval", evt->interval);
 }
 
 static void le_req_cis_evt(struct timeval *tv, uint16_t index,
Signature · 1 line
2.40.1
author maintainer
#1 lore raw

PATCH v2 2/2 btdev: Fix CIS Establish ISO Interval

From: Luiz Augusto von Dentz <[email protected]>

ISO Interval is actually using 1.25 ms slots so it needs to be properly converted.

---
 emulator/btdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
emulator/btdev.c +1 -1
index 462f352ea252..0a375febad68 100644
@@ -5977,7 +5977,7 @@ static void le_cis_estabilished(struct btdev *dev, struct btdev_conn *conn,
 		evt.p_ft = 0x01;
 		evt.c_mtu = le_cig->cis[cis_idx].c_sdu;
 		evt.p_mtu = le_cig->cis[cis_idx].p_sdu;
-		evt.interval = le_cig->params.c_latency;
+		evt.interval = (le_cig->params.c_latency + 1) / 1.25;
 	}
 
 	le_meta_event(dev, BT_HCI_EVT_LE_CIS_ESTABLISHED, &evt, sizeof(evt));
Signature · 1 line
2.40.1
#2 lore raw
In reply to Luiz Augusto von Dentz
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 8 lines · On Wed, 21 Jun 2023 14:38:44 -0700 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

The ISO Interval is actually using set using 1.25ms slots:

BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2304:

[...]

Here is the summary with links:
- [v2,1/2] monitor: Fix decoding of HCI CIS Established Event

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=dafec5e4e41e
  - [v2,2/2] btdev: Fix CIS Establish ISO Interval
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2f3479337f14

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html