Page 1 of 1

ESP32-C6 nimble not working same code works ith ESP32-S3

Posted: Wed Aug 14, 2024 11:28 am
by JBS_ABRIZ
I get an error when I compile for the ESP32-C6 chip the same code works for the ESP32-S3. Is it a known problem? here is the error: C:/Espressif/frameworks/esp-idf-v5.2.1/examples/Brainwave/ESP32C6_Test_LED_BLE_nimble/main/main.c:8:10: fatal error: esp_nimble_hci.h: No such file or directory
8 | #include "esp_nimble_hci.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Missing "esp_nimble_hci.h" file name found in the following component(s): bt(C:\Espressif\frameworks\esp-idf-v5.2.1\components\bt\host\nimble\esp-hci\include\esp_nimble_hci.h). Maybe one of the components needs to add the missing header directory to INCLUDE_DIRS of idf_component_register call in CMakeLists.txt.
ninja failed with exit code 1, output of the command is in the C:\Espressif\frameworks\esp-idf-v5.2.1\examples\Brainwave\ESP32C6_Test_LED_BLE_nimble\build\log\idf_py_stderr_output_10288 and C:\Espressif\frameworks\esp-idf-v5.2.1\examples\Brainwave\ESP32C6_Test_LED_BLE_nimble\build\log\idf_py_stdout_output_10288

I have added the main.c and the CMakeLists.txt

I have activated the Nimble BLE via idf.py Menuconfig.

To test with ESP32 S3 I did:
set IDF_TARGET=esp32s3
idf.py set-target esp32s3
Then it compiles without an error.
Change to ESP32-C6:
set IDF_TARGET=esp32c6
idf.py set-target esp32c6

The error above apears: esp_nimble_hci.h: No such file or directory

How can I solve the problem or is the ESP32-C6 not supporting nimble?

Re: ESP32-C6 nimble not working same code works ith ESP32-S3

Posted: Fri Aug 16, 2024 3:45 am
by ESP_Sprite
Do you have nimble enabled in the menuconfig? Iirc changing targets resets that to defaults.

Re: ESP32-C6 nimble not working same code works ith ESP32-S3

Posted: Fri Aug 16, 2024 8:20 pm
by JBS_ABRIZ
I found the solution when I comment out this line:
//esp_nimble_hci_init();

Now it works.