Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Bluetooth handsfree with laptop in debian squeeze

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Bluetooth handsfree with laptop in debian squeeze

#1 Post by gradinaruvasile »

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?

Requirements:

- 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.

cfragni
Posts: 1
Joined: 2011-01-17 15:18

Re: Bluetooth handsfree with laptop in debian squeeze

#2 Post by cfragni »

Thank you very much.
Using Debian Squeeze with a Philips bluetooth headset and its working like a charm.
Best regards

jbs1136
Posts: 40
Joined: 2006-03-13 21:51
Location: Spanaway, Wa

Re: Bluetooth handsfree with laptop in debian squeeze

#3 Post by jbs1136 »

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.

john
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)

geazzy
Posts: 27
Joined: 2011-07-02 05:39

Re: Bluetooth handsfree with laptop in debian squeeze

#4 Post by geazzy »

wow great job :D

eric1959
Posts: 1298
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: Bluetooth handsfree with laptop in debian squeeze

#5 Post by eric1959 »

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

User avatar
racecar
Posts: 6
Joined: 2009-08-14 23:59

Re: Bluetooth handsfree with laptop in debian squeeze

#6 Post by racecar »

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

Post Reply