Skip to content
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

Fix MTU negotiation logic. Resolves notification data truncation. #510

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

retsyx
Copy link

@retsyx retsyx commented Apr 30, 2024

MTU for client and server can be different. When we negotiate MTU, don't use the returned server's MTU for our client's MTU. Instead, set our MTU, notify the server, and be done.

The server correctly uses our max advertised MTU when sending us data. However, bluepy-helper MTU logic used the minimum of the advertised client and server MTUs to set the local MTU. So when the server advertised a smaller MTU, bluepy-helper truncated notification data that was longer than the server's smaller MTU.

retsyx added 2 commits April 30, 2024 12:44
MTU for client and server can be different. When we negotiate MTU,
don't use the returned server's MTU for our client's MTU. Instead,
set our MTU, notify the server, and be done.
A random address may be used when pairing to a peripheral. For later reference, the public
address needs to be known. Until this change, there was no way to know the public address
from the information available when performing the pairing. The kernel returns the
public address at pair completion, and bluepy now propogates it to the caller.
* Replacing Bluez-5.47 sources with Bluez-5.75 release
* Updating BLUEZ_PATH, and files to make in bluepy/Makefile
* Rebuilding bluepy/bluez-src.tgz (make -C bluepy bluez-tarfile)
retsyx added 2 commits June 23, 2024 23:57
Bondable/pairable controls if bonding is enabled when pairing with a device.
If it is not set when pairing, some devices will refuse to pair with an insufficient authentication
error.
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.

1 participant