Daniel Benoy wrote:
> I found a useful python script on Gentoo's boards for using the bluez-utils d-bus interface for activating bluetooth keyboards so that they will connect automatically when you turn them on. I've also modified it and created one that does the same thing for A2DP headsets, and I've decided to share :) The keyboard one can/must be used in lieu of hidd, so it's for newer versions of bluez-utils (Available in the testing and unstable feeds)
>> You also have to bond (pair) the devices first. Instructions for that are here: http://wiki.bluez.org/wiki/HOWTO/Bonding (Feel free to make a convenience script for the bonding process too)
>> You may also have to run:
> dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetTrusted? string:AA:BB:CC:DD:EE:FF (Feel free to add this to the script)
>> If you want to use an A2DP headset you can add an entry like this to your /etc/asound.conf
> ----
> pcm.bluetooth {
> type bluetooth
> device "AA:BB:CC:DD:EE:FF"
> profile "auto"
> }
> ----
>> And then you can tell alsa aware applications to use it for output. i.e.:
>> mplayer -ao alsa:device=bluetooth nifty.mp3
>> (I believe you can also name it pcm.!default and it will become the default.)
Thanks! This is very helpful.
I'd like to add this to the wiki, but I'm just learning my way around
Bluetooth. Can you help me find the place for it?
Perhaps in
http://wiki.openmoko.org/wiki/Manually_using_Bluetooth#Advanced_Audio_Distribution_Profile_.28A2DP.29