Delayed Start up of AR150

Hello and I hope that someone can help me out here,

I have a main ISP Router that needs to start up and connect to the ISP, it takes around 3-5 minutes before the internet connection is available. My AR150 is connected in to one of the main router LAN ports and is running Open WRT with VPN services set up. All working OK for normal internet connections via the main router and also with VPN connection through the AR150 access point.

The issue that I have is when there is a power outage and then both routers restart, the AR150 start-up is much faster than the main router and then the AR150 does not connect to the internet as there is no main router connection. Even after the main router has obtained its IP address and internet connection, the AR150 does not get any internet access until i manually reboot the AR150, then it is OK. The issue being that I need it to delay its start up until after the main router is connected (lets say a 300 second delay) so that it can connect without a manual restart. If I’m away from home when the system reboots I’m unable to do the manual reboot so need it to be automatic.

Thank you for any advice on how to set up the AR150 with a delayed start up.

@angusc It doesn’t make sense that AR150 can’t connect to the Internet when it is startup faster than main router. Could you disable vpn and try again? I think that it will connect the internet if you wait for enough time.

You cannot delay the start up of AR150 in hardware. But you can do some trick in software.

For example, you can add delay in start up script. Try to add to these script
/etc/init.d/network
/etc/rc.local

Add to the beginning to the file sleep 300

But I think the correct way is to find out the reason why AR150 doesn’t connect. It should be.

The usage of a “wait” or “sleep” is the “Last Weapon of a deparate Programmer”.
Some service (openvpn ??) obviously depends upon working WAN connection, and is broken, in case not having WAN, when started. Possible to try the “dirty hack” proposed, but delay in rc.local might not work, as (almost all) other services are started before already.
Clean solution: To introduce a check for running WAN. Which can be done by pinging google.com. dnsmasq and other standard services are not sensible to non-existing WAN, so this usually works.
Most likely to introduce this check before openvpn is started.
Verify before doing all this: Does problem also exists, in case openvpn disabled ?

totally correct. Agree