OpenWrt Forum Archive

Topic: WRT54GL briked?

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

today I had the bad idea to update my kamikaze install. No idea what exactly wen wrong..

- compiled kamikaze and flashed via mtd (OK)
- telnet to it (OK)
- passwd and ssh to it (OK, sort of.. shell was very slow, and i had to reconnect 3 times)
- started copying back configs from previous install via NFS. Boom!

the the shell somewhat locked up, I also wasn't able to connect to a new one, because it hang after typing password. I thought okay, maybe a reboot helps. but it never came up again.

Failsafe mode does not seem to exist yet on kamikaze, at least nothing happened after holding reset for 2 secs after DMZ light.

So, boot_wait is still enabled from whiterussion (I hope) and I wanted to reflash it using TFTP, but somehow I cannot even ping the router.

Is there something I can check to get TFTP running?


Or is it just totally bricked and next step is JTAG method? (Geee, no idea of soldering... only one guy from canada selling cables on ebay..)

(Last edited by gimpel on 24 Jun 2007, 20:14)

Double check the size of the firmware file you're trying to load.  I've tried flashing partial builds (unintentionally, of course). 

Make sure your network cable is plugged into one of the 4 ports (not the one where you connect to the cable modem - but you've probably already done that)

Set the IP of your system that your trying to tftp from to 192.168.1.2 (subnet mask 255.255.255.0, gateway 192.168.1.1)

Set up an instruction to ping your router constantly.

Set up another window with TFTP ready to go.

Power cycle the router.

As soon as you get a successful ping, start the TFTP session.

You might have to try it several times.

If you had Kamikaze running, you'll have to use the .trx file.  If you get a message indicating that there's something wrong with the .trx, try the .bin file.

Did you read several times the Wiki on Troubleshooting and TFTP flash?
http://wiki.openwrt.org/OpenWrtDocs/Ins … WrtViaTftp

Did you put a switch between you and WRT?  It is difficult to ping at power-up, if you are directly attached to the WRT since it can take too long for PC to recognize link is up.

Immediately on power-up of WRT you should be able to get at least a few reply from 192.168.1.1.  If so, you can TFTP to it, usually just a matter of timing and persistence.  Alternatively, cut the end off a Nokia cellphone DKU-5 USB cable or similar, and 3 wires to serial console.  Most times you can see what is wrong from serial console and it's easy to put the mode in TFTP receptive mode.  Much quicker than JTAG and solves 99% of problems.

Soldering headers onto GL is very easy!  They didn't even block up the holes with solder. Any friend with a tiny bit of soldering skills should be able to add a 2x5 header for serial and 2x6 for JTAG in 5 minutes.

(Last edited by vincentfox on 24 Jun 2007, 21:34)

vincentfox wrote:

Did you read several times the Wiki on Troubleshooting and TFTP flash?
http://wiki.openwrt.org/OpenWrtDocs/Ins … WrtViaTftp

Yeah, I did.

Did you put a switch between you and WRT?  It is difficult to ping at power-up, if you are directly attached to the WRT since it can take too long for PC to recognize link is up.

I read your post about this, but unfortunately the router contains my only switch. This is a linux box, basically it just keeps the link up.

Immediately on power-up of WRT you should be able to get at least a few reply from 192.168.1.1.  If so, you can TFTP to it, usually just a matter of timing and persistence.  Alternatively, cut the end off a Nokia cellphone DKU-5 USB cable or similar, and 3 wires to serial console.  Most times you can see what is wrong from serial console and it's easy to put the mode in TFTP receptive mode.  Much quicker than JTAG and solves 99% of problems.

Well i did a constant ping to the router and powered on to see if it gets at least some packages, but not a single one arrived. Unfortunately i do not own a nokia mobile, all i have is an old but good siemens me45 which comes with a com port cable. Could i maybe use that?

regloss wrote:

Double check the size of the firmware file you're trying to load.  I've tried flashing partial builds (unintentionally, of course).

Was about 1.7MB - so it looked OK.

Make sure your network cable is plugged into one of the 4 ports (not the one where you connect to the cable modem - but you've probably already done that)

Set the IP of your system that your trying to tftp from to 192.168.1.2 (subnet mask 255.255.255.0, gateway 192.168.1.1)

Yes, I even tried to plug it in different ports - the LEDs light up correctly. The client box has 192.168.1.2/24 and correct gateway.

Set up an instruction to ping your router constantly.
Set up another window with TFTP ready to go.

Power cycle the router.

As soon as you get a successful ping, start the TFTP session.

You might have to try it several times.

If you had Kamikaze running, you'll have to use the .trx file.  If you get a message indicating that there's something wrong with the .trx, try the .bin file.

Ping was constant, but as said in above post, not a single package got returned.

I used atftp with trace etc like described in the wiki. All i got was "timeout: retrying" 5 times before it aborted.

Uhm OK. Just tried again from the laptop, and received at least some packages.

Will try again with this machine, and maybe use the other tftp client too. atftp aborting after 5 retries doesn't really look like it is really tracing anyway.

There is some older linksys firmware around that has its own TFTP built into it.  The firmware is packaged as a .exe file.  I don't know if you can execute it on a linux system though.  I've used it to recover a bricked router from a Windows system.  PM me and I'll send it to you as an attachment.

regloss wrote:

There is some older linksys firmware around that has its own TFTP built into it.  The firmware is packaged as a .exe file.  I don't know if you can execute it on a linux system though.  I've used it to recover a bricked router from a Windows system.  PM me and I'll send it to you as an attachment.

Worth a try.. thanks! If the windows emulator can't handle it.. i still have some old xp sp1 on any of the harddrives.

Meanwhile result from netkit-tftp

From 192.168.1.2 icmp_seq=212 Destination Host Unreachable
From 192.168.1.2 icmp_seq=213 Destination Host Unreachable
64 bytes from 192.168.1.1: icmp_seq=215 ttl=100 time=510 ms
64 bytes from 192.168.1.1: icmp_seq=216 ttl=100 time=0.461 ms
64 bytes from 192.168.1.1: icmp_seq=217 ttl=100 time=0.481 ms
From 192.168.1.2 icmp_seq=261 Destination Host Unreachable

I get exactly 3 packages before it dies out again..

tftp can establish a connection, but not transfer anything

$ echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput openwrt-brcm-2.4-squashfs.trx\n" | tftp 192.168.1.1
tftp> tftp> tftp> tftp> Packet tracing on.
tftp> sent WRQ <file=openwrt-brcm-2.4-squashfs.trx, mode=octet>
...
received ACK <block=0>

and it exits hmm

(Last edited by gimpel on 24 Jun 2007, 22:37)

OK, thank you regloss for sending me the firmware. Unfortunately it wasn't able to find the router.

I also tried TFTP method several more times. "received ACK <block=0>" is all response i got. I tried to name the image code.bin etc like described in the wiki, but that didn't help.

Reading http://www.nslu2-linux.org/wiki/HowTo/AddASerialPort I will try vincentfox' tip regarding serial console, the data cable of my siemens me45 seems to be good to do that. Will get a soldering kit from a friend this evening. The needed J2 pins are really open, should indeed not be that hard to do.

Will report later.

Thank you guys already for the help! smile

The linksys tftp utility is designed for the tftp server in the linksys firmware. Linksys uses a modified tftp protocol, but only in the firmware tftp server -- the tftp server you're trying to reach is in CFE before the firmware loads. Use a standard tftp client.

It tends to work best if you set the tftp client into a retransmit mode with a very short retransmit delay, and actually start the tftp transfer before even powering on the router. You need to hit the tftp server very quickly after powerup or it will just start booting into the firmware.

mbm wrote:

The linksys tftp utility is designed for the tftp server in the linksys firmware. Linksys uses a modified tftp protocol, but only in the firmware tftp server -- the tftp server you're trying to reach is in CFE before the firmware loads. Use a standard tftp client.

It tends to work best if you set the tftp client into a retransmit mode with a very short retransmit delay, and actually start the tftp transfer before even powering on the router. You need to hit the tftp server very quickly after powerup or it will just start booting into the firmware.

I just tried the original firmware method after it failed with standard netkit-tftp and atftp clients with the commands from the wiki, as described in above post(s).

I started transfer before powering on, the link was up for sure, tftp recieved an ACK, but could not send anything.

Could it be that the CFE is damaged somehow? Would a serial console work or help at all in that case?

It takes quite a bit of effort to actually damage the router, all that's happened here is a misconfiguration; a tftp and it'll be good as new.

I think so too, as it died right after I cp -R'ed /etc/* over from the previous install via NFS. Boom.
Well, bad idea, I admit.

Too bad tftp just didn't work, so I have to go the soldering way.

Hmm, I just took the cable of my me45
http://www.hardwarebook.info/Siemens_C25/S25

Reading http://www.nslu2-linux.org/wiki/HowTo/AddASerialPort
it should be powered from the PC side, so i connected them as shown here:
http://wiki.openwrt.org/OpenWrtDocs/Har … /WRTSL54GS (there is a table for wrt54gl too)

cable 1 (GND) -> J2 10
cable 5 (TX) -> J2 6 (RX)
cable 6 (RX) -> J2 4 (TX)

But somehow i do not get the serial console to show up.

I use 'cu' on Linux, which works just fine at work with our cisco content switches and routers.

Do i maybe need the power pin too?

(Last edited by gimpel on 26 Jun 2007, 18:34)

Oh yeah, it's back!

I once more deinstalled ntkit-tftp and installed atftp again, after the 200gazillions try with

atftp --trace -p -l openwrt-wrt54g-2.6-squashfs.bin -r code.bin --option "mode octet" --tftp-timeout 1 192.168.1.1

it finally munched that image.

Still curious what i did wrong with the serial console. But anyways muchas gracias for your input, guys!

The discussion might have continued from here.