Archive for July, 2008

OLS close is near

Saturday, July 26th, 2008

After a nice week here in Ottawa/Canada full of interesting talks, presentations, tutorials and people OLS today sadfully already closes. Definitely a conference you should consider visiting if you are interested into linux and want to take part in discussions where and how to move forward. Especially the talks from James Bottomley and Mark Shuttleworth were very remarkable. Although i somehow doubt Marks idea of synchronising all major distros is doable or even worth the effort, it was nevertheless inspiring of how to break rules that are only in our minds.

Bluetooth headset with openSUSE 11.0

Friday, July 25th, 2008

Well, this turned out to be some kind of adventure. At least when you need it urgently to work as expected on a business trip. :-(

Seems we need much more testing in this area. Anybody volunteering to provide me some more hardware of this area so i can make sure it works in future? :-) (e.g. bluetooth stereo headset etc.)

I have to admit until now I hadn’t much to do with bluetooth at all, but after a salesman here in Ottawa (here for OLS) advertised me this thing would work nicely under linux.. i somehow expected we’d do nice here, but to my frustration i found we have plenty of room for improvement here.

To make it short, after a lot of hours going through hundreds all different howtos and documentation i really was desperate i never would get this thing workin… when i finally realized our packages are broken in 11.0. Or at least bluez-audio which contains libaudio.so that seems to segfault immediatelly after connecting to the device :-( . Fortunatelly the latest factory rpms have this fixed and also works on a 11.0 system (i opened a bug report for this meanwhile, perhaps you wanna place a vote for this.. bnc#412464).

Download them either from official factory repo or from seifes home buildservice project.

Please be aware that i am absolutely no bluetooth expert and all this might just be crap and i was just lucky this worked by chance for me, but perhaps this is also helpful for some more (but try on your own risks..).

After you upgraded your bluez* packages and installed bluez-audio you can make the headphone functionality make work with two simple files to create, but that solution won’t work for simultanious voice transfer for current voip softphones (like e.g. ekiga, kcall, xten etc.).

But if thats enough just:

  1. Install new bluez* packages (including bluez-audio) from above
  2. as root create the file /etc/bluetooth/audio.service with this content:
    [Bluetooth Service]
    Identifier=audio
    Name=Audio service
    Description=Bluetooth Audio service
    Autostart=true
  3. as normal user create the file ~/.asoundrc (yes, really in your home directory) with this content:
    pcm.bluetooth {
    type bluetooth
    device "00:00:00:00:00:00"
    profile "auto"
    }

    (with the address after device being that of your bluetooth headset; findable e.g. via kbluetooth or with hcitool scan on pairing)
  4. restart bluetooth service (rcbluetooth restart as root)

From then on you have new alsa device called “bluetooth” many newer audio-/multimediaplayers can acces (e.g. for mplayer: mplayer -ao alsa:device=bluetooth ….).

Sadfully for e.g. ekiga and other softphones this does not work. There we have to use/ i had to use the old snd-bt-sco module so i get a new additionall complete sound device. When back in germany or when time permits i’ll package this so this will just be simple kmp package to install, but for now heres a tar ball with the fixed sources (so they compile with a 11.0 kernel).

  1. Deactivate above method by setting Autostart to false in /etc/bluetooth/audio.service
  2. Download and extract the tar ball fseidels-btsco-05a.tar.bz2
  3. cd into the new dir and issue (as normal user) “./configure
  4. then “make
  5. and as root in that directory a “make install
  6. if not already done install kernel-source package
  7. cd /usr/src/linux
  8. as root “make cloneconfig
  9. as root “make prepare
  10. cd back to the btsco directoy and there cd into its kernel subdirectoy
  11. issue a “make
  12. copy the snd_bt_sco.ko module to /lib/modules/$(uname -r)/weak-updates/ (as root)
  13. issue a “depmod -a” (as root)

To start/use it

  1. restart bluetooth service
  2. pair your headset (e.g. with help from kbluetooth)
  3. issue “hciconfig hci0 voice 0x0060” as root
  4. issue a modprobe snd_bt_sco as root
  5. start “btsco 00:00:00:00:00” (as root; with the address parameter being that of your headset)
  6. chmod 666 /dev/dsp1 (as root)
  7. chmod 666 /dev/mixer1 (as root)
  8. as root issue “alsamixer -c 1” to adjust volume settings

now you have a workin new /dev/dsp1 sound device you can set in the audio settings of ekiga and other voip softphones and use it like expected. :-)

Hope this helps anybody and hopefully i will soon find the time to package this up as decent kmp with automated udev-rules so it gets easier to use.