Debian

How to Configure Bluetooth On Debian

Suppose your laptop or computer has WiFi or Bluetooth hardware installed. In that case, there is a chance that Debian won’t recognize it automatically after you’ve installed Debian on your computer, as many other Linux distributions do. It’s because Debian does not include these drivers by default. But, you can easily install the required drivers from the official Debian non-free repository and get them to work on Debian.

In this article, I will show you how to enable and configure Bluetooth on Debian 10. So, let’s get started.

Table of Contents

  1. Installing Bluetooth Drivers
  2. Getting the Bluetooth Adapter Ready
  3. Using GNOME Bluetooth to Connect to Bluetooth Devices
  4. Using Bluedevil to Connect to Bluetooth Devices
  5. Using Blueman to Connect to Bluetooth Devices
  6. Conclusion
  7. References

Installing Bluetooth Drivers

Most laptops these days have one of the many versions of the Intel CNVi wireless adapters installed on them, and these adaptors usually provide WiFi and Bluetooth support for these devices. So, to get Bluetooth working on your Debian machine, you have to install the iwlwifi firmware on your computer.

NOTE: My test computer has the Intel Wireless-AC 9560D2W card installed. It provides Bluetooth and WiFi functionality for my test computer.

First, enable the Debian official non-free package repository with the following command:

$ sudo apt-add-repository non-free

The Debian official non-free package repository should be enabled.

Update the APT package repository cache with the following command:

$ sudo apt update

The APT package repository cache should be updated.

Now, install the iwlwifi firmware with the following command:

$ sudo apt install firmware-iwlwifi -y

The iwlwifi firmware is being installed. It may take a few seconds to complete.

The iwlwifi firmware should be installed.

For the changes to take effect, reboot your computer with the following command:

$ sudo reboot

Getting the Bluetooth Adapter Ready

You can use rfkill to find out whether your computer has detected the installed Bluetooth hardware of your computer.

First, install the rfkill package with the following command:

$ sudo apt install rfkill -y

rfkill should be installed.

Run rfkill as follows:

$ sudo rfkill

All the wireless hardware (i.e., Wi-Fi and Bluetooth) installed on your computer should be listed.

As you can see, a Bluetooth device is available on the list. It has the ID 0 on my computer. On your computer, the ID may be something other than 0. So, make sure to replace it with yours from now on.

In some cases, Bluetooth may be blocked on your computer.

To use the Bluetooth hardware, you will have to unblock it as follows:

$ sudo rfkill unblock 0

NOTE: Here, 0 is the ID of the Bluetooth device.

As you can see, the Bluetooth device is unblocked. Now, it’s ready to be used.

Using GNOME Bluetooth to Connect to Bluetooth Devices

GNOME Bluetooth is the default Bluetooth manager app for the GNOME 3 desktop environment. GNOME Bluetooth is tightly integrated with the GNOME 3 desktop environment. So, you will have an amazing experience using it.

You can install all the required packages to set up GNOME Bluetooth on Debian 10 with the following command:

$ sudo apt install Bluetooth gnome-Bluetooth bluez bluez-tools pulseaudio-module-Bluetooth

To confirm the installation, press Y and then press <Enter>.

GNOME Bluetooth and all the required dependency packages are being installed. It may take a few seconds to complete.

At this point, GNOME Bluetooth and other required packages should be installed.

Now, check the status of the Bluetooth service as follows:

$ sudo systemctl status Bluetooth

The Bluetooth service should be active/running and enabled as marked in the screenshot below.

In case the Bluetooth service is not active/running, you can start it with the following command:

$ sudo systemctl start Bluetooth

In case the Bluetooth service is not enabled, you can enable it with the following command:

$ sudo systemctl enable Bluetooth

Once GNOME Bluetooth is installed and the Bluetooth service is active/running, you can navigate to the Bluetooth section of the GNOME Settings app and connect to your Bluetooth devices from there.

To learn how to use GNOME Bluetooth, read the Connecting to a Bluetooth Device using GNOME Bluetooth section of the article How to Connect to a Bluetooth Device on Arch Linux.

Using Bluedevil to Connect to Bluetooth Devices

Bluedevil is the default Bluetooth manager app for the KDE desktop environment. Bluedevil is tightly integrated with the KDE desktop environment. So, you will have an amazing experience using it.

You can install all the required packages to set up Bluedevil on Debian 10 with the following command:

$ sudo apt install Bluetooth bluedevil bluez bluez-tools pulseaudio-module-Bluetooth

To confirm the installation, press Y and then press <Enter>.

Bluedevil and all the required dependency packages are being installed. It may take a few seconds to complete.

At this point, Bluedevil and other dependency packages should be installed.

Now, check the status of the Bluetooth service as follows:

$ sudo systemctl status Bluetooth

The Bluetooth service may not be running.

The Bluetooth service should be enabled.

In case the Bluetooth service is not active/running, you can start it with the following command:

$ sudo systemctl start Bluetooth

In case the Bluetooth service is not enabled, you can enable it with the following command:

$ sudo systemctl enable Bluetooth

Once Bluedevil is installed and the Bluetooth service is active, you can click on the Bluetooth icon ( ) from the KDE panel to bring up the Bluetooth applet.

You can manage your Bluetooth devices from here.

You can also right-click (RMB) on the Bluetooth icon ( )  from the KDE panel and click on Configure Bluetooth… as marked in the screenshot below to bring up the Bluetooth System Settings window.

From this window, you can manage your Bluetooth devices from here as well.

To learn how to connect to Bluetooth devices with Bluedevil, read the Connecting to a Bluetooth Device using Bluedevil section of the article How to Connect to a Bluetooth Device on Arch Linux.

Using Blueman to Connect to Bluetooth Devices

Blueman is a third-party Bluetooth manager. If you want, you can also use it to manage your Bluetooth devices.

You can install Blueman on Debian 10 with the following command:

$ sudo apt install Blueman

To confirm the installation, press Y and then press <Enter>.

Blueman is being installed. It may take a while to complete.

At this point, Blueman should be installed.

Once Blueman is installed, you can start it from the Application Menu of your computer.

The Blueman app should start. You can manage your Bluetooth devices from here.

To learn how to connect to Bluetooth devices with Blueman, read the Blueman for Connecting to a Bluetooth Device section of the article How to Connect to a Bluetooth Device on Arch Linux.

Conclusion

In this article, I have shown you how to install Bluetooth drivers on Debian and configure it. I have also shown you how to set up the GNOME 3 desktop environment and the KDE desktop environment for using Bluetooth. I have shown you how to install a third-party Bluetooth manager Blueman on Debian as well.

References

[1] Bluetooth – ArchWiki

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.