projects
/
connman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove deprecated resolver element type
[connman]
/
test
/
list-networks
diff --git
a/test/list-networks
b/test/list-networks
index
94e111c
..
8f7e01b
100755
(executable)
--- a/
test/list-networks
+++ b/
test/list-networks
@@
-1,6
+1,7
@@
#!/usr/bin/python
import dbus
#!/usr/bin/python
import dbus
+import string
bus = dbus.SystemBus()
bus = dbus.SystemBus()
@@
-9,12
+10,24
@@
manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
properties = manager.GetProperties()
properties = manager.GetProperties()
+def convert_ssid(ssid_list):
+ ssid = ""
+ for byte in ssid_list:
+ if (str(byte) in string.printable):
+ ssid = ssid + str(byte)
+ else:
+ ssid = ssid + "."
+ return ssid
+
for path in properties["Devices"]:
device = dbus.Interface(bus.get_object("org.moblin.connman", path),
"org.moblin.connman.Device")
properties = device.GetProperties()
for path in properties["Devices"]:
device = dbus.Interface(bus.get_object("org.moblin.connman", path),
"org.moblin.connman.Device")
properties = device.GetProperties()
+ if (properties["Type"] != "wifi" and properties["Type"] != "wimax"):
+ continue;
+
print "[ %s ]" % (path)
for path in properties["Networks"]:
print "[ %s ]" % (path)
for path in properties["Networks"]:
@@
-26,6
+39,12
@@
for path in properties["Devices"]:
print " [ %s ]" % (path)
for key in properties.keys():
print " [ %s ]" % (path)
for key in properties.keys():
- print " %s = %s" % (key, properties[key])
+ if (key == "WiFi.SSID"):
+ ssid = convert_ssid(properties[key])
+ print " %s = [ %s ]" % (key, ssid)
+ elif (key == "WiFi.Strength"):
+ print " %s = %d" % (key, properties[key])
+ else:
+ print " %s = %s" % (key, properties[key])
print
print