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!

Use wl_ifnames to get the list of WLAN interfaces.

Code:
admin@stargate:/tmp/home/root# nvram get wl_ifnames
eth6 eth7
That is all fine and dandy, but we are only concerned with the one specific to the 5ghz bandwidth. do they follow numerical logic in this case?

Code:
GT-AX11000-9600:/tmp/home/root# nvram get wl_ifnames
eth6 eth7 eth8

Code:
RT-AX88U-C7C0:/tmp/home/root# nvram get wl_ifnames
eth6 eth7

Edit: Revised logic (abit overkill) per @RMerlin

Code:
port5ghz-1="$(nvram get wl_ifnames | grep -oF "$(ifconfig | grep -F "$(nvram get wl1_hwaddr)" | awk '{if (NR==1) {print $1}}')")"
and
port5ghz-2="$(nvram get wl_ifnames | grep -oF "$(ifconfig | grep -F "$(nvram get wl2_hwaddr)" | awk '{if (NR==1) {print $1}}')")"

@Adamm , the revised logic should take care of worrying about catching the wrong interface between different models.
 
Last edited:
Hate to bump this but this would be great on my gt-ax11000 if it works. Hopefully support can be added.
 
That is all fine and dandy, but we are only concerned with the one specific to the 5ghz bandwidth. do they follow numerical logic in this case?

Code:
GT-AX11000-9600:/tmp/home/root# nvram get wl_ifnames
eth6 eth7 eth8

Code:
RT-AX88U-C7C0:/tmp/home/root# nvram get wl_ifnames
eth6 eth7

Edit: Revised logic (abit overkill) per @RMerlin

Code:
port5ghz-1="$(nvram get wl_ifnames | grep -oF "$(ifconfig | grep -F "$(nvram get wl1_hwaddr)" | awk '{if (NR==1) {print $1}}')")"
and
port5ghz-2="$(nvram get wl_ifnames | grep -oF "$(ifconfig | grep -F "$(nvram get wl2_hwaddr)" | awk '{if (NR==1) {print $1}}')")"

@Adamm , the revised logic should take care of worrying about catching the wrong interface between different models.

 
I tried to install it - but the install script says that my AX-11000 isn't supported...

[*] ChannelHog currently only supports the RT-AX88U / RT-AX86U / RT-AX58U

Try now, got rid of the model check.

Edit; Just tested, need to make some small fixes.
 
Last edited:
Try now, got rid of the model check.

Edit; Just tested, need to make some small fixes.

Thanks. I installed it. At what time is it supposed to restart the band? Because right after starting nothing happend...

thanks
 
Everything should be in working order now. If anyone with a dual radio device could test the latest version and let me know.
 
@Adamm , I installed on an AX58U (dual radio). Working fine.
I did a few "sh /jffs/addons/channelhog/channelhog.sh check" after I installed and it showed 160Mhz every time.
 
I wish I could use this addon on my XT8 for the 5Ghz-2.

Problem is, it's 5Ghz-1 supports 80mhz at most. Only 5Ghz-2 supports 160mhz.
If I use this addon, its 5Ghz-1 brand will just keep restarting? Is there any workaround?
 
I wish I could use this addon on my XT8 for the 5Ghz-2.

Problem is, it's 5Ghz-1 supports 80mhz at most. Only 5Ghz-2 supports 160mhz.
If I use this addon, its 5Ghz-1 brand will just keep restarting? Is there any workaround?
Its a Bash shell script so it is pretty easy to read through and modify if you want.

I would search for “160” and see about changing it to “80” for example.
@Adamm is a very good SW developer and I have found his code to be pretty easy to read through and modify.

Ahh, the beauty of Free and Open Source. ;-)
 
Its a Bash shell script so it is pretty easy to read through and modify if you want.

I would search for “160” and see about changing it to “80” for example.
@Adamm is a very good SW developer and I have found his code to be pretty easy to read through and modify.

Ahh, the beauty of Free and Open Source. ;-)
I have found his script to be beautifully written, but unless the average user takes the time to investigate what each variables individually do and also understands basic script logic, they can easily find themselves breaking something trying to modify @Adamm scripts despite the ease and beauty at which the script was written. That is because @Adamm does not simply just write script, or just a good SW developer (although he is both of those); however, he has an intricate, and intimate, understanding of how his script interacts with Asuswrt/Merlin inner workings. It is not something that can always be easily reproduced, or modified; even though, for @Adamm it might be as simple as changing one or two lines of code.

I further digress by simply stating I, and hopefully the rest of the community addon users (and/or developers), are thankful for everything @Adamm does and continues to do. Simply make your request known and as @Adamm finds the time, I am sure he will implement patches for these "newer" supported routers. He cannot simply move at the speed that these routers are showing up on the market. He first has to do like any other diligent developer would do, which is research, and test, before dropping in patches or new releases; this requires time and patience.
 
Last edited:
Problem is, it's 5Ghz-1 supports 80mhz at most. Only 5Ghz-2 supports 160mhz.
If I use this addon, its 5Ghz-1 brand will just keep restarting? Is there any workaround?
channelhog.png
Just a guess but it should be as easy as putting lines 190-191 in its own if statement (assuming nvram get model returns XT8 as a model name)
Code:
targetbandwidth="160MHz"
if [ "$currentbandwidth1" != "$targetbandwidth" ]; then
    if [ "$(nvram get model)" != "XT8" ]; then
        restart5ghz1="true"
        restartradio="5GHz-1 "
    fi
fi
 
View attachment 43514
Just a guess but it should be as easy as putting lines 190-191 in its own if statement (assuming nvram get model returns XT8 as a model name)
Code:
targetbandwidth="160MHz"
if [ "$currentbandwidth1" != "$targetbandwidth" ]; then
    if [ "$(nvram get model)" != "XT8" ]; then
        restart5ghz1="true"
        restartradio="5GHz-1 "
    fi
fi
something like

nvram get productid

may work.

e.g.

Code:
RT-AX88U-C7C0:/tmp/home/root# nvram get productid
RT-AX88U
 
I have found his script to be beautifully written, but unless the average user takes the time to investigate what each variables individually do and also understands basic script logic, they can easily find themselves breaking something trying to modify @Adamm scripts despite the ease and beauty at which the script was written. That is because @Adamm does not simply just write script, or just a good SW developer (although he is both of those); however, he has an intricate, and intimate, understanding of how his script interacts with Asuswrt/Merlin inner workings. It is not something that can always be easily reproduced, or modified; even though, for @Adamm it might be as simple as changing one or two lines of code.

I further digress by simply stating I, and hopefully the rest of the community addon users (and/or developers), are thankful for everything @Adamm does and continues to do. Simply make your request known and as @Adamm finds the time, I am sure he will implement patches for these "newer" supported routers. He cannot simply move at the speed that these routers are showing up on the market. He first has to do like any other diligent developer would do, which is research, and test, before dropping in patches or new releases; this requires time and patience.

Appreciate the kind words.


I wish I could use this addon on my XT8 for the 5Ghz-2.

Problem is, it's 5Ghz-1 supports 80mhz at most. Only 5Ghz-2 supports 160mhz.
If I use this addon, its 5Ghz-1 brand will just keep restarting? Is there any workaround?

I’ll update the logic this week to support this model. Hard for me to find edge cases like this sometimes with so many models in the wild and limited testing devices.
 
Appreciate the kind words.




I’ll update the logic this week to support this model. Hard for me to find edge cases like this sometimes with so many models in the wild and limited testing devices.

Much appreciated. I didn't expect so much kind response to my request. I'm not very familiar with these stuff and not sure if model specific is good idea or not, given that we have so many models outside in the market. Maybe, if possible and not too troublesome, it would be better to just let the user decides which 5Ghz band(s) it should monitor?

Thank you again for all the insight above.
 
Last edited:
I’ll update the logic this week to support this model. Hard for me to find edge cases like this sometimes with so many models in the wild and limited testing devices.
BTW, GT-AXE16000 radios aren't in the same order as other models.

wl0: 5 GHz-1
wl1: 5 GHz-2
wl2: 6 GHz
wl3: 2.4 GHz

75% of the development time on 386.8 was spent dealing with this (even Asus's latest released firmware for that model still had a few webui issues where the wrong settings would show for the wrong radios, so I had to fix it).
 
Could this script be used to restart the Wifi when DFS is detected?
My Wifi is running on channel 120, but several times a month it "detects" DFS (probably a false positive) and moves to channel 36 or so and stays there.
Could this script detect it and restart 5GHz?
 

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