OpenWrt Forum Archive

Topic: Linksys WRT54GL flash via tftp

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

Hi all,
I have a problem with my Linksys WRT54GL router; I've tried to flash the firmware via web interface, in order to install kamikaze 8.09.02. The process didn't work properly and I want to recover my router installing a working firmware via tftp on ubuntu 9.04 (the web interface is no longer accessible). I followed ALL instruction on this web site, and a plethora of similar posts over the web. The result is always the same: the tftp session ends always with "Transfer timed out."
These are the followed steps:

tftp 192.168.1.1
binary
rexmt 1
timeout 60
trace
put firmware.bin (or .trx)

then, I plug the power cord of the router to boot it.

I use DHCP on my PC: I am on the same LAN of the router (typically the IP address of my PC is  "inet addr:192.168.1.149  Bcast:192.168.1.255  Mask:255.255.254.0"). However, I've tried with static IP too, with no improvements. I use also a switch between my PC and the router, to maintain the link active.

I've tried different firmwares (directly downloaded from the Linksys web site, or from OpenWRT web site...), with the same effect. I've tried to reset it with the 30/30/30 reset procedure, but it is still the same.

I really don't know what I have to do more... I'm at the wit's end!!!

Any suggestion, please?
Thanks in advance,
Marco

Does it even start the transfer and aborts times out during the process or does it keep silent all the time? You can try to ping the router when you switch it on? It should return pings for a couple of seconds. Have you set enabled the boot_wait nvram variable before trying to flash the new image?

No, it remains silent. I've tried to ping the router soon after I plugged the power cord and it works. Yes I set boot_wait on accessing the router through ssh and typing nvram boot_wait on. I've tried also to monitor the communication between PC and router with tcpdump, but I saw no data exchange between them.

Perhaps you can try using a TFTP client from another network package. Ubuntu should come with quite a selection. I think I have read on the forums here that some TFTP clients did'nt work properly.

Up to now I used tftp, atftp and linksys-tftp-1.2.1, a tftp version for linksys... but as you can imagine I didn't solve the problem :'(

The first and most important: have you sent the boot_wait variable in nvram? If the boot_wait is not set, the bootloader will not wait for the TFTP.

To verify if boot_wait is set:
1. Set your network interface to static address 192.168.1.100, netmask 255.255.255.0.
2. Connect the network cable to one of the LAN port 2 on the router.
3. Execute the ping 192.168.1.1 command in the terminal
4. Power off the router (remove the power plug from wall) and power it on.
5. Wait...

At some point the router should reply for approximately 4 ping messages, with TTL=100. If you can't see the responses for a minute, your router does not have the boot_wait setup, which makes the process of TFTP the firmware much more difficult.

-- edit

I can see that you mention that boot_wait is set correctly. What I do (but I do it from Windows) is to prepare the complete tftp command in one terminal window, and launch the ping in other terminal. Once the pings get replied, I press ENTER in the tftp terminal - and it gets transferred then.

I believe the tftp client you're using does allow to specify all parameters in command line too.

-- edit again

tftp -m binary -c PUT image-wrt54g.bin should do the trick...

(Last edited by grogi on 6 May 2010, 12:31)

Thanks grogi, now it works!!! I followed all instructions, maybe point 1 and 2 of your list were mandatory... the rest was ok, boot_wait included! Thank you again!

thanks grogi it works.. i reflash may linksys wrt54gl via tftp, i forgot the password of OPENWRT,
i just change some parameters for tftp

i use WinAgent TFTP Client (http://www.tftp-server.com/tftp-download.html)
and issue this command, while ping reply is at TTL=100 when power cycle

tftp -i 192.168.1.1 PUT code.bin

and it works!

Again Thank you and more power!

BTW.  code.bin is just a rename .bin file from Linksys

I have same problem..but in my case, boot-wait is not set.  i am afraid how can now i flash firmware?

This is exactly the problem I have.

boot-wait is not set. I cannot set it because the 'configuration utility' is all messed up.

More Info about this here.


It seems that the bootloader has a short time where you can use TFTP, immediately after you do a 30/30/30 Reset. However I was unable to get this working.

(Last edited by k3ll4gr0up on 18 Jul 2013, 00:38)

The discussion might have continued from here.