Thursday, February 08, 2007

Wirefree!

I received a Jabra BT135 Bluetooth Headset, courtesy HP, a couple of days ago. Funny thing is that they import it to a place that's ten minutes from the Institute, but I had to wait for two months for it!

My primary purpose for this new toy was to use it with Bonszai, rather than with a mobile phone. Yes, it's mono and not stereo, but going wireless with audio would be fun! Turns out Linux does support these headsets out of the box, with the snd-bt-sco driver. Essentially, this driver supports bluetooth headsets by appearing as another sound card to all applications. This page has more details.

Unfortunately, nothing ever works out of the box for me. Turns out that because I'd re-compiled ALSA separately from the rest of the kernel, the snd-bt-sco driver refused to load, citing lots of missing (and version mismatched) symbols. Either I could recompile the entire kernel or go back to the older version of ALSA (and lose the normal headphone support!). I decided instead to upgrade to kernel 2.6.20 which I knew would have the latest ALSA. The only thing that would break would be the nvidia drivers.

So there I was, snd-bt-sco loaded, btsco running, and trying to get a song to play using aplay or mpg123. Except it just wouldn't play! The headset would pair up, authenticate, send messages to the computer whenever I pressed buttons, emit a ringtone when I commanded it from the computer, doing everything short of playing a song. All the music playing apps would just freeze. Others had encountered this situation too, but nobody seemed to have found a solution to it. Just bugreport after bugreport. I struggled for a long day, before giving up.

Today, I found this bluetooth-alsa page and this thread that documented a fix to exactly the same problem. The solution was simple: use the force_scofix argument to the hci_usb module (when you load it the first time), especially if you're running a Broadcom adapter.

Voila! It worked! Sound is not that great, but it is convenient to listen to music about 5 meters wire-free away!

I hate Broadcom. What's wrong with them? First wireless adapters, now Bluetooth adapters. Sigh.

No comments: