ESP32 esp-idf ble_mesh_console

I am having trouble importing the ble_mesh_console example and compiling it. The compiler complains it does not find the files. I also do not see any reference to it in the Library manager.


Is there a step-by-step example on how to import these complex projects. I did try to create a default project from the built in examples and then copied the files over but it still does not want to compile.


In general: Always watch the console output regarding package version (and Releases · platformio/platform-espressif32 · GitHub) what ESP-IDF version you’re working with. Importing examples from the master version of ESP-IDF while working on a lower stable release version often goes wrong.

Next, if a file is missing, go into the repo and press the “Go to file” button and type in the name of the missing file. This will lead you to components/bt/esp_ble_mesh/mesh_common/include/mesh_config.h. The file being inside the esp_ble_mesh component folder component suggests that you have not properly enabled the component via sdkconfig as documented. The project has a sdkconfig.defaults with the needed default settings – if you copied this file into your project too, it will however only take effect if you delete your sdkconfig file and run pio run -t menuconfig (per linked docs), it will then draw from those settings at regeneration. Once these settings are enabled properly (especially CONFIG_BLE_MESH and friends…), the project should compile just fine.

Also note that the project uses a custom partition table.

so you will also have to inform PlatformIO about this per documentation.