bookweevil

7 June 2009

Recovering a misconfigured or mis-flashed Linksys WRT54G from Windows XP

Filed under: router configuration — bookweevil @ 4:23 pm

Here’s the steps I took to restore the Linksys firmware to my (probably just misconfigured) WRT54G router after a failed attempt to upload third-party firmware – basically, the steps are summarised from the dd-wrt recovery page.

You’ll need a known good firmware image in .bin format (e.g. WRT54GV4.0_4.21.1_US_code.bin from the Linksys site), and your PC should be connected to your router via one of the ethernet ports.

  1. First see if a hard reset fixes the problem (power off, wait a bit, power on, hold down the reset button for 30 secs).
  2. Assuming it doesn’t: configure your PC to assign itself a static IP address for the relevant network interface – e.g. 192.168.1.70.
  3. In a command prompt window, run the following command:
    ping -t -w 2 192.168.1.1

    This continually pings the target address, with a timeout of 2 milliseconds.

  4. In another command prompt window, go to the directory where your firmware image is located. Type the following, but do not hit enter:
    tftp -i 192.168.1.1 PUT <name of firmware image file>
  5. While keeping an eye on window 1 (with the ping command running), power off the router, then power it back on. While the router is off, ping obviously will have no route to the destination. But within a couple of seconds of turning it back on, you should see a response – e.g.:
    Reply from 192.168.1.1: bytes=32 time=9ms TTL=255

    As soon as you see a response – perform the actions in step 6.

  6. In the window with the tftp command ready to be run – hit the Enter key. tftp may take a while (a minute or two, at 10 Mbps) to upload an image – but hopefully it will complete, and report that the transfer was successful:
    Transfer successful: 3122208 bytes in 55 seconds, 56767 bytes/s

If it doesn’t work, there’s a variation you can try: configure your network interface to use a lower speed. In “Network connections” (from the Control Panel), right-click on the relevant connection and select “properties”. Click the “Configure …” button near the top right. Select the “Advanced” tab. The exact setting you’ll have to change then depends on the exact hardware and driver you’re using, but for mine, theproperty to change is “Speed & Duplex”.

Advanced settings for a network interface

Advanced settings for a network interface

It should be set to “Auto” or something similar. Set it to “10 Mbps half duplex” and try tftping again. (Remember to set it back once everything’s working again!)

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: