Reset to Defaults / Erase NVRam

Report problems and success stories with Gargoyle on various hardware platforms.

Moderator: Moderators

User avatar
DoesItMatter
Moderator
Posts: 1373
Joined: Thu May 21, 2009 3:56 pm

Reset to Defaults / Erase NVRam

Post by DoesItMatter »

Eric,

Any way you can implement a Reset to Defaults or Erase NVRam command?

I know with the Atheros chipset, as long as I have Redboot access,
I can just go in and do an "fis init -f" command to completely blank NVRam.

Wondering if you can implement a command like that pretty easily for final 1.0 version?

That way it can erase all old info/settings and prevent any conflicts. :idea:

This should also help with the bug about the bandwidth monitor showing old data?
:twisted: Soylent Green Is People! :twisted:
2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Reset to Defaults / Erase NVRam

Post by Eric »

There already is a restore original settings option in the GUI, in the system/backup&restore section. Is it not working for you?

Also, configuration is not done via nvRAM. OpenWrt Kamikaze uses config files stored in /etc/config.

This will clear the old bandwidth monitor data. However there is currently a really nasty bug in the bandwidth monitor but it's the same one that's been driving me crazy for the last month. One reason for this is testing if it is working. What if it looks ok for a day or two and only after day 3 it dies? Waiting 3 days to see if something works or just run a test is not an efficient way to debug something... I've been using tricks to get the thing to advance faster, but the question becomes whether that prevents the error from showing up or whether it is really gone.

User avatar
DoesItMatter
Moderator
Posts: 1373
Joined: Thu May 21, 2009 3:56 pm

Re: Reset to Defaults / Erase NVRam

Post by DoesItMatter »

OK...

Backed up my config just in case.

Did a reset to defaults, left it for over 5 minutes, it just stayed at the loading screen.

Went back to 192.168.1.1 - no change.

Rebooted router, tried again, no luck.

Tried 2 different browser, Internet Explorer 8 and Firefox 3.5
Both have web page caching disabled, it always gets the newest page.

I decided to wipe the Fonera, so I went into redboot, did an "fis init -f" to completely erase the flash except for the redboot.

Reloaded the latest bleeding edge atheros, reloaded my config,
now I can't get into the router? won't accept the password.
When I first did the reload, I set the password.
When I loaded the config, it loaded settings, rebooted, and now I can't get into settings.
I tried my password, I tried 'password', nothing. Can't get in.
-----------

I tried this again, completely reloaded the atheros bleeding edge via Fon Flash, logged in the first time, set my password, loaded my config, and now I can't login to the router, won't accept default of "password" or the password that I had set.

Any way to reset the password?

-------------------

OK, I was able to SSH into the router with the password I set.
I cannot get into the web gui though with that password.

Is there anyway I can manually delete the password file, but leave all the other settings, so that I can login to the web gui and use the default "password"?
:twisted: Soylent Green Is People! :twisted:
2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Reset to Defaults / Erase NVRam

Post by Eric »

Ok, I'll test the reset command tonight to see what may be wrong.

In the mean time try accessing the router via ssh, and replacing /etc/config/gargoyle file with this one.

User avatar
DoesItMatter
Moderator
Posts: 1373
Joined: Thu May 21, 2009 3:56 pm

Re: Reset to Defaults / Erase NVRam

Post by DoesItMatter »

OK

That new gargoyle config file worked and I was able to reset the password via the web gui.

Now I can get back in and all settings are still there.

1 other question, I was doing this to try out bandwidth monitor.

I had it disabled but enabled it now for testing.

Why is all my old data there and how can that be erased?

When you restore configs, can't you put in some blank bandwidth monitor data?

Is there any more reference as to the bandwidth monitor bug?
Is it only on routers with 16MB of RAM?

I had been running my Fon 2201+ with bleeding edge with a 40 day uptime, no issues, memory usually around 11.5 mb of 13.5mb available

