The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.
The following packages are required:
bluez:bluetoothdbluez-utils:bluetoothctl,rfcomm
-
Start daemon:
systemctl start bluetooth -
Pair using
bluetoothctl:power on agent on scan on ... wait ... scan off pair <dev> -
Create serial device:
rfcomm bind 0 <dev>
You should now have /dev/rfcomm0.
-
Remove serial device:
rfcomm release 0 -
Unpair using
bluetoothctl:remove <dev> power off -
Stop daemon:
systemctl stop bluetooth
Check rfkill list to make sure that the Bluetooth device is not blocked.
Weird for issue on Archlinux.
After pairing, when I attempt to connect via
bluetoothctlitself, I get these:[bluetooth]# connect 38:0B:3C:XX:XX:XX Attempting to connect to 38:0B:3C:XX:XX:XX [CHG] Device 38:0B:3C:XX:XX:XX Connected: yes Failed to connect: org.bluez.Error.Failed [CHG] Device 38:0B:3C:XX:XX:XX Connected: noMade me scratch my head for an hour when I found this gist and just
rfcomm bind 0 <dev>worked.EDIT: Just figured out the even the wiki suggests to only pair. Damn.