Tony's ramblings on Open Source Software, Life and Photography

Using Bluetooth Headset With Skype In 64 Bit Ubuntu

First I'll say I'm nowhere near an expert on bluetooth with Ubuntu - or even bluetooth for that matter. What I've done is mash together a lot of different things until I found what worked for me. Your mileage my vary, but this is how I got my Plantronics bluetooth cellphone headset working with Skype in 64 bit Ubuntu Intrepid.

Please note - the bluetooth stack changed between Hardy (8.04) and Intrepid (8.10). This is for Intrepid.

Setup the bluetooth environment

First, of course, you must get bluetooth working and paired with your bluetooth headset. That part is actually pretty easy.

Make sure you have the following packages. I think bluez-alsa is the one that may not be installed by default, but go ahead and check them all:

sudo apt-get install bluetooth bluez bluez-gnome bluez-alsa bluez-gstreamer libbluetooth3

Once it's all installed, create a file called .asoundrc in your home directory and place the following text inside it:

pcm.Headset {
  type bluetooth
  profile "voice"

I saw several HOWTO's that talked about loading modules or otherwise affecting the audio drivers, but I found that with Intrepid, none of that was necessary.

Pairing your headset

I found that if you'd tried to pair your device before or otherwise went through an upgrade, it may be a good idea to remove all associations. BE ADVISED: this will remove ALL bluetooth pairings from your computer, so if your keyboard or mouse uses BT, don't do this next step!

sudo rm -R /var/lib/bluetooth/*

Now, reboot and attempt to pair your device. One of two ways may work - you may simply trigger a pairing on the headset and a pop-up will automatically appear on your desktop offering to pair it. If that doesn't happen, right click on the bluetooth icon in the tray and pick setup new device. You can probably figure out the rest of the pairing from there.

Test with ALSA

Once your headset is paired, let's make sure it's working through ALSA properly. Run the following. After a few seconds, you should hear whatever you say echoed back in your ear:

arecord -D Headset -f S16_LE | aplay -D Headset -f S16_LE

Hit CTRL-C to cancel the recording. If however you get Input/Output errors, try restarting the bluetooth service:

sudo /etc/init.d/bluetooth restart

Unfortunately I found that every time I turn off the headset, I have to restart the bluetooth service before it works again.

If you haven't made it this far, I honestly don't know what could be wrong - but feel free to discuss it in the comments with each other - someone may have a clue. For me, things worked at this point - I think. The problem is that I tried a LOT of different things before getting this far, and it's possible I've left out a step I did without realizing it.

Install missing libraries

Now, I'm going to assume you already have Skype working on your 64 bit system using the static build of Skype for 64 bit Ubuntu installs. I'll also assume that you already figured out that it's not working with your bluetooth headset. If you run Skype from a command line you should see:

Cannot open shared library /usr/lib32/alsa-lib/

This is because Skype is looking for the 32 bit libraries.

The easiest way to install what you need is the same trick used for Tweetdeck. Download the GetLibs package and install it.

After getlibs is installed, run the following:

getlibs -p bluez
getlibs -p bluez-alsa

You may find you need to reboot one last time. Now in Skype set your audio source and output to "Headset" and run a test echo call. If all has gone well you should be up and running!

ubun2d00d's picture

Alsa Test

I am trying to get skype to work with my bluetooth headset (Samsung WEP210) under 32 bit Ubuntu 8.10. I know that this is a 64 bit tutorial but it seems to get me further than any other how-to's and forums I have looked at. Anyway, I was fine up to testing alsa. I typed in the command as per instruction and it started to capture but I couldn't hear myself. I could however hear some slight hissing as if an audio connection had been made, the lights on my bluetooth dongle also showed that a connection had been made and the command line printed:

"Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono"

After a few seconds the connection was cut with an error. The error is as follows:

"arecord: set_params:1015: Unable to install hw params:
RATE: 8000
TICK_TIME: [0 0]
aplay: playback:2148: read error"

I desided to try skype anyway. I loaded skype and changed all the sound sources over to "Headset" as per instruction and instantly heard that slight hissing noise. When I tried an echo call, however, I just got "Problem with audio playback". I have been trying this for some time now and always seem to hit brick walls! Would greatly appreciate any suggestions.

urmum's picture

exact same problem as you :(

exact same problem as you :(

tony's picture

Wish I could help - I've

Wish I could help - I've only got the one configuration to play with and like I said - I'm no expert on this. If you find anything out, please come back and post your experiences!

ubun2d00d's picture

Alsa Test

I must admit it all does look a little odd! The only thing that I have been able to come up with is that it is my bluetooth headset. It was a cheapy that I got free with my mobile phone and I have come to the conclusion that it must, in some way, be incompatible with my particular Linux kernel, although I am not sure about this. I have decided to get a hard wired headset instead because I will need skype soon and I do not have enough time to look for answers. However, I will keep my eyes and ears open for an answer.

Thank you for all of your comments.

JB's picture

Skype finally working!

Thank you - this tutorial was most helpful. I have 32 bit 9.04 Ubuntu Jaunty and a Plantronics 520 (bought on the strength of this piece in fact). I would be interested to learn which Skype version you were using.

My comment on this is - it works a treat but only for me with Skype (which is still downloadable from skype if you google a bit). The latest beta release linux binary ( only interacts with the PulseAudio system and does not (for me on ubuntu 9.04) pick up the Plantronics headset (or any other audio interface). Only allows you to pick from many different audio systems.

I tried quite hard to get the headset talking to the PulseAudio system but with the standard 9.04 system this does not seem to be possible in a way that Skype will recognise. I have seen tell of it working with later versions of PulseAudio 0.9.15+ (Jaunty comes with 0.9.14 as standard) - but it is a lot of work and I suspect it would be easier to upgrade to Karmic if the latest Skype release is important to you.

I strongly recommend BlueMan as a better bluetooth device manager - you have to build it yourself I'm afraid - not AFAIK an ubuntu package yet.

When I did intermittently get a similar problem to yours (ubuntud200d) - I found restarting the bluetooth daemon or indeed the whole box did clear it.

mw's picture

Bluetooth & Skype on Ubuntu

JB: "I strongly recommend BlueMan as a better bluetooth device manager - you have to build it yourself I'm afraid - not AFAIK an ubuntu package yet."

Not sure what the status was at your time of writing, but it is currently available in the software center.

My current setup is:

Ubuntu 9.10 Jaunty 32bit (2.6.31-17-generic kernel)
Pulseaudio 0.9.19
Blueman 1.21

At this point in time, Blueman successfully recognizes my bluetooth device, but pulseaudio does not see it, therefore I can not choose it within Skype.

waaa's picture

Bluetooth Headset and Ubuntu Karmic 64 bit

My configuration is:
Pulseaudio 0.9.21
Linux 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64 GNU/Linux
Headset Motorola H670
HP Pavilion 1135ew

I am totally shocked. All works fine just after first try without any configuration edit (headset detected via blueman). I can talk via skype and see and hear other audio and video on standard devices.

Configuration process on Windows was very painful.

Anonymous n00b's picture

Dell BH-200