I spent too many hours trying to figure this stupid thing out.. but FINALLY! I have my bluetooth headset working in CentOS 7 with the KDE 4 Plasma environment. Read on if you dare…
First, you must configure dbus to allow your user to use the bluetooth dongle. Add the following above the closing /busconfig tag. Be sure to replace USERNAME with your user account:
sudo nano /etc/dbus-1/system.d/bluetooth.conf
<policy user="USERNAME">
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent1"/>
<allow send_interface="org.bluez.GattCharacteristic1"/>
<allow send_interface="org.bluez.GattDescriptor1"/>
<allow send_interface="org.freedesktop.DBus.ObjectManager"/>
<allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>
Remove and re-plug the adapter in.
Next, follow Arch Linux’s excellent guide on how to pair a bluetooth device using bluetoothctl
bluetoothctl
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on
Now make sure that your headset is in pairing mode. It should be discovered shortly. For example,
[NEW] Device 00:1D:43:6D:03:26 Lasmex LBT10
shows a device that calls itself “Lasmex LBT10” and has MAC address “00:1D:43:6D:03:26”. We will now use that MAC address to initiate the pairing:
[bluetooth]# pair 00:1D:43:6D:03:26
After pairing, you also need to explicitly connect the device (every time?):
[bluetooth]# connect 00:1D:43:6D:03:26
If you’re getting a connection error org.bluez.Error.Failed
retry by killing existing PulseAudio daemon first:
$ pulseaudio -k
[bluetooth]# connect 00:1D:43:6D:03:26
Finally, configure pulseaudio to automatically switch all audio to your headset by adding the following line to the bottom of /etc/pulse/default.pa:
nano /etc/pulse/default.pa
# automatically switch to newly-connected devices
load-module module-switch-on-connect
Update 7/27: I rebooted my machine and lost my bluetooth, to my dismay. I discovered that my user needs to be a member of the audio group. Since I’m in an active directory environment I think the local audio group got removed at reboot. So, to restore it, as root I had to run this:
usermod -aG audio <user>
After doing that, to prevent logging out and back in again, you can do the following:
su - <USERNAME>
Once that’s done all the bluetoothctl commands worked again.