-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MTU size incorrect on Windows #1497
Comments
It could be that the Bluetooth adapter (or the driver) on the "problem" computer is the one limiting the MTU. https://bleak.readthedocs.io/en/latest/troubleshooting.html#enable-logging explains how to enable logging. |
Ah thanks, I was mistakenly using CMD instead of PS and was wondering why there are no logs 😅 ...
|
Thanks for the logs. This looks like a race condition where on this particular adapter/computer, the |
Seeing this as well.
Should we go back to handling special case on Linux and then assuming that # BlueZ doesn't have a proper way to get the MTU, so we have this hack.
# If this doesn't work for you, you can set the client._mtu_size attribute
# to override the value instead.
if self._client._backend.__class__.__name__ == "BleakClientBlueZDBus":
await self._client._backend._acquire_mtu() |
Users have reported that the max pdu size was wrong on some devices. This was happening because the max_pdu_size_changed event was happeing after the get_services() call returned. This adds an event to wait for the max_pdu_size_changed event to happen and updates the characteristics in the service dictionary after the fact to ensure they have the correct value. The service_explorer example is also updated to show the value to help with future troubleshooting. Fixes: #1497
Users have reported that the max pdu size was wrong on some devices. This was happening because the max_pdu_size_changed event was happeing after the get_services() call returned. This adds an event to wait for the max_pdu_size_changed event to happen and updates the characteristics in the service dictionary after the fact to ensure they have the correct value. The service_explorer example is also updated to show the value to help with future troubleshooting. Fixes: #1497
First of all, thanks for this nice BLE lib!
Description
Using a NRF52 development kit, which acts as a BLE peripheral, I want to transfer data from my PC via a Write-Characteristics.
The MTU size on the NRF52 is set to 247, however
max_write_without_response_size
returns 20.But as seen it the Wireshark logs, it seems that the correct MTU size gets transmitted.
Client Rx MTU: 527
Server RX MTU: 247 (as defined)
I have also tested it on another Windows machine successfully,
max_write_without_response_size
returns 244 as expected.Please let me know if you need more details. I wasnt sure how to collect debug logs on Windows.
The text was updated successfully, but these errors were encountered: