Bluetooth Headset

From Gentoo Wiki
Jump to: navigation, search

This article describes the setup of a bluetooth headset.

Prerequisites

A Bluetooth installation must be done first. If you use simple-agent, no GUI programs or applets are needed. Here is how to setup ALSA sound.

ALSA configuration

Edit /etc/asound.conf (systemwide) or ~/.asoundrc (user level). Add one of the following code snippets, and replace the MAC address with the one of your bluetooth device.

File/etc/asound.conf or ~/.asoundrc

# First try autodetection:
@hooks [
	{
		func load
		files [
			"/usr/share/alsa/bluetooth.conf"
		]
		errors false
	}
]

# Specify your device if autodetection doesn't work for you:

## To redirect ALL output to the headset
#pcm.!default {
#type bluetooth
#device 00:16:44:FD:6B:A0
#profile "auto"
#}

## OR: to create a new, additional output channel
#pcm.bluetooth {
#type bluetooth
#device 00:16:44:FD:6B:A0
#profile "auto"
#}

Restart ALSA.

root # /etc/init.d/alsasound restart

Testing

Play a sound file. When it works, please add your device to our Hall of Fame.

user $ mplayer -ao alsa:device=bluetooth <filename>

Troubleshooting

Audio socket

Some setups (non-PulseAudio) need Socket enabled, if there's no sound.

File/etc/bluetooth/audio.confEnable audio socket

[General]
Enable=Socket

BlueZ 5

Non-PulseAudio setups need to skip BlueZ 5 for now, as the ALSA plugin has been removed.

File/etc/portage/package.maskMask BlueZ 5 versions

>=net-wireless/bluez-5

Can't open input device

Compile and load the uinput kernel module, when things don't work, and the logs show this error:

CodeOutput of Syslog

bluetoothd: Can't open input device: No such file or directory (2)
bluetoothd: AVRCP: failed to init uinput for 00:16:44:FD:6B:A0
bluetoothd: Unable to select SEP
Kernel configuration

Device Drivers  --->
   Input device support  --->
      [*]   Miscellaneous devices  --->
         <M>   User level driver support

No audio service is available

After updating to net-wireless/bluez-5.xx it might happen, that a Bluetooth headset is connected, but ALSA / PulseAudio fails to pick up the connected device.

An error message like this might be shown in the output of PulseAudio:

CodeDebug output of PulseAudio

I: [pulseaudio] module-card-restore.c: Restoring profile for card bluez_card.00_16_94_0B_6F_DE.
I: [pulseaudio] card.c: Created 10 "bluez_card.00_16_94_0B_6F_DE"
bt_audio_service_open: connect() failed: Connection refused (111)
W: [pulseaudio] module-bluetooth-device.c: Bluetooth audio service not available
W: [pulseaudio] module-bluetooth-device.c: Service not connected
I: [pulseaudio] card.c: Freed 10 "bluez_card.00_16_94_0B_6F_DE"
E: [pulseaudio] module.c: Failed to load module "module-bluetooth-device" (argument: "address="00:16:94:0B:6F:DE" path="/org/bluez/31716/hci0/dev_00_16_94_0B_6F_DE""): initialization failed.

To fix this, the following needs to be done:

  1. Enable the audio socket of bluetoothd
File/etc/bluetooth/audio.confEnable audio socket

[General]
Enable=Socket
  1. Restart bluetoothd by doing one of the following things:
    • Turn the software wireless kill switch off and on again
root # rfkill block bluetooth
root #
rfkill unblock bluetooth
    • Turn the hardware wireless kill switch off and on again
    • Reboot the computer
  1. Reconnect the Bluetooth headset

List of working devices

NOTE: The quality of work or capabilities of a particular headset dependent on the bluetooth adapter!

  • Dell BH200 - works as headphones - microphone not yet tested
  • HFBLU-ST6 - works as headphones - microphone doesn't seem to work with preliminary testing
  • Nokia BH-214 - works as headphones - microphone doesn't seem to work with preliminary testing
  • HBH-DS200 - works as headphones - microphone not yet tested
  • Plantronics BackBeat GO - works as headphones - microphone not yet tested
  • Nokia BH-604 - works (microphone as well)
  • Phillips SBH 6201 - works (microphone as well)
  • Phillips SBH 9100 - works as headphones - microphone not yet tested
  • Belkin Bluetooth Music Receiver (F8Z492TTP) -- works as headphones -- no built-in microphone
  • Smart Bluetooth Handset (SBH52) - works (supported rate 48000, microphone works as well, all buttons work - can assign actions in KDE)
  • LG HBS730 - works as headphones - microphone doesn't seem to work with preliminary testing
  • Prestigio PBHS1 - works as headphones - microphone not yet tested
  • Parrot Zik - works as headphones - microphone not yet tested
  • Sony MDR-ZX750BN - Works as headphones. Track and volume change buttons work. Microphone does not appear as input device in preliminary testing.