I've been trying to run the ESP32 SerialToSerialBT example included with the current IDE. I installed the current BluetoothSerial library from the library manager. The compile is failing on all the method calls such as
BluetoothSerial SerialBT;
and
SerialBT.begin("ESP32test", true)
I looked in the header file, BluetoothSerial.h, and none of the method calls are there. It appears to be designed for a game controller.
It there an error here, or is this newbe missing something
which ESP32 are you using, e.g. an ESP32, ESP32S3, ESP32C3, etc?
if I set Tools>Board to "ESP32 Dev module" the program File>Examples>BluetoothSerial>SerialToSerialBT compiles and loads OK
Are you trying to connect the ESP 32 to an iphone?
The ESP32 SerialToSerialBT example uses the Serial Bluetooth library bundled with the esp32 package used to run an ESP 32 with the Arduino core for that device. To connect two ESP32 devices with classic bluetooth no other library is needed.
As @horace asked, what ESP32 are you using, as not all the model support classic bluetooth.
Upon further research, I realized the my ESP32C6 does not support Bluetooth classic.
My project is Simultaneous Location and Mapping, SLAM, robot. Arduino microcontrollers do not have enough power so I'm trying to connect to Python on a laptop. I thought that Bluetooth would be a lightweight, easy solution.
There is an older ESP32 variant from Adafruit that does support classic Bluetooth which I've ordered and will try next week.
While i know that I should have realized that there are limited ESP32s that support classic, I'm a bit annoyed that there are supplied examples that won't work and a library file, BluetoothSerial.h, which apparently has the same name as another library file for a different purpose, a time wasting trap for unsuspecting newbes
there is an equivalent to Bluetooth Classic Serial for BLE
try File>Examples>BLE>UART
creates "UART Service" you can connect too it using Serial Bluetooth Terminal app
just checked - works OK with a ESP32C6