-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ESP_GATT_MAX_ATTR_LEN = 512 (IDFGH-16534) #17657
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
base: master
Are you sure you want to change the base?
Conversation
…to 517" This reverts commit df8c1f7.
👋 Hello nebkat, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
|
We cannot change the max attribute length to 512, as it would cause other issues. |
|
we encountered a data loss issue, which we found was related to setting the max ATT length to 512. May I ask what impact setting it to 517 would have on you? |
|
@esp-zhp unless I have completely misunderstood the BLE spec I believe it is invalid for any attribute to contain a value length greater than 512, even if the MTU can in theory be up to 517. If there is data loss occurring with a 512 max it is presumably because something is trying to send an attribute with length >512? We must strictly adhere to the standard as otherwise another BLE stack may receive our packets and experience data loss on their end as they expect a max length of 512 bytes. Alternatively if this data loss is occurring when receiving data from another device, it is the fault of that device for sending a packet that is too large. |
|
For maximum compatibility on ESP, we retain data even when its length exceeds 512 bytes. |
Description
The maximum attribute length as per the BLE GATT spec is 512 - see https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-54/out/en/host/attribute-protocol--att-.html#UUID-d24e0156-618e-728d-f19b-01349ced952b:~:text=The%20maximum%20length%20of%20an%20attribute%20value%20shall%20be%20512%20octets.
Checklist
Before submitting a Pull Request, please ensure the following: