X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=test%2Fstart-scanning;h=cf36477dacbcedb046a545852c16c4d5b4694258;hb=d7415ae9768d6bb51145ffc5327d78f1dd33aeff;hp=ff0dd07a8518932148902c5c84392f6c81a037a0;hpb=e952851502277cc41cd2a54ef5386cca7a8843dd;p=connman diff --git a/test/start-scanning b/test/start-scanning index ff0dd07..cf36477 100755 --- a/test/start-scanning +++ b/test/start-scanning @@ -7,25 +7,19 @@ bus = dbus.SystemBus() manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"), 'org.moblin.connman.Manager') -elements = manager.ListElements() +properties = manager.GetProperties() -for path in elements: - element = dbus.Interface(bus.get_object('org.moblin.connman', path), - 'org.moblin.connman.Element') +for path in properties["Devices"]: + device = dbus.Interface(bus.get_object('org.moblin.connman', path), + 'org.moblin.connman.Device') - properties = element.GetProperties() - - if (properties["Type"] != "device"): - continue + properties = device.GetProperties() print "[ %s ]" % (path) - if (properties["Subtype"] == "wifi"): - print " Started WiFi scanning" - element.Update() - elif (properties["Subtype"] == "wimax"): - print " Started WiMAX scanning" - element.Update() + if properties["Type"] in ["wifi", "wimax"]: + print " Started scanning" + device.ProposeScan() else: print " No scanning"