Closed tomaszduda23 closed 6 months ago
There is a Windows-specific workaround, but it looks like it may be required for Linux as well... either way, I'd like to hear more from Bleak about the "best way".
Right now it defaults to 20 %50 of times. Calling this explicit works 100% time https://github.com/tomaszduda23/smpclient/blob/d25c8035ae2858fd41a106058297b619d58fbcb5/smpclient/transport/ble.py#L84 It seems that there is a race in bleak. Perhaps value is set only once and sometimes it happens before MTU negotiation is completed. Could you consider adding this code temporary? It is main blocker for me know.
@tomaszduda23 Agreed that we need the fix now, I will add it back!
I’ll be advocating for Bleak to add acquire_mtu() to the public interface.
I've tested 3.0.1 and MTU works correctly :+1:
I've tested version 2.0.1 a few more times. It looks that MTU is calculated incorrectly sometimes. The log after a few runs look like:
It seems that this should be still added