X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=test%2Fstart-scanning;h=cf36477dacbcedb046a545852c16c4d5b4694258;hb=dba2854c4a36e8848aeec7b1e7d8c24b17147222;hp=b5933231734e293e1fc0ab5888ab921b571e2165;hpb=abd3d59620a11ba5c9aec630bf28cf04ea6c3cf6;p=connman diff --git a/test/start-scanning b/test/start-scanning index b593323..cf36477 100755 --- a/test/start-scanning +++ b/test/start-scanning @@ -7,19 +7,19 @@ bus = dbus.SystemBus() 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"