Sunday, October 07, 2012

Bricked TRENDnet TEW-651BR


Despite carefully following the directions for performing a firmware update on my TRENDnet TEW-651BR, I recently found myself with a non-responsive (aka "bricked") router.  It wasn't handing out IP addresses and when I manually configured my computer to use an IP in the TEW-651BR's default 192.168.10.* range I was still unable to get any response.

Feeling defeated, I submitted a support ticket to TRENDnet and then setup an old computer to temporarily serve as a wireless router while I waited for a response from support.  TRENDnet tech support replied in about a day, but unfortunately they were unable to offer any assistance beyond a lengthy (scripted) response which could be summarized as, "reset the router and try the firmware update again". 

Searching the interwebs failed to turn up a solution, so I figured I'd wing it.  Although most of my experience is with desktop application development, I do have some development experience on embedded systems as well.  And I know from my brief time in that realm that some devices (including routers from other manufacturers) can be recovered using a TFTP upload of the firmware even if they're otherwise non-functioning.

So with nothing to lose, I decided to give it a whirl.  I setup my computer to tftp the firmware to the router's default IP (192.168.10.1):

tftp -i 192.168.10.1 firmware.bin

I plugged the router in and as soon as I saw the lights start, I hit enter.  Instead of emitting an error, tftp showed a progress bar and a few moments later the router rebooted itself.  Keeping my fingers crossed, I reconfigured my computer to use DHCP and attempted to connect to the router's management web page.  After what felt like an eternity, the browser refreshed with the familiar TRENDnet logon screen and I was back in business.

It has been just over two months now and I'm happy to report my TRENDnet TEW-651BR is still working nicely.

Update (June 2013)

My original post included instructions based on TFTP under Linux.  If you don't have access to a Linux machine, TFTP is available on Windows and MacOS too.  Unfortunately the command syntax is slightly different on each platform.  I'll try to outline the steps below for using TFTP on each of these platforms.

Windows

I believe a TFTP client was installed by default under WinXP if TCP/IP was installed.  Under Windows Vista and Win7, the TFTP client is not installed by default and some extra steps are required to install it.  I suspect a similar process must be followed in Win8.

First navigate to the Control Panel-> Programs->Turn Windows Features on or off



Scroll through the list and find the 'TFTP client'.  It'll be unchecked as in the screen shot below.  Check the box next to TFTP client and click "OK".  It may take a couple minutes while windows installs this component.


Once installed, you should be able to run TFTP from a command prompt.  The Windows version of TFTP requires slightly different syntax (highlighted in red below).

tftp -i 192.168.10.1 PUT firmware.bin

There are also many, free graphical TFTP clients available for Windows.  A quick search should turn up one or more of these tools.  Just make sure you transfer the firmware in binary mode!

MacOS

The TFTP client provided with MacOS only runs in an interactive mode.  This makes it harder to hit the small window in which the TFTP server is listening.  Consider using an alternative TFTP client like MacPorts tftp-hpa port instead of the built-in TFTP client.

To upload the firmware you'll need to first launch TFTP from the directory which contains firmware.bin

tftp -i 192.168.10.1

Then from the tftp> prompt you'll need to issue the following commands:

tftp> verbose
tftp> put firmware.bin
tftp> quit

The 'verbose' command simply tells TFTP to provide more information about what it's doing.  This can be issued as soon as TFTP is started.  The 'put' command should be issued at the point when the lights start on the router.

Like Windows, there are third party TFTP clients available for the Mac. Users in other forums have experienced some difficulty using the built-in TFTP client so you might consider using a third party client instead.

Other Tips

The window of time that the router's TFTP server is listening is very short, maybe as little as 1-2 seconds from the time the router is powered on.  If you miss this window, TFTP will just sit trying to connect and eventually time out.

When TFTP connects and the file is uploaded you should see status something like:

Transfer successful: 8388608 bytes in 2 second(s), 4194304 bytes/s

If you don't see any status from TFTP after about 30 seconds and the router doesn't reboot itself within a minute or two, then you've likely missed the window and will  need to try again.

For additional info on how to recover a bricked router, I'd recommend looking at DD-WRT's excellent Recover From a Bad Flash wiki page.  There are tips for multiple makes & models of routers and much of what is written there can be used with stock firmware just as readily as DD-WRT.  (Note:  At the time of writing, DD-WRT is not compatible with the TEW-651BR, so don't even try!)

16 comments:

  1. hi..im having a problem with my router..same model as this..after updating the firmwware..i got disconnected..then i could no longer connect to my wifi..wlan have no lights on the router and couldnt access 192.168.10.1 on my browser.. can you pls help me to fix it..would really appreciate it..

    Thanks

    ReplyDelete
  2. tftp -i 192.168.10.1 tew651brv2_fw202b01.bin

    >> is this a dos command? where will i input this?

    ReplyDelete
    Replies
    1. The original post was written using TFTP on Linux. I've updated the post with instructions on how to use TFTP on Windows and MacOS. Hopefully this will help.

      Delete
  3. i will do this now. will update you asap.. hope it works.. thanks for the guide...

    ReplyDelete
  4. i keyed in

    tfpt -i 192.168.10.1 PUT firmware.bin

    and it says timeout occured.connect request failed.

    ReplyDelete
  5. my computer is directly connected to the router on port #1.

    i opened dos command and put it tfpt -i 192.168.10.1 PUT firmware.bin

    the firmware that i downloaded is located at c:\firmware.bin.

    is this procedure correct? i mean im flashing my routers firmware right so i can unbrick it..

    ReplyDelete
    Replies
    1. I've added some additional tips describing what you should see when TFTP successfully transmits the firmware. You are running the correct sequence of commands as far as I can tell. If this isn't working then I'm not sure what else to suggest without being able to take a look at the router.

      Unfortunately this procedure is complex and it's entirely possible it won't work for your router.

      I published these instructions because I was frustrated with the total lack of support from TRENDnet. I'm sure would much rather we simply buy a new router!

      Delete
  6. Ty. This works
    Pls change tfpt to tftp and firmware.bin to C:\firmware.bin

    ReplyDelete
    Replies
    1. Thanks for pointing out the typo in 'tftp'... Looks like I fat-fingered it once and then copy-pasted it several times over. I think I've fixed them all up now.

      The change to C:\firmware.bin will only work if you have the firmware in the root folder of the C drive. By default, I believe the Microsoft TFTP client will look for the target file in the current working directory...

      Delete
  7. hello
    where can I download firmware v. 2.01b19 or v. 2.01b21 for this router ?

    ReplyDelete
    Replies
    1. I don't know, sorry.

      My post only covers the process of recovering from a bad flash, not rolling back to earlier revisions.

      The latest versions of the firmware can be found on
      TRENDnet's download site, http://downloads.trendnet.com/

      You might be able to get older firmware by contacting TRENDnet support.

      Delete
  8. Really need some help from anyone. I think i bricked my TRENDnet TEW-811DRU. Trying to use a TFTP client to upload the original firmware through IP 192.168.10.1 do I need to add a port as well? or leave the port section empty. Any help would be great as my router seems to be in a bootloop and is not responding.

    ReplyDelete
    Replies
    1. I'm not familiar with the TrendNET TEW-811DRU, so I don't know for sure if this model can be recovered via tftp.

      You generally don't need to specify a port when using tftp.

      It can be tricky to perform the recovery because the tftp server only listens for a very short period of time. (When I used this to recover my TEW-651BR, it took several attempts before I was able to connect.)

      It looks like this router supports DD-WRT, so you might be able to get some help on a DD-WRT forum.

      Delete
  9. Wanted to thank you for instructions you shared.

    Updated from working DD-WRT firmware on a Trendnet TEW812DRU to a newer version and the router became totally unresponsive after the reboot, failing all attempts to ping known used addresses and local network searching software.

    I enabled the Windows tftp feature (disabled by default in Windows 8.1) and proceeded to use your command line instructions:

    "tftp -i 192.168.10.1 put firmware.bin"

    The first time I tried the command a timeout occurred, but only after about 30 seconds, so, I retried the command, but this time power cycled the router within the first 10 seconds, and voila, the transfer was successful on only my second attempt. My addition to your instructions would be to run the command before you power cycle the router, at least for Windows, as the tftp command seems to have a decent timeout period in which you can perform the power cycle rather than trying to issue the command during the router's boot up cycle, which as you already mentioned can be quite short.

    Thank you for sharing your experience. Saved me from binning an otherwise salvageable router.

    ReplyDelete