manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
'org.moblin.connman.Manager')
-interfaces = manager.ListInterfaces()
+elements = manager.ListElements()
-for path in interfaces:
- print "[ %s ]" % (path)
+for path in elements:
+ element = dbus.Interface(bus.get_object('org.moblin.connman', path),
+ 'org.moblin.connman.Element')
+
+ properties = element.GetProperties()
- interface = dbus.Interface(bus.get_object('org.moblin.connman', path),
- 'org.moblin.connman.Interface')
+ if (properties["Type"] != "device"):
+ continue
- properties = interface.GetProperties()
+ print "[ %s ]" % (path)
- if (properties["Type"] == "80211"):
+ if (properties["Subtype"] == "wifi"):
print " Started scanning"
- interface.Scan()
+ element.Update()
else:
print " No scanning"