1. Introduction
In this short tutorial, we'll show how to enable a Bluetooth device on Linux systems. Devices could be blocked due to software or hardware reasons.
For this purpose, we'll be using rfkill tool, used for disabling and enabling wireless devices. First, we'll show how to install it, then how to check the status of your Bluetooth device, and finally, how to turn it on in case that it's blocked for some reason. For this example, we're using the Kali Linux that is one of many Debian derivates, so you'll notice that we're using dpkg. If you have some other distribution, please use the package management software that you find most suitable for your distribution.
2. Check if you have rfkill tool on your machine
First check if you have rfkill installed on your system using the following command:
dpkg -s rfkill
The output should be as follows:
Package: rfkill
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 145
Maintainer: util-linux packagers <util-linux@packages.debian.org>
Architecture: amd64
Multi-Arch: foreign
Source: util-linux
Version: 2.36-3
Replaces: bash-completion (<< 1:2.8~)
Depends: libc6 (>= 2.14), libsmartcols1 (>= 2.33)
Breaks: bash-completion (<< 1:2.8~)
Description: tool for enabling and disabling wireless devices
rfkill is a simple tool for accessing the Linux rfkill device interface,
which is used to enable and disable wireless networking devices, typically
WLAN, Bluetooth and mobile broadband.
Homepage: http://www.kernel.org/pub/linux/utils/util-linux/
If you have it, great, you can skip the following step.
3. Install rfkill tool
The rfkill tool is installed like any other package:
sudo apt-get install rfkill
4. Check the current status of your Bluetooth device
To check the current status of your wireless devices, use the following command:
sudo rfkill list
As an output, you'll see something like this:
0: ideapad_wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
1: ideapad_bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
2: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
3: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Be sure that any of your Bluetooth devices have no soft blocked or hard blocked property set to yes. If that's the case anyway, go to the following step.
5. Enable a Bluetooth device on Linux system
To enable/unblock your Bluetooth device, use the following command:
sudo rfkill unblock bluetooth
After this command, repeat step 4 of this tutorial to be sure that everything is in place.
If your Bluetooth device was blocked/disabled, it's a chance that the Bluetooth service is not started on your machine, so start it using:
sudo service bluetooth start
6. Conclusion
In this tutorial, we showed how to enable or unblock Bluetooth devices on our Linux system. For more detaills on rfkill tool, check the official rfkill documentation.