This material is work-in-progress ...
work in progress
Bluetooth is a standard for the short-range wireless interconnection of cellular phones, computers, and other electronic devices. BlueZ 🔓 is an implementation of the Bluetooth protocol stack for Linux, and it is provided by the package.
This article describes the basic installation of Bluetooth controllers and devices.
Prerequisites and Basic Installation
should be installed and setup:
Basic installation is as follows:
- Optionally install
hcitool if you need deprecated tools like
- Optionally install
- Load the
- Add user to the
- Start and enable the Bluetooth service
Now, check the state of the Bluetooth radio transmitter using
It should return something similar to:
0: hci0: Bluetooth Soft blocked: no Hard blocked: no
If the device is listed as blocked, it can be unblocked using the same tool:
There are several front-ends available:
comes with the
- : a full-featured Bluetooth manager
- KDE Bluetooth manager : the
- GNOME Bluetooth manager : the
Begin by starting
bluetoothctl and follow these basic steps:
The prompt should display:
List the available controllers:
Display information about a controller:
[bluetooth]# show controller_mac_address
Set the default controller:
[bluetooth]# select controller_mac_address
Power on the controller:
[bluetooth]# power on
Enable the agent and set it as default:
[bluetooth]# agent on [bluetooth]# default-agent
Set the controller as discoverable (temporarily for 3 minutes) and pairable:
[bluetooth]# discoverable on [bluetooth]# pairable on
Scan for devices:
[bluetooth]# scan on
Put the device into pairing mode. This generally involves pressing a button or a combinations of buttons, usually for several seconds.
Discover the device MAC address:
Pair with the device:
[bluetooth]# pair device_mac_address
Enter the PIN if prompted:
[agent] PIN code: ####
Trust the device:
[bluetooth]# #trust device_mac_address
Connect to the device:
[bluetooth]# connect device_mac_address
Display information about the device:
[bluetooth]# info device_mac_address
The device is now paired:
Set adapter power state
If you would like the adapter to not be automatically enabled (e.g. on a portable device where you wish to save battery), set
/etc/bluetooth/main.conf in the
An experimental feature can be enabled in order to report device battery level:
Due to the variety of available Bluetooth hardware it is possible that you receive errors while attempting to install, activate, or find your Bluetooth device.
"No default controller available" error
After having followed these instructions, or others, you run
bluetoothctl and encounter the following scenario:
[bluetooth]# list [bluetooth]# show No default controller available
One possible solution is that you are missing firmware drivers.
Try running the following command to discover the source of the issue:
There are many firmware packages available that could likely solve the this problem (see).
Another possible solution is to installand add load the module:
Unable to control Bluetooth speaker volume / Bluetooth output is muted (Pulseaudio)
It is possible to automatically switch audio output and volume control to last connected device.
This can solve the problem of controlling the speaker volume when switching between Bluetooth devices.
Append the following lines at the end of the /etc/pulse/default.pa: