bug fix, be more specific with slot

This commit is contained in:
Chuck SmileyRekiere
2020-09-22 14:35:34 -06:00
parent 9333cb4745
commit 276ac894d2
2 changed files with 26 additions and 22 deletions

View File

@@ -18,6 +18,13 @@ $ pip3 install pexpect-serial
./cisco_wifi_ctl.py --scheme ssh -d 192.168.100.112 -u admin -p Cisco123 --action cmd --value "show ap config general APA453.0E7B.CF9C" ./cisco_wifi_ctl.py --scheme ssh -d 192.168.100.112 -u admin -p Cisco123 --action cmd --value "show ap config general APA453.0E7B.CF9C"
telnet 172.19.36.168(Pwd:Wnbulab@123), go to the privileged mode and execute the command “clear line 43”. telnet 172.19.36.168(Pwd:Wnbulab@123), go to the privileged mode and execute the command “clear line 43”.
Cisco uses 9130 AP
show controllers dot11Radio 1 wlan
AP
Command on AP to erase the config:"capwap ap erase all"
''' '''

View File

@@ -648,21 +648,18 @@ def main():
continue continue
if (searchap): if (searchap):
pat = "%s\s+(\S+)\s+(\S+)\s+\S+\s+\S+\s+(\S+)\s+(\S+)\s+\(\s*(\S+)\s+dBm\)+\s+(\S+)\*+\s"%(args.ap) pat = "%s\s+(\S+)\s+%s\s+\S+\s+\S+\s+(\S+)\s+(\S+)\s+\(\s*(\S+)\s+dBm\)+\s+(\S+)\*+\s"%(args.ap,args.slot)
m = re.search(pat, line) m = re.search(pat, line)
if (m != None): if (m != None):
cc_slot= m.group(2)
print("cc_slot: {}".format(cc_slot))
if (args.slot == cc_slot):
cc_mac = m.group(1) cc_mac = m.group(1)
cc_slot = m.group(2) cc_slot = args.slot
cc_ch = m.group(6); # (132,136,140,144) cc_ch = m.group(5); # (132,136,140,144)
cc_power = m.group(4) cc_power = m.group(3)
cc_power = cc_power.replace("*/", " of ", 1) # spread-sheets turn 1/8 into a date cc_power = cc_power.replace("*/", " of ", 1) # spread-sheets turn 1/8 into a date
cc_dbm = m.group(5) cc_dbm = m.group(4)
cc_ch_count = cc_ch.count(",") cc_ch_count = cc_ch.count(",")
cc_bw = m.group(3) cc_bw = m.group(2)
print("group 1: {} 2: {} 3: {} 4: {} 5: {} 6: {}".format(m.group(1),m.group(2),m.group(3),m.group(4),m.group(5),m.group(6))) print("group 1: {} 2: {} 3: {} 4: {} 5: {} 6: {}".format(m.group(1),m.group(2),m.group(3),m.group(4),m.group(5),m.group(6)))
print("9800 test_parameters_summary: read: tx: {} ch: {} bw: {}".format(tx,ch,bw)) print("9800 test_parameters_summary: read: tx: {} ch: {} bw: {}".format(tx,ch,bw))