-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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 error #8176: simple_ble_start enable controller failed 259 #11167
base: master
Are you sure you want to change the base?
Conversation
👋 Hello Jason2866, 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 ...
|
Test Results 76 files 76 suites 11m 52s ⏱️ Results for commit 1145aec. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
This is the classic BT memory being released, not BLE, so I wonder why you see the issue that you do. Maybe we can rethink this so that provisioning will cause it to not be released? |
@me-no-dev Isnt the provided PR just doing this? Keep the allocated memory for BT / BLE needs. Imho the weak if here does not work always as it should
So doing this call affects classic BT and BLE https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/bluetooth/controller_vhci.html |
@Jason2866 it is keeping it always, regardless if BT is used or not. The point of the commented code is to free that memory if BT is not in use. You in effect never free that memory with this PR |
So the if with the "weak" is not working. Honestly idk why not working looking in https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-bt.c Imho
is always set when using a BT / BLE sketch. Wrong include order? |
We might need to rework/revisit this, especially with moving to NimBLE. What chip is failing @Jason2866 ? |
@me-no-dev Have tested with an esp32. Probably other MCU types fail too. |
which happens when example https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFiProv/examples/WiFiProv is compiled with pioarduino. The full pioarduino example is here https://github.com/pioarduino/test-rainmaker/tree/wifiprov
This PR fixes this bug by comment out the call to
esp_bt_controller_mem_release
since, once you release that memory, it cannot be reclaimed per the docs.Fix #8176