All of the latest Raspberry Pi models have Bluetooth built in, giving users another medium by which they can connect their peripheral devices such as headphones, keyboard, mouse, etc. Ideally, Bluetooth devices should be easy to connect to your Raspberry Pi. The connection process usually involves making your peripheral device discoverable, and then selecting the devices from the Bluetooth list on your Raspberry Pi.
If your Bluetooth devices are not syncing to your Raspberry Pi, there are some troubleshooting steps you can take to check the Bluetooth status on your Raspberry Pi. In this tutorial, we will go over the step by step instructions of connecting a Bluetooth device to the Raspberry Pi, and checking the status of the Bluetooth service.
In this tutorial you will learn:
- How to connect a Bluetooth device to a Raspberry Pi
- How to check Bluetooth status on Raspberry Pi
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Connect Bluetooth device to a Raspberry Pi
First, let’s quickly cover the step by step instructions to connect a Bluetooth capable device to your Raspberry Pi. If these steps fail somewhere along the way, then it is recommended to proceed to the next section which contains commands for checking the Bluetooth status, restarting the service, etc.
- The easiest way to pair a Bluetooth device with your Raspberry Pi is to select the Bluetooth icon from the upper right corner of the desktop.
On this menu, you can select ‘Make Discoverable’ if you plan to do the pairing from your other device. Otherwise, select ‘Add Device.’
- After selecting ‘Add Device’ you will see your Bluetooth devices listed in the window that pops up. If you do not see your device listed here, then you need to ensure that it is currently discoverable. Select the device you wish to pair your Raspberry Pi with.
Checking Bluetooth Status
To check the current status of the Bluetooth service on Raspberry Pi, execute:
$ systemctl status bluetooth
In case you are encountering problems with the Bluetooth on your Raspberry Pi, it can be useful to restart the service:
$ sudo systemctl restart bluetooth
Further command line options for controlling the Raspberry Pi’s Bluetooth can be found within the
$ bluetoothctl [bluetooth]# help
The Bluetooth commands can be executed from within the
bluetoothctlterminal, and allow for advanced control over the Bluetooth hardware on your Raspberry Pi. It can be used for additional troubleshooting or to pair devices from the command line.
Any of the commands shown in the help menu output can then be execute. For example, to turn the Bluetooth hardware controller on or off:
$ power on Changing power on succeeded
$ power off Changing power off succeeded [CHG] Controller A0:E7:0B:C8:64:27 Powered: no [CHG] Controller A0:E7:0B:C8:64:27 Discovering: no [CHG] Controller A0:E7:0B:C8:64:27 Class: 0x00000000
In this tutorial, we saw how to pair a Bluetooth device with a Raspberry Pi system. We also learned how to check the Bluetooth status on a Raspberry Pi, and how to restart the Bluetooth service. It can be frustrating when a peripheral device refuses to pair via Bluetooth, but oftentimes a simple restart of the Bluetooth service can be all that is needed to fix the problem. There is always the
bluetoothctlcommand in case advanced troubleshooting or device pairing is needed.