I'm looking for the same stuff. I need to connect from an ESP32 to a bluetooth device (in my case, an OBD2 bluetooth plug in a car) and set up a serial connection over the BT connection.
Online, there's heaps of stuff to be found about Blutooth BLE and how connect over BT classic TO
the ESP32, but I haven't been able to find any example script that shows me how to connect to bluetooth device FROM
an ESP32. I'm starting to think it's not possible (yet) with the Arduino IDE, but I still have hope that this is possible.
What I need to do, summarised:
- Set up a bluetooth connection from the ESP32 to a known BT device. The BT MAC address, name, PIN etc. of the device are known
- Set up a serial connection over the BT connection
- Send a command from the ESP32 to the BT device over the serial connection
- Listen over the serial connection to the BT device response to the command
I hope some one can help. Having an easy way to connect to BT classic devices should make the ESP32 an even more powerful device!