What's new

ASUS RT-N12E C1: Prevent router from power saving?

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

I don't kow if 'cru' works with commas to specify minutes, hours, day, month or week.
But it does work with the wild card "*" in each of the time fields.

Typing 'cru' in a terminal connected to my router reports back
Code:
# cru

Cron Utility
add:    cru a <unique id> <"min hour day month week command">
delete: cru d <unique id>
list:   cru l
and 'cru l' gives me
Code:
# cru l

1 3 * * * /opt/sbin/log_rotate #log rotate#
59 23 2 * * get_MVPS #get hosts files#
* * * * * /bin/ping -c5 192.168.2.40 #ping heatpump#

My log rotation script runs daily at 3:01 AM
The 'get_MVPS' is a shell function set to run at 23:59 on the 2nd day of the month to get blocking host files from the internet.
It doesn't run without a path. (I'll fix that someday)
(The third line was added during edit as an example of what to expect to see.)

While knowing the IP address of the heatpump, would this in the startup scripts of the RT-AC68U, used as the wireless router, get that job done ?
Code:
cru a "ping heatpump" "* * * * * /bin/ping -c5 ${heatpump_IP_address} >/dev/null"
EDIT: If the unique identifier has white space, both of the statements need to be encapsulated separately inside quotes.
Otherwise use a single word or underscores to replace whitespace in the unique identifier and quotation marks for the rest, including the command.

This should run once every minute to ping the heatpump 5 times and stop. The output from ping would be sent to /dev/null so it doesn't show up somewhere unexpected.
Not in the RT-N12E's start ups. His nvram.txt doesn't show them to have any jffs parts and no USB available to mount.
But the RT-AC68U should have the 3
script_usbhotplug=
script_usbmount=
script_usbumount=

still available if a USB disk is plugged in the main router.
 
Last edited:
The last time @happyman was on this forum was [Last seen Feb 25, 2021] I hope he logs on again and sees what you posted. I think it is a great lead to getting his network working and not enter standby mode/power save mode anymore.

That NVRAM file was pretty long to be reading through it, trying to find mention of JFFS partition and USB. The N12D1, I have, does not have a USB port.

I was reading that one of the issues in the N12 routers (regarding 3rd party firmware) was the limited memory to flash the firmware and still have enough room for a usable JFFS partition. I read that OpenWRT, is dropping support after this version 19.07 because of that limited memory.

Maybe the default Asus firmware doesn't bother to try to make available a usable jffs partition.
 
Last edited:
The last time @happyman was on this forum was [Last seen Feb 25, 2021] I hope he logs on again and sees what you posted. I think it is a great lead to getting his network working and not enter standby mode/power save mode anymore.

That NVRAM file was pretty long to be reading through it, trying to find mention of JFFS partition and USB. The N12D1, I have, does not have a USB port.

I was reading that one of the issues in the N12 routers (regarding 3rd party firmware) was the limited memory to flash the firmware and still have enough room for a usable JFFS partition. I read that OpenWRT, is dropping support after this version 19.07 because of that limited memory.

Maybe the default Asus firmware doesn't bother to try to make available a usable jffs partition.
I seen it's been a while since he'd been here.
I followed up with everything , not only for his benefit on his return, but for anyone else that found this having similar issues.

After sorting the file and sending it to less, so I could search the file, it wasn't so bad .
Surpisingly, ssh login was available and enabled in that little router.

I think it's Advanced Tomato that's running on one here. It has 384K of usable space in the JFFS partition.
For me that was perfect . I added a few webpages with images to NoCatSplash and put up a WiFi billboard.
It seems I had cru working to swap out the "Daily Specials" webpage that showed by default. (In the first few months of COVID I got pretty bored)
The mini version had no JFFS modules but lots of room for the 20K of required modules and few Megs for JFFS. While the AIO version, with everything, was so stuffed there was little room left for JFFS, but did have it.

To the manufacturer, those unsupported features cost money to add with no return.
Not much point in them adding it's when not needed or profitable to include them.
 
* * * * * /bin/ping -c5 192.168.2.40 #ping heatpump#[/code]


Code:
cru a "ping heatpump" "* * * * * /bin/ping -c5 ${heatpump_IP_address} >/dev/null"
Just so I understand. when your time interval is "* * * * *" that means 1 minute intervals?

I was thinking the shortest interval was 1 hour via the minute "*" i.e. if set at [10] then 0:10, 1:10, 2:10, 3:10, 4:10 etc. So if you wanted to set 5 minute ping intervals that's 12 cronjobs/lines you would have and each offset by 5 minutes.

He did mention in a response to me that ssh was enabled.

It is very cool that years ago, a few smart people realized the potential "under the hood" of the these very capable routers/hardware that official firmware never fully took advantage of.
 
Yes.


No need. Just create a single crontab entry with "*/5" as the minutes field.

