No reply within specified time
Fabian Steiner
lists at fabis-site.net
Fri Jul 14 11:26:44 PDT 2006
Hello!
I am just trying to learn more about DBus and its python bindings.
Unfortunately, I got stuck now. This is what I have so far:
The Server:
class HydraHALObject(dbus.service.Object):
def __init__(self, bus_name,
object_path='/de/lsh-marquartstein/Hydren/HydraHALObject'):
dbus.service.Object.__init__(self, bus_name, object_path)
@dbus.service.signal('de.lsh-marquartstein.Hydren.HydraHALIFace')
def deviceAdded(self, deviceName, display):
pass
@dbus.service.signal('de.lsh-marquartstein.Hydren.HydraHALIFace')
def deviceRemoved(self, deviceName, display):
pass
bus = dbus.SystemBus()
busName = dbus.service.BusName('de.lsh-marquartstein.Hydren.HydraHAL',
bus=bus)
hydraHALObject = HydraHALObject(busName)
gobject.MainLoop().run()
The Client:
bus = dbus.SystemBus()
hydraClientObj =
self.dbus.get_object('de.lsh-marquartstein.Hydren.HydraHAL',
'/de/lsh-marquartstein/Hydren/HydraHALObject')
hydraClientIFace = dbus.Interface(hydraClientObj,
'de.lsh-marquartstein.Hydren.HydraHALIFace')
hydraClientIFace.connect_to_signal('deviceAdded', lambda udi, display:
signalReceived('deviceAdded', udi, display))
hydraClientIFace.connect_to_signal('deviceRemoved', lambda udi, display:
signalReceived('deviceRemoved', udi, display))
gobject.MainLoop().run()
The server is started by root, that's why I added a system-local.conf
file as I was suggested in a tutorial:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration
1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow own="de.lsh-marquartstein.Hydren.HydraHAL"/>
</policy>
</busconfig>
Now I can start the server, but trying to launch the client as a normal
user fails:
Introspect error: No reply within specified time
Traceback (most recent call last):
File "ClientTest.py", line 13, in ?
client = Client(debug=True)
File "../Client.py", line 52, in __init__
print
hydraClientObj.Introspect(dbus_interface='org.freedesktop.DBus.Introspectable')
File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 25, in
__call__
ret = self._proxy_method (*args, **keywords)
File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 102, in
__call__
reply_message = self._connection.send_with_reply_and_block(message,
timeout)
File "dbus_bindings.pyx", line 455, in
dbus_bindings.Connection.send_with_reply_and_block
dbus_bindings.DBusException: No reply within specified time
I have done everything I can think of, but I did not help :-( Do you
have any ideas?
Cheers,
Fabian
More information about the dbus
mailing list