-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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-IDF v5.1.5 - BLE Crashes after connection parameter update (IDFGH-12607) #13605
Comments
@expresspotato |
Hi @zhp0406, Were you able to determine the root cause and a fix for this issue? |
Version 4.3 is no longer under active maintenance, so I've utilized the latest master branch to replicate your issue. I've employed two examples (esp-idf/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex and esp-idf/examples/bluetooth/bluedroid/ble/gatt_client). In the gatt_client example, I irregularly initiate connection parameter updates. No alterations have been made to a2dp_gatts_coex. However, I haven't been able to reproduce the issue you described. log in a2dp_gatts_coex:
|
Could you test with the latest version to see if the issue persists? If it still exists, could you provide an example that reproduces the problem? |
Well there are other issues that are unresolved in 4.4.x, namely #11315, and a few others... Our project is very large, so it's not easy to switch between 4.3.7 and 4.4.x (nor 5.x anything for that matter) without extensive testing. To my knowledge v.4.3.5 didn't have this issue. I see in your test that A2DP, HFP and AVRC aren't connected yet. Can you try and connect those first? |
Do you mean this issue only occurs when A2DP, HFP, and AVRC are connected? I don't have A2DP, HFP, and AVRC connected here, only BLE connections. |
If you have a demo that reproduces the issue , it would be helpful for me to resolve the problem.” |
Upon further observation, the crash occurs during an indicate. The parameters are not yet changed, and an indicate is sent from the ESP32 (GATTS) -> to an Android phone (GATTC) during the update process. One instance:
Another:
|
Hey @esp-zhp , so this is not fixed on v4.4.8... We checked and we really don't do anything bizzare in the code leading up to, or after the connection parameter update. We simply make the request and even wait for the callback with the updated parameters before sending another GATT indicate. Poking around, L2CA_UpdateBleConnParams does return true from the call stack, so it seems like the bug is on Espressif's side. Since the source code is closed, I can't debug it further... What happens in hci_le_rem_con_param_req_reply_cmd_handler? Without HFP connected, I'm unable to reproduce this bug, but I gave up after 50 attempts. With HFP connected, it will crash in in 15 - 20 attempts. Can you try with HFP connected and send data over a ble characteristic through writes?
The interesting thing to note is that EXCVADDR is often 0x0014f013 (in my original post and now) along with the following addresses:
|
@expresspotato EXCVADDR: 0xfcabba16 Were these two logs generated using different versions of the IDF? |
Interesting. So I've updated to v5.1.5 and the issue persists, in a slightly different manner. The stack still refers to
|
Yes, we haven’t resolved this issue yet. I urgently need a demo from you to reproduce the problem. |
Answers checklist.
IDF version.
v4.3.7
Espressif SoC revision.
ESP32-Pico-V3-02
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
LyraT
Power Supply used.
USB
What is the expected behavior?
Not crash
What is the actual behavior?
Crashes
Steps to reproduce.
Debug Logs.
More Information.
Forum topic: https://esp32.com/viewtopic.php?f=28&t=37739
Edit: I've also noticed this issue without changing the connection params myself...
The text was updated successfully, but these errors were encountered: