Page 1 of 1

BT component include error

Posted: Sat May 18, 2024 8:35 pm
by Sports5115
I'm trying to include the BLE header into my ESP32 project, added line

Code: Select all

REQUIRES bt esp_common driver hal freertos log 
to CMakeLists.txt as instructed by documentation
https://docs.espressif.com/projects/esp ... p_ble.html

compiled with latest docker image

Code: Select all

sudo docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py build
but still getting

Code: Select all

/project/main/ble_wrp.c:9:10: fatal error: esp_gap_ble_api.h: No such file or directory 9 | #include "esp_gap_ble_api.h" compilation terminated. 

Code: Select all

Missing "esp_gap_ble_api.h" file name found in the following component(s): bt(/opt/esp/idf/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h). Maybe one of the components needs to add the missing header directory to INCLUDE_DIRS of idf_component_register call in CMakeLists.txt.
weirdly I didn't have any problem including wifi, didn't even have to modify REQUIRES for it

#include "esp_wifi.h"

Re: BT component include error

Posted: Sun May 19, 2024 2:10 pm
by liaifat85
Bluetooth should be enabled in your sdkconfig file. You can run idf.py menuconfig to open the configuration menu and check the Bluetooth settings.

Re: BT component include error

Posted: Tue May 28, 2024 9:14 pm
by Sports5115
It didn't do anything from docker

Code: Select all

 sudo docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py menuconfig
 
A fatal error occurred: setupterm: could not find terminal
Loaded configuration '/project/sdkconfig'

 tput config /project/sdkconfig
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Executing action: menuconfig
Running ninja in directory /project/build
Executing "ninja menuconfig"...

I would expect a menu.