Add test script for setting device priorities
[connman] / test / select-network
index e7491e8..e7d1a63 100755 (executable)
@@ -20,6 +20,9 @@ for path in properties["Devices"]:
 
        properties = device.GetProperties()
 
+       if (properties["Type"] != "wifi" and properties["Type"] != "wimax"):
+               continue;
+
        print "[ %s ]" % (path)
 
        for path in properties["Networks"]:
@@ -31,6 +34,6 @@ for path in properties["Devices"]:
                if (properties["Connected"] == dbus.Boolean(1)):
                        continue
 
-               if (properties["WiFi.Name"] == sys.argv[1]):
+               if (properties["Name"] == sys.argv[1]):
                        print "Connecting %s" % (path)
                        network.Connect()