mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	Support abgn band
This commit is contained in:
		| @@ -50,7 +50,7 @@ def usage(): | |||||||
|    print("-p|--pass:  password") |    print("-p|--pass:  password") | ||||||
|    print("-s|--scheme (serial|telnet|ssh): connect via serial, ssh or telnet") |    print("-s|--scheme (serial|telnet|ssh): connect via serial, ssh or telnet") | ||||||
|    print("-l|--log file: log messages here") |    print("-l|--log file: log messages here") | ||||||
|    print("-b|--band:  a (5Ghz) or b (2.4Ghz)") |    print("-b|--band:  a (5Ghz) or b (2.4Ghz) or abgn for dual-band 2.4Ghz AP") | ||||||
|    print("-h|--help") |    print("-h|--help") | ||||||
|  |  | ||||||
| # see https://stackoverflow.com/a/13306095/11014343 | # see https://stackoverflow.com/a/13306095/11014343 | ||||||
| @@ -76,8 +76,8 @@ def main(): | |||||||
|    parser.add_argument("-l", "--log",     type=str, help="logfile for messages, stdout means output to console") |    parser.add_argument("-l", "--log",     type=str, help="logfile for messages, stdout means output to console") | ||||||
|    #parser.add_argument("-r", "--radio",   type=str, help="select radio") |    #parser.add_argument("-r", "--radio",   type=str, help="select radio") | ||||||
|    parser.add_argument("-a", "--ap",      type=str, help="select AP") |    parser.add_argument("-a", "--ap",      type=str, help="select AP") | ||||||
|    parser.add_argument("-b", "--band",    type=str, help="Select band (a | b)", |    parser.add_argument("-b", "--band",    type=str, help="Select band (a | b | abgn)", | ||||||
|                        choices=["a", "b"]) |                        choices=["a", "b", "abgn"]) | ||||||
|    parser.add_argument("--action",        type=str, help="perform action", |    parser.add_argument("--action",        type=str, help="perform action", | ||||||
|       choices=["config", "country", "ap_country", "enable", "disable", "summary", "advanced", |       choices=["config", "country", "ap_country", "enable", "disable", "summary", "advanced", | ||||||
|       "cmd", "txPower", "bandwidth", "channel", "show" ]) |       "cmd", "txPower", "bandwidth", "channel", "show" ]) | ||||||
| @@ -94,6 +94,8 @@ def main(): | |||||||
|       logfile = args.log |       logfile = args.log | ||||||
|       if (args.band != None): |       if (args.band != None): | ||||||
|           band = args.band |           band = args.band | ||||||
|  |           if (band == "abgn"): | ||||||
|  |               band = "-abgn" | ||||||
|       else: |       else: | ||||||
|           band = "a" |           band = "a" | ||||||
|       filehandler = None |       filehandler = None | ||||||
|   | |||||||
| @@ -65,7 +65,7 @@ def usage(): | |||||||
|    print("--lfmgr: LANforge manager IP address") |    print("--lfmgr: LANforge manager IP address") | ||||||
|    print("--lfresourcer: LANforge resource ID") |    print("--lfresourcer: LANforge resource ID") | ||||||
|    print("--pathloss:  Calculated path-loss between LANforge station and AP") |    print("--pathloss:  Calculated path-loss between LANforge station and AP") | ||||||
|    print("--band:  Select band (a | b), a means 5Ghz, b means 2.4") |    print("--band:  Select band (a | b | abgn), a means 5Ghz, b means 2.4, abgn means 2.4 on dual-band AP") | ||||||
|    print("-h|--help") |    print("-h|--help") | ||||||
|  |  | ||||||
| # see https://stackoverflow.com/a/13306095/11014343 | # see https://stackoverflow.com/a/13306095/11014343 | ||||||
| @@ -107,7 +107,7 @@ def main(): | |||||||
|    parser.add_argument("--outfile",     type=str, help="Output file for csv data") |    parser.add_argument("--outfile",     type=str, help="Output file for csv data") | ||||||
|    parser.add_argument("--pathloss",     type=str, help="Calculated pathloss between LANforge Station and AP") |    parser.add_argument("--pathloss",     type=str, help="Calculated pathloss between LANforge Station and AP") | ||||||
|    parser.add_argument("--band",    type=str, help="Select band (a | b), a means 5Ghz, b means 2.4Ghz.  Default is a", |    parser.add_argument("--band",    type=str, help="Select band (a | b), a means 5Ghz, b means 2.4Ghz.  Default is a", | ||||||
|                        choices=["a", "b"]) |                        choices=["a", "b", "abgn"]) | ||||||
|     |     | ||||||
|    args = None |    args = None | ||||||
|    try: |    try: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ben Greear
					Ben Greear