David Lechner
David Lechner
In Bleak 0.13, we switched to the [bleak-winrt](https://github.com/dlech/bleak-winrt) package which contains many fixes and improvements to the unmaintained [winrt](https://github.com/microsoft/xlang/) package. One of these is that `IBuffer` now implements the Python...
> scanner = BleakScanner(filters={"scanning_mode":"passive"}) FYI, passive mode prevents the device from sending SCAN_RSP data which is why all of the advertisement packets look the same in your output.
> advData = [dt[0] for dt in struct.iter_unpack('
The message needs to be a bytes-like object (Python buffer protocol). You didn't include the code for `initMsg()`, so we can't see what the problem is.
Can you share the full stack trace of where the error occurs?
What is `len(msg)`?
And what is `client.mtu_size`?
For write without response, which is the default, the limit is `mtu_size - 3`. You can try `await client.write_gatt_char(MY_UUID, msg, response=True)`
Write without response has to fit in a single packet while write with response can be split into multiple packets.
If rebooting the RPi solves the problem, then the issue is probably with BlueZ rather than Bleak.