/ tuesdaytooling

Tuesday Tooling: Making Bluetooth Connections From The Terminal

Yes this is the late edition of Tuesday Tooling...I've been on holiday


You're connected to your Raspberry Pi / Pocket Chip / Single Board Computer via a terminal session, but you would really like to use a Bluetooth device...no fancy GUI can help us now!


Use bluetoothctl

Open up a terminal and enter the following to drop into an interactive bluetoothctl session.


Now inside the session lets power on the Bluetooth transceiver in the device.

power on

Turn on the scanner.

scan on

Create a background agent.

agent on

Look for devices that are available for pairing.


You will now see all the devices available for connection, and their MAC addresses.
Find the device that you wish to connect to and copy the MAC address.

Now pair the device.


Then trust the device so that we don't have to do this again.


Lastly complete the connection.

connect [MAC ADDRESS]

Now you can use your Bluetooth device with you computer!