View Single Post
Posts: 19 | Thanked: 3 times | Joined on Jun 2008
#134
Kagu does require some slight of hand but it is actually not too painful once you have the needed information.

heres the howto I used and I have made some changes to make it actually WORK:

Bluetooth ALSA

These packages implement an alpha quality A2DP system. It plays without skipping on my n800, but it uses an excessive amount of CPU and none of the convenient graphical players support alsa right now. These packages are provided here mainly for my development purposes. Feel free to give them a try though.
Step 1: Download Packages

You'll need to download and install the following packages:
- libdbus-1-2 - http://download.dailydffr.net/linux/...fix3_armel.deb
- Plugz - http://download.dailydffr.net/linux/...08-1_armel.deb
- SBC - http://download.dailydffr.net/linux/...08-1_armel.deb

You'll need these too, but they can be found and installed in the application manager:
- bluez-utils-dist
- Mplayer
- wget
- vim


################################################## ################################################## ##
Step 2: Turn on Bluetooth Radio

First, make sure you turn your Bluetooth radio on. You can do this from the control panel, I think.


################################################## ################################################## ##
Step 3: Find Headset Address

Next, we need to find our A2DP headset's BT address. So put the headset into pairing mode, log into an xterm and do this:

hcitool scan

The address will look something like 00:11:22:33:44:55


################################################## ################################################## ##
Step 4: Get Sample .a2dprc

Then, log into an xterm on your n800 and download the sample a2dprc:

wget http://www.guardiani.us/sample.a2dprc
cp sample.a2dprc ~/.a2dprc


################################################## ################################################## ##
Step 5: Setup Headset Address

Next, please edit ~/.a2dprc to contain the address of your headset on the address= line:

NOTE: If you have VIM installed and know how to use it, run the following command. Otherwise, please use a text editor that you are comfortable with to edit the file /home/user/.a2dprc

vim ~/.a2dprc


################################################## ################################################## ##
Step 6: Create .asoundrc

create ~/.asoundrc with simply (copy and paste everything in the box below to create the file):

cat > ~/.asoundrc <<EOTXT
pcm.a2dpd2 {
type a2dpd
}
EOTXT


################################################## ################################################## ##
Step 7: Edit Bluetooth audio config files

1. As root, edit /etc/bluetooth/hcid.conf file and change the following 2 sections.

change:
lm accept;

to:
lm accept,master;

then edit:
lp rswitch,hold,sniff,park;

Code:
lp hold,sniff,park;


2. As root, Edit /etc/bluetooth/audio.conf and comment out the "Disable=Sink" line near the top:

Code:
#Disable=Sink

################################################## ################################################## ##
Step 8: Reboot

reboot to restart hcid:


################################################## ################################################## ##
Step 9: install Kagu

Installthe Kagu media player using the application manager.


################################################## ################################################## ##
Step 10: Listen to Music

Now, to listen to some music over a2dp all you have to do is open kagu and hit the bluetooth icon in the top right corner.

This will do several things; first it will start mplayer and if your headset is on (NOT in pairing mode, just on.) your PDA will capture it and start piping sound!

cool huh?

I am trying to build a shell script to do all this automagically... so far the scriopt I have does everything here... but it also occasionally causes a reboot loop... I'll not post it until it works perfectly every time.