Talk:D-Bus

From Openmoko

Revision as of 11:56, 16 October 2008 by Exactt (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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/Devi$
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
Personal tools

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/Devi$
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