zoukankan      html  css  js  c++  java
  • wifi 热点配置最优信道

    wifi热点服务hostapd启动需要配置hostad.conf文件,其中有一个参数channel是用来配置信道的,信道的可选参数如下:

    # channel 1-14 is 2.4 GHz ; channel 36, 40, 44, 46, 48, 52, 56, 60,
    # 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149,
    # 153, 157, 161 is 5GHz
    # The channels that are available for use in a particular country differ
    # according to the regulations of that country.

     如果只是要配置正确在可选范围内随便填一个就可以了,但是如果需要选出一个当前环境下最优的一个信道,就需要动动手指了。

    我们需要戒指iwlist工具来扫描一下,然后就可以找到最优信道了

    ifconfig wlan0 up
    iwlist wlan0 scan
    iwlist wlan0 scan
    iwlist wlan0 scan
    

    扫面了三次,现在我们可以去看下最优信道是哪个了,我的网卡是rtl8188eu,通过以下指令获取

    [root@t3_p3 /]# cat /proc/net/rtl8188eu/wlan0/best_channel
    The rx cnt of channel 1 =8
    The rx cnt of channel 2 = 11
    The rx cnt of channel 3 = 12
    The rx cnt of channel 4 = 15
    The rx cnt of channel 5 = 20
    The rx cnt of channel 6 = 31
    The rx cnt of channel 7 = 22
    The rx cnt of channel 8 = 17
    The rx cnt of channel 9 = 13
    The rx cnt of channel 10 = 12
    The rx cnt of channel 11 = 14
    The rx cnt of channel 12 = 9
    The rx cnt of channel 13 = 7
    The rx cnt of channel 14 = 0
    best_channel_5G = 36
    best_channel_24G = 1
    [root@t3_p3 /]#

    如果没有走scan扫描直接去cat 那么channel后面接收到的数据包全都是0

    The result of “cat /proc/net/rtl…/wlan0/best_channel” has two parts. The first
    part is received packet count at all supported channels during site survey.
    Developers can use these statics to decide your own best channel. The second
    part is the simple estimated best channels for 5G and 2.4G band for reference
    only. HT40+ rule is used to estimate the best channel when the primary
    channel is at 1, 6, 36, 44, etc., and the primary channel with minimum
    received packet count is selected
    

     我们要找的是计数包最小的那个通道(14通道除外),类似于干扰最小的信道。

     wifi热点启动后我们可以在手机上安装wifi魔盒一类的wifi查看器,查看当前环境下的各个热点、信道、信号质量等信息。

  • 相关阅读:
    【CV论文阅读】Detecting events and key actors in multi-person videos
    2020意大利数学奥林匹克 第6题
    2020最终数学杯 初级组第3题
    地球上的最短距离
    钱学森做过的趣题
    第35届IMO预选题(瑞典提供)
    第55届IMO 第2题
    第四十届(1999年)IMO 第3题(白俄罗斯供题)
    2019年多瑙河数学竞赛(高中组) 第三题
    2020环球城市春季赛 O级别 高级组 第2题
  • 原文地址:https://www.cnblogs.com/tid-think/p/10538120.html
Copyright © 2011-2022 走看看