Yeah, without actually reading/getting up to speed about all the features and shortcuts with crontab, I had thought how ridiculously laborious it would be (and was for me) to set up anything less than a 1 hour interval. Surely, there was a better way.

Thanks, for the crontab URL... have it saved to my password manager.
 
Yes, Thank You. I've missed that little tidbit, apparently, more than once over the years.
This is much better than multiple entries and still better than 5 or 6 to 30 comma separated values in the minutes field.
I've spent more time with System V (POSIX) based Unix's which don't support the */n extension. With those you have no choice but to use the long form.
 
It's been almost 10 months since anyone has added to this thread. Just shows what a valuable resource these older threads can be using search/better search.

Recently, my RT-AC86U has been giving me trouble with my WiFi on both bands, 2.4GHz and 5GHz. periodically either one or the other band(s) devices would lose connectivity to my router--and on a rare occasion both bands several times a day. It was happening with Merlin 386.4 and all the prior alpha/beta version(s), and I think the prior Merlin 386.3, though much less often.

I would have to go to menu item [Network Map>> System Status>>Wireless>>Apply] to re-enable the WiFi (or I could just manually unplug and re-plug the power cord)

Without really knowing why this was happening, my wife was suggesting that from her perspective it seemed that often times her phone's WiFi would go to sleep/turn off. She would disable it from her phone's settings and then re-enable it and often times it would then work.

It occurred to me to try the idea/solution discussed/recommended on this thread to see if crontab(s) [cru] pinging the various devices linked via WiFi to my router every 5 minutes would keep the connections alive/active.

The syntax wasn't obvious to me to use the [cru] command but after some trial and error (accidentally deleted every [cru] item from my installed amtm add-ons and had to force (re)install the add-ons to reload their respective crontab events) :oops: finely got it figured out.

I would describe my "solution" as a kludge: a haphazard or makeshift solution to a problem and especially to a computer or programming problem. Which doesn't explain why it's happening but at least for the last 24 hours all my devices have remained active and online without drops. I will continue leaving my settings as is and run it without rebooting for several more days, to be sure not to have any WiFi drops and report back.

=============================================================
UPDATE: I had considered waiting 48 hours or longer before posting my favorable results that seemed to work in my case. This morning, the router, after being up for 1 day 15 hours was showing no devices connected on the 5GHz band, and my 5GHz devices were not connected to the internet. Back to the drawing board. :( I managed to re-enable 5GHz band by [Network Map>> System Status>>Wireless>>Apply] without having to reboot.

2ND UPDATE (Jan 28): After pondering why "Recently, my RT-AC86U has been giving me trouble..." I realized that either HW was failing or there was some Software error. Since, for many months my RT-AC86U had pretty much worked flawlessly, I knew that there wasn't a KEY underlying zero-day flaw in the router but something NEW.

Assuming that there wasn't a HW problem, which for me would be highly difficult to troubleshoot, I began to look at the AsusMerlin 386.4 firmware. Testing that version on each of my several RT-AC68U's for at least 24 hours, each worked w/o WiFi errors.

Like many (I'm sure) I was doing dirty updates/upgrades because it's fast and convenient and provides immediate gratification, though some have warned that this is NOT a best practice.

Soooooo... After saving my Settings and backing up the JFFS partition, from the Administration tab I did a Factory default [Restore] with the "Initialize all the settings..." check box checked.

I then began configuring the router at tha GUI to my typical settings (I've done this so many times I know most of my settings). Every 2-3 configuration changes I would do a soft REBOOT of the router. Then, in a SSH session, began configuring/adding my favorite amtm add-ons, AGAIN every 2-3 changes soft REBOOTING.

The Result: 3 days 2 hour(s) 58 minute(s) 39 seconds of flawless service (again)!

Had this method NOT worked I would have progressed to a more formalized/practiced method of resetting the router.
=============================================================

Additional Note: Noticed when I intially did the "cru a" to my devices at the SSH prompt and rebooted that I lost all my added cru events. I'm sure that I will have to add these items to an appropriate start bash script.

list: cru l
delete: cru d <unique id>
add: cru a <unique id> <"min hour day month week command">

In a SSH session typed:

cru a Ping_Firestick "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"
cru a Ping_RokuTV "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"
cru a Ping_RokuStick "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"
cru a Ping_Echo_Bedroom "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"
cru a Ping_Echo_Kitchen "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"
cru a Ping_RingDoorbell "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"
cru a Ping_Samsung_4s "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"
cru a Ping_Samsung_Galaxy "*/5 * * * * ping -c5 192.168.xx.xx >/dev/null"

typing cru l shows:

*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_Firestick#
*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_RokuTV#
*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_RokuStick#
*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_Echo_Bedroom#
*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_Echo_Kitchen#
*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_RingDoorbell#
*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_Samsung_4s#
*/5 * * * * ping -c5 192.168.xx.xx >/dev/null #Ping_Samsung_Galaxy#
 
Last edited:

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

Staff online

Top