-
Notifications
You must be signed in to change notification settings - Fork 159
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
ESP32-C6 is crashing when BlueDroid is used. (MEGH-5841) #323
Comments
Hi @P-R-O-C-H-Y thanks for taking efforts to reproduce the issue with IDF and providing the example. Our Bluetooth team has identified the issue and the clean fix will be provided on IDF. Meanwhile, can you please apply the below patch on IDF and check if this vents the issue for you? diff --git a/components/protocomm/src/simple_ble/simple_ble.c b/components/protocomm/src/simple_ble/simple_ble.c
index 8a4ae0f3d9..cd6421c6e5 100644
--- a/components/protocomm/src/simple_ble/simple_ble.c
+++ b/components/protocomm/src/simple_ble/simple_ble.c
@@ -225,7 +225,7 @@ esp_err_t simple_ble_start(simple_ble_cfg_t *cfg)
#ifdef CONFIG_BTDM_CTRL_MODE_BTDM
ret = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
-#elif defined CONFIG_BTDM_CTRL_MODE_BLE_ONLY || CONFIG_BT_CTRL_MODE_EFF
+#elif defined CONFIG_BTDM_CTRL_MODE_BLE_ONLY || CONFIG_BT_CTRL_MODE_EFF || CONFIG_IDF_TARGET_ESP32C6
ret = esp_bt_controller_enable(ESP_BT_MODE_BLE);
#else
ESP_LOGE(TAG, "Configuration mismatch. Select BLE Only or BTDM mode from menuconfig"); |
Hi @vikramdattu, Thank you for quick reply. Your proposed fix is working fine. |
@P-R-O-C-H-Y yes the fix will be back ported to all the eligible IDF branches including |
@P-R-O-C-H-Y please add PR with the patch to the lib-builder |
Answers checklist.
IDF / ESP32-Arduino version.
ESP-IDF v5.1.3-1012-gd82f9162df
Operating System used.
macOS
How did you build your project?
Command line with idf.py
Development Kit.
ESP32-C6 DevKitM-1 V1.0
What is the expected behavior?
The switch example is expected to work on C6 using BlueDroid as for all other chips BlueDroid with RainMaker works fine.
In Arduino we use BlueDroid as the BLE provider, and C6 is not working.
I was able to reproduce the issue using IDF with the RainMaker switch example, changing just few things in the SDK Config.
With the same SDK config it's working fine on ESP32-C3.
Partition table was changed to just single OTA partition, to fit the binary when BlueDroid is used.
What is the actual behavior?
Crashes on simple_ble: Configuration mismatch. Select BLE Only or BTDM mode from menuconfig.
But there is nothing in menuconfig to fix the issue.
Steps to reproduce.
I have created a project on GH to easily reproduce the issue.
Just build and flash.
https://github.com/P-R-O-C-H-Y/rainmaker-bluedriod/tree/main
Debug Logs.
The text was updated successfully, but these errors were encountered: