What's new

Turn off / on 5 Ghz radio

  • 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!

DevinsDad

New Around Here
My son only has the passwords to the 5Ghz radio. Alexa and I have passwords to the 2.4Ghz radio. I want to turn off the 5Ghz radio overnight and turn it on when my son has done his chores in the morning. I wrote a simple off and on script for my ASUS RT-AX88U with the latest Merlin software, version 386.2.2.

I can execute the turn-on script from my iPhone with a simple shortcut button so I don't have to log on to the web browser and navigate to Wireless, Professional.

It's a very simple script. Here are the guts of the turn-off script :

nvram set wl1_radio=0
service restart_wireless

Here is the turn-on script:

nvram set wl1_radio=1
service restart_wireless

After running either of these, the WiFi goes in and out.

What else do I need to do?

Tom
 
I have been using the parental control features of the router in the past.
I have switched to homebrew iptables scripts.
I like your approach a lot, seems very pragmatic.
Btw, I don't have Alexa. I hope it doesn't answer questions about WiFi passwords :)
Best regards
 
Well, I finally figured it out.

First off, I changed the process. Instead of turning off the 5Ghz radio, I changed the password of the one and only guest network my son knows about to a meaningless password. The iPad has shortcuts that can be scheduled to run. I created an "automated" shortcut to change the password at 11 pm. When I want to give him access, I manually run an iPad shortcut executing an SSH script on the router changing the password to the one profiled on his devices.

I had planned to use a cron job on the router to change the password at 11 pm. I had it configured and the script ran, but the radios got into a very strange state. They would come on and off and on and off. It was very strange. Running the same script from the iPad worked perfectly.

Here are the guts of the two scripts with example passwords. My son only knows the "Turn On" password. I made the "Turn Off" password harder to guess.

Turn off script:
nvram set wl1.2_wpa_psk='Chores_Not_Done'
service restart_wireless

Turn on script:
nvram set wl1.2_wpa_psk='Chores_Are_Done'
service restart_wireless

I still wonder why the cron job did not work.
 

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