Bluetooth headset

This guide describes how to use a bluetooth headset under Gentoo with bluez 4.80. No GUI programs or applets are needed !

Installation of net-wireless/bluez
bluez must have been emerged with the "test-programs" USE flag. Otherwise you won't find the "simple-agent" program.

euse -E test-programs emerge bluez

Make your bluetooth headset visible.

Then run

hcitool scan

You should now get a list of available bluetooth devices.

Output might look like

Scanning ... 00:16:44:FD:6B:A0      DELL BH200

Note the address of the headset.

Pairing

simple-agent hci0 00:16:44:FD:6B:A0

Mark the device trusted so it can connect automatically

bluez-test-device trusted 00:16:44:FD:6B:A0 yes

Connect

bluez-test-audio connect 00:16:44:FD:6B:A0

If you use ALSA

First try autodetection, edit /etc/asound.conf (systemwide) or ~/.asoundrc (user level)

@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, edit /etc/asound.conf or ~/.asoundrc

pcm.!default { type bluetooth device 00:16:44:FD:6B:A0 profile "auto" }

OR: to create a new, additional output channel, edit /etc/asound.conf or ~/.asoundrc

pcm.bluetooth { type bluetooth device 00:16:44:FD:6B:A0 profile "auto" }

Restart ALSA

/etc/init.d/alsasound restart

Testing
Play a sound file using your bluetooth headset. With mplayer type

mplayer -ao alsa:device=bluetooth

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

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

Enable the socket in /etc/bluetooth/audio.conf might help

[General] Enable=Socket

List of working devices

 * Playstation 3: cechya-0076 - works as headphone
 * 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-101 - works as headphone
 * Nokia BH-214  - works as headphones - microphone doesn't seem to work with preliminary testing
 * Nokia BH-505 - works as headphones - mic not thoroughly tested
 * HBH-DS200 - works as headphones - microphone not yet tested
 * Motorola H700 - does not work as headphone - does not work as microphone && catostrophic system flooding failure