AR系列高通芯片通过调用ubus来处理连接客户端的问题
发布日期:2021-06-30 17:15:47 浏览次数:2 分类:技术文章

本文共 1182 字,大约阅读时间需要 3 分钟。

#!/bin/shwhile true;do        maclist=`iw dev wlan0 station dump | grep "Station" | cut -f 2 -s -d " "`        len=`iw dev wlan0 station dump | grep "Station" | cut -f 2 -s -d " " |wc -l`        rxlist=`iw dev wlan0 station dump | grep "signal:" | cut -f 3 -s -d " "`        #maclist=`iwinfo wlan0 assoclist | grep "dBm" | cut -f 1 -s -d " "`        #rxlist=`iwinfo wlan0 assoclist | grep "dBm" | cut -f 3 -s -d " "`        rxref="-80"  #threshold        len=`iw dev wlan0 station dump | grep "Station" | cut -f 2 -s -d " " |wc -l`#       len=${#maclist[@]}        echo $len        for((i=0;i<$len;i++))        do                mac=${maclist[$i]}                rx=${rxlist[$i]}        # here, use string comparation, simple but error prone                if [[ "$rx" > "$rxref" ]]; then                        echo "$mac  ------> $rx"                        ubus call hostapd.wlan0 del_client '{"addr":"'"$mac"'", "reason": 5, "deauth": True, "ban_time": 3000}'                        #ubus call hostapd.wlan0 list_bans                fi        done        sleep 1doneubus call hostapd.wlan0 del_client '{"addr":"48:db:50:d5:e4:a1", "reason": 5, "deauth": True, "ban_time": 1000}'

转载地址:https://leekwen.blog.csdn.net/article/details/71403206 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
下一篇:Hi3515 CRQCV100 NVR折腾记

发表评论

最新留言

路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月21日 06时17分25秒