Wednesday, December 28, 2005

Linux Fedora Core 4, Headset Jabra BT500, Bluetooth and Sound

I finally got it - a bluetooth headset - cool thing...
But it is very hard to convice a geek like me that this is going to work only with my Nokia phone and/or M$ operating system installed on my IBM box. So I took a quest for finding an answer how to make it working with my Fedora.

Making sure everything is installed

To make it working - one will need to:

  • install bluetooth (BlueZ stack) support: # yum install bluez-libs bluez-pin bluez-utils bluez-hcidump bluez-utils-cups
  • install ALSA with devel packages: # yum install alsa-tools alsa-lib alsa-utils alsa-lib-devel
  • install automake-1.7
  • make sure you are running kernel 2.6.x (

Install BTSCO (bluetooth sound for ALSA)

Check btsco out from cvs:

cvs login
cvs co btsco

Compile btsco:

make install
make maintainer-clean
For SCO (two-way voice quality audio) you need a kernel with the emu10k1 driver selected (this is one of the drivers that forces the inclusion of the implementation of "snd_hwdep_new"). Build the kernel module:
cd kernel
make install
depmod -e
make clean

Connect and start using your headset

Turn on your bluetooth dongle, activate paring on your headset and scan for the head set
hcitool scan
Next try to connect your box to headset (change 00:00:00:00:00:00 to MAC of your headset):
hcitool cc 00:00:00:00:00:00
If you have any problems with paring check your /etc/bluetooth/hcid.conf, it should look like that:
options {
autoinit yes;
security user;
pairing multi;
# PIN helper
pin_helper /etc/bluetooth/;
# D-Bus PIN helper

device {
name "%h-%d";
# Local device class
class 0x120104;
# Inquiry and Page scan
iscan enable; pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
# Authentication and Encryption (Security Mode 3)
auth enable;
encrypt enable;
... and the /etc/bluetooth/ should look like that (with 700 access rights; remember to change 0000 to your headset PIN number):
echo "PIN:0000"
When you box is paired with headset you can proceed with the rest of sound set up commands. insert the module (or better, set up the alsa configuration to load it)
 modprobe snd_bt_sco

stop the esound controller if it's running via
 esdctl stop
run (in case of problems you might change 0x0060 to 0x0040)
        hciconfig hci0 voice 0x0060
run the handler (let it keep running if you run in the foreground)
 btsco -v 00:00:00:00:00:00 
... and that's it - easy, isn't it? You may want to restart kmix if you are using one, and look for the BT Headset audio device. At Skype - look for a new DSP device - probably /dev/dsp1 or /dev/dsp2.

Alternatively you can take a shortcut but using Skype hijacking solution by Andreas Beck.

Finally a couple of web pages worth visiting:

No comments: