summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest/test-adapter15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test-adapter b/test/test-adapter
index a0249010..4b53540e 100755
--- a/test/test-adapter
+++ b/test/test-adapter
@@ -19,6 +19,7 @@ if (len(sys.argv) < 2):
print " mode [mode]"
print " requestmode <mode>"
print " pairable [on/off]"
+ print " discoverable [on/off]"
print " discoverabletimeout [timeout]"
print " periodicdiscovery [on/off]"
sys.exit(1)
@@ -65,6 +66,20 @@ if (sys.argv[1] == "pairable"):
adapter.SetProperty("Pairable", value)
sys.exit(0)
+if (sys.argv[1] == "discoverable"):
+ if (len(sys.argv) < 3):
+ properties = adapter.GetProperties()
+ print properties["Discoverable"]
+ else:
+ if (sys.argv[2] == "on"):
+ value = dbus.Boolean(1)
+ elif (sys.argv[2] == "off"):
+ value = dbus.Boolean(0)
+ else:
+ value = dbus.Boolean(sys.argv[2])
+ adapter.SetProperty("Discoverable", value)
+ sys.exit(0)
+
if (sys.argv[1] == "discoverabletimeout"):
if (len(sys.argv) < 3):
properties = adapter.GetProperties()