- if (properties["Type"] == "network"):
- if (properties["Connected"] == 1):
- state = "*"
- else:
- state = " "
- print " %s %s" % (state, properties["SSID"])
+ if (properties["Type"] != "wifi" and properties["Type"] != "wimax"):
+ continue;
+
+ print "[ %s ]" % (path)
+
+ for path in properties["Networks"]:
+ network = dbus.Interface(bus.get_object("org.moblin.connman", path),
+ "org.moblin.connman.Network")
+
+ properties = network.GetProperties()
+
+ print " [ %s ]" % (path)
+
+ for key in properties.keys():
+ if (key == "WiFi.SSID"):
+ ssid = convert_ssid(properties[key])
+ print " %s = [ %s ]" % (key, ssid)
+ elif (key == "Strength"):
+ print " %s = %d" % (key, properties[key])
+ else:
+ print " %s = %s" % (key, properties[key])
+
+ print