Turn off / on 5 Ghz radio

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

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
 

Wistuplu

Regular Contributor
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
 

DevinsDad

New Around Here
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.
 

Similar threads

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