I have a problem with my ESP-IDF component's CMakeLists file. While I am trying to use "bt" component in ESP-IDF v5.0.2 , compiler is not seeing some files inside the bt component. It seems weird from my point of view. Can you help me out
Here is my CMakeLists.txt:
idf_component_register(SRCS "ble_server.c"
INCLUDE_DIRS "include"
REQUIRES bt nvs_flash)
What I am trying to run in component is basically the official example of esp-idf in here https://github.com/espressif/esp-idf/bl ... eat_demo.c
Bluetooth cfg in menuconfig:
Bluetooth on
Host (NimBLE - BLE only)
Controller (Enabled)
I can share more if needed..
Here is the error from terminal while compiling:
/components/ble_server/ble_server.c:26:10: fatal error: esp_gap_ble_api.h: No such file or directory
26 | #include "esp_gap_ble_api.h"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Hope someone knows what I am doing wrong.
BLE as ESP-IDF Component - Can't Include Header Files
-
- Posts: 1709
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: BLE as ESP-IDF Component - Can't Include Header Files
Host (NimBLE - BLE only)
You're trying to compile a Bluedroid example against the NimBLE stack. Won't work.Code: Select all
#include "esp_gap_ble_api.h" // <-- This is Bluedroid API
If you want to use NimBLE check the NimBLE examples @ https://github.com/espressif/esp-idf/tr ... oth/nimble
Who is online
Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 86 guests