How to connect to a bluetooth device using cli in GNU/Linux
Use bluetoothctl!
bluetoothctl
# [bluetooth]# power on
# [bluetooth]# agent on
# [bluetooth]# default-agent
# [bluetooth]# scan on
# … wait until you see 11:22:33:44:55:66 …
# [bluetooth]# pair 11:22:33:44:55:66
# [bluetooth]# trust 11:22:33:44:55:66
# [bluetooth]# connect 11:22:33:44:55:66
If you have a problem with your device:
sudo systemctl stop bluetooth # assuming you have systemctl, otherwise use your daemon manager's equivalen command.
sudo rm -rf /var/lib/bluetooth/AA:BB:CC:DD:EE:FF/11:22:33:44:55:66 # only if you have a serious problem with the device
sudo systemctl start bluetooth