Posted on Jan 2, 2010

Skype, Linux, Alsa & Bluetooth

Today I've been finally able to make my bluetooth headset working fine with Skype.
First of all I want to say that Skype for Linux quite sucks on what should be its main purpose: audio communications.
 

Check out your kernel configuration. Running "lsmod" here is my module configuration related to audio/bluetooth:

lsmod
Module Size Used by btusb 10883 2 rfcomm 32313 4 sco 7586 2 bnep 9474 2 l2cap 28147 16 rfcomm,bnep coretemp 4646 0 snd_pcm_oss 30288 0 snd_mixer_oss 12350 1 snd_pcm_oss snd_seq_oss 23147 0 snd_seq_midi_event 5516 1 snd_seq_oss snd_seq 43658 4 snd_seq_oss,snd_seq_midi_event snd_seq_device 5297 2 snd_seq_oss,snd_seq snd_hda_codec_realtek 256239 1 snd_hda_intel 19780 1 snd_hda_codec 61238 2 snd_hda_codec_realtek,snd_hda_intel snd_hwdep 5362 1 snd_hda_codec snd_pcm 61528 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec snd_timer 16938 2 snd_seq,snd_pcm snd 51423 13 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer soundcore 6040 1 snd snd_page_alloc 6813 2 snd_hda_intel,snd_pcm

In particular you should make sure to have bt-sco enabled in your kernel.

Now you should gather information about your device, in particular you need its bluetooth MAC address:

hcitool scan
Scanning ... 00:07:B0:11:81:83 BTC5

Write somewhere this xx:xx:xx:xx:xx:xx address, you’ll need it in a while.

Next step is to pair your bluetooth device with your computer.
I use gnome-bluetooth to manage bluetooth devices on my system so feel free to use anything that works for your system.
Look up for your device, start pairing it and issue the PIN (usually 0000 for handsets).

Pair

Once everything seems working fine, let’s configure ~/.asoundrc (Notice that this file should be placed in your user homedir).

Well, open that file (or create it) with your favorite text-editor:

vi ~/.asoundrc
pcm.bluetooth { type bluetooth device xx:xx:xx:xx:xx:xx # The device address gathered before }

This will tell your audio tools that exists another control named “bluetooth” that points out to the device address “xx:xx:xx:xx:xx:xx” (your bluetooth headset).

This should be enough, fire up skype and choose “bluetooth” for incoming and outcoming audio flows.

Note: Some issues you might encounter:

Please make sure you run skype from a terminal to collect more informations

  • This error shows up:
    ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL bluetooth



    Actually you might ignore this message. However, if you followed Bluez HOWTO/AudioDevices and you put something like

    pcm.bluetoothraw {
       type bluetooth
       device 00:11:22:33:44:55
    }
    pcm.bluetooth {
        type plug
        slave {
            pcm bluetoothraw
        }
    }

    in your ~/.asoundrc, then I can tell you that I had this issue before. I just removed this “workaround” and I simply used the “normal” configuration.


  • On Gentoo amd64 is possible that you get some errors regarding not found lib32 libs. This is “normal” (shouldn’t be, but happens). Just unmask and use app-emulation/emul-linux-x86-soundlibs-20091231. This ebuild contains lib32 alsa-bluetooth libraries you need.

Comments

  • JackTheVendicator

    I’m having lots of problems with the same headset and a broadcom based dongle… which kernel version are you using?

  • elbryan

    2.6.32 if I recall correctly.

    The dongle you’re using is an usb one?