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

JBS_ABRIZ
Posts: 5
Joined: Wed Aug 14, 2024 10:10 am

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

Postby JBS_ABRIZ » Wed Aug 14, 2024 11:28 am

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?
Attachments
main.c
(2.95 KiB) Downloaded 53 times
CMakeLists.txt
(108 Bytes) Downloaded 45 times

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Fri Aug 16, 2024 3:45 am

Do you have nimble enabled in the menuconfig? Iirc changing targets resets that to defaults.

JBS_ABRIZ
Posts: 5
Joined: Wed Aug 14, 2024 10:10 am

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

Postby JBS_ABRIZ » Fri Aug 16, 2024 8:20 pm

I found the solution when I comment out this line:
//esp_nimble_hci_init();

Now it works.

Who is online

Users browsing this forum: No registered users and 141 guests