From a0d49e0444dbd47b08171106d09b64fd666eda30 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Wed, 28 Apr 2021 11:31:32 -0600 Subject: [PATCH] ap_ctl.py : added example and additional commands not used. Signed-off-by: Chuck SmileyRekiere --- ap_ctl.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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")