BluetoothSerial compilation issue for ESP32


Starting this weekend, our CI compiling bluetooth examples on esp32 with arduino framework through platformio started failing because of a missing BluetoothSerial.h library header.

Now, I checked and the library itself doesn’t seem to have changed in this regard. So I tested further, with Platformio v6.1.13 that I still have on my machine, I do not have this issue.

The issue only arises with Platformio v6.1.14 that the CI gets through

The .ini file would be (zenoh-pico is resolved with a symbolic link to my local repo version):

platform = espressif32
board = esp32thing_plus
framework = arduino
lib_deps = zenoh-pico

The main file (and the zenoh-pico library) can be found here: zenoh-pico/examples/arduino/z_pub.ino at main · eclipse-zenoh/zenoh-pico · GitHub

Well the PIO core definitely explicitly ignores the libraries in that manifest

 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
Warning: Ignored `BluetoothSerial` dependency for `zenoh-pico` library
Warning: Ignored `FreeRTOS` dependency for `zenoh-pico` library

That were declared in

Two possibilites: The dependencies statement in that libary.json is wrong or the PIO core is wrong.

Just FYI, the Arduino-ESP32 2.0.14 framework declares the built in BluetoothSeriael library to be of version 2.0.0.

and FreeRTOS as a “Arduino library” doesn’t exist, it’s built in directly. So not sure what FreeRTOS 1.0.0 is referencing.

Also note that lib_deps = zenoh-pico will give you an older 0.7.0-rc version since no other version is listed in the PIO registry. You might want to use lib_deps = or similar.

In any case though, setting lib_ldf_mode = deep+ fixes compilation for the latest PlatformIO core. So with respect to the last PIO core version, some intricate detail might have changed about the default library detection.

Sorry I forgot to mention, for the lib_deps = zenoh-pico I then create a symbolic link in the lib/ folder of the platformio project towards my local zenoh-pico repository, which no longer contains the file you’re mentioning.

Ok thanks for the lib_ldf_mode = deep+, tip it does fixes compilation, but I’m wondering why it is now necessary.