Joined: 07 Jun 2006 Posts: 198 Location: Parma - Italy
Posted: Sun Apr 15, 2007 22:15 Post subject: Re: Added capacitance to power pack to slow power bounce
cmoswizard wrote:
Just a data point. After losing my settings once soon after putting DD-WRT V23 sp2 on my WHR-G54S from Buffalo I added 1500uF of capacitance to the 3.3V power pack line. I then pulled the plug and re-powered it about 5 times without any loss of settings. If you are qualified to make this modification it might help. YMMV.
The additional capacitance stores more energy to prevent rapid power bounces which may be responsible for the loss of nvram contents. The switching power packs they ship with these things are so small that they can't be putting very much storage capacitance in there. It wouldn't fit.
Dennis in Minneapolis
1500 uF at 3.3V store C*V*V/2= about 8mJ
I suppose Buffalos draws about 5W. This means that the capacitor can power the router for about 1.6 milliseconds. But in reality it is much less, since the above calculations imply that the router will keep working down to 0 V.
So I think the capacitor does nothing at all. Energy stored on the primary side of the SMPS is bigger by some order of magnitude.
You have to test thousand of power cycles, resets are not so common to be seen with only 5 tries.
If the culprit are interrupted nvram writings by CFE, these happens several seconds after power up, there should be a post by me previously in this thread.
To be effective, your approach should have:
1) several seconds of available energy. This could be done increasing the capacitance on the primary side of the SMPS. Don't forget to add some form of inrush current limiting.
2) a relay, controlled by some logic that starts giving power to the router only when the voltage on the DC link is enough to sustain the 30 seconds required to get out of CFE.
I've been in Minneapolis for one week, two years ago. Only thing I visited was Mall of America, and the factory I was working for. Probably in september I'll be back .
Yeah, I am aware of those issues. It would take a monstrous capacitor to hold up the router for seconds. I also didn't want to cut into my power pack just yet to put the capacitor on the line side. I was thinking more in terms of hardware events inside the router when the power bounces rapidly during the contact bounce while plugging it in and out or during a power surge. There are things that can get upset in the hardware from the faster bounce that my capacitor addition might prevent.
By all means. More capcitance is better. A UPS might be more appropriate to address software level events.
That said, I'm afraid I have abandoned ship. Multiple issues with DD-WRT have led me to try the "Tomato" firmware package with solid results. "It just works"
Joined: 17 Nov 2006 Posts: 5 Location: Girard, Ohio
Posted: Mon Apr 30, 2007 21:10 Post subject: Re: New release
Alberto wrote:
Here is release 0.5
- ssh should work
- added the --status parameter, which shows if there has been an nvram restore. Use --clear_revert_warning to reset the warning.
- added an SP2 standard no Kaid version
Feedback welcome.
Good luck!
Alberto
Heya Alberto,
I just wanted to give you some feedback and to thank you for your DD-WRT patch for this problem that's been plaguing me for months. It works great and is a lifesaver!
And now the feedback part LOL (just a couple things I've noticed) ...
1. It appears the reset button on the Buffalo WHR can "override" your patch and it will still sit at the "DD-WRT" defaults (even after I've given it a healthy long time to restore my settings). I've even tried power-cycling it a few times but it just refuses to restore my settings. I've been able to get it to "kick-in" and restore my settings only after using the web-gui at "http://root:admin@192.168.1.1/Factory_Defaults.asp" for a hard reset. But not a big deal unless you have a knucklehead (or "fingers" I call them) resetting it on you.
2. I found the "--help" parameter and discovered the "--restore" command listed. Not sure how this would be helpful though.
3. It appears the "--clear_revert_warning" does not have to issued after every hard reset/restore, which is sweet because it can do its thing any number of times and all is well!
Joined: 07 Jun 2006 Posts: 198 Location: Parma - Italy
Posted: Thu May 03, 2007 8:06 Post subject: Re: New release
Vergitek wrote:
1. It appears the reset button on the Buffalo WHR can "override" your patch and it will still sit at the "DD-WRT" defaults (even after I've given it a healthy long time to restore my settings). I've even tried power-cycling it a few times but it just refuses to restore my settings. I've been able to get it to "kick-in" and restore my settings only after using the web-gui at "http://root:admin@192.168.1.1/Factory_Defaults.asp" for a hard reset. But not a big deal unless you have a knucklehead (or "fingers" I call them) resetting it on you.
This is strange. I do not own a WHR, but I would assume it works just like a Linksys. Normally the reset button wipes nvram, so the script does not find the restore_status variable and starts reloading parameters.
Quote:
2. I found the "--help" parameter and discovered the "--restore" command listed. Not sure how this would be helpful though.
The --restore option is useful when you want to test the script. Could be used also if you have different profiles and you want to change your router configuration from command line.
Quote:
3. It appears the "--clear_revert_warning" does not have to issued after every hard reset/restore, which is sweet because it can do its thing any number of times and all is well!
Joined: 17 Nov 2006 Posts: 5 Location: Girard, Ohio
Posted: Thu May 03, 2007 12:20 Post subject: Re: New release
Alberto wrote:
Vergitek wrote:
1. It appears the reset button on the Buffalo WHR can "override" your patch and it will still sit at the "DD-WRT" defaults (even after I've given it a healthy long time to restore my settings). I've even tried power-cycling it a few times but it just refuses to restore my settings. I've been able to get it to "kick-in" and restore my settings only after using the web-gui at "http://root:admin@192.168.1.1/Factory_Defaults.asp" for a hard reset. But not a big deal unless you have a knucklehead (or "fingers" I call them) resetting it on you.
This is strange. I do not own a WHR, but I would assume it works just like a Linksys. Normally the reset button wipes nvram, so the script does not find the restore_status variable and starts reloading parameters.
Yes, this is exactly what I thought too... (and didn't your earlier scripts basically check for the "DD-WRT" name on the router and restores the settings?) So the only thing I can think of is the script is not being run after the button reset maybe? Where is that "restore_status" variable stored (so I can check before & after a button reset too)?
Quote:
Quote:
2. I found the "--help" parameter and discovered the "--restore" command listed. Not sure how this would be helpful though.
The --restore option is useful when you want to test the script. Could be used also if you have different profiles and you want to change your router configuration from command line.
I think I get it... allows you to store your different setting profiles on the router (if you've got the space on it) just by saving then renaming the /jffs/nvram_mirror.gz file to something else and when you need it, rename it back to /jffs/nvram_mirror.gz. I must admit I've been doing that sort of thing through the web interface instead. Which reminds me, is there a factory reset command (like "reboot") or a way to run the script from command line after restoring the settings?
Joined: 07 Jun 2006 Posts: 198 Location: Parma - Italy
Posted: Fri May 04, 2007 12:32 Post subject: Re: New release
[quote="Vergitek"][quote="Alberto"]
Vergitek wrote:
Yes, this is exactly what I thought too... (and didn't your earlier scripts basically check for the "DD-WRT" name on the router and restores the settings?) So the only thing I can think of is the script is not being run after the button reset maybe? Where is that "restore_status" variable stored (so I can check before & after a button reset too)?
From a telnet or ssh console type "nvram get revert_status".
If it returns "OK" it means settings were kept. If it were blank the script would have restored everything and set the "OK" so you always get OK.
Quote:
is there a factory reset command (like "reboot") or a way to run the script from command line after restoring the settings?
I do not understand why you would like to call the script AFTER it restored the settings.
Anyhow you can call it whenever you want, with nvram_restore --restore and --save.
Nvram can be cleared with mtd erase nvram.
An easy way to force a reload at next boot is to issue
nvram unset revert_status; nvram commit
Joined: 17 Nov 2006 Posts: 5 Location: Girard, Ohio
Posted: Fri May 04, 2007 17:11 Post subject: Re: New release
Alberto wrote:
Vergitek wrote:
Yes, this is exactly what I thought too... (and didn't your earlier scripts basically check for the "DD-WRT" name on the router and restores the settings?) So the only thing I can think of is the script is not being run after the button reset maybe? Where is that "restore_status" variable stored (so I can check before & after a button reset too)?
From a telnet or ssh console type "nvram get revert_status". If it returns "OK" it means settings were kept. If it were blank the script would have restored everything and set the "OK" so you always get OK.
Quote:
is there a factory reset command (like "reboot") or a way to run the script from command line after restoring the settings?
I do not understand why you would like to call the script AFTER it restored the settings. Anyhow you can call it whenever you want, with nvram_restore --restore and --save. Nvram can be cleared with mtd erase nvram. An easy way to force a reload at next boot is to issue nvram unset revert_status; nvram commit
Honestly, I can't get the "nvram_restore --restore" command to actually do anything (after the button hard-reset). It just persistently stays at the DD-WRT defaults indefinitely. Looks like, after these button resets, the only reliable way to restore the settings via telnet is to:
mtd erase nvram
nvram unset revert_status
nvram commit
reboot
Of course, doing it from the web-gui ("http://root:admin@192.168.1.1/Factory_Defaults.asp") is much easier & faster; but it is nice having an alternative way to do it in case the web-gui is broke and the only way to access it is telnet.
BTW, I've been playing around with the firmware/patch on three Buffalo units and they all do the same thing on the button resets: places the router into the "DD-WRT" defaults and they stay there indefinitely. I've got one Linksys WRT router I'm going to try the button reset multiple times just to see if this is unique to the Buffalo WHRs or not.
Fortunately, DD-WRT allows me to disable the reset button entirely (and it works just fine on the Buffalo WHRs), so there is always that if you don't want anyone messing with your equipment like that.
I have a custom DD-WRT firmware based in SP2, i do this with firmware modification kit.
Well, how i can patch my custom firmware with 0.5 version of patch without lost my custom features??
Alberto, what files i can replace in my SP2 firmware for have one patched version.
Please help me about this.
I understan how a can do this for prior version, but i dont know your lastest script and resolve about ssh issue.
A lot of thanks.
Joined: 07 Jun 2006 Posts: 198 Location: Parma - Italy
Posted: Sat May 05, 2007 22:13 Post subject:
Cenarius wrote:
I have a custom DD-WRT firmware based in SP2, i do this with firmware modification kit.
Well, how i can patch my custom firmware with 0.5 version of patch without lost my custom features??
Alberto, what files i can replace in my SP2 firmware for have one patched version.
Please help me about this.
I understan how a can do this for prior version, but i dont know your lastest script and resolve about ssh issue.
A lot of thanks.
Monday I can give you all the details. I'm not in a civilized place right now, so for a quick answer the best I can do for now is this advice:
1) Download the custom firmware at page 8 in this thread.
2) Expand it with the firmware mod kit
3) Look for the nvram_restore script, it should be in /bin or /usr/bin. Copy it in the same location in your firmware tree.
4) Copy /etc/init.d/rcS to your tree. This is where the script is called. Of course you have to modify it if you have already changed it.
Joined: 07 Jun 2006 Posts: 198 Location: Parma - Italy
Posted: Mon May 14, 2007 7:00 Post subject:
dmark1867 wrote:
I have a WRT54G V5 and I am currently running DD-WRT v23 SP2 (09/15/06) micro generic - build 3932
Is there any chance you are going to release a version that I can use with v23 SP2 (09/15/06) micro generic?
Unfortunately V5 can not have JFFS, therefore it's not possible to store the parameters at runtime.
The best thing you could do is to recompile the source code with your desired parameters. Or experiment a new CFE.
I do not own a V5, so I can't do any test. Sorry.
Any way to tell if it is fixed in ver 24. I know a bug ticket was opened but I can't see if it has been fixed yet. Can any body tell me ?
Alberto you code has been a life saver don't know how many trips I have saved.