From 4a48309643a7549a47a13a6cb7b15510c1ff8408 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Mon, 11 Aug 2025 16:29:45 +0800 Subject: [PATCH] Fix wrong BIG parameters and flows --- bumble/device.py | 13 +++++-------- bumble/hci.py | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/bumble/device.py b/bumble/device.py index 919e102..5ce8d88 100644 --- a/bumble/device.py +++ b/bumble/device.py @@ -1166,14 +1166,11 @@ class BigSync(utils.EventEmitter): logger.error('BIG Sync %d is not active.', self.big_handle) return - with closing(utils.EventWatcher()) as watcher: - terminated = asyncio.Event() - watcher.once(self, BigSync.Event.TERMINATION, lambda _: terminated.set()) - await self.device.send_command( - hci.HCI_LE_BIG_Terminate_Sync_Command(big_handle=self.big_handle), - check_result=True, - ) - await terminated.wait() + await self.device.send_command( + hci.HCI_LE_BIG_Terminate_Sync_Command(big_handle=self.big_handle), + check_result=True, + ) + self.state = BigSync.State.TERMINATED # ----------------------------------------------------------------------------- diff --git a/bumble/hci.py b/bumble/hci.py index fd88b67..59ef271 100644 --- a/bumble/hci.py +++ b/bumble/hci.py @@ -5257,7 +5257,7 @@ class HCI_LE_BIG_Terminate_Sync_Command(HCI_Command): return_parameters_fields = [ ('status', STATUS_SPEC), - ('big_handle', 2), + ('big_handle', 1), ]