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()
28 if properties["Type"] not in ["wifi", "wimax",
29 "bluetooth", "cellular"]:
32 print "[ %s ]" % (path)
34 for path in properties["Networks"]:
35 network = dbus.Interface(bus.get_object("org.moblin.connman", path),
36 "org.moblin.connman.Network")
38 properties = network.GetProperties()
40 print " [ %s ]" % (path)
42 for key in properties.keys():
43 if (key == "WiFi.SSID"):
44 ssid = convert_ssid(properties[key])
45 print " %s = [ %s ]" % (key, ssid)
46 elif (key == "Strength"):
47 print " %s = %d" % (key, properties[key])
49 print " %s = %s" % (key, properties[key])