Bluetooth handsfree with laptop in debian squeeze

Share your own howto's etc. Not for support questions!

Bluetooth handsfree with laptop in debian squeeze

Postby gradinaruvasile » 2010-02-28 22:45

Here is the idea: you have a laptop (or desktop with bluetooth stick) that has bluetooth device and a bluetooth handsfree (or headset). How to use the handsfree with skype or other programs?


- Debian squeeze at least for up-to date kernel, bluez and blueman (the latter is recommended, not required).
- pulseaudio + pulseaudio-module-bluetooth + pavucontrol (the latter is not required, but can be handy) packages:

Code: Select all
sudo aptitude install pulseaudio pulseaudio-module-bluetooth pavucontrol

- blueman - recommended, because i found it easy to use, straightforward and transparent - the default bluetooth manager would be suffice, but that is not anywhere near blueman in usability:

Code: Select all
sudo aptitude install blueman

a file, named .asoundrc (~/.asoundrc), in your home folder that contains the following (create it with your editor of choice, no root access required):

Code: Select all
pcm.!default plug:pulse

pcm.pulse {
   type pulse

Ok, you now have the ingredients. A gdm restart (login+logout in the graphical shell) will apply the ALSA and PulseAudio changes.

Note: You will have 2 volume controls, one for ALSA, other for PulseAudio - leave them both, because you might want to set volumes separately for programs who use ALSA and
PulseAudio respectively.

Pair your bluetooth device with your computer. Right-click on the PulseAudio volume control from the system tray, select sound preferences and set the in/out sound to your bluetooth device (if its there, it will probably work). Now any sound played through the PulseAudio server will be routed to the bluetooth device - Skype for example will select the pulseaudio server by default. Also all ALSA sounds are routed by default through the pulse plug to pulseaudio.

Now all PulseAudio aware programs can be used with the bluetooth headset. But what about ALSA? Some programs dont have pulseaudio plugins per se - this is where the .asoundrc file comes into play - the two sections added have the following meaning:

pcm.!default plug:pulse - defines the "pulse" plugin as default route (meaning that the "default" ALSA device will be routed to the pulseaudio server)

pcm.pulse { - this section defines the "pulse" plugin as the pulseaudio server.
type pulse

Caveats: Some programs might not like this setup for example older games, Wine etc. Java audio, OSS programs might bypass the ALSA sound system, so they will play through speakers (preloading alsa-oss might help here).
You might comment out the first line in .asoundrc if you dont want to route all ALSA sound through PulseAudio - the pulse plugin will be available and can be selected from programs that have advanced ALSA device support. Also this leads to sound device grabbing conflicts betweel ALSA and PulseAudio and you might experience sound cutting off sometimes.
It is recommended to either route everything through PulseAudio if you want sound to work.
Last edited by gradinaruvasile on 2011-01-18 13:40, edited 1 time in total.
User avatar
Posts: 674
Joined: 2010-01-31 22:03
Location: Cluj, Romania

Re: Bluetooth handsfree with laptop in debian squeeze

Postby cfragni » 2011-01-17 15:20

Thank you very much.
Using Debian Squeeze with a Philips bluetooth headset and its working like a charm.
Best regards
Posts: 1
Joined: 2011-01-17 15:18

Re: Bluetooth handsfree with laptop in debian squeeze

Postby jbs1136 » 2011-05-12 00:50

Just want to add my thinks for the how-to. I used and it works great. I have a Motorola S9-HD stereo headset and a plantronics 222 headset and both work now. I also am able to connect my wife's and my phones (Galaxy S 4G - android) with the computer to transfer files. I have upgraded to testing and everything still works. Had to come back and find this to install on my laptop.

Thanks again, wish this could go in a wiki for easier finding.

Home built, ASRock M3A770DE motherboard with AMD Phenom II X4 955, MSI R5450 Graphics Card, 16 GB ram DDR#-1600, 1 TB Seagate sata, 500 GB Western Digital sata, Acer H243H 24" 1920x1080 monitor. Running Debian Testing (Wheezy)
Posts: 40
Joined: 2006-03-13 21:51
Location: Spanaway, Wa

Re: Bluetooth handsfree with laptop in debian squeeze

Postby geazzy » 2011-07-06 12:23

wow great job :D
Posts: 27
Joined: 2011-07-02 05:39

Re: Bluetooth handsfree with laptop in debian squeeze

Postby eric1959 » 2011-09-09 08:43

fredmad wrote:not directly relating to the topic

Start your own thread...
Debian Bits And Snips
Squeeze, Gnome, amd64, Intel Core i3-530, Geforce GT330
Posts: 1299
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: Bluetooth handsfree with laptop in debian squeeze

Postby racecar » 2011-09-26 17:26

ty gradinaruvasile!
I agree, this needs to be in the wiki or at the very least a sticky in the forum.
~ Learn from yesterday, live for today, hope for tomorrow. The important thing is to not stop questioning. ~
- Albert Einstein
User avatar
Posts: 6
Joined: 2009-08-14 23:59

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests