What's new

ChannelHog - Monitor And Force Maximum 5GHz Bandwidth

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

How does it not work, please elaborate
it doesn't work in any way :) The width of the channel has not once risen to 160. After deleting the script and rebooting, it became 160.
Channel cleared for radar: shows --
 
I wanted to use your script on my Asus AXE-11000, but I tested the used commands and do not seem to work as expected.

My intention is to check in the morning (5:30 am) if 5ghz wifi i set to 100/160 and change it if it's different (in case of radar detection).

I used this script so far, and added this cron job:

Code:
cru a ChannelChange "30 5 * * * /jffs/scripts/check_channel.sh"


check_channel.sh
Code:
#!/bin/sh


check_channel() {
    current_channel=$(nvram get wl1_chanspec)
   
    if [ "$current_channel" != "100/160" ]; then
        logger "Current channel is $current_channel, switching to 100/160"
        nvram set wl1_chanspec=100/160
        nvram commit
        service restart_wireless
        logger "5GHz channel was changed to 100/160"
    else
        logger "5GHz channel is already set to 100/160"
    fi
}


check_channel

In my case I think the commands from your script do not have the desired effect

Code:
nvram set wl1_bw=5
l -i "eth7" down
l -i "eth7" up

As I want to change both the channel and the width and after that only "service restart_wireless" works for me.


Did I misunderstand something and would ChannelHog work for me? Meaning if after radar detection the channel is changed from 100/160 to 36/80, would restarting the 5ghz interface make it go back to 100/160? Or is my approach needed (nvram set wl1_chanspec=100/160 and service restart_wireless)?
 
Last edited:
I believe Adamm uses the program “wl” to get the present speed.

Here is a distilled version. You will need to figure out the eth device for the radio you want to check.
In my case, on an AX-88U Pro, 5Ghz is eth7, 2.4 is eth 6.

Code:
wl -i $1 assoc | grep Chanspec | awk '{print $5}'

Paste that one line into a file, make executable and then pass the eth device

When I run it for eth7 I get
160Mhz

as the output.

Adamms script will figure out the proper eth devices for the radios, then do the above and check if it’s in the range you want. If not, the script restarts the radio (again using “wl”)
Using the example above, you could:

wl -i ethX down
wl -i ethX up

(Setting X to the correct wifi radio)

This resets the radio and hopefully get you back to the speed you hope for.
 
Hello.
I'm attempting to use ChannelHog with an AXE11000 and am having issues with it working.
I have my channel and width set to 100/160. When it gets knocked out of channel 100, it doesn't go back even when I manually run the script and it says it's restarting the 5gz radio.
Any suggestions here?
@AlexD Did you manage to get something figured out?
 
Not really, even with my custom script it wouldn't go back to 100/160 but to something like 36/160. And I don't like restarting my wifi randomly. There are other approaches, but this one is not working in my case.
 
Last edited:
Have you tried to force the channel with the wl command?

the syntax is:

wl -i ethX channel [channel]

Without the [channel] number it should report the present channel.
 
Ch. 50 takes 36-48 non-DFS + 52-64 DFS.
That’s correct. 36-64 total. I was thinking of no DFS on the upper channels 100-128 which consists of 100-112 & 116-128 where 116-128 & on upper channels also 169-177 is restricted DFS and isn’t allowed unlike in the US. Really a shame.
 
I was thinking of no DFS on the upper channels 100-128

Also DFS channels. There are zero non-DFS 160MHz channels on 5GHz band. No client device supports U-NII-4.
 
Have you tried to force the channel with the wl command?

the syntax is:



Without the [channel] number it should report the present channel.
I have not.
I'm pretty novice with this.
wl -i eth7 channel does show me the channel and target fine though.
Would I need to write this into a script or do something particular?
 
v1.1.1
Updated - 28th June 2022



ChannelHog - Monitor and force maximum 5GHz bandwidth

About;


Tired of badly configured neighbours and DFS cutting your wireless bandwidth in half? Then this is the script for you!

ChannelHog will monitor your current 5GHz channel bandwidth on a daily basis and if it detects anything lower then 160MHz it will restart the 5Ghz radio. This script also includes optional Discord notification support.

Note: Your clients will temporarily be disconnected from the 5GHz band in the event of a restart, this usally takes 1-2 minutes and occurs at 4.45am.


This script will always be open source and free to use, but if you want to support future development you can do so by Donating With PayPal.


Usage;

To open the menu its as simple as;

Code:
sh /jffs/addons/channelhog/channelhog.sh


z5nOiJp.png



Installation;

In your favorite SSH Client;

Code:
mkdir -p /jffs/addons/channelhog && /usr/sbin/curl -s "https://raw.githubusercontent.com/Adamm00/ChannelHog/master/channelhog.sh" -o "/jffs/addons/channelhog/channelhog.sh" && chmod 755 /jffs/addons/channelhog/channelhog.sh && sh /jffs/addons/channelhog/channelhog.sh install
I think I got it installed correctly when I choose option 1 start channelhog I don't get any error message so that's a good sign
 

Attachments

  • Screenshot_2024-09-10-22-13-50-52_572064f74bd5f9fa804b05334aa4f912.jpg
    Screenshot_2024-09-10-22-13-50-52_572064f74bd5f9fa804b05334aa4f912.jpg
    69.8 KB · Views: 35

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top