![]() |
![]() OCAU News - Wiki - PC Database - QuickLinks - Pix - Sponsors |
|
|||||||
|
Sign up for a free OCAU account and this ad will go away! Search our forums with Google: |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Furrius Animalus
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 5,204
|
At the risk of self-appointing myself tech support for this, I present an updated version of my Bluetooth headset with Ubuntu Hardy guide, this time for Ubuntu Jaunty 9.04.
This HowTo illustrates how to pair and configure a Bluetooth headset with Ubuntu Jaunty 9.04 and redirect your music and media players to it. This guide is based on the guides at Ubuntu Forums with some modifications to be more step-explicit and thus newbie-friendly and reflects the changes to the Bluetooth stack since my original Hardy instruction. Purpose: To play your audio such as MP3's and movie output through a Bluetooth-connected audio headset using Ubuntu Jaunty 9.04. Scenario: You are too lazy to plug in a cable to your PC. You want to walk around your house without a long cable after you. You want to look cool to your mates. You want to psyche out your non-tech parents by listening to music without any audio device or cables attached to you. Problem is, very few Linux apps have direct support for directing sound to any other device. Solution: Redirect all audio using the PulseAudio Server on Ubuntu Jaunty. Prerequisites:
Cons:
These instructions should be adaptable to other distributions.
KNOWN ISSUES:
CONTRIBUTIONS:
__________________
If practice makes perfect, and nobody's perfect, why practice? Last edited by HyRax1; 24th August 2009 at 12:56 PM. Reason: Added contributions note. |
|
|
|
|
|
#2 |
|
Member
Join Date: Aug 2001
Location: Brisbane
Posts: 7,756
|
Nice guide.
Hoping you'll update the "Syncing your Nokia handset with Evolution" thread for 9.04 too.
__________________
My Website | Ubuntu Linux - It's better than Windows & OS X | My Computers | Grado Labs Alessandro MS-1 | Why Windows Causes Stupidity
|
|
|
|
|
|
#3 |
|
Furrius Animalus
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 5,204
|
Yeah, yeah, I'll get to that.
__________________
If practice makes perfect, and nobody's perfect, why practice? |
|
|
|
|
|
#4 |
|
Member
Join Date: May 2009
Posts: 5
|
Mate, you are absolutely the BEST!
I've been struggling with this for a few months and had actually been using Windows 7 for a while as I couldn't get to use my S9's. You are a hero in my eyes. Quick question for you tho....of course there's got to be one. If I log out/in or restart, I have to re do like the last 4 steps and then I'm good again. Do you think it's possible for me to write a script that will automate those steps? I've got your post saved as a document so I can just copy paste my way to bluetooth headphone bliss...but I was just wondering.... Thanks again! |
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2003
Location: Briz Vegas
Posts: 2,029
|
__________________
Q6600 @ 3.6GHz Scythe Ninja | Gigabyte GA-EP43-DS3R | 4GB PNY 6400 @ 1000Mhz| Zotac GTX275 |
|
|
|
|
|
#6 | |
|
Furrius Animalus
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 5,204
|
Er, well... ummm... haha... shucks <blush>
![]() Quote:
Code:
#!/bin/bash echo Setting up PulseAudio for your Bluetooth headset... pactl load-module module-alsa-sink device=btheadset pactl load-module module-alsa-source device=btheadset echo Done!
__________________
If practice makes perfect, and nobody's perfect, why practice? |
|
|
|
|
|
|
#7 |
|
Member
Join Date: May 2009
Posts: 5
|
Thanks again HyRax1! I will continue to try and come up with a script to reconnect fully.
|
|
|
|
|
|
#8 |
|
New Member
Join Date: May 2009
Posts: 2
|
Thanks for the tips.
I am able to run this code after pairing. Code:
pactl load-module module-alsa-sink device=btheadset However, failed running this part. Code:
pactl load-module module-alsa-source device=btheadset |
|
|
|
|
|
#9 |
|
Furrius Animalus
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 5,204
|
The second command is not technically required - it's for setting up the Bluetooth headset's microphone as in input source. If you do not have a mic on your headset, you can safely ignore this command (it really shouldn't matter, but in your case I suspect that if you don't have a mic, this bit is probably confusing Ubuntu a bit).
__________________
If practice makes perfect, and nobody's perfect, why practice? |
|
|
|
|
|
#10 | |
|
New Member
Join Date: May 2009
Posts: 2
|
Quote:
Thanks HyRax for a quick response. The headset does have a mic, however, I don't really use it so I guess I can skip the second command (which is what I have been doing). |
|
|
|
|
|
|
#11 |
|
New Member
Join Date: May 2009
Posts: 2
|
I cant get past step 12. When I try either command, I get a short pause followed by:
Code:
Failure: Module initalization failed I'm on Jaunty 64 bit. What am I doing wrong? Last edited by fruityren7; 18th May 2009 at 7:05 AM. |
|
|
|
|
|
#12 |
|
Furrius Animalus
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 5,204
|
Is your headset paired successfully? Those commands will not work if you haven't already paired your headset or if you haven't defined the ~/.asoundrc file properly.
Also ensure that your Bluetooth adapter is protocol v1.2 compliant or higher. Older ones will NOT work.
__________________
If practice makes perfect, and nobody's perfect, why practice? |
|
|
|
|
|
#13 |
|
New Member
Join Date: May 2009
Posts: 1
|
This totally rocks! Using A2DP from my laptop is great. Wanted to share the script I'm using to load the pulseaudio module. Since the bluetooth support is somewhat delicate, I throw in some extra checks to see if the module is loaded already, then I scan the network for the btheadphone MAC as defined in ~/.asoundrc, then finally I load the module. I use this script from the gnome panel. The sleep statements are just so the terminal window doesn't close right away and I can see what happened.
This script assumes a single device declaration in ~/.asoundrc The alsa-source module is commented OUT. I don't need it with my NS-BTHDP head phones, and it usually fails to load anyway. Uncomment those lines if you have a microphone. I think you might need a sleep between the alsa-sound and alsa-source module loading, but maybe not... Code:
#!/bin/bash
if pactl list | grep -q btheadset ; then
echo Module already loaded
sleep 5
exit 0
fi
MAC=`grep device ~/.asoundrc | awk '{print $2}'`
if [ -z "$MAC" ]; then
echo couldnt parse MAC from ~/.asoundrc
sleep 5
exit 1
fi
BTHDP=`hcitool name $MAC`
if [ -z "$BTHDP" ]; then
echo Cant find the device $MAC
sleep 10
exit 1
else
echo Found $BTHDP $MAC
fi
echo Loading Bluetooth ALSA sink
pactl load-module module-alsa-sink device=btheadset
echo
echo Done
sleep 5
#sleep 2
#echo Loading Bluetooth ALSA source
#pactl load-module module-alsa-source device=btheadset
Matt |
|
|
|
|
|
#14 |
|
Furrius Animalus
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 5,204
|
That's an awesome contribution - thanks!
__________________
If practice makes perfect, and nobody's perfect, why practice? |
|
|
|
|
|
#15 | |
|
New Member
Join Date: May 2009
Posts: 2
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Tags |
| audio, bluetooth, howto, jaunty, ubuntu |
|
Sign up for a free OCAU account and this ad will go away! |
| Thread Tools | |
|
|