NVRAM Editor 0.92 Beta released

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Contributions Upload
Author Message
Iron
DD-WRT User


Joined: 17 Jun 2007
Posts: 100
Location: China, Suzhou

PostPosted: Thu Jul 12, 2007 9:06    Post subject: NVRAM Editor 0.92 Beta released Reply with quote
Hi people,

I had some spare time to build a little NVRAM editor for Windows 9x/XP/Vista to show the contents of the NVRAM backup that you can make via the DD-WRT GUI (Administration->Backup->Backup Button at the bottom). With this little program you can view the NVRAM variable names and their contents. You can also edit the contents and write the changes back, and then restore the NVRAM via the GUI again.

This is a beta version, so be careful. If you don't know what you are doing then you will probably brick your router.
In case you manage to brick your router then apply the 30 seconds reset trick.
For this you need to power down your router, then press the reset button(if it has one), and hold it for 30 seconds while you power on the router. This will reset the NVRAM contents to the default values.

The program was made with Borland Delphi 10. I will release the sources once the program has reached the "Final" status. I have some idea's to improve the program a little, like searching, sorting and change highlighting. I'm not sure if it is allowed to sort the items and then write them back. Is there anybody out there who knows this!?

Your suggestions are welcome. Please let me know if you find this program useful. If not then send you comments to "/dev/null" Wink

Enjoy!

Update 0.91
A) Added XPManifest component like suggested. Does is work!? (I cannot test this)
B) Allowed a little more space around the buttons. I don't have the missing pixel problem. Perhaps it has to do with the font and windows settings. A screenshot would help me solve this efficiently.

Update 0.92.
A) Added change highlighting and column sorting.

_________________
Buffalo WHR-G54S, Generic Broadcom V2.4 Beta 2007-08-15, SD/MMC mod(2 GByte).
Buffalo WHR-HP-G54, Generic Broadcom V2.4 2007-08-15 SD/MMC mod(1 GByte).


Last edited by Iron on Mon Jul 23, 2007 14:06; edited 1 time in total
Sponsor
GeeTek
DD-WRT Guru


Joined: 06 Jun 2006
Posts: 3740
Location: I'm the one on the plate.

PostPosted: Sun Jul 22, 2007 8:29    Post subject: Reply with quote
Let me see if I can get it working.... Oh, is that pretty girl somebody you know or is it you ?
_________________
http://69.175.13.131:8015 Streaming Week-End Disco. Station Ripper V 1.1 will do.
robert-e
DD-WRT User


Joined: 19 Feb 2007
Posts: 191

PostPosted: Sun Jul 22, 2007 19:39    Post subject: Reply with quote
Hi Iron,
I will try to attach a screen shot jpg file to this post. There appears to be gray horizontal lines that appear when I page down to another page...the lines seem to dissapear if the screen if refreshed (moving the window??)

Hope this helps.

Regards,
Bob
Iron
DD-WRT User


Joined: 17 Jun 2007
Posts: 100
Location: China, Suzhou

PostPosted: Mon Jul 23, 2007 6:34    Post subject: Reply with quote
Thanks for giving it a spin. I'm aware of this, it is only a visual artifact. I just don't know how to solve it Sad I use custom draws to color the rows. I know how to fix the lines, but I don't know which event I need to hook it up to. I will look into it...
_________________
Buffalo WHR-G54S, Generic Broadcom V2.4 Beta 2007-08-15, SD/MMC mod(2 GByte).
Buffalo WHR-HP-G54, Generic Broadcom V2.4 2007-08-15 SD/MMC mod(1 GByte).
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Mon Jul 23, 2007 11:54    Post subject: Reply with quote
I see you're using Delphi for your tool Smile
You should use the OnCustomDraw events as far as i know. But I even failed trying to color the items in a TreeView.

_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
Iron
DD-WRT User


Joined: 17 Jun 2007
Posts: 100
Location: China, Suzhou

PostPosted: Tue Jul 24, 2007 12:24    Post subject: Reply with quote
If I use the "OnCustomDraw" then the thing goes quite crazy. It is refreshing too much...
I need an event that fires after the listview was scrolled up or down. Thanks for your input.
I can show you how I color the rows if you are interested...

_________________
Buffalo WHR-G54S, Generic Broadcom V2.4 Beta 2007-08-15, SD/MMC mod(2 GByte).
Buffalo WHR-HP-G54, Generic Broadcom V2.4 2007-08-15 SD/MMC mod(1 GByte).
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Tue Jul 24, 2007 14:48    Post subject: Reply with quote
Hmm, that would be nice Smile
What if you use the onDraw or onAdvancedDraw events? Using just the onCustomDraw events should be enough to get it to work.
I once used the AdvancedCustomDrawItem to color just one column, the sorted column that is.

