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查看器,查看当前环境下的各个热点、信道、信号质量等信息。

  • 相关阅读:
    BZOJ 5059: 前鬼后鬼的守护 可并堆 左偏树 数学
    BZOJ 1975: [Sdoi2010]魔法猪学院 大水题 第k短路 spfa
    BZOJ 4003: [JLOI2015]城池攻占 左偏树 可并堆
    BZOJ 3091: 城市旅行 lct 期望 splay
    2018/3/27 省选模拟赛 140分
    BZOJ 2959: 长跑 lct 双联通分量 并查集 splay
    2018/3/26 省选模拟赛 60分
    快速排序
    插入排序法
    快速排序的两种方法
  • 原文地址:https://www.cnblogs.com/tid-think/p/10538120.html
Copyright © 2011-2022 走看看