manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
'org.moblin.connman.Manager')
-interfaces = manager.ListInterfaces()
+properties = manager.GetProperties()
-for path in interfaces:
- print "[ %s ]" % (path)
+for path in properties["Devices"]:
+ device = dbus.Interface(bus.get_object('org.moblin.connman', path),
+ 'org.moblin.connman.Device')
- interface = dbus.Interface(bus.get_object('org.moblin.connman', path),
- 'org.moblin.connman.Interface')
+ properties = device.GetProperties()
- properties = interface.GetProperties()
+ print "[ %s ]" % (path)
- if (properties["Type"] == "80211"):
+ if properties["Type"] in ["wifi", "wimax"]:
print " Started scanning"
- interface.Scan()
+ device.ProposeScan()
else:
print " No scanning"