summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-03 23:02:07 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-03 23:02:07 +0100
commit416e8cbe721a7ed8052e599edd3b7ae4249642ba (patch)
tree451ed4e7f82927e3fd8ad1502e85809fa3813628 /test
parent0b55d59e5c43bb5358fb830691f504ffee8d7e75 (diff)
downloadconnman-416e8cbe721a7ed8052e599edd3b7ae4249642ba.tar.gz
connman-416e8cbe721a7ed8052e599edd3b7ae4249642ba.tar.bz2
connman-416e8cbe721a7ed8052e599edd3b7ae4249642ba.zip
Use device interface to trigger scanning
Diffstat (limited to 'test')
-rwxr-xr-xtest/start-scanning21
1 files changed, 9 insertions, 12 deletions
diff --git a/test/start-scanning b/test/start-scanning
index ff0dd07a..9d3f4db5 100755
--- a/test/start-scanning
+++ b/test/start-scanning
@@ -7,25 +7,22 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
'org.moblin.connman.Manager')
-elements = manager.ListElements()
+properties = manager.GetProperties()
-for path in elements:
- element = dbus.Interface(bus.get_object('org.moblin.connman', path),
- 'org.moblin.connman.Element')
+for path in properties["Devices"]:
+ device = dbus.Interface(bus.get_object('org.moblin.connman', path),
+ 'org.moblin.connman.Device')
- properties = element.GetProperties()
-
- if (properties["Type"] != "device"):
- continue
+ properties = device.GetProperties()
print "[ %s ]" % (path)
- if (properties["Subtype"] == "wifi"):
+ if (properties["Type"] == "wifi"):
print " Started WiFi scanning"
- element.Update()
- elif (properties["Subtype"] == "wimax"):
+ device.Scan()
+ elif (properties["Type"] == "wimax"):
print " Started WiMAX scanning"
- element.Update()
+ device.Scan()
else:
print " No scanning"