how to include esp32 ble component in a custom component

trustmiao
Posts: 43
Joined: Mon Aug 06, 2018 5:16 am

how to include esp32 ble component in a custom component

Postby trustmiao » Thu Apr 30, 2020 8:45 am

Hi all
While i was writing a component about ble functions, i've met this error:

Code: Select all

../components/ble/ble.h:9:20: fatal error: esp_bt.h: No such file or directory
although i've put bt in cmakelists for the custom component

Code: Select all

set(COMPONENT_ADD_INCLUDEDIRS .)

set(COMPONENT_SRCS "ble.cpp")

set(COMPONENT_REQUIRES spi_flash mbedtls mdns ethernet)
set(COMPONENT_PRIV_REQUIRES freertos fatfs nvs_flash app_update spiffs bootloader_support openssl bt esp32)
register_component()
is it because the bt needed to be enable or some? it normally work for me this way to make a component, just not ble before.
thanks in advance

SlavaDev503
Posts: 5
Joined: Thu Apr 30, 2020 1:00 pm

Re: how to include esp32 ble component in a custom component

Postby SlavaDev503 » Thu Apr 30, 2020 4:39 pm

It seems that your bluetooth disabled, you need to enable it in menu config, you should not directly add it in your cmake.
Image
Attachments
esp32.png
esp32.png (33.46 KiB) Viewed 5753 times

trustmiao
Posts: 43
Joined: Mon Aug 06, 2018 5:16 am

Re: how to include esp32 ble component in a custom component

Postby trustmiao » Wed May 06, 2020 9:34 am

SlavaDev503 wrote:
Thu Apr 30, 2020 4:39 pm
It seems that your bluetooth disabled, you need to enable it in menu config, you should not directly add it in your cmake.
Image
this solves the problem perfectly, thanks alot

Who is online

Users browsing this forum: No registered users and 107 guests