diff --git a/ap_ctl.py b/ap_ctl.py index 0a287d1e..0a67ea04 100755 --- a/ap_ctl.py +++ b/ap_ctl.py @@ -9,7 +9,7 @@ Script that logs into an AP via Serial, SSH, or Telnet to read data or execute c EXAMPLE: -./ap_ctl.py --scheme "serial" --prompt "#" --dest --port --user +./ap_ctl.py --scheme "serial" "--tty "Serial port for accessing AP" --prompt "#" --dest --port --user --passwd --action In a program: @@ -303,6 +303,20 @@ def main(): if i == 1: print(egg.before.decode('utf-8', 'ignore')) # do not delete this for it allows for subprocess to see output + elif (args.action == "ds_data_5ghz"): + logg.info("execute: wl -i wl1 bs_data") + egg.sendline('wl -i wl1 bs_data') + egg.expect([pexpect.TIMEOUT], timeout=4) # do not detete this for it allow for subprocess to read + print(egg.before.decode('utf-8','ignore')) # do not delete this for it allows for subprocess to see output + + + elif (args.action == "ds_data_24ghz"): + logg.info("execute: wl -i wl0 bs_data") + egg.sendline('wl -i wl1 bs_data') + egg.expect([pexpect.TIMEOUT], timeout=4) # do not detete this for it allow for subprocess to read + print(egg.before.decode('utf-8','ignore')) # do not delete this for it allows for subprocess to see output + + else: # no other command at this time so send the same power command #logg.info("no action so execute: show controllers dot11Radio 1 powercfg | g T1") logg.info("no action")