From Openmoko

Jump to: navigation, search

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")

it get the following error

root@om-gta02:~# dbus-launch python
Traceback (most recent call last):
File "", line 4, in <module>
proxy = bus.get_object("org.freesmartphone.ogsmd","/org/freesmartphone/GSM/Device")
File "/usr/lib/python2.5/site-packages/dbus/", line 244, in get_object
File "/usr/lib/python2.5/site-packages/dbus/", line 241, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python2.5/site-packages/dbus/", line 183, in activate_name_owner
File "/usr/lib/python2.5/site-packages/dbus/", line 281, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python2.5/site-packages/dbus/", 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)

Personal tools