GithubHelp home page GithubHelp logo

geresa / wifi-bestchannel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nivrrex/wifi-bestchannel

0.0 0.0 0.0 35 KB

OpenWrt下 2.4G Wifi 最优信道选择,use lua and ubus

License: MIT License

Lua 100.00%

wifi-bestchannel's Introduction

wifi-bestchannel

OpenWrt下 2.4G/5G Wifi 最优信道选择,use lua and ubus

说明及更新日志:

2020-09-29:

  1. 实现很简单,就是路由器 scan 附近的所有 2.4G wifi 信道,然后对比所有主要频段的信号强度,选择当中高强度信号最少的频段(干扰最小)的,进行选择
  2. 如果附近最强的信号不超过 -50dbm ,则默认用 -50dbm 进行信道对比。 可以通过 find_best_channel_24g 函数进行调整
  3. 默认使用 1 6 11 13 这几个主要频段,最终结果也是对比并采用这几个频段
  4. 因为部分路由器采用了非标准频段,即非 1 6 11 13 频段,所以也将邻频干扰稍微考虑了下
  5. 暂不考虑 5G 的自动选择频段

2020-10-13:

  1. 增加对5G网络的监测,默认支持 149 153 157 161 165 等多区域支持的频段,也可以调整源码,增加 36 40 44 48 等几个常用频段
  2. 为增强稳定性,2.4G 修改为仅支持 1 6 11 频段,因 13 频段在部分区域内不支持
  3. 增加命令行参数,参数 1 可以是 all 2.4g 5g 三种,确定扫描频段;参数 2 如果是 true ,则进行最优信道的调整,否则不调整

2020-10-14:

  1. ubus 调用 hostapd.wlan 的 switch_chan 方法时,因为参数问题,会导致仅能使用 20mhz 频段带宽,所以暂时调整为使用 uci 进行设置,wifi 会短暂中断。

2020-10-27:

  1. ubus 调用的 hostapd.wlan 的 switch_chan 方法,增加 bandwidth=20 和 ht=true 两个参数。该方法wifi中断时长较短,不介意带宽的可以使用。

2021-01-06:

  1. 针对所有 2.4G 所有频点均纳入邻频干扰监测

备注

很简单的算法,效果尚可,可以放在 crontab 中定时执行

备注2

做实验时发现部分信道或者国家区域调整后 OpenWrt 的 2.4G 或者 5G 无线网络一直无法启动,后 Google 得一个解决方案:

国家代码设置为 US ,2.4G 信道设置为 11 , 5G 信道设置为 149 ,重启后基本无线网络就正常了。

应该是不同国家对频段不同要求导致,所以这个脚本进行了默认频段的调整,尽可能选用各个国家区域都支持的频段作为默认频段。

wifi-bestchannel's People

Contributors

nivrrex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.