PlatformIO Community

Fatal error: BluetoothSerial.h: No such file or directory

I am using PIO with VScode. It works better that Arduino IDE, mostly it is working out of the box.
I just started my first BT project with ESP8266. All examples I saw required include of BluetoothSerial.h , yet it is reported as error when I compile. Should I import it? I couldn’t locate it in the lib manager. Thank you,

I know the BluetoothSerial only from the Arduino-ESP32 framework, since the ESP32 has WiFi+BT.

The ESP8266 only has 2.4GHz WiFi radio, it has no bluetooth capabilities. What extra chip did you use for Bluetooth with your ESP8266?

Aha, good point. I was assuming wrongly the ESP8266 has BT included. My bad.

Then you may want to look into getting a e.g. HC-05 bluetooth-serial chip and using the built-in EspSoftwareSerial library, that way it’s practically the same functionality as the ESP32-Bluetooth Serial. See e.g.

https://circuitdigest.com/microcontroller-projects/hc-05-bluetooth-module-interfacing-with-esp8266-to-control-an-led

Thanks, but I recall these parts require to modify the voltage from 5V to 3.3 using resistors, and not so easy to match BT. I am searching bow for ESP-12 which I am supposed to have somewhere, and it should fit the L293D motor shield.

Back to square 1:
I created noew project with ESP12, and still I get errors:
#include errors detected. Please update your includePath. Squiggles are disabled for

“message”: “cannot open source file “sdkconfig.h” (dependency of “BluetoothSerial.h”)”,

The ESP12 is still an ESP8266-core module, so it won’t work with the BluetoothSerial.h header. The sdkconfig.h is something Arduino-ESP32 / ESP-IDF specific (configuration file).

In that case I will abort the motor shield since I will have to migrate to ESP32. It is what it is. Thanks.