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.
 

Latest threads

Sign Up For SNBForums Daily Digest

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