[maemo-users] OS2008 on n800 - Nice Job

From: Frédéric Crozat fred at crozat.net
Date: Sun Jan 13 14:18:17 EET 2008
On Dec 5, 2007 11:52 PM, Frédéric Crozat <fred at crozat.net> wrote:
> Le jeudi 29 novembre 2007 à 22:42 +0100, Frédéric Crozat a écrit :
> > Le jeudi 29 novembre 2007 à 21:28 +0100, Laurent GUERBY a écrit :
> > > On Wed, 2007-11-28 at 23:43 +0100, Frédéric Crozat wrote:
> > > > > https://bugs.maemo.org/show_bug.cgi?id=667
> > > >
> > > > Well, documentation for enabling A2DP is extremely scarce atm, even in
> > > > this bug report.
> > > >
> > > > I'm not sure if I'll keep my BT headset or ask for a refund.
> > >
> > > On IRC I was told there was work done on it, I suggest
> > > adding a comment with your model and problem on the
> > > above bugzilla.
> >
> > Well, I've spend part of this afternoon at Mandriva office into fixing /
> > enabling Audio bluetooth on Mandriva cooker and I've been successful
> > into directing using ALSA output to headset (either in HSP or A2DP) or
> > using gstreamer a2dp sink (from bluez-utils).
> >
> > Some dbus queries are needed to enable a2dp, which is why it can't work
> > out of the box on IT2008.
> >
> > I'll do more test on n800 this week-end and report here.
> I haven't had time to test the dbus queries for A2DP, yet.

And I just found enough time to finish my test with A2DP and I'm happy
to announce
I got it working with IT2008 !

Here is the howto (I've posted it on bugzilla too) :
-first, ensure you have your headset working with IT2008 ie bluetooth pairing
done and if you enable enabled, you get sound (crappy but you get it ;)
-as root, edit /etc/bluetooth/audio.conf and change

(it would be nice for next nokia image to enable Sink by default, even if there
is no UI to use it in a "supported by Nokia way" so it wouldn't require any
root privilege to hack around A2DP support

-as user, create ~/.asoundrc and put into it :
pcm.bluetooth {
   type bluetooth

        type bluetooth

-as a user, create a file bt.sh with the following content (be sure to set
HEADSET_ADDRESS with your headset BT address :

MANAGER=`dbus-send --system --print-reply --dest=org.bluez  /org/bluez
org.bluez.Manager.ActivateService string:audio | grep string | sed -e 's/.*
string //g' -e 's/"//g' `

DEVICE=`dbus-send --system --type=method_call --print-reply --dest="$MANAGER"
/org/bluez/audio org.bluez.audio.Manager.CreateDevice string:"$HEADSET_ADDRESS"
| grep string | sed -e 's/.* string //g' -e 's/"//g' `

dbus-send --system --type=method_call --print-reply --dest="$MANAGER"
"$DEVICE" org.bluez.audio.Sink.Connect

-chmod +x this file
-run this file at each startup so A2DP sink is configured and enabled for your

now, to play sound, use mplayer as following :
mplayer -ao alsa:device=bluetooth your_file_to_play

and enjoy quality music ;)

There is some buffer underrun during playback, but it is a good start.

Frederic Crozat

More information about the maemo-users mailing list