From: Jelle de Jong <jelledejong@powercraft.nl>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: [Bluez-users] .simple-agent dbus pin handle
Date: Sun, 27 Jul 2008 18:52:51 +0200 [thread overview]
Message-ID: <488CA7E3.4000303@powercraft.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
This message contains the following attachment(s):
.simple-agent.py
Hello everybody,
I can't get my pin-agent working anymore. I currently have not the
knowledge to fix this issue and help is appreciated. I don't use a gui
on the system, so gnome tools is not an options. Any help is really
appreciated.
running on debian sid:
Architecture: i386
Version: 3.36-1
Thanks in advance,
Jelle
sudo python .simple-agent.py
ERROR:dbus.connection:Unable to set arguments ('/test/agent',) according
to signature u'os': <type 'exceptions.TypeError'>: More items found in
D-Bus signature than in Python arguments
Traceback (most recent call last):
File ".simple-agent.py", line 54, in <module>
adapter.RegisterAgent(path)
File "/var/lib/python-support/python2.5/dbus/proxies.py", line 68, in
__call__
return self._proxy_method(*args, **keywords)
File "/var/lib/python-support/python2.5/dbus/proxies.py", line 140,
in __call__
**keywords)
File "/var/lib/python-support/python2.5/dbus/connection.py", line
597, in call_blocking
message.append(signature=signature, *args)
TypeError: More items found in D-Bus signature than in Python arguments
[-- Attachment #2: .simple-agent.py --]
[-- Type: text/x-python, Size: 1701 bytes --]
#!/usr/bin/python
import gobject
import dbus
import dbus.service
import dbus.mainloop.glib
class Agent(dbus.service.Object):
@dbus.service.method("org.bluez.Agent",
in_signature="", out_signature="")
def Release(self):
print "Release"
mainloop.quit()
@dbus.service.method("org.bluez.Agent",
in_signature="os", out_signature="")
def Authorize(self, device, uuid):
print "Authorize (" + device + ", " + uuid + ")"
return
@dbus.service.method("org.bluez.Agent",
in_signature="o", out_signature="s")
def RequestPasskey(self, device):
print "RequestPasskey (" + device + ")"
return "0000"
@dbus.service.method("org.bluez.Agent",
in_signature="s", out_signature="")
def ConfirmModeChange(self, mode):
print "ConfirmModeChange (" + mode + ")"
return
@dbus.service.method("org.bluez.Agent",
in_signature="", out_signature="")
def Cancel(self):
print "Cancel"
return
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.bluez", "/"),
"org.bluez.Manager")
path = manager.DefaultAdapter()
adapter = dbus.Interface(bus.get_object("org.bluez", path),
"org.bluez.Adapter")
path = "/test/agent"
object = Agent(bus, path)
adapter.RegisterAgent(path)
print "Agent registered"
mainloop = gobject.MainLoop()
mainloop.run()
#adapter.UnregisterAgent(path)
#print "Agent unregistered"
[-- Attachment #3: Type: text/plain, Size: 363 bytes --]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
reply other threads:[~2008-07-27 16:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488CA7E3.4000303@powercraft.nl \
--to=jelledejong@powercraft.nl \
--cc=bluez-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox