What's new

Asuswrt-Merlin - custom build of the Asus RT-N66U firmware

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

Status
Not open for further replies.
The WOL through web UI is something I was using myself with DD-WRT on my previous router. I occasionally VPN back from work, and then I need a way to turn on my workstation remotely - that's what I'm using the web-based WOL for. Also with people getting smartphones and tablets, having a device at hand that lets you remotely turn on a compter through a web UI does make sense.

I can understand not implementing an automated method like yours as a built-in feature. First, it requires you to have packet logging enabled, which can add quite a load on a router in the long run. There are also security concerns. But using an external script like yours should get the job done for those who still wishes to use that method of WOL.

The best place to put your script would probably be in /jffs/scripts/services-start . That script gets run right after all other services have been started. You could either put the content of your script directly in it, or save your script somewhere in the /jffs partition, and have services-start run your script - that way you will be able to easily add or remove more entries to the services-start script.

Well, I didn't mean my comment to be taken as as feature request, though I would surely like something like that integrated :) It's not a problem to do it by hand, because it's a very simple script.
I didn't mean that the WOL UI is not a good thing. It's very good. Just not so handy. I mean, before connecting to my PC, I have to load the router page and go to the WOL page and wake up the PC, then connecting to it. Doing this from a phone it's quite time consuming :) For me (just for me, of course) it's easier to just start the program I need (let's say a VNC client, or the streaming client) and wait 10 seconds for the computer to start.
About the load on the router... It doesn't concern me. I use the router just for... routing :) The download tasks, Samba, FTP, etc. are done by the NAS so no problem here either.
About the security... I see no problem here... Maybe I am missing something. I mean without SSL, connecting to the router to wake the PC by simple HTTP seems not so secure. Better would be to use SSH to connect a router and exec a script. Am I right? Or what do you mean by "security concerns"?

Reverting to the services-start, because that was my original question :)
Is "services-start" a script or a folder? I'm guessing it's a script, but I just want to be sure.
 
One other question, RMerlin...

How do I run cron jobs?
There is a /usr/sbin/crond, but where do I put the crontab files?
I tried /tmp/etc/crontab but it doesn't run.
Do you have any idea where to put crontab files?
 
Cron is not enabled in the code. That's something down my list that I will look at later.

For now, you could probably start it manually through services-start. Cron entries should be put in /var/spool/cron/crontabs/ .
 
I couldn't get it to work...
Maybe I missed something and maybe you can shed some light:
I created the following test file in /var/spool/cron/crantabs and I started crond.

15 * * * * root /bin/echo "test" > /var/log/test.log 2>&1

I checked if it created a log file and, surprise, no test.log file :confused:
 
I couldn't get it to work...
Maybe I missed something and maybe you can shed some light:
I created the following test file in /var/spool/cron/crantabs and I started crond.



I checked if it created a log file and, surprise, no test.log file :confused:

The file in that folder must be named after a valid user. In this case, the file must be named /var/spool/cron/crontabs/admin .
 
Eric, do you know if there is a downside to having jffs enabled by default? I guess other firmwares don't do it because they are generic and to be used across a variety of routers. But I guess N66U has lot of space and we will always have jffs applicable. So, can we enable and mount it by default? Would lead to a lot of safe assumptions (e.g. in the traffic monitor issue that you opened, you can always assume jffs to be available)
 
The file in that folder must be named after a valid user. In this case, the file must be named /var/spool/cron/crontabs/admin .

No success...
I have the same file renamed "admin", modified the minute, killed crond and then started it again... and no test.log...:mad:
Did anybody tried crond?
Or is just me?
 
Last edited:
No success...
I have the same file renamed "admin", modified the minute, killed crond and then started it again... and no test.log...:mad:
Did anybody tried crond?
Or is just me?

I did, and it worked fine for me.

You can run crond in debug mode with this:

crond -l 0

(that's the letter "l", followed by a zero)


Output goes to /tmp/syslog.log and will look like this:

Apr 27 01:52:27 crond[1030]: crond: crond (busybox 1.17.4) started, log level 0
Apr 27 01:53:01 crond[1030]: crond: USER admin pid 1032 cmd root /bin/echo "test" > /var/log/test.log 2>&1


Don't forget that the first column determines the minute, not the frequency. Your example would run on the 15th minute of every hour, for example (1:15, 2:15, 3:15, etc...). Also, check your RT-N66U's clock, in case it failed to connect to an NTP server.
 
Last edited:
Eric, do you know if there is a downside to having jffs enabled by default? I guess other firmwares don't do it because they are generic and to be used across a variety of routers. But I guess N66U has lot of space and we will always have jffs applicable. So, can we enable and mount it by default? Would lead to a lot of safe assumptions (e.g. in the traffic monitor issue that you opened, you can always assume jffs to be available)

Two reasons:

1) It has to be manually formatted before its first use. And automating a destructive operation such as a filesystem format is too dangerous.

