Handle the special "<hidden>" SSID case from old IEEE80211 layer
[connman] / test / select-network
index e7491e8..376d9d2 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"]:
@@ -28,9 +31,12 @@ for path in properties["Devices"]:
 
                properties = network.GetProperties()
 
+               if "Name" not in properties.keys():
+                       continue
+
                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()