What's new

Startup script on RT-AC58U

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

Shaamaan

New Around Here
Hello everyone!

I'd like to set up WOL, so that I can wake up my PC remotely from my mobile. My PC already has a static IP, DDNS is set up, and port 9 UDP is forwarded.

Unfortunately, WOL works only for a while after the PC is turned off. I suspect the reason for this is that the ARP entry for my PC is deleted some time after the host is offline.

A simple solution is to issue the following command via SSL:
arp -i br0 -s <static IP of PC> <MAC address of PC>

With the above command, WOL works as expected.

...at least until the router is restarted for whatever reason.

Is there any way to make this setting permanent? Or, in other words, is there some way to set up a start-up script or command on this router?
 
You can add a job into the crontab (Linux time schedule) to to this command regularly:
Create a shell script with the commands you need and schedule the script with the cru command.

To make this permanent you should use service-start user script for the cru statements on the Merlin's version of the firmware...
 
You can add a job into the crontab (Linux time schedule) to to this command regularly:
Create a shell script with the commands you need and schedule the script with the cru command.

To make this permanent you should use service-start user script for the cru statements on the Merlin's version of the firmware...
That would be awesome... except you missed the fact that Merlin doesn't support the 58U router. :( Unless there's something I don't know and there's a version of Merlin which works?

Heck, if I could install Merlin, I'd probably just create a start-script, something that is explicitly supported in that firmware.
 
Upps - sorry for not checking your router model against Merlin's fork! :oops:

Well, you can still issue the cru command manually every time you reboot the router... ;)
 
Upps - sorry for not checking your router model against Merlin's fork! :oops:

Well, you can still issue the cru command manually every time you reboot the router... ;)
That's... pointless. I can manually SSL into the router and run the ARP command as well (it creates a static entry)... I'm trying to avoid having to do that on each reboot, i.e. run a startup script on this router...
 
Apparently my GoogleFU is weak. I did plenty of searching, but that particular google result evaded me, as did the thread. Thanks for that! :)

That said, it's pretty silly it needs to be "hacked" as a "on USB mount" script. :/

I was hoping Entware-NG would be able to do this, seeing as it can be installed on the stock FW. However, this seemed like trying to use a hammer where a wooden spoon is needed, so I didn't bother to try that...
 
Yes it's pretty ugly, but that's why it's a "hack" I suppose. It wasn't designed to do it.

As you say, it could be done with an entware/optware install. As part of that, it looks like just creating a script on a USB drive called asusware/.asusrouter might also work.
 
Well, it certainly works with a USB plugged in, but... damn that's one ugly solution! :(

Speaking of this router - DD-WRT isn't available, neither is Merlin... is there any other FW that could be flashed on it (possibly removing the USB requirement)?
 
Check with Lede/OpenWRT, they might have something, however it's possible it comes with certain hardware limitations. There isn't a big third party firmware market for Qualcomm devices.
 

Latest 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!
Top