Skip to content

Conversation

glfharris
Copy link
Contributor

There seems to be a long running issue with Bleak and the default bluetooth stack on Linux BlueZ, where the MTU size isn't set correctly.

With respect to the Frame SDK, without correcting for MTU size, usually generates a Payload length is too large exception.

I appreciate this is a pretty specific use case, but there doesn't seem to be way to easily do this on the user side, rather than modifying the library. Largely because the __aenter__ method both connects, and attempts to inject the library functions, which will fail if the MTU size is incorrect.

Mirrors suggestion by Bleak maintainers in bleak/examples/mtu_size.py, and is a little more reliable than adding a hard coded mtu size.

Targets issue #1.

Add a condition to check if Bleak Client is running on Bluez, and if it
is, to set MTU Size.

Mirrors suggestion by Bleak maintainers in `bleak/examples/mtu_size.py`
@OkGoDoIt
Copy link
Owner

Thanks @glfharris! The connection issue on Linux has been pretty frustrating and I hadn’t been able to figure out how to solve it. Thank you for this.

@OkGoDoIt OkGoDoIt merged commit db36eba into OkGoDoIt:master Oct 26, 2024
OkGoDoIt pushed a commit that referenced this pull request Mar 31, 2025
…doesn't do it automatically when using BlueZ backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants