Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No passkey agents for bluetooth? Trouble pairing headsets.
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
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 306
Location: Limerick, Ireland

PostPosted: Sat Oct 24, 2009 9:53 am    Post subject: No passkey agents for bluetooth? Trouble pairing headsets. Reply with quote

Hi all,

A while ago I got my bluetooth stereo headset partially working. I had it working for sound output in mplayer/exail/aplay and anything that allowed me to specify an alsa device. I even got it working in skype although it was flakey at best. Sadly, I never managed to get it to record sound though, and had to use my laptop's internal mic in conjuction with the headset to make a call on skype.

Recent updates to gentoo in general, including new alsa, new kernel, and new bluez, have caused my bluetooth headset to no longer function. I think the problem may be that after a long period of disuse the battery went completely flat and it lost it's pairing. Pairing in the first place was incredibly difficult, with almost no documentation on how to do it. The major issue was that there appear to be no passkey agents marked as stable in portage. It was suggested that I use gnome-bluetooth (but it's blocked by or blocks newer versions of bluez). I use xfce and not gnome or kde, so the kde-bluetooth stuff I haven't tried. There is no passkey agent that I can find within bluez itself, and the bluez guys seem to be of the attitude that this should now all be implemented 'client' side via dbus for want of a better description.

Eventually I had to run the python script supplied by the bluez website. They have since removed support for this script. It worked for me originally (with blues 3.x) but now appears to be broken since upgrading to bluez-4.x, and when run produces

Code:

Traceback (most recent call last):
  File "passkey-agent-gtk.py", line 67, in <module>
    sec.RegisterDefaultPasskeyAgent(PATH)
  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.freedesktop.DBus.Error.UnknownMethod: Method "RegisterDefaultPasskeyAgent" with signature "s" on interface "org.bluez.Security" doesn't exist


The reason I think it's a pairing problem is that I'm getting the same error I used to when I initially had problems pairing it. I can scan for the headset with hcitool scan, and it appears. I can ping it with l2ping, but when I attempt to play sound to it, I get

Code:

ALSA lib pcm_bluetooth.c:1607:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
aplay: main:608: audio open error: Input/output error


It looks like bluez has changed the dbus interface, and the old script I have now breaks. So the ideal solution would be if someone could point me to an XFCE4 friendly bluetooth passkey agent handler that works with a recent version of bluez. Second best solution would be if someone could point in the direction of some docs or something that would allow me to fix the passkey agent script.

Thanks
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
shlape
n00b
n00b


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

PostPosted: Sun Oct 25, 2009 1:41 am    Post subject: Same sad story here Reply with quote

Upgrade to bluez4 only brought more (new) dramas. I wus'd out and went back to bluez-utils and bluez-libs (v3.36) and will wait til bluez4 "develops" :roll:
Doing this restored bluetooth happiness. Strangely enough, the bluetooth mouse had no problems with bluez4 using a similar python script that I have for the headset.
Back to top
View user's profile Send private message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 306
Location: Limerick, Ireland

PostPosted: Sat Oct 31, 2009 6:05 pm    Post subject: Reply with quote

Hmm, might try that route too, I've certainly had no breakthroughs with >=bluez-4 so far :(
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Sat Oct 31, 2009 7:18 pm    Post subject: Reply with quote

If you compile bluez with the "test-programs" USE flag, you'll get a simple command-line passkey agent.
Back to top
View user's profile Send private message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 306
Location: Limerick, Ireland

PostPosted: Sat Oct 31, 2009 8:17 pm    Post subject: Reply with quote

Okay recompiled bluez with USE="test-programs", thanks for the tip. list-bluetooth-devices lists my headset as claims the "Paired = 1", so I guess that's not the problem... I think I'm going to try to revert to 3.36 and wait for 4 to stabilise a bit.
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Sun Feb 13, 2011 1:29 am    Post subject: Reply with quote

Just found this old thread... I am currently looking for a way to pair my bluetooth-device on the command line. There doesn't seem to be a command-line passkey-agent in the bluez4 package.
Does anyone know a way to pair on the command line? GTK based tools aren't an option, the machine running bluez is a headless server.

Thanks for any hints!
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Sun Feb 13, 2011 10:54 am    Post subject: Reply with quote

It's still as described above, you need the 'test-programs' USE flag.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Sun Feb 13, 2011 3:55 pm    Post subject: Reply with quote

Gusar wrote:
It's still as described above, you need the 'test-programs' USE flag.

Do you ? Shouldn't some wacky dbus-send line be enough ?
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Sun Feb 13, 2011 7:08 pm    Post subject: Reply with quote

VoidMage wrote:
Gusar wrote:
It's still as described above, you need the 'test-programs' USE flag.

Do you ? Shouldn't some wacky dbus-send line be enough ?

Oh. Yeah, that'd work, if you can figure it out. But the 'simple-agent' python script that the test-programs USE flag gives you does all the work for you.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Sun Feb 13, 2011 7:34 pm    Post subject: Reply with quote

Well, he wants commandline anyway, this way python middleman gets kicked out of the equation.
Back to top
View user's profile Send private message
lil_liminal
n00b
n00b


Joined: 19 Nov 2011
Posts: 51
Location: Bangkok, Thailand

PostPosted: Mon Mar 19, 2012 2:28 pm    Post subject: Reply with quote

got a problem with simple-agent:

simple-agent
Traceback (most recent call last):
File "/usr/bin/simple-agent", line 104, in <module>
path = manager.DefaultAdapter()
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 143, in __call__
**keywords)
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 630, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.NoSuchAdapter: No such adapter

So does this mean my usb dongle isn't supported?

net-wireless/bluez-4.96 was built with the following:
USE="consolekit cups test-programs -alsa -caps -debug -gstreamer -health -maemo6 -old-daemons -pcmcia -pnat -usb"

any idea why?
I appears to that test-programs is in the use flag.
Let me know.



Additionally I am getting this error:
McFang_House bluetooth # hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:34 acl:0 sco:0 events:3 errors:0
TX bytes:9 acl:0 sco:0 commands:45 errors:42

McFang_House bluetooth # hciconfig hci0 up
Can't init device hci0: Connection timed out (110)
Hopefully this is because I don't have a passkey?

I googled the problem and got a lot of different things other people have done, but nothing that directly relates to me.
Any idea how I ensure power is on my bluetooth dongle?
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