Here's the code I used:
Code:
////////////////////////////////////////////////////////////////////////////////
// lv_DVDsAdvancedCustomDrawItem
////////////////////////////////////////////////////////////////////////////////
procedure Tfrm_DoBs.lv_DVDsAdvancedCustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
  var DefaultDraw: Boolean);
begin
  if ColumnOrder[0] = SortedColumn then
    Sender.Canvas.Brush.Color:= $00F7F7F7
  else
    Sender.Canvas.Brush.Color:= clWhite;
end;


////////////////////////////////////////////////////////////////////////////////
// lv_DVDsAdvancedCustomDrawSubItem
////////////////////////////////////////////////////////////////////////////////
procedure Tfrm_DoBs.lv_DVDsAdvancedCustomDrawSubItem(Sender: TCustomListView;
  Item: TListItem; SubItem: Integer; State: TCustomDrawState;
  Stage: TCustomDrawStage; var DefaultDraw: Boolean);
begin
  if ColumnOrder[SubItem] = SortedColumn then
    Sender.Canvas.Brush.Color:= $00F7F7F7
  else
    Sender.Canvas.Brush.Color:= clWhite;
end;

_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
itsmorefun
DD-WRT Novice


Joined: 02 Apr 2007
Posts: 39

PostPosted: Tue Jul 31, 2007 14:51    Post subject: Reply with quote
can you add a delete button to delete blank or useless entry?
thk
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Wed Aug 01, 2007 10:18    Post subject: Reply with quote
Iron wrote:
If I use the "OnCustomDraw" then the thing goes quite crazy. It is refreshing too much...
I need an event that fires after the listview was scrolled up or down. Thanks for your input.
I can show you how I color the rows if you are interested...

Another thing that just popped up, have you tried setting DoubleBuffered to True?

_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
Iron
DD-WRT User


Joined: 17 Jun 2007
Posts: 100
Location: China, Suzhou

PostPosted: Mon Aug 06, 2007 9:12    Post subject: Reply with quote
itsmorefun wrote:
can you add a delete button to delete blank or useless entry?
thk


I'm doing some tests with this. Implementation is easy, but I'm not sure how the firmware handles it when suddenly some variables that used to be empty are non-existing...
I guess it should be fine, but I just don't know. Deleting empty variables will release some nvram...

Thanks for the feedback on the drawing issues... I will try it soon.

_________________
Buffalo WHR-G54S, Generic Broadcom V2.4 Beta 2007-08-15, SD/MMC mod(2 GByte).
Buffalo WHR-HP-G54, Generic Broadcom V2.4 2007-08-15 SD/MMC mod(1 GByte).
dlublink
DD-WRT Novice


Joined: 29 Jan 2008
Posts: 18

PostPosted: Sun Feb 07, 2010 21:07    Post subject: Reply with quote
Does this support the defaults in /etc/defaults.bin ?
ccreamer_22
DD-WRT User


Joined: 10 Dec 2009
Posts: 60
Location: Obetz, OH

PostPosted: Fri Apr 16, 2010 21:02    Post subject: Reply with quote
Here is a good discussion for this from openwrt. They discuss the nvram and the workings and exploration of the wndr3700 in pretty good detail. Some of it is a little above my current knowledge level, but I think it contains the information that you are looking for.

http://open-wrt.ru/forum/viewtopic.php?id=22311&p=1

_________________
Money can't buy happiness, but it can buy a Jet-ski. Have you ever seen someone who is UNHAPPY on a Jet-ski?
bazzoola
DD-WRT Novice


Joined: 06 Oct 2007
Posts: 27

PostPosted: Fri Jul 16, 2010 7:10    Post subject: Reply with quote
Very interesting!

I hope you are still working on it after 3 years :P
WeJammin
DD-WRT Novice


Joined: 04 Feb 2011
Posts: 2

PostPosted: Fri Feb 04, 2011 22:53    Post subject: Reply with quote
ccreamer_22 wrote:
Here is a good discussion for this from openwrt. They discuss the nvram and the workings and exploration of the wndr3700 in pretty good detail. Some of it is a little above my current knowledge level, but I think it contains the information that you are looking for.

http://open-wrt.ru/forum/vmware.php?id=22311&p=1


The wndr3700 has been my best router to this point and I am a total noob. Thanks for posting this link I am going to just start my mastering one router instead of just playing around with all of these scraps.
MrFidget
DD-WRT User


Joined: 15 Jul 2010
Posts: 373

PostPosted: Tue Nov 01, 2011 12:34    Post subject: Reply with quote
dlublink wrote:
Does this support the defaults in /etc/defaults.bin ?


Nope Sad v15962 K26 NEWD

Cheers
Chris
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Contributions Upload 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 cannot attach files in this forum
You cannot download files in this forum