Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Multimedia & Video
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Multimedia & Video
Have multimedia question? ATI, Nvidia, Sound cards. Just ask here.

 
Thread Tools Display Modes
Old December 6th, 2007   #1
lodp
Gee! These Aren't Roasted!
 
Join Date: Nov 2005
Location: Vienna, Austria
Beans: 213
Bluetooth Stereo (a2dp) in Gutsy

After ugrading to Gutsy recently, I was delighted to find that it was very easy to get my Bluetooth stereo headset (Nokia BH-501) to work, by just performing a one-step operation described here: http://wiki.bluez.org/wiki/HOWTO/AudioDevices


Quote:
modify your ~/.asoundrc to contain

Quote:
pcm.bluetooth {
type bluetooth
device 00:11:22:33:44:55
}
.. and then selecting "bluetooth" as the Alsa device in the various players.

Getting this to work in feisty was a pain in the behind -- installing various packages, inserting kernel modules, running daemons ... it seems the bluez-utils included in gutsy did away with that all.

Now I would like to re-write the out-dated community dokumentation page here: https://help.ubuntu.com/community/BluetoothAudio

But there's a couple of things I don't know enough about:

The bluez-utils wiki page linked to above says you don't have to get bluetooth-alsa, plugz, sco and all that. So does the new "bluetooth" alsa device provide two-way (duplex) connection, so you can use it with skype?

I actually couldn't make it to work with Skype -- when I selected the "bluetooth" alsa device, I did get mono sound on the left channel, but Skype would complain that the audio capture device wasn't working.

Can anyone comment on this?
lodp is offline   Reply With Quote
Old February 3rd, 2008   #2
frank320
First Cup of Ubuntu
 
Join Date: Jan 2008
Beans: 1
Re: Bluetooth Stereo (a2dp) in Gutsy

You make it sound soooo... simple. I have Gutsy, a Motorola DC800 (like a stereo
headphone), and can obtain its MAC(?) address via hcitool scan. Beyond that, I am
lost... and have spent hours trying to make it work.

For one thing, how do you "select "bluetooth" as the alsa device in the various players'?

All of which sez: HELP.

If you do write an updated HOWTO, I would read it instantly.

Regards...
frank320 is offline   Reply With Quote
Old March 1st, 2008   #3
inozemtsev
First Cup of Ubuntu
 
Join Date: Mar 2008
Beans: 8
Re: Bluetooth Stereo (a2dp) in Gutsy

I just installed Ubuntu on my laptop today, still fighting with a few things, but my bluetooth headphones are working I have a pair of Etymotic Ety8s.

Here's what I did:
  1. Make sure you have bluez-utils installed
  2. Put headset into pairing mode
  3. Run
    Code:
    hcitool scan
    This will get you the headset's address.
  4. Use the bluetooth applet to pair the headset to the PC. The PIN was 0000 in my case, so the default PIN of 1234 in hcid.conf didn't work.
  5. Make an .asoundrc file in your home directory with the following contents:
    Code:
    pcm.bluetooth {
            type bluetooth
            device XX:XX:XX:XX:XX:XX
            profile "hifi"
    }
    The other "profile" options are "auto" and "voice".
  6. Edit /etc/bluetooth/hcid.conf. Find the line
    Code:
    discovto 0;
    Add
    Code:
    pageto 2400;
    after this line. This ups the page timeout. Without this, using any other bluetooth device causes uncontrollable stuttering in the audio. I have a bluetooth keyboard, and every keypress would kill the music Experiment with this value.
  7. I use Rhythmbox for music. To route audio to bluetooth in any GStreamer app, use this command:
    Code:
    gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink "alsasink buffer-time=6000000 latency-time=1000000 device=bluetooth"
    Huge latencies are needed for stutter-free playback when CPU use is somewhat high, like starting a program. Experiment with these values.
  8. To play sound through your sound card again, use
    Code:
    gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink "autoaudiosink"
    I made two launchers on the panel to switch between speakers and headset for now. A proper script would be better, of course

Now, the only thing I'd like to get to work are the control buttons on my headset. There is a ctl_bluetooth plugin in bluez_utils, but I have no idea how to get it to work. Anyone know this one?

Last edited by inozemtsev; March 1st, 2008 at 02:22 AM..
inozemtsev is offline   Reply With Quote
Old March 2nd, 2008   #4
mptpro
5 Cups of Ubuntu
 
Join Date: Nov 2007
Location: Orange, CA USA
Beans: 33
Ubuntu 7.10 Gutsy Gibbon
Send a message via Skype™ to mptpro
Re: Bluetooth Stereo (a2dp) in Gutsy

Thanks inozemtsev!

Your solution finally solved my problem of connecting my plantronics headset via bluetooth!

It works great in Amarok and Totem Player.

However, it doens't work with mplayer nor smplayer. I think it may be that it uses xine instead of gstreaemer.

Any ideas?
__________________
"Live life to the fullest, fight for what you believe in, and go down swinging."
Linux user number 458854
mptpro is offline   Reply With Quote
Old March 4th, 2008   #5
uhappo
A Carafe of Ubuntu
 
uhappo's Avatar
 
Join Date: Feb 2008
Beans: 104
Re: Bluetooth Stereo (a2dp) in Gutsy

My simplest solution was to install Blueman BT-program and use Audacious

Here is the how-to

http://blueman.tuxfamily.org/forum/v...ic.php?f=5&t=5
__________________
HP Pavilion dv5-1035eo AMD Turion 64 X2 2,0ghz
Ubuntu user,from 18.2.2008
Oh, my studio www.ukkohapponen.fi
My bandwww.rakkaudenammattilaiset.net
uhappo is offline   Reply With Quote
Old March 5th, 2008   #6
inozemtsev
First Cup of Ubuntu
 
Join Date: Mar 2008
Beans: 8
Re: Bluetooth Stereo (a2dp) in Gutsy

One more thing: I found out that the skips in music weren't caused by insufficient buffers or the page timeout. The problem was that my DiNovo Edge keyboard switched to master mode, and the headset stayed as slave. So, every time I pressed a key, I got a skip in the music. The solution: switch the headset to master mode also:

Code:
sudo hcitool sr XX:XX:XX:XX:XX:XX MASTER
Now, does anyone know if it is possible to make hcid do this automatically when the headset is paired? I have to run this every time I reconnect my headphones, and it's annoying.
inozemtsev is offline   Reply With Quote
Old March 5th, 2008   #7
inozemtsev
First Cup of Ubuntu
 
Join Date: Mar 2008
Beans: 8
Re: Bluetooth Stereo (a2dp) in Gutsy

Solved. Add to your /etc/default/hcid.conf:

Code:
device XX:XX:XX:XX:XX:XX {
	name "Xxxx";
	auth enable;
	lm master;
	passkey "0000";
}
inozemtsev is offline   Reply With Quote
Old March 12th, 2008   #8
lodp
Gee! These Aren't Roasted!
 
Join Date: Nov 2005
Location: Vienna, Austria
Beans: 213
Re: Bluetooth Stereo (a2dp) in Gutsy

The Ubuntu Wiki page for bluetooth audio is still out-dated and refers mainly to the low-quality sco thing.

..to get back to my question: can anybody confirm that just by installing bluez-utils (and performing roughly the steps that inozemtsev posted above, you can also get a two-way (sound+microphone) connection to a regular (non-ad2p) bluetooth hands-free?

I could go and update the wiki page according to this then, and delete all that misleading stuff about sco..
lodp is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:40 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry