PlatformIO Community

Esp-idf BLE example doesnt compile

Hey guys, newb post here

id like to create a BLE server project but i cant figure out what to config

when trying to compile the “ESP-IDF Gatt Server Demo” it works fine,
but when i try to open a new project and include the libraries it seems like platformio unable to locate the BLE libraries

what am i doing wrong? do i need to config something? where does platformio includes it’s libraries from?

Link to the ESP-IDF example you tried?

Did you remember to use the v4.3 ESP-IDF branch because that’s what PIO uses?

trying this one:

if i just download the whole project and compile it, it works fine

but if i create a new project im unable to include the libraries

It’s important to setup the menuconfig to activate the bluetooth components, as they do in that projects via the sdkconfig

It’s hard to say though if that is exactly what’s wrong with your project without seeing all project files or an error message.

should i just edit those manually? or add additional sdkconfig file like they did?

do you have any idea how do i access these settings via menuconfig?

My above post contains a link on how to get into the menuconfig via the CLI.

You can do it either way, via the menuconfig or adding the same sdkconfig.defaults file to the project, deleting the old sdkconfig file, then rebuilding the project – this applies the default parameters from the sdkconfig.defaults file.

Ok ok!

so adding sdkconfig.defaults and deleting old sdkconfig file worked!
it indeed rebuilt everything and now it works

I appreciate your answer and your quick response!

if you have an additional moment, do you have any idea how do i access those parameters through menuconfig? so i can add BLE to existing project and not start over

Have you gone through the documentation I’ve linked to? Let me know if there’s an error when you do that.