Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] BT headset won't connect -> "Stream setup fail"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
shlape
n00b
n00b


Joined: 04 Feb 2005
Posts: 29
Location: Cranny, Aus.

PostPosted: Thu Oct 22, 2009 8:50 am    Post subject: [SOLVED] BT headset won't connect -> "Stream setup f Reply with quote

I have a Sony DR-BT21G bluetooth headset which I'm trying to pair with a Dell TrueMobile 360 Bluetooth Module. This module is already paired with a bluetooth mouse and my understanding is this module can pair with several devices.
I am using the following python code to try pairing the headset:

Code:
#!/usr/bin/python

import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
bus_id = manager.ActivateService('audio')
audio = dbus.Interface(bus.get_object(bus_id, '/org/bluez/audio'), 'org.bluez.audio.Manager')

path = audio.CreateDevice('XX:XX:XX:XX:XX:XX')
#audio.ChangeDefaultDevice(path) #change the device to be used by default
sink = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.audio.Sink')
sink.Connect()


...where XX:XX... is the address I got using hcitool.
I was hoping to use audacious, but after activating its bluetooth plugin, audacious won't even start now. I only get this:

Code:
bluetooth plugin - start discovery
Aborted


The forementioned python code is very similar to what I use to pair my bluetooth mouse (successfully), but executing this code then putting the headset into pairing mode results in this output:

Code:
Traceback (most recent call last):
  File "/usr/local/bin/bth_up.py", line 12, in <module>
    sink.Connect()
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.Failed: Stream setup failed


I'm not sure if this bit of info helps, but it was mentioned for the audacious setup. I also have a ~/.asoundrc file which looks like this:

Code:
pcm.bluetoothraw {
   type bluetooth
   device XX:XX:XX:XX:XX:XX
}
pcm.bluetooth {
    type plug
    slave {
        pcm bluetoothraw
    }
}


I've even executed the following:

Code:
dbus-send --print-reply --system --type=method_call --dest=org.bluez /org/bluez/service_input org.bluez.Service.SetTrusted string:XX:XX:XX:XX:XX:XX


...as this worked for my bluetooth mouse so it would automatically reconnect.

Apart from all that, both bluetooth and alsasound are started. So, what do you thing I've missed out or have done wrong?


Last edited by shlape on Fri Oct 23, 2009 9:23 am; edited 2 times in total
Back to top
View user's profile Send private message
shlape
n00b
n00b


Joined: 04 Feb 2005
Posts: 29
Location: Cranny, Aus.

PostPosted: Fri Oct 23, 2009 9:18 am    Post subject: Reply with quote

This appears to have fixed my problem.

bluez-utils needed to be re-emerged with the gstreamer use flag.
Following this, the python script I posted previously worked.

I could listen thru the headset using mplayer by typing:

Code:
mplayer -ao alsa:device=bluetooth <file or URL>


The reception can be patchy at times which remains an unresolved issue.
The headset shares the bluetooth with a mouse which seems to be one of the causes.
...for now, it will be an ongoing 'tuning' task for me unless someone can suggest what I could do?

BTW. If you're having the same problems with Audacious not wanting to start, edit the ~/.config/audacious/config
file, replacing the bluetooth.so reference with 0 (zero).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum