Giter Site home page Giter Site logo

ashus / openwrt-radio-check Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nilsro/openwrt-radio-check

2.0 0.0 0.0 16 KB

A script that checks if OpenWRT wi-fi radio is still working and restarts it if neccessary.

License: GNU General Public License v3.0

Shell 100.00%

openwrt-radio-check's Introduction

OpenWRT-radio-check

A script that checks if OpenWRT wi-fi radio is still working and restarts it if neccessary.

original checker logic taken from https://github.com/NilsRo/Openwrt-radio-check

Installation

SSH to your device and run the following commands:

# download script (required)
cd /etc/
wget https://raw.githubusercontent.com/Ashus/OpenWRT-radio-check/main/radio-check.sh
chmod +x radio-check.sh

# enable cron (required)
echo "*/15 * * * * /etc/radio-check.sh" >> /etc/crontabs/root
/etc/init.d/cron reload

# persist on upgrades (suggested)
echo "/etc/radio-check.sh" >> /etc/sysupgrade.conf

# change cron loglevel to Warnings only (suggested)
uci set system.@system[0].cronloglevel='9'
uci commit

Notes

  • Tested to be working well with OpenWRT version 22.03.x on 5 different hardware configurations.
  • The script will check if the channel used by a radio matches the configured channel. So with DFS it will detect a fallback to channel 36 and also if wifi is turned off completely. If any of this is detected, radio is restarted to get it working again. With DFS channels this means the initial 1-minute wait for DFS check is initiated.
  • Pay close attention to configuring the wi-fi radios. If you set something that can't be satisfied (wide channel close to the range edge, etc.), review your syslog and fix it before using this.
  • This script will not work correctly if you use auto channel or with a list, please use a static channel configuration on all radios.
  • You might want to lower cron loglevel in syslog to prevent this check to spam your syslog on every execution. Any case of wi-fi restart will be logged there anyway.
  • The original version was fixed to radio0 and wlan0. This improved one gets the interface and radio names from system and iterates through them fixing all at once. Obviously it might not be of much use on 2.4 GHz range, but if you have a device with more 5 GHz radios or 6 GHz, it should work on them out of the box as well.
  • This script is neccessary with OpenWRT as the version today will not try and switch back to DFS channel automatically and sometimes it simply hangs.

openwrt-radio-check's People

Contributors

ashus avatar nilsro avatar

Stargazers

 avatar  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.