Diff between fee1eda5a5f846b8323ec315653bfc3f2d4cc2ae and 6ee8f62e85287c08bb8f55a072c07ad064d3519f

Changed Files

File Additions Deletions Status
test/test-device +11 -0 modified

Full Patch

diff --git a/test/test-device b/test/test-device
index 63a96d3..bdd14e7 100755
--- a/test/test-device
+++ b/test/test-device
@@ -39,6 +39,7 @@ if (len(args) < 1):
 	print("  services <address>")
 	print("  create <address>")
 	print("  remove <address|path>")
+	print("  connect <address>")
 	print("  disconnect <address>")
 	print("  discover <address> [pattern]")
 	print("  class <address>")
@@ -87,6 +88,16 @@ if (args[0] == "remove"):
 		adapter.RemoveDevice(path)
 	sys.exit(0)
 
+if (args[0] == "connect"):
+	if (len(args) < 2):
+		print("Need address parameter")
+	else:
+		path = adapter.FindDevice(args[1])
+		device = dbus.Interface(bus.get_object("org.bluez", path),
+							"org.bluez.Device")
+		device.Connect()
+	sys.exit(0)
+
 if (args[0] == "disconnect"):
 	if (len(args) < 2):
 		print("Need address parameter")