mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 02:38:03 +00:00 
			
		
		
		
	ap_ctl.py : added example and additional commands not used.
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
		
							
								
								
									
										16
									
								
								ap_ctl.py
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								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: | EXAMPLE: | ||||||
|  |  | ||||||
| ./ap_ctl.py --scheme "serial" --prompt "#" --dest <ip if using SSH or Telnet> --port <port , none for serial>  --user <user name> | ./ap_ctl.py --scheme "serial" "--tty "Serial port for accessing AP" --prompt "#" --dest <ip if using SSH or Telnet> --port <port , none for serial>  --user <user name> | ||||||
|         --passwd <password> --action <command> |         --passwd <password> --action <command> | ||||||
|  |  | ||||||
| In a program:  | In a program:  | ||||||
| @@ -303,6 +303,20 @@ def main(): | |||||||
|         if i == 1: |         if i == 1: | ||||||
|             print(egg.before.decode('utf-8', 'ignore')) # do not delete this for it  allows for subprocess to see output |             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 |     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 so execute: show controllers dot11Radio 1 powercfg | g T1") | ||||||
|         logg.info("no action") |         logg.info("no action") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Chuck SmileyRekiere
					Chuck SmileyRekiere