test script
#!/bin/sh
loop=0
for i in $(seq 0 1 1000000);
do
date | tee -a /mnt/sdcard/tx_test.log
echo $i | tee -a /mnt/sdcard/tx_test.log
/usr/bin/init.qti.wlan_off.sh | tee -a /mnt/sdcard/tx_test.log
/usr/bin/init.qti.wlan_on.sh | tee -a /mnt/sdcard/tx_test.log
ifconfig wlan0 up | tee -a /mnt/sdcard/tx_test.log
iwpriv wlan0 set_fw_log 1
killall hostapd | tee -a /mnt/sdcard/tx_test.log
killall wpa_supplicant | tee -a /mnt/sdcard/tx_test.log
iw dev wlan0 interface add wlan1 type managed | tee -a /mnt/sdcard/tx_test.log
ifconfig wlan1 up | tee -a /mnt/sdcard/tx_test.log
/usr/sbin/hostapd -B /etc/misc/wifi/hostapd-wlan1.conf&
sleep 2 | tee -a /mnt/sdcard/tx_test.log
/usr/sbin/wpa_supplicant -i wlan0 -Dnl80211 -B -c /etc/misc/wifi/wpa_supplicant.conf&
sleep 2 | tee -a /mnt/sdcard/tx_test.log
wpa_cli -i wlan0 set_network 0 ssid '"TP-LINK_5G_3ACB"' | tee -a /mnt/sdcard/tx_test.log
wpa_cli -i wlan0 set_network 0 psk '"1234567890"' | tee -a /mnt/sdcard/tx_test.log
wpa_cli -i wlan0 select_network 0 | tee -a /mnt/sdcard/tx_test.log
sleep 8 | tee -a /mnt/sdcard/tx_test.log
wpa_cli -i wlan0 status | tee -a /mnt/sdcard/tx_test.log
hostapd_cli -i wlan1 status | tee -a /mnt/sdcard/tx_test.log
# stop unload driver
if (cat /mnt/sdcard/log/umdplog/kmesglog_*_current | grep "Auth TX: fail"); then
for j in $(seq 0 1 1000000);
do
echo "tx fail"
wpa_cli -i wlan0 disconnect | tee -a /mnt/sdcard/tx_test.log
wpa_cli -i wlan0 set_network 0 ssid '"TP-LINK_5G_3ACB"' | tee -a /mnt/sdcard/tx_test.log
wpa_cli -i wlan0 set_network 0 psk '"1234567890"' | tee -a /mnt/sdcard/tx_test.log
wpa_cli -i wlan0 select_network 0 | tee -a /mnt/sdcard/tx_test.log
sleep 8 | tee -a /mnt/sdcard/tx_test.log
if [ $j -eq 20 ]; then
echo "tx fail stop fw log"
iwpriv wlan0 set_fw_log 2
fi
done
fi
done
posted on 2023-09-18 11:43 huangguanyuan 阅读(14) 评论(1) 编辑 收藏 举报