verbose and sometimes not really helpful. The "monitor-connman" script
allows to monitor "PropertyChanged" D-Bus signals from various interfaces.
- During start of daemon
- {Manager} [/] Devices = dbus.Array([dbus.ObjectPath('/dev_00_90_CC ...
- {Device} [/dev_00_90_CC_xx_xx_xx] Powered = 1
- {Device} [/dev_00_90_CC_xx_xx_xx] Networks = dbus.Array( ...
-
- During shutdown of daemon
- {Device} [/dev_00_90_CC_xx_xx_xx] Networks = dbus.Array( ...
- {Device} [/dev_00_90_CC_xx_xx_xx] Powered = 0
- {Manager} [/] Devices = dbus.Array([], ...
-
Every "PropertyChanged" signal will generate a line of output. Some of them
can get very complex. The first detail inside "{ ... }" is the interface
name (without its service name prefix). The second detail inside "[ ... ]"
import dbus.mainloop.glib
def property_changed(name, value):
- if name in ["Profiles", "Services", "Providers", "Technologies",
- "Devices", "Networks"]:
+ if name in ["Profiles", "Services", "Providers", "Technologies"]:
val = "["
for i in value:
val = val + " " + i[i.rfind("/") + 1:]
def property_changed(name, value, path):
service = path[path.rfind("/") + 1:]
- if name in ["Profiles", "Services", "Providers", "Technologies",
- "Devices", "Networks"]:
+ if name in ["Profiles", "Services", "Providers", "Technologies"]
val = "["
for i in value:
val = val + " " + i[i.rfind("/") + 1:]
properties = manager.GetProperties()
for path in properties["Technologies"]:
- technology = dbus.Interface(bus.get_object("org.moblin.connman", path),
- "org.moblin.connman.Technology")
+ object = dbus.Interface(bus.get_object("org.moblin.connman", path),
+ "org.freedesktop.DBus.Introspectable")
- properties = technology.GetProperties()
-
- for path in properties["Devices"]:
- object = dbus.Interface(bus.get_object("org.moblin.connman", path),
- "org.freedesktop.DBus.Introspectable")
-
- print object.Introspect()
+ print object.Introspect()