8 manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
9 "org.moblin.connman.Manager")
11 properties = manager.GetProperties()
13 def convert_ssid(ssid_list):
15 for byte in ssid_list:
16 if (str(byte) in string.printable):
17 ssid = ssid + str(byte)
22 for path in properties["Devices"]:
23 device = dbus.Interface(bus.get_object("org.moblin.connman", path),
24 "org.moblin.connman.Device")
26 properties = device.GetProperties()
29 if properties["Type"] not in ["wifi", "wimax",
30 "bluetooth", "cellular"]:
35 print "[ %s ]" % (path)
37 for path in properties["Networks"]:
38 network = dbus.Interface(bus.get_object("org.moblin.connman", path),
39 "org.moblin.connman.Network")
41 properties = network.GetProperties()
43 print " [ %s ]" % (path)
45 for key in properties.keys():
46 if key == "WiFi.SSID":
47 ssid = convert_ssid(properties[key])
48 print " %s = [ %s ]" % (key, ssid)
49 elif key in ["Strength", "Priority"]:
50 print " %s = %d" % (key, properties[key])
52 print " %s = %s" % (key, properties[key])