Serial Recovery

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:59, 30 October 2010 (edit)
Donny (Talk | contribs)

← Previous diff
Revision as of 15:10, 30 October 2010 (edit) (undo)
Donny (Talk | contribs)

Next diff →
Line 4: Line 4:
You connect to the router with the programs hyperterminal or putty. You connect to the router with the programs hyperterminal or putty.
 +
 +The settings you want are:
 +Baud: 115200
 +Data bits: 8
 +Stop Bits: 1
 +Parity: none
 +No Flow control
 +
 +===Serial Commands ===
 +
 +=Erase Nvram=
Power cycle the router and while it is booting hit control C quickly. You should get a CFE> Power cycle the router and while it is booting hit control C quickly. You should get a CFE>
-The most common command you will use is the "nvram erase" command.+The most common command you will use is the "nvram erase" command.
 +This command will erase the nvram values that are often the cause of bricked routers
 + 
 +At the cfe prompt:
 + 
 +cfe> nvram erase [enter]
-To flash the firmware+=To flash the firmware=
This assumes you have a ttl adapter connected and ready to go. There is reference to stock firmware. This does not apply to router that used to run vxworks. All of those, have jtag tmk.. This assumes you have a ttl adapter connected and ready to go. There is reference to stock firmware. This does not apply to router that used to run vxworks. All of those, have jtag tmk..
Line 22: Line 38:
cfe> cfe>
-Get the tftp utility ready to flash the STOCK LINKSYS firmware for your router so all you need to do it hit enter to launch.+Execute the nvram erase command at the CFE prompt
 + 
 +Get the tftp utility ready to flash the STOCK firmware for your router so all you need to do it hit enter to launch.
You are going to tell the router to accept a tftp flash of firmware. It times out quickly so that is why you need to get the utility ready to launch. You are going to tell the router to accept a tftp flash of firmware. It times out quickly so that is why you need to get the utility ready to launch.
Line 28: Line 46:
Static ip on your rig.. 192.168.1.10, mask 255.255.255.0, not necessary but gateway 192.168.1.1 Static ip on your rig.. 192.168.1.10, mask 255.255.255.0, not necessary but gateway 192.168.1.1
-at the cfe prompt:+If you have a linksyse router, at the cfe prompt:
flash -ctheader : flash1.trx flash -ctheader : flash1.trx
Line 50: Line 68:
Good Luck.. Good Luck..
-EDIT: the above is mostly for linksys. I have used this on others also. I also forgot to mention..+ 
Before flashing the kernel (firmware), erase nvram so any bad nvram entries won't screw up the new kernel. Before flashing the kernel (firmware), erase nvram so any bad nvram entries won't screw up the new kernel.
Line 57: Line 75:
cfe> nvram erase [enter] cfe> nvram erase [enter]
- 
- 
-stop the boot with ctrl-c 
-Enter this command "flash -ctheader : flash1.trx 

Revision as of 15:10, 30 October 2010

Routers that have a serial port can often be recovered by using a serial adapter. This is an alternative to Jtag.

Serial ports are normally a four or five pins on the router motherboard. Usually, you have to solder to pads or remove solder from the holes and install a four or five pin header.

You connect to the router with the programs hyperterminal or putty.

The settings you want are: Baud: 115200 Data bits: 8 Stop Bits: 1 Parity: none No Flow control

Serial Commands

Erase Nvram

Power cycle the router and while it is booting hit control C quickly. You should get a CFE>


The most common command you will use is the "nvram erase" command. This command will erase the nvram values that are often the cause of bricked routers

At the cfe prompt:

cfe> nvram erase [enter]

To flash the firmware

This assumes you have a ttl adapter connected and ready to go. There is reference to stock firmware. This does not apply to router that used to run vxworks. All of those, have jtag tmk..

connect that bitch (the router to your serial adapter).. 115200,8,1,n and no flow control are the com, param's

I use hyperterminal. In the terminal, boot the router.

Immediately start hitting ctrl-c. If you hit it right you will be at the cfe prompt:

cfe>

Execute the nvram erase command at the CFE prompt

Get the tftp utility ready to flash the STOCK firmware for your router so all you need to do it hit enter to launch.

You are going to tell the router to accept a tftp flash of firmware. It times out quickly so that is why you need to get the utility ready to launch.

Static ip on your rig.. 192.168.1.10, mask 255.255.255.0, not necessary but gateway 192.168.1.1

If you have a linksyse router, at the cfe prompt:

flash -ctheader : flash1.trx

hit enter.. the router will want an upload of the firmware. It will time out after three tries. Don't let it time out, now launch the tftp utility. It will upload, program and then you will be back at the cfe prompt. This will take some time. You will see what is happening in the console.

You will be back at the cfe prompt when it is done:

cfe>

issue a "go" command:

go [enter]

the router will launch its new firmware.

Let it boot. It will boot 2 ~ 3 times.. You are done.

Now install dd-wrt again.

Good Luck..


Before flashing the kernel (firmware), erase nvram so any bad nvram entries won't screw up the new kernel.

At the cfe prompt:

cfe> nvram erase [enter]