ESP32 Bluetooth
2026-03-24
Edited: 2026-03-24
Connecting to ESP32 Bluetooth is kind of weird because it uses a Serial Port Profile (SPP) which does not come with bluetoothctl profiles by default. You have to instead use rfcomm directly instead.
- Use
bluetoothctlto trust and pair device sudo rfcomm /dev/rfcomm0 <MAC> <CHANNEL>echo <COMMAND> > /dev/rfcomm0to send commands
You might have to use rfcomm bind /dev/rfcomm0 <MAC> first, but probably not. Use sdptool browse <MAC> to get information about the device as well as what channel you have to connect to <CHANNEL> defaults to 1 for rfcomm connect. Use rfcomm -a to get all connected devices.
You might hit permission errors when trying to echo into /dev/rfcomm0, that can probably be fixed using chmod a+rw /dev/rfcomm0, with sudo of course.