Mystery reset to defaults out of no-where!

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 17, 18, 19  Next
Author Message
Alberto
DD-WRT User


Joined: 07 Jun 2006
Posts: 198
Location: Parma - Italy

PostPosted: Sun Apr 15, 2007 22:15    Post subject: Re: Added capacitance to power pack to slow power bounce Reply with quote
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 .

Regards
Sponsor
cmoswizard
DD-WRT Novice


Joined: 04 Apr 2007
Posts: 3

PostPosted: Tue Apr 17, 2007 19:58    Post subject: Reply with quote
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"

Dennis in Minneapolis
Vergitek
DD-WRT Novice


Joined: 17 Nov 2006
Posts: 5
Location: Girard, Ohio

PostPosted: Mon Apr 30, 2007 21:10    Post subject: Re: New release Reply with quote
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! Very Happy

Again kudos and thank you!

Lonnie M. Smith
Youngstown, Ohio
Alberto
DD-WRT User


Joined: 07 Jun 2006
Posts: 198
Location: Parma - Italy

PostPosted: Thu May 03, 2007 8:06    Post subject: Re: New release Reply with quote
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! Very Happy

Again kudos and thank you!

Lonnie M. Smith
Youngstown, Ohio


You're welcome.
Vergitek
DD-WRT Novice


Joined: 17 Nov 2006
Posts: 5
Location: Girard, Ohio

PostPosted: Thu May 03, 2007 12:20    Post subject: Re: New release Reply with quote
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?

Lonnie (Youngstown, OH)
Alberto
DD-WRT User


Joined: 07 Jun 2006
Posts: 198
Location: Parma - Italy

PostPosted: Fri May 04, 2007 12:32    Post subject: Re: New release Reply with quote
[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
Vergitek
DD-WRT Novice


Joined: 17 Nov 2006
Posts: 5
Location: Girard, Ohio

PostPosted: Fri May 04, 2007 17:11    Post subject: Re: New release Reply with quote
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.

Lonnie (Youngstown, OH)
Cenarius
DD-WRT Novice


Joined: 02 Sep 2006
Posts: 12
Location: Ecuador

PostPosted: Sat May 05, 2007 20:41    Post subject: Reply with quote
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.
Alberto
DD-WRT User


Joined: 07 Jun 2006
Posts: 198
Location: Parma - Italy

PostPosted: Sat May 05, 2007 22:13    Post subject: Reply with quote
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.

That's all.
Good luck, ask if you need help.
dmark1867
DD-WRT Novice


Joined: 11 May 2007
Posts: 4

PostPosted: Fri May 11, 2007 19:24    Post subject: Reply with quote
I have a WRT54G V5 and I am currently running DD-WRT v23 SP2 (09/15/06) micro generic - build 3932

I can only use the micro version, & only have 2MB of Flash Memory and 8MB of RAM.
When I go to DD-WRT Control Panel -> Status -> Sys-Info -> Memory

Total Available 6.2 MB / 8.0 MB
Free 0.2 MB / 6.2 MB
Used 5.9 MB / 6.2 MB
Buffers0.4 MB / 5.9 MB
Cached 1.2 MB / 5.9 MB
Active 1.1 MB / 5.9 MB
Inactive 0.6 MB / 5.9 MB

This must be my RAM and not my Flash memory

Is there any chance you are going to release a version that I can use with v23 SP2 (09/15/06) micro generic?
Alberto
DD-WRT User


Joined: 07 Jun 2006
Posts: 198
Location: Parma - Italy

PostPosted: Mon May 14, 2007 7:00    Post subject: Reply with quote
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.
psj00
DD-WRT Novice


Joined: 23 Aug 2006
Posts: 17

PostPosted: Tue Jun 05, 2007 14:44    Post subject: Reply with quote
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.

Thanks again.

Phil
madamada
DD-WRT Novice


Joined: 05 Sep 2006
Posts: 47

PostPosted: Sun Jun 17, 2007 14:49    Post subject: no solution ? Reply with quote
Anyone have solution for this issue ?
Seems this is a never ending mystery Sad
Alberto
DD-WRT User


Joined: 07 Jun 2006
Posts: 198
Location: Parma - Italy

PostPosted: Sun Jun 17, 2007 15:42    Post subject: Re: no solution ? Reply with quote
madamada wrote:
Anyone have solution for this issue ?
Seems this is a never ending mystery Sad


I never had a single reverted router, with the patched firmware.
madamada
DD-WRT Novice


Joined: 05 Sep 2006
Posts: 47

PostPosted: Mon Jun 18, 2007 2:11    Post subject: Re: no solution ? Reply with quote
Alberto wrote:
I never had a single reverted router, with the patched firmware.


I am using:
DD-WRT v23 SP2 (09/15/06) std
(SVN revision 3932)

Which patch should I try ?

Thanks.
Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 17, 18, 19  Next Display posts from previous:    Page 9 of 19
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum