Posted: Wed Nov 07, 2012 19:39 Post subject: [SOLVED] boot delay (longer than 5 sec)
In brief: can someone give me a command to put in dd wrt to introducr a delay into the boot process. I need something longer than the 5 second boot delay option. Ill be testing various delays between 20 and 60 seconds to see the shortest delay that works.
In detail:
i have a ubiquiti router as my main router and a linksys 610n and wrt54g im using as wifi extenders (all 3 use dd wrt). Problem is we lose power 2-3 times a day. When my routers restart my 610n connects to the base station ubiquiti and i can get online. But the 54g does not connect and if i turn it off and then on it works. I suspect its because my 54g probably boots up a lot quicker than my ubiquiti device so it wont connect properly until i power cycle once the ubiquiti has had enough time to get up and runnimg.
If someone knows how to fix this other than simply using a command to boot delay my 54g please let me know. Oterwise in short just provide me with the command i can use to introduce a 30 secondish delay into boot. I saw a comman box i believe in admin section i assume i use it there.
Id already came across that command but wasnt sure about it. Tried it after you mentioned but issue persists. Did some more research and I THINK what that command does it tell the router to wait xx seconds after router restarts before executing the commands thatfollow. So my router is still going through its trying to connect stage and then after its all done then wars 20 seconds. I could be wrong though but my problem just isnt fixed.
Posted: Thu Dec 13, 2012 4:06 Post subject: Re: Cmd to introduce boot delay (longer than 5 sec)
zank wrote:
In brief: can someone give me a command to put in dd wrt to introducr a delay into the boot process. I need something longer than the 5 second boot delay option. Ill be testing various delays between 20 and 60 seconds to see the shortest delay that works.
I have the same issue with different equipment, I have my Linksys WRT320N, hooked up to a cable modem, I change the MAC address ever now and then to force my ISP to give me a new IP address, when I reboot the cable modem has not released the router address before the router reboots so I loose the internet until I can physically power cycle both boxes.
I just need to add a two minute delay to the router to fix it.
Posted: Fri Mar 22, 2013 14:50 Post subject: Cmd to introduce boot delay (longer than 5 sec)
Bump, Similarly looking for this.
I have a E4200 as my main router, and a WRT310n as a client bridge. But the Client bridge boots faster. So if I have a power outage or other interruption the WRT310n can't find a network and fails to connect.
As a workaround, I have WDS/connection watchdog set-up to ping the E4200 at 1000 second intervals, and if it finds none prompts a reboot. I think this works, but at 8 minute intervals. I'd prefer a script to pause startup for 10 seconds or so on the WRT310n. I agree that the sleep command doesn't do it.
Posted: Fri Mar 22, 2013 14:58 Post subject: Cmd to introduce boot delay
Just realized you COULD disable the 'boot wait' on the main router, which should speed up the boot by 5 seconds. It's risky, but if your setup is stable it may be enough to speed it up ahead of the client.
Joined: 21 Sep 2007 Posts: 373 Location: pittsburgh pa
Posted: Fri Mar 22, 2013 21:04 Post subject:
disabling boot wait could hurt you should you have a problem later down the line.
you could try the connection watchdog under admin->keep alive and enter in your ubiquiti ip address. if the wrt ever is unable to ping it, it will reboot itself. set the interval to something managable that you'd like, maybe 1 minute
edit: just noticed someone above was using the connection watchdog as well. its a workaround at best. you could try something as a startup script like
sleep 10
wl down
sleep 5
wl up
I had to ssh into the bridge, then use these commands to set the boot wait time to 20 seconds.
nvram set boot_wait=on
nvram set wait_time=20
nvram commit
Not sure if you have to ssh, or can execute these from the web-gui, but oh well.
Second thing, was to follow "lethalfang's" suggestion and set a startup script that reset the wireless connection if two pings failed within 10 seconds of each other. The advantage of this over the watchdog is that it just resets the wireless, and doesn't go through a whole re-boot. I followed the useful script suggestion lethalfang sent over to reset the connection.
Posted: Sun Mar 24, 2013 2:21 Post subject: Cmd to introduce boot delay (longer than 5 sec
Update: The reset the wireless radio script did not work as expected, and didn't solve the problem. From what I can tell the script is running, but bringing the wireless down, and then up does not solve whatever issue and force it to reconnect. Not sure if there's a better command in between wl -i eth1 down, and a full on reboot that would more effectively reset the wireless.
So for now I'm back to using the connection watchdog, which does a reboot when the connection drops.
Joined: 21 Sep 2007 Posts: 373 Location: pittsburgh pa
Posted: Sun Mar 24, 2013 18:16 Post subject:
i just tried wl down and wl up, you're correct it does not reconnect the bridge. i'll see if i can figure out why.
why doesnt your boot wait time modification work? it would seem like that should keep the kernel from loading longer and delay the router coming up and connecting to the main ap? I would think that would be the most elegant solution, rather than scripting your way around it
Joined: 21 Sep 2007 Posts: 373 Location: pittsburgh pa
Posted: Sun Mar 24, 2013 18:59 Post subject:
try this at the very end of your startup script (anything after it will not run, as it is a loop):
while true; do
ping -c 1 192.168.1.1
if [ $? -ne 0 ]; then
wl join "dd-wrt";
fi
sleep 60;
done
This will ping your AP once every 60 seconds, if anything other than a success, it will try to rejoin the AP (doesnt even take down/up the wireless).
set 192.168.1.1 do your AP's ip, make sure it responds to pings. set "dd-wrt" to the name of your AP. set sleep 60 to whatever time you want.
if youre still having trouble with it, you can add wl down and wl up in front of the wl join, just to take down and back up the wl interface, but it shouldnt be needed.
note: mine didn't join the ap on the first try, but did on the second time around.
Posted: Wed Mar 27, 2013 16:02 Post subject: Client Bridge failed Rejoin
I'll try your join command tonight.
To be clear, I'm experiencing one problem, that shows up in 2 ways.
The problem is that after startup, if the WRT310n doesn't see the main wifi network, it does not join the network.
This shows up in two place, first if both routers start booting at the same time, the client bridge (WRT310n) boots faster, doesn't see a network, and never joins the network (I solved this with the boot wait change in nvram above)
The second place this shows up, is if the client bridge loses the network for whatever reason, it fails to rejoin the network and reestablish the link. (for now, I've solved this using the watchdog, but I don't like that the CB is rebooting multiple times (~2) a day, that can't be a good long term thing).
I've also tried updating the firmware from 14929, to 15940 (based on the WRT310n v2 page, without any luck on the rejoin issue). I haven't seen anything about the newest version I could use on this router, as both of those builds are from 2010.
Thanks for the script suggestion, I'll try that tonight. (Maybe I need to move this to a new topic as I've solved the boot wait question?) I'll let you know how the join command works. Thanks.
Joined: 21 Sep 2007 Posts: 373 Location: pittsburgh pa
Posted: Fri Mar 29, 2013 0:48 Post subject:
the above script should solve both problems. seeing as you have solved the first with the boot wait already, it should at least solve the problem of re-joining the network should you lose connectivity without the need to reboot the router.
I tested this script on one of my client bridges by rebooting my AP with the script running on the client bridge. shortly after the ap came up, the bridge reconnected (it did not reconnect immediatly without the script)
Posted: Fri Mar 29, 2013 2:52 Post subject: WRT310n drop
OK, so I solved my issue by going with a newer firmware. The recommended firmware for the WRT310n was compiled in August or December of 2010 depending on the version.
So I went with version 19342, which was compiled in 2012, and it works much better. I still changed the boot wait in nvram. But the CB has been able to pick back up after any dropped signals. 24 hours up so far, which is doing pretty well.