Joined: 26 Jan 2008 Posts: 13049 Location: Behind The Reset Button
Posted: Tue Apr 07, 2009 19:36 Post subject:
zargalo wrote:
Quote:
Isn't the code "erase nvram" not "nvram erase"?
Hi erase nvram gives an error. i think its nvram erase.
Fair enough... I was just guessing because that is the command via telnet.
Fooling around with the serial console on a nas device, if you enter a /? at the prompt, it lists all the commands. If you enter the command with the /?, it then explains the command option(s).
I would assume the router would be similar.
Back to the erase.... I would think that after the erase, you would want to enter a reboot command, not a commit. Maybe erase the nvram, then pull the plug if you cant find a reboot command. Risky though.. _________________ [Moderator Deleted]
If the NVRAM is erased, the CFE will rebuild it before loading the kernel. The kernel (dd-wrt) will then realize it's a fresh start and rebuilt it's settings and save them to nvram too. If you don't commit, but do a reboot (or cycle the power), then all of the old nvram settings will be reloaded from the flash and nothing will be different. It should be erase, then commit, and then power cycle.
Note that the router will need some time to power up and initialize everything after the nvram has been wiped. After you erase the nvram and power cycle it, give it 10 minutes before deciding that it is not working.
Joined: 26 Jan 2008 Posts: 13049 Location: Behind The Reset Button
Posted: Tue Apr 07, 2009 20:08 Post subject:
tcharron wrote:
If the NVRAM is erased, the CFE will rebuild it before loading the kernel. The kernel (dd-wrt) will then realize it's a fresh start and rebuilt it's settings and save them to nvram too. If you don't commit, but do a reboot (or cycle the power), then all of the old nvram settings will be reloaded from the flash and nothing will be different. It should be erase, then commit, and then power cycle.
Note that the router will need some time to power up and initialize everything after the nvram has been wiped. After you erase the nvram and power cycle it, give it 10 minutes before deciding that it is not working.
That makes no sence to me.. If nvram is erased, it is erased. When you commit to nvram, you are writing ram to nvram. For instance.. The traffic data. If you commit nvram, it writes the traffic data to nvram when you commit it instead of leaving it in ram. (well... it stays in ram also)
If you erase nvram with no reboot or power cycle, the router continues to run as if nothing happened because everything is still in ram. If you commit at that point, everything (or there abouts), gets written to nvram.
Using telnet to erase nvram, then reboot, the variables are gone and nvram is rebuilt with default variables from the firmware (kernel) & CFE at the next boot.
So.. I would think if you want to clear nvram, whether via serial console, telnet, or what ever, you would want to erase nvram, then reboot without a commit. _________________ [Moderator Deleted]
Great news!! I got it working! Is a live with linksys firmware (for now)
Thansk a lot all of you that help me. When i bougth this router i was inexperience, but because of it i have learn a little.
I will make a tutorial, how to debrick a wrt600n by serial port. (But i think that this will apply to all routers with similar CFE bin).
this is the more important topics:
- Never give it up
- Linux OS (linux always for this kind of operations)
- Serial cable TTL 3v3 converter(cheap on ebay nokia ca-42 serial, works perfect)
- CFE know how
Last edited by zargalo on Wed Apr 08, 2009 22:40; edited 1 time in total
Joined: 26 Jan 2008 Posts: 13049 Location: Behind The Reset Button
Posted: Wed Apr 08, 2009 13:19 Post subject:
How about just a summery for now... There are a few that are in your situation and there is other hardware that has no jtag, just serial.
Did you flash the cfe over serial? Did erasing nvram without a commit command work and allow tftp to the router?
Actually.. I want to purchase a 600 but have been hesitant because of no jtag support. I like the external antennas as opposed to the internal antennas in a 610 _________________ [Moderator Deleted]
- Linux OS machine, i used Ubuntu 8.10 (tried with windows xp and vista, but cant enter in CFE, using the CRTL-C, with putty or hyperterminal, ). In linux Ubuntu shell interface, i used minicom application in order to connect to the wrt600n. To install minicom used this command:
Quote:
sudo apt-get install minicom
. To check whats the name of you serial port use this command:
3º - ACCESSING TO CFE AND FLASH FIRMWARE PROCEDURE
- After install/configured minicom, and connecting USB serial cable to PC and router, i power up the router, and i start seeing the startup of the router in the console output in PC.
- When you see the output message Decompressing ...done, start hitting the CRTL-C key for 5 seconds. This should take you to the CFE shell. In my wrt600n case, i cant ping the lan ports because the nvram could not load the eth0 definitions. So, i need to configure the eth0 in the first place.
To configure the eth0 ipaddres i used this command:
And voilá, my ethernet port start responding! .
Atfer this, i can use the tftp server to send the frimware to the router, (i think its possible to send nvram file settings and cfe.bin to, but i do not tested).
3.1 - FLASHING THE FIRMWARE.
First you need to setup tftp server in linux machine. I used this settings in the tftp:
and next hit the tftp server to start sending the firmware, and then hit enter in the CFE flash command. After a second you should see the frimware load progress in the linux console.
In the router CFE you should see the message READING... and then Programing...
Omething like this:
Quote:
Reading :: Done. XXXXXXX bytes read
fname=flash1.trx
Programming...done. XXXXXX bytes written
*** command status = 0
Dont do nothing yet let it work, when it show a message that is finished or error(if something is wrong).
So, after the flashing OK, remove the power cord of the router and turn it on again.
Let the router start, give him a 4 or 5 minutes. If it works, great! If not make a 30-30-30 seconds reset.
I have done this several times, i notice that if i fail a command in CFE the flashing was not succefull any more. I only get a succefull flash by rebooting the router and start doing the commands again.
Ok thats it! I hope this will help someone with a bricked WRT router out there.
Greetings from Portugal.
Last edited by zargalo on Fri Apr 10, 2009 12:56; edited 6 times in total
hey man i just recently had the same exact problem from a walk through with linksys support i managed to get this fixed
change computer ip to 192.168.1.10
change your gateway to 192.168.1.1
MAKE SURE YOU change your DNS to 4.2.2.1 and 4.2.2.2
flash the linksys firmware through tftp
you Must hit send right when the router is booting
to utilize the bootwait tftp process,
then reset your router /hard reset/30/30/30 reset
and try loading the firmware page 192.168.1.1
Thanks for the advice, will give this a try... but I am not going to hold my breath since the log I posted above shows that the router busts at the point it tries to initialize eth0. This means that there is no LAN support to the router. TFTPing to it would seem impossible without that.
I can't even Ctrl-C into the CFE, to figure out the problem like the original poster... I will keep it at it, don't like expensive paper weights, and until now, have not bricked a router (i bought this one bricked).
This method worked in restoring my WRT-600N to operation. My WRT600N failed when I was trying turning up the bandwidth limiters on the pay version while a heavy user was slamming the thing. Not sure why that caused it though.
My WRT600N was crashing and rebooting like yours, but was hanging when it was loading the "WRT-54G/GL/GS" but TFTP would not respond unless you did it this way. After trying every build I could find, the only thing that would load was the stock linksys firmware.