2) If you have a script there that prevents you from booting your device (for example, you did something silly such as put as "reboot" command inside a start script, possibly as part of a poorly-designed watchdog), you can currently re-install a non-jffs firmware in Recovery Mode, then do a Factory Defaults reset. Once you re-flash my build, the jffs partition will no longer be mounted by default, allowing you to manually mount the partition, then fix the problem script.

I think it would be safer to simply have stuff look for a working jffs partition, and take advantage of it only if it's working. Easily done if you just check for the presence of a specific file before using it, like the startup scripts do.
 
Thanks for the explanation, eric.
mtz: I just tried cron on my router and it works here as well. BTW, Please note that you don't need to restart crond after making an update to your cron config file. Just create another file cron.update in the same folder with the full path to your cron config file that you created/updated. cron.update is read every minute by crond and it will update the config immediately (otherwise it will rescan the directory every hour anyways)
 
Original post updated - version 3.0.0.3.108.4 now available :)

Changes in 3.0.0.3.108.4:
- NEW: Clicking on the MAC address of an unidentified client will do a lookup in the OUI database (ported from DD-WRT).
- NEW: Added HTTPS access to web interface (configurable under Administration)
- NEW: Option to turn the WPS button into a radio on/off toggle (under Administration)
- FIXED: sshd would start even if disabled
- CHANGE: Switched back to wol, as people report better compatibility with it. ether-wake remains available over Telnet.
 
- NEW: Clicking on the MAC address of an unidentified client will do a lookup in the OUI database (ported from DD-WRT).

Working great when you connect to the UI with HTTP.
With HTTPS, when I click "Clients" in the "Network Map", the "Client status" tab turns into "Internet Explorer cannot display this webpage"
And, after that the UI crashes. I have to restart the router.
Correction: the HTTPS UI crashes. Can work normally with HTTP.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    35.3 KB · Views: 339
Last edited:
Working great when you connect to the UI with HTTP.
With HTTPS, when I click "Clients" in the "Network Map", the "Client status" tab turns into "Internet Explorer cannot display this webpage"
And, after that the UI crashes. I have to restart the router.
Correction: the HTTPS UI crashes. Can work normally with HTTP.

Just tried it here, and it works fine for me (both with IE9 and Chrome 18).

The Client Status page seems to be seriously buggy, as quite a few people are having random issues with it. People with Sonos devices on their network for example are unable to access the Network Map, as it causes the web interface to hang. Could be a specific device on your network that it doesn't like, unless it's a random issue.
 
Nope, not random. It crashes every time.
Tested further: with Firefox, over HTTPS, it works normally. But, when I try the same thing with IE (over HTTPS), it crashes the HTTPS. :D Cannot open HTTPS in Firefox either.
Very, very strange.
Not a very big issue anyway.
 
Performance Tuning Panel

About this pic:

http://assets.vr-zone.net/13760/tuning.jpg

Users could also set each of the radio’s transmission power level individually. The fan speed can also be manually adjusted to cool down those hot chipsets. The graph shows the temperature of the router and at which threshold should the fan be turned on. Also, do keep in mind that the router's firmware is still in beta stages.



Is possible enable on new firmware?

Thanks
 
About this pic:

http://assets.vr-zone.net/13760/tuning.jpg

Users could also set each of the radio’s transmission power level individually. The fan speed can also be manually adjusted to cool down those hot chipsets. The graph shows the temperature of the router and at which threshold should the fan be turned on. Also, do keep in mind that the router's firmware is still in beta stages.



Is possible enable on new firmware?

Thanks

there are not fans on the asus n66u
 
About this pic:

http://assets.vr-zone.net/13760/tuning.jpg

Users could also set each of the radio’s transmission power level individually. The fan speed can also be manually adjusted to cool down those hot chipsets. The graph shows the temperature of the router and at which threshold should the fan be turned on. Also, do keep in mind that the router's firmware is still in beta stages.



Is possible enable on new firmware?

Thanks

The fan was only present in the pre-release version. Revision B1 that people are buying have no fan in it.

If you still want to see temperature out of curiosity, the page is still there:

http://192.168.1.1/Advanced_PerformanceTuning_Content.asp

(just change the IP to match your router's)
 
Status
Not open for further replies.

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top