Skip to content

Commit 38132c7

Browse files
committed
Correction of Issue #3: Workaround to acquire MTU size because Bleak doesn't do it automatically when using BlueZ backend
1 parent 4d32a61 commit 38132c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/frame_sdk/bluetooth.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ async def connect(
218218

219219
try:
220220
await self._btle_client.connect()
221+
# Workaround to acquire MTU size because Bleak doesn't do it automatically when using BlueZ backend
222+
if self._btle_client._backend.__class__.__name__ == "BleakClientBlueZDBus":
223+
await self._btle_client._backend._acquire_mtu()
221224

222225
await self._btle_client.start_notify(
223226
self._RX_CHARACTERISTIC_UUID,

0 commit comments

Comments
 (0)