Skip to content

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

Open
retsyx wants to merge 5 commits intoIanHarvey:masterfrom
retsyx:master
Open

Fix MTU negotiation logic. Resolves notification data truncation.#510
retsyx wants to merge 5 commits intoIanHarvey:masterfrom
retsyx:master

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