Posted: Wed Mar 15, 2023 1:36 Post subject: Toggle wifi with cron
Netgear XR500
Build 51855
I am familiar with the radio scheduling feature available in the GUI. However, I need to disable wifi at 4 am on Saturday only. Thus, the radio scheduler does not work for me.
How do I disable wifi on the XR500 via the command line? The suggestions in the below thread do not work on the XR500.
Joined: 16 Nov 2015 Posts: 6447 Location: UK, London, just across the river..
Posted: Wed Mar 15, 2023 7:43 Post subject:
Radio scheduling feature available in the GUI for me its working as it should...
in the past i used one of those but dont remember which
bear in mind may be non of those is working now or those need adapting
may be someone else will give better light on the subject...
now tea its time for me...
p.s. you can set the radio scheduling feature on off and monitor via top what is executed to bring it down and than use this a base to adapt the cron job for it...
0 18 * * * root wl -i wlan0 radio off
0 6 * * * root wl -i wlan0 radio on
I ran this command which appears to apply to all wifi radios:
Code:
service radio_off start
The Radio Status showed "Inactive" and all clients were disconnected.
However, the wlan0 temperature still reads 45 °C. This indicates that the radio remains powered. I want to completely disable (i.e., depower) the radio.
"I don't think it works how you think or expect it should work." There is no code in the binaries to remove electrical power to any part of the SoC, including wifi radios. Your only options are to power down the entire router, remove the radio chip with soldering equipment as sir ho1Aetoo so eloquently alluded to, or add a fan to draw air through and out of the router case. Those temps are fairly benign if you're that worried, and it seems as if you already are using a fan of some sort(?) ,,, _________________ "The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost
"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio
No desoldering is needed. If the network mode is “disabled” then the radio is off and the temperature is not displayed in the GUI. Case in point, I don’t see the 2.4 ghz radio temp since I have 2.4 ghz disabled. I can only see the wlan0 5 ghz radio temperature.
Which is a completely different function than the previous radio_off / radio_on. _________________ "The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost
"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio
No desoldering is needed. If the network mode is “disabled” then the radio is off and the temperature is not displayed in the GUI. Case in point, I don’t see the 2.4 ghz radio temp since I have 2.4 ghz disabled. I can only see the wlan0 5 ghz radio temperature.
Just because the The temperature is not shown when "disabled" is selected it doesn't mean the radio is powered off. It's still drawing power to respond to CLI or GUI commands.
If you open the router and measure the temperature of the radio chip with an Infrared Gun when it is disabled or radio off will more likely have the same temperature. _________________ Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9
Off Site 1
R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4
Off Site 2
R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531
radio_off does exactly what "radio scheduling" does, it terminates the hostapd process and without this the radio is without function.
The radios remain hot either way because they are both directly connected to the processor via the same heat sink.
I also doubt that the network mode "disabled" will make the whole card powerless, it will simply disable the card.
The devices powerstats can actually also be read out via "lspci".
Quote:
D0 or Fully On is the operating state.
As with S0ix, Intel has D0ix states for intermediate levels on the SoC.[40]
D1 and D2 are intermediate power-states whose definition varies by device.
D3: The D3 state is further divided into D3 Hot (has auxiliary power), and D3 Cold (no power provided)
When I set the network mode to "disabled" in my R7800, "lscpi" still shows me D0 for the WLAN cards.
This is interesting since with my BCM router it would not show the temperature in the GUI after disabling the radio and I also measured 2 watts lower power consumption with a Kill a Watt meter. I haven’t had a chance to do the Kill a Watt test with the XR500 but I guess Atheros chipsets behave differently than BCM which is why I assumed it wasn’t working.
After disabling wifi radios vía cron, I can’t get de-wrt to enable them again by pressing the wifi button on the XR500. It seems to think that it needs to turn the radios off even though they are already off and I actually want to turn them on.
Code:
Mar 20 21:17:28 DD-WRT user.debug : Wifi Button: turning radio(s) off
Mar 20 21:17:28 DD-WRT user.debug : Wifi Button: turning radio(s) off