View Single Post
Posts: 59 | Thanked: 47 times | Joined on Aug 2012
#11
Originally Posted by ZedThou View Post
I've made some progress. After adding Enable=Source to /etc/bluetooth/audio.conf, I can hear the GPS coming through the phone audio output after I run these commands.

Code:
# GPS bluetooth id
devmac=00:02:5B:00:A5:A5

adapter=$(dbus-send --print-reply --system --dest=org.bluez / org.bluez.Manager.DefaultAdapter| sed -ne "s/^.*object path //p"|sed -e 's/"//g')

device=$(dbus-send --print-reply --system --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac}|sed -ne "s/^.*object path //p"|sed -e 's/"//g') 

dbus-send --system --print-reply --type=method_call --dest=org.bluez ${device} org.bluez.AudioSource.Connect

sleep 2

pactl load-module module-loopback source=bluez_source.00_02_5B_00_A5_A5 sink=sink.hw0andhw1
There are a couple of glitches. After the the GPS disconnects, the phone microphone starts coming through as well, until I unload the module-loopback. Also, I can play music on the phone with mplayer, and it will mix with the GPS audio, but when I use Open Media Player, it mutes the GPS while it plays. Then when it pauses it turnes the GPS audio back on.

This is awesome. Together with that link and this post I managed to write a little bash script with which I can connect the N900 to several devices. It works well with an Android tablet, my Ubuntu laptop and my Nokia N9 (although this one seems to have some issues with playback sometimes after a while but that's not so important). My old N900 is going to serve as a little media station for my girlfriend, playing podcasts, FM radio, internet radio and music without having to have her computer running. Also, I'll connect the phone to her speakers. To prevent having to unplug and replug all of her other devices and having a lot of cables all over the room, I said well, let's simply have your other audio playing devices connect to the N900 and then use this as the audio source. However, her laptop and her phone are both apple devices and the audio quality is **** to an extend that it's unbearable to listen, also it's being to slow (when I stop the iphone playing music, it keeps playing on the N900 slowly). Any idea what could be causing this? I tried several options in pulseaudio already to no avail. Should I try to upgrade pulseaudio on the N900?

Edit: I don't think I can upgrade pulseaudio further, as I am having CSSU Thumb already.

Last edited by Tschaka; 2013-10-09 at 17:40.