Active Topics

 


Reply
Thread Tools
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.
 
Posts: 110 | Thanked: 127 times | Joined on May 2010
#12
I've made small modifications to ZedThou's script, and I get bluetooth connections to the N900, but "pactl list" reports ridiculous latency between the BT Source and the module-loopback, and no audio is output. There are two configurations I've tested, and both fail with the same errors: iPad Mini -> N900, and N900 #2 -> N900.

/etc/bluetooth/audio.conf is "Enable=Source", HFP is commented out, and the [A2DP] stanza is commented out, but I've tried every combination of those. I've also tried every possible sink in the script (sink.hw0andhw1, sink.btmusic, sink.hw0) and two different rates on module-loopback (44100 and 48000) and the problem is consistent.

If anyone else has toyed with this your help is super-appreciated!
 
Posts: 110 | Thanked: 127 times | Joined on May 2010
#13
It turns out "Profile=General" must be turned on for the N900 to work as a Bluetooth receiver.

The silent profile on N900 mutes many pulseaudio modules that would otherwise be turned on, including "module-loopback".

Recent CSSU pushes made music "somewhat work" in a test linking a BB9930 to a N900, but it was very stuttery and jittery. My tests between iPad and N900, and Macbook and N900, have been totally unsuccessful thus far.

Think the next step is to reconfirm what the resample settings are.
 
Posts: 47 | Thanked: 31 times | Joined on Jul 2010
#14
Opps, wrong thread. Deleted.
 
Reply

Tags
bluethoot ?


 
Forum Jump


All times are GMT. The time now is 20:39.