Talk:D-Bus
From Openmoko
(Difference between revisions)
m |
|||
| Line 28: | Line 28: | ||
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freesmartphone.ogsmd was not provided by any .service files | dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freesmartphone.ogsmd was not provided by any .service files | ||
</pre> | </pre> | ||
| + | |||
| + | replace bus = dbus.SessionBus() by bus = dbus.SystemBus() and it should work. | ||
| + | It's now fixed on the main page | ||
| + | thanks for spotting this(I thought it was me) | ||
Latest revision as of 00:28, 2 March 2009
if i use the following python code:
#!/usr/bin/env python
import dbus
bus = dbus.SessionBus()
proxy = bus.get_object("org.freesmartphone.ogsmd","/org/freesmartphone/GSM/Device")
interface = dbus.Interface(proxy, "org.freesmartphone.GSM.Call")
interface.Initiate("12345","voice")
it get the following error
root@om-gta02:~# dbus-launch python my_dialer.py
Traceback (most recent call last):
File "my_dialer.py", line 4, in <module>
proxy = bus.get_object("org.freesmartphone.ogsmd","/org/freesmartphone/GSM/Device")
File "/usr/lib/python2.5/site-packages/dbus/bus.py", line 244, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 241, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python2.5/site-packages/dbus/bus.py", line 183, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python2.5/site-packages/dbus/bus.py", line 281, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 622, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freesmartphone.ogsmd was not provided by any .service files
replace bus = dbus.SessionBus() by bus = dbus.SystemBus() and it should work. It's now fixed on the main page thanks for spotting this(I thought it was me)
