-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
'esp_ble_gatts_send_indicate' fails when 'value_len' is larger than 512 (IDFGH-14150) #14953
Comments
Until now, I thought the problem was solely related to the negotiated MTU being 517 (which means a value_len in esp_ble_gatts_send_indicate larger than 512).
|
There’s a "loose end" that I’m not entirely clear about, related to the ATT Header Size.
However, I found documentation suggesting that the ATT Header Size for Android can be up to 5 bytes:
Could it be that the ATT Header is defined by the GATT Client and that the server must adapt/replicate the same header when answering? And could this be the reason why it fails on certain devices, where the ATT Header is 5 bytes? Is there any way in ESP-IDF to retrieve the ATT Header size from the client, so I don’t hardcode 3 bytes as a constant and instead dynamically adjust to the client’s header size? |
@carlessole |
@carlessole Any updates? |
Answers checklist.
IDF version.
v5.3
Espressif SoC revision.
ESP32
Operating System used.
Windows
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
CMD
Development Kit.
Custom Board
Power Supply used.
USB
What is the expected behavior?
Hi,
We’ve encountered an issue when interacting over BLE with some Android devices, specifically Google Pixel and some Samsung Galaxy models.
The problem seems to be related to the MTU size of the Android device, which in these devices is set to 517 (instead of 512).
After reading the ESP-IDF BLE Documentation, it is said MTU=517 is supported:
Also see ESP_GATT_MAX_MTU_SIZE macro (=517).
What is the actual behavior?
The issue arises when in esp_ble_gatts_send_indicate the 'value_len' >= 512 (due to a resulting total MTU of 515 or higher, as 'ATT header (3 bytes)' is already considered as in ble_spp_server example)
Although esp_ble_gatts_send_indicate is returning 'ESP_OK' -> (ee 'Debug Logs' section)
Note also that setting the LOG verbosity to maximum 'ESP_LOG_VERBOSE' is not reporting any message that indicates that the function is having any error.
Please, see 'Debug Logs' section.
Steps to reproduce.
See 'What is the actual behavior?' section
Debug Logs.
More Information.
No response
The text was updated successfully, but these errors were encountered: