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   huangguanyuan  阅读(15)  评论(1编辑  收藏  举报

相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2021-09-18 wpa_supplicant 认知!
2018-09-18 [Chromium文档转载,第007章]JNI on Chromium for Android
2018-09-18 [Chromium文档转载,第006章]Chrome IPC To Mojo IPC Cheat Sheet
2018-09-18 [Chromium文档转载,第005章]Calling Mojo from Blink
2018-09-18 [Chromium文档转载,第004章]Mojo Synchronous Calls
2018-09-18 [Chromium文档转载,第003章]Proposal: Mojo Synchronous Methods
2018-09-18 [Chromium文档转载,第002章]Mojo C++ Bindings API

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示