-
DescriptionAfter creating a BleakClient and calling Expected result: Observed result:
The Even though it is single-underscore-prefixed, I also attempted to call What I DidI'm writing a small client for the Brilliant Labs Monocle, which has a MicroPython shell accessible via UART. Minimum workable example: import asyncio
from bleak import BleakClient
async def example():
address = '<address of Monocle>'
client = BleakClient(address)
await client.connect()
print(client.mtu_size)
asyncio.run(example()) I am unaware of anything Monocle-specific that would prevent reproduction of this phenomenon on other devices (but a Monocle is all I have access to at this time). LogsLogs attached. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is the documented behavior: https://bleak.readthedocs.io/en/latest/api/client.html#bleak.BleakClient.mtu_size Please use |
Beta Was this translation helpful? Give feedback.
This is the documented behavior: https://bleak.readthedocs.io/en/latest/api/client.html#bleak.BleakClient.mtu_size
Please use
BleakGATTCharacteristic.max_write_without_response_size
instead as suggested or provide your own implementation as in https://github.com/hbldh/bleak/blob/develop/examples/mtu_size.py. You can hard-code 128 as the MTU instead of using_acquire_mtu
if you are sure it will always be correct.