From: Marcel Holtmann Date: Thu, 26 Mar 2009 08:29:22 +0000 (-0700) Subject: Extend script for joining network with security options X-Git-Tag: 0.14~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35687e51f6bb14417777def599ba4f6cb65876de;p=platform%2Fupstream%2Fconnman.git Extend script for joining network with security options --- diff --git a/test/join-network b/test/join-network index 400f497..576c602 100755 --- a/test/join-network +++ b/test/join-network @@ -4,7 +4,7 @@ import sys import dbus if (len(sys.argv) < 2): - print "Usage: %s " % (sys.argv[0]) + print "Usage: %s [passphrase] [security]" % (sys.argv[0]) sys.exit(1) bus = dbus.SystemBus() @@ -26,5 +26,16 @@ for path in properties["Devices"]: print "[ %s ]" % (path) print "Attempting to join %s" % (sys.argv[1]) + if len(sys.argv) > 2: + if len(sys.argv) > 3: + security = sys.argv[3] + else: + security = "wpa2" + passphrase = sys.argv[2] + else: + security = "none" + passphrase = "" + device.JoinNetwork({ "WiFi.SSID": sys.argv[1], - "WiFi.Security": "none" }) + "WiFi.Security": security, + "WiFi.Passphrase": passphrase })