I enabled Bandwidth mon and its around 12.5 of 13.5 now.
It almost seems like if there is crashing, its due to the router running out of memory.
Any users with 32MB of ram experiencing the bandwidth monitor bug?

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Reset to Defaults / Erase NVRam

Post by Eric »

I'm fairly certain the problem in the bandwidth monitor is not due to memory usage. It's true that it eats up a bunch of memory since it's storing a lot of data, but that's not the problem. The problem is how the program handles the case when the timezone on the router is changed. If it is running and the user changes timezone, the data needs to be adjusted to accommodate this shift, and handling this properly is HIGHLY non-trivial.

My original "fix" seems to have made the problem worse, not better, and I haven't figured out exactly why yet. Specifically, I need to find a way to reproduce the bug reliably in less than a couple days for easy testing, but even that isn't trivial. As I said I'm working on it...

User avatar
DoesItMatter
Moderator
Posts: 1373
Joined: Thu May 21, 2009 3:56 pm

Re: Reset to Defaults / Erase NVRam

Post by DoesItMatter »

Hope you don't think I'm bugging you on it!

I don't even use or care about it :D

I'm just trying to help test and see if I can reproduce any errors.

I usually have QoS, bandwith monitor, DDNS all turned off and disabled - I got other equipment doing that stuff.

I just liked how Gargoyle consumed much less memory on the Fonera and had such a good stable uptime compared to DD-WRT on the Fonera.
:twisted: Soylent Green Is People! :twisted:
2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400

NL2009
Posts: 54
Joined: Mon May 18, 2009 1:03 pm

Re: Reset to Defaults / Erase NVRam

Post by NL2009 »

DoesItMatter wrote:OK
Any users with 32MB of ram experiencing the bandwidth monitor bug?
Yes, this bug (old quota data re-appearing) also happens on my router with 32MB ram. I have however not had any signs of instability or crashes with bandwidth monitoring.
Regards, Nigel

NL2009
Posts: 54
Joined: Mon May 18, 2009 1:03 pm

Re: Reset to Defaults / Erase NVRam

Post by NL2009 »

Eric wrote:The problem is how the program handles the case when the timezone on the router is changed. If it is running and the user changes timezone, the data needs to be adjusted to accommodate this shift, and handling this properly is HIGHLY non-trivial.
Hi Eric, I can appreciate how difficult this can be - even Adobe could not get this right in editing EXIF date/time info in Lightroom 1.0 ;) .

Since the timezone setting should not normally be changed all that often, is it not reasonable to just accept that times in logged data will not be adjusted? IMHO, a simpler solution (with a couple of known exceptions) that works well is better than a more complex solution that tries to accommodate every last unusual exception.
Regards, Nigel

User avatar
DoesItMatter
Moderator
Posts: 1373
Joined: Thu May 21, 2009 3:56 pm

Re: Reset to Defaults / Erase NVRam

Post by DoesItMatter »

Eric,

Hopefully this is some additional help in troubleshooting the bandwidth bug / time zones thing.

The dates and the data are not lining up properly.

I'm in Pacific time zone, and I messed around and changed the timezone to UTC, and then to Australia, which changed the whole thing forward 1 day.

i.e. UTC - 8 ==> UTC ==> UTC + 10

Here's the results...

bwmontest1 and bwmontest2 show that when you put the date forward one day, it shows the prior days data in the history.

BUT, if you go and set the time backwards, it still retains the prior days date, it just doesn't show the right history, if you know what I mean.

Still haven't managed to crash my Fon 2201+ though while changing all the time zones.

I've got Bandwidth monitor on, Web Page monitor on, DDNS Off and QoS off
Attachments
bwmontest2.png
bwmontest2.png (3.86 KiB) Viewed 15485 times
bwmontest1.png
bwmontest1.png (4 KiB) Viewed 15483 times
:twisted: Soylent Green Is People! :twisted:
2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400

Post Reply