Fix start-scanning script
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 5 Feb 2010 20:07:15 +0000 (21:07 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 5 Feb 2010 20:11:01 +0000 (12:11 -0800)
Devices are no longer part of the manager properties, go through
the technology list instead.

test/start-scanning

index cf36477..b8e5229 100755 (executable)
@@ -9,17 +9,22 @@ manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
 
 properties = manager.GetProperties()
 
-for path in properties["Devices"]:
-       device = dbus.Interface(bus.get_object('org.moblin.connman', path),
-                                               'org.moblin.connman.Device')
-
-       properties = device.GetProperties()
+for path in properties["Technologies"]:
+       technology = dbus.Interface(bus.get_object('org.moblin.connman', path),
+                                               'org.moblin.connman.Technology')
+       properties = technology.GetProperties()
 
        print "[ %s ]" % (path)
 
        if properties["Type"] in ["wifi", "wimax"]:
+
                print "   Started scanning"
-               device.ProposeScan()
+
+               for path in properties["Devices"]:
+                       device = dbus.Interface(bus.get_object('org.moblin.connman', path),
+                                                               'org.moblin.connman.Device')
+
+                       device.ProposeScan()
        else:
                print "   No scanning"