2010-02-28

Trendnet TEW-652BRP and DD-WRT Success!

I recently visited my dad while on a business trip when I coincidentally discovered that DD-WRT is now available for his TEW-652. The TEW-652BRP has been a great router for my father, but it isn't what I'd call "feature rich". An upgrade to DD-WRT is a big bonus.

I live 2500 miles away from my non-technical father, and so a well-specified router that helps me manage his network remotely is important to both of us.

This article will explain what I did to finally get DD-WRT working on my TEW-652BRP v1.0R.

About the TEW-652brp

It's a nice looking little black 802.11n, 2.5 GHz router. It was amazingly inexpensive (usually way under $30), and the TEW-652brp is available through Amazon. Mine is a version 1.0R, you'll likely want the same version. Out of the box, it works quite well - it has been stable, and I was fairly happy with the stock firmware. But it was short on features - I like having VPN, SSH, and flexible DHCP services on the home networks I support. The stock firmware on the TEW-652BRP wasn't so good at that stuff.

An upgrade to DD-WRT gives me all these advanced features and much more. According to the label on the back of my TEW-652BRP, I have hardware version V1.0R.

Plan A: An easy upgrade to DD-WRT.

The on-line literature suggested that I might be able to simply install the DD-WRT firmware using the Trendnet's built-in firmware utility.

I downloaded the "factory to DD-WRT" .bin file for the TEW-652BRP, found here. Then I logged into the router via http://192.168.10.1/ and navigated to the router's firmware update page. From there, I tried to upgrade the device using the "factory to DD-WRT" .bin file.

The firmware upgrade failed - the Trendnet firmware reported an error. Happily, no destructive action was taken by the firmware updater - the router was not bricked.

I initially believed that the upgrade utility didn't like the signature of the firmware file found on the DD-WRT website.

Plan B - Recovery Mode firmware utility.

So went to "Plan B": I'd upgrade the router's firmware using the recovery mode.

I set a static address of 192.168.0.2 on my PC. Then I powered up the router while holding down the reset button. I held the reset button down until the "status" LED started to blink.

Then I plugged into Ethernet and went to http://192.168.0.1/ with Firefox. Ta-da! A firmware update page came up.


Trendnet Firmware Recovery Page

I then attempted to upload the DD-WRT .bin file. Crap, same thing - invalid firmware file. Even the recovery mode wasn't willing to install a renegade firmware file.

Plan C - The solution

After two failures taking several hours, I decided to get a little more serious. I went to the Trendnet web site and downloaded their latest firmware, seen here. Then I got out the trusty hex editor and looked at the end of the file. The signature at the end was

AP81-AR9130-RT-080609-05
... aka ...
41 50 38 31 2D 41 52 39 31 33 30 2D 52 54 2D 30 38 30 36 30 39 2D 30 35

I then looked at the DD-WRT firmware's signature at the end of its .bin file, and, sadly, it was identical. So it didn't seem like my installation problem was a simple "file signature" issue, but maybe a checksum or some other algorithmic issue within the Trendnet firmware.

So I decided to try to run around the apparent checksum issue by avoiding the Trendnet software altogether. Which worked.

The story I read on the web was that the D-Link 615 rev. C is the same hardware device as the '652, but with different (and better) firmware. I decided to try to install the D-Link firmware onto the router, and then install the DD-WRT firmware onto the "D-Linkified" Trendnet.

The short story is that this strategy worked like a charm. But it did require some hex editing. Here are the details.

(1) Download the D-Link 615 rev C firmware. I used an old version, Version 3.00.

(2) Use a hex editor to replace the D-Link signature string at the very end of the .bin file.

AP81-AR9130-RT-070614-02
(aka: 41 50 38 31 2D 41 52 39 31 33 30 2D 52 54 2D 30 37 30 36 31 34 2D 30 32)

... became ...

AP81-AR9130-RT-080609-05
(aka: 41 50 38 31 2D 41 52 39 31 33 30 2D 52 54 2D 30 38 30 36 30 39 2D 30 35)

(3) Using Trendnet's stock firmware, install the newly modified "DLink" .bin file.

(4) Wait patiently for the upgrade to complete

(5) Tada! The D-Link firmware login page appears! Yay!

From there, I performed a similar procedure with the DLink firmware update page:

(1) Download the DD-WRT firmware from the FTP site. I used the "factory to dd-wrt" firmware for the Trendnet, found here.

(2) Use a hex editor to replace the Trendnet signature string at the end of the .bin file with a signature that the D-Link firmware accepts. I changed the signature as follows:

AP81-AR9130-RT-080609-05
(aka: 41 50 38 31 2D 41 52 39 31 33 30 2D 52 54 2D 30 38 30 36 30 39 2D 30 35)

... became ...

AP81-AR9130-RT-070614-02
(aka: 41 50 38 31 2D 41 52 39 31 33 30 2D 52 54 2D 30 37 30 36 31 34 2D 30 32)


(3) Log into the D-Link router (username admin, password admin).

(4) Using the router's renegade D-Link firmware, I upgrade the firmware with the modified DD-WRT .bin file.

(5) Wait patiently

(6) Ta-da! DD-WRT firmware page appears!

From this point on, I was able to use DD-WRT firmware. I've been using this firmware now for well over a year, and it has been totally reliable.

15 comments:

Anonymous said...

I have the same router, I played with OpenWRT briefly awhile back and it worked okay but didn't have N. I ended up switching to the Dlink firmware, but now that DDWRT has support I'm tempted to switch.

Question though is, have they added actual N-speed support?

Thanks.

Anonymous said...

Followup to myself in case anyone stumbles on this and wants to know - yes, dd-wrt seems to support n-speed on this router. And yes, the above hex editing lets you install firmware on it, though I also had to add a few leading 0's that I noticed in the official firmware that wasn't in dd-wrt.

Anonymous said...

I was having a pain trying to get the TEW-652BRP flashed over to DD-WRT ... then I flashed the DLink 615-C1 over to it, but still couldn't get DD-WRT on ---- Up until I found this!! Thanks!

Anonymous said...

The latest factory to dd-wrt firmware dated 2010-04-23 available through the DD-WRT router database flashed successfully for me. I didn't need to flash to the D-Link firmare first.

Anonymous said...

I was able to flash DD-WRT v24-sp2 (SVN revision 14311) to my TrendNet TEW-652BRP REV1.1 without loading the D-Link firmware first. I just did a 30/30/30 hard restart followed by a power-cycle, flashed the firmware, and did another 30/30/30 hard restart and another power-cycle.

Anonymous said...

What version of the TEW-652BRP do you have 1.2 or 2.1? I think the v2.1R routers have a Realtek processor that is not supported by DD-WRT.

Anonymous said...

So, I tried and tried what you suggested with my 652brp router... but, this dosen't work with the v2.xxx routers. The chipset is different and isn't supported by DD-wrt. Time for a new router.... :(

LanceJ said...

Yes, to recap, you do need the right version of the '652. Evidently some newer 2.x models are not compatible with DD-WRT.

Anonymous said...

Same router and dd-wrt v24 installed seamlessly from TrendNET firmware page. Some progress has been made (TEW-652BRP is fully supported). YAY!

Anonymous said...

Fantastic. Thanks for your instructions, worked perfectly.

Keith said...

Hi, I am about to do this operation myself. Looking at the comment two up from this, where it says...

-> "Some progress has been made (TEW-652BRP is fully supported)"

I have TEW-652BRP HW/V2.1R and the 2010-08-09 build of DD-WRT (tew652brp-factory-to-ddwrt-firmware.bin). In the hex editor the signature is already AP81-AR9130-RT-080609-05.

If anyone knows then, please, am I supported for the router version with this DD-WRT firmware?

A said...

any comment regardinghte ver 2.00b36? I just bought the unit and wonder if I should try upgrading the firmware or reinstalling an alternate?

dng_dng said...

Hello, I have a trendnet TEW-652BRP (RHB)H/W: V3.2R, I just wanted to upgrade it to the latest firmware, I`ve respected the procedure, but now it doesn`t work anymore. When I access the ip 192.168.10.1, the web recovery interface tels me to brows for the firmware, but it says to any firmware(even the old one)"invalid model firmware" or "invalid firmware". What should I do?

Anonymous said...

It only works with HW 1.XX not for v2 or v3 has they are not using Atheros chipsets

Anonymous said...

Thanks this worked exactly as stated. I have an old Trendnet hardware version 1.1R. Using the DLink binary first, after that I was able to get the DD-WRT Trendnet hardware version, once the binary signature was hacked. Thank you!


Share