1 (edited by RoundSparrow 2009-03-02 01:32:31)

Topic: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

Wanted to start a new thread focused on these models.  These routers are all virtually identical based on the Atheros AP81 router platform with Atheros AR9102 WiFi chip (2x2 MIMO).  They are rather inexpensive here in the USA, they have been on sale several times for $25.  They have 32MB of RAM, 4MB of FLASH, and AR9132 (MIPS) processor running at 400Mhz.  They use u-boot bootloader and have a recovery mode that uses http. Good details over on the x-wrt.org site  Stock firmware hacking: http://www.bitsum.com/forum/index.php?&topic=45.0;wap2

OpenWrt trunk will build firmware for these routers, flashable via the web interface.  Thread on the local forum on how to compile and build OpenWrt for these routers

1) Trendnet TEW-632BRP version A1.1R, AP81-AR9130-RT-070614-00
2) Trendnet TEW-632BRP version A1.0R, AP81-AR9130-RT-070614-00
3) Trendnet TEW-652BRP, AP81-AR9130-RT-080609-05
4) DLink DIR-615 revision C1, AP81-AR9130-RT-080609-05.  IMPORTANT: Earlier revisions of this router are not Atheros based, a major change was made.
5) Cameo Communications WLN2206, FCC ID is same as Trendnet TEW-632BRP according to SmallNetBuilder website

On the DD-WRT forum people have had good results putting the D-Link DIR-615 C1 factory firmware onto the Trendnet TEW-652BRP. dd-wrt forum thread.

Previous OpenWrt thread: Recent changes means support for TRENDnet TEW-632BRP?

FCC internals information on router: https://fjallfoss.fcc.gov/oetcf/eas/rep … IR615B2%27

:______________________________:

Warning about flashing the router using the recovery mode:  There are some issues with how the switch behaves in recovery mode. I suggest you only connect it to the computer you are flashing from.

While in recovery mode, the switch tends to bring down my 8-port managed Dell gigabit switch! Tends to take about 45 seconds and my network dies.   The recovery mode isn't a full OS and probably does a minimal job initializing the switch hardware. I also think it sets the MAC on the network port to something like all zeros.  Someone on the DD-WRT lost LAN connection mid-flash and bricked a router.  I suspect this issue.

I've had no such issues flashing from within OpenWrt, this is only when using the recovery website boot of the router.

:| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :|
STATUS, KNOWN ISSUES, ToDo with current OpenWrt

This is the first router to work with ath9k and AHB bus.  The ath9k driver is entirely free but not very mature.  Atheros and Trendnet have NOT released the source code for the madwifi driver that the original router firmware uses - so everything is having to be done from scratch in ath9k.

Open source is about contributing to the community; please do testing, please contact Atheros and ask them for madwifi driver source code for the AR9100 chips (ath_ahb driver), please consider donations of hardware or money to OpenWrt developers, hostapd developers, ath9k developers.  I am making a list of issues so we can see where the effort needs to go.

To me, it is exciting to have a router that often sells for $25 that has modern WiFi support, entirely free software, respectable amount of RAM and CPU speed.  It will take a little time to get these working the way we want, please help out!  These routers are already working as an Access Point under OpenWrt!

WARNING1: Do not try to activate 5Ghz mode - your chips don't support it (it is a 2.4Ghz only router), and one user reported this bricked his router!

1. It is early in the game.  Consider this alpha or early beta testing until some people chime in with positive experience ;) use at your own risk.  The good news is that the flash process works well on these routers and you can easily put back on the factory firmware using the recovery mode.

2. When the WiFi interface goes up it resets the eth0 cabled interfaces and causes them to go down for a couple seconds.  It will drop my telnet session for example.  Not a fatal problem, but something to resolve.

3a. [s]The ath9k wireless driver is only working at 54Mbps on these routers.  Very new code in ath9k, so hopefully this will improve within a week or two.[/s]  UPDATE: You can change the config and Makefile for hostapd and we have been able to get 130Mbps rate with OpenWrt and ath9k, see the ar9102/ar9103 thread

3b.  [s]The ath9k driver currently has high CPU usage (hostapd softirq).  Expect wireless to max out at 750KBps (~9mbps WiFi througput) on heavy file copies.  Performance tuning for CPU usage ath9k AHB bus is still underway. [/s] As of build 14334, this seems resolved!  Recent checkins to improve hostapd performance and to disable the WiFi LED light have resolved this issue.  report your results please.

4. [s]Make sure your flash size comes out something like 3866624 bytes, don't go over that too much.  I bricked a Trendnet TEW-652BRP flashing it with a 4653056 byte build.  After flash, u-boot and recovery flash mode are gone.  I had enabled kernel symbols on 2.6.28 and some other stuff and didn't pay attention to the file size ;)[/s] SVN 13878 has an improved sanity check to prevent this. thanks.

5. [s]Once you put OpenWrt on the router, I haven't found a way to flash the router from within OpenWrt (please post if you know how). [/s]  You can flash new OpenWrt firmware from within running OpenWrt.  SCP or WGET the firmware into the router, then use: "mtd -r write openwrt-ar71xx-tew-652brp-squashfs.bin firmware".  Or you can use the recovery boot loader built into the router:  hold down the reset button for 40 seconds after you connect power.  You should be able to connect with a web browser via 192.168.0.1 IP address (the uploads on this recovery boot webpage expect the D-Link binary signature footer).

6.  [s]On OpenWrt I see an eth0 interface for the switch ports (works on any of the switch ports), are we missing eth1 driver for the WAN interface?[/s] UPDATE: I developed a patch and now the eth1 interface is working! Submitted 2009-01-23.

7. ifconfig on the wireless wlan0 interface shows MAC address other than the one for the system?

8. Wireless station mode (client mode) not performing well.  I've used the router in Access Point mode with "OK" results - but station mode drops to 1Mbps rate and erratic ping times.  A couple of us have submitted reports to the ath9k-devel mailing list.  These ath9k drivers on AHB bus routers has only been tested here by like 20 people in the world, chime in!  Thread on this forum about client mode: http://forum.openwrt.org/viewtopic.php?id=18377

9. NICE TO HAVE: WDS not yet implemented in ath9k driver.  Seeking patches, testing reports, research.  Participate!  The ath9k-devel mailing list in early February 2009 confirmed it is not yet implemented.

9a.  NICE TO HAVE:  hostapd 0.6.8 does not yet implement a way to specify N-only mode for these routers (reject G clients).  see: https://lists.ath9k.org/pipermail/ath9k-devel/2009-February/001223.html

10. [s]On Trendnet 652: The WLAN LED light does not work with current ath9k driver.  The original vendor firmware has param wireless_led_gpio=7 on madwifi driver.  There is also a /proc/ar531x/gpio/tricolor_led.[/s] - seems to be working when tested build 14334.  UPDATE:  It has since been disabled due to the high CPU usage it caused.  See #3b above.

11. On Trendnet 652: OpenWrt has no knowledge of the reset and WPS buttons on the router.  Ignores them.  In original vendor firmware, there is a /proc/ar531x/gpio/push_button.  NOTE from juhosg:  for buttons you need the kmod-input-core, kmod-input-polldev, kmod-input-gpio-buttons, kmod-button-hotplug packages;  then the buttons will generate a hotplug event, and you can use hotplug rules: https://dev.openwrt.org/ticket/3522

12. [s]Now on two Trednet 652 routers this has shown up:  the driver may segfault on "wifi up" for some routers.  We believe this has something to do with the specific MAC address of the router and a bug in ath9k driver.   We have two identical 652's with similar serial numbers, we unbox them and make everything identical - same flash bin - and one segfaults and one does not.  output of the crash is shown here: http://forum.openwrt.org/viewtopic.php?pid=78928#p78928[/s]  This has been corrected in newer builds.  It seems that the factory eprom of the ar9102 chips on some routers had nonsense (broadcast) MAC addresses.  The vendor firware used a MAC stored elsewhere that OpenWrt ignores.  There is a patch in trunk to deal with this better, works fine on two known routers that had this issue.

13. Buttons.  Has anyone tested if 'reset config' button works with OpenWrt Kamikaze?  I assume some scripts have to be button-aware in our OpenWrt build?  Any testing and howto appreciated.

14. UCI and LUCI currently has no real config knowledge of 802.11n specific features:  20/40 band, N-only mode.  New programming will have to be added to OpenWrt.

15. as of 2009-03-01, Lark and I both confirm an issue of the router rebooting after startup.  It seems if the ath9k driver is started too soon after router boot it is unstable.  Solution for now is to disable wireless with UCI and after boot manually enable and start it. A script with sleep would also probably work.

16. I find interacting with the WiFi disrupts the LAN ports at times.  The OpenWrt bridge seems to interact badly.  A "wifi down" followed by "wifi" will disrupt the LAN ports.  Illustration: http://openwrt.pastebin.com/f318e5431

HW1.  Last of all, make sure your router isn't overheating.  Trendnet made the case nice and easy to open, but didn't design the vents very well for convection cooling.  Info on dd-wrt thread: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=43228&start=150  Although I personally have had no issues I've noticed and I have 4 of these routers.... but I'm not using them real heavy at the moment.

Thank you to the OpenWrt team, especially Gabor Juhos.

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

They use the default profile for each platform. If I recall correctly those do not include ath9k or ath9k-new for ar71xx (or only orion includes ath9k-new)

If it is desired I could probably maintain ar71xx builds with ath9k in my people directory on the openwrt servers. As this would be binary compatible with the snapshots I wouldn't have to generate all the packages so they could be built more often and with less effort. (It currently takes ~36 hours to pump out all the snapshots on a quadcore machine.)

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

Bartman007 - I'm sure everyone who gets the AP81 routers firmware (the ones mentioned in this thread) will want the ath9k driver.  madwifi doesn't work at all.

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

Heads up that the Trendnet website shows TWO models for the TEW-632BRP, they have different firmware downloads.  But I ran strings on the binary and they both end with the same AP81 ID string.  Wierd.  http://www.trendnet.com/downloads/list_subcategory.asp?SUBTYPE_ID=1295

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

Fry's electronics in the USA has the Trendnet TEW-652BRP on sale for $25 (no rebates) in-store only.  Advertisement link

6 (edited by RoundSparrow 2009-01-12 02:32:05)

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

Ok, I've had some requests for a working OpenWRT binary for these routers.  The snapshots don't include the ath9k driver.  So I've decided to post binaries I compiled.

USE AT YOUR OWN RISK, consider this risky testing!  Files can be downloaded here: http://sites.google.com/site/stephengutknecht/

I recommend you build your own, I did it, you can too wink  Please read the first topic on this thread to see the list of known issues.  If you have never used OpenWRT before, i don't recommend you rush and reprogram your router.  This is not for novice users.

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

>_<  that means I have to wait.. I am novice user

8 (edited by RoundSparrow 2009-01-13 20:04:38)

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

I updated my builds to svn14023 and uploaded: http://sites.google.com/site/stephengutknecht/

This includes iw 0.9.7 update.  But "iw --version" returns nonsense.  "iw info" only shows 54Mbps maximum - where my client machine is clearly connecting to this router at 130 (running OpenWRT).  Anyone know why iw isn't seeing the higher rates?

Anyone have information to share regarding what might be needed to get eth1 (WAN) interface working?

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

Not sure why ifconfig is showing a mac of 88:02:51:09:52:24 for wlan0 when the true mac is completely different.

Anyone think this could be causing my problem when trying to connect to a Juniper SSG5 in sta mode? 

Works great in AP mode though, thanks for the upload RoundSparrow!!!

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

by the way RoundSparrow. question here.
is the WDS working in the most updated build?

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

codier wrote:

is the WDS working in the most updated build?

Nobody has tried it.  ath9k AP mode is new, so not sure if that is in there yet.  Their driver page says "Already part of mac80211", so maybe it isn't much to add to ath9k?

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

RoundSparrow wrote:
codier wrote:

is the WDS working in the most updated build?

Nobody has tried it.  ath9k AP mode is new, so not sure if that is in there yet.  Their driver page says "Already part of mac80211", so maybe it isn't much to add to ath9k?

I see..
sigh, I can't help anything here for testing.. sigh...

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

warning, don`t select the 5GhZ channels on the wlan configuration page.  I did this one of my tew-632 units, and bricked it.  was able to get the recovery mode page and reload the firmware, but now every time i enable Wireless it reboots the router into recovery mode.

Looks like i`ll have to RMA the unit sad

Also i know someone was asking how to flash the firmware once you have openwrt on the unit.  the following command will work
"mtd -r write openwrt.bin firmware"

Firmware is the partition that needs to be updated.

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

unknwon wrote:

warning, don`t select the 5GhZ channels on the wlan configuration page.  I did this one of my tew-632 units, and bricked it.  was able to get the recovery mode page and reload the firmware, but now every time i enable Wireless it reboots the router into recovery mode.

I updated the first post with your new information, thank you.  Try putting the original factory firmware back on?  How exactly did you enable 5Ghz, what config file did you change?

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

used the web interface in openwrt, and than selected on the drop down menu.  i know not a smart move.  i`ve flashed it back with the default factory firmware, but it too will just reboot back to the recovery mode as the factory firmware has the wireless enabled by default.

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

ok, it seems i was able to unbrick the unit and i`m now able to connect to my other router with the unit using WPA-PSK smile  still have gotten it completely working with in client mode.  here`s hoping..

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

is it possible to flash from openwrt f/w back to 632BRP/615 C1 f/w?
if can, how to do it?

18 (edited by RoundSparrow 2009-01-21 04:29:12)

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

codier wrote:

is it possible to flash from openwrt f/w back to 632BRP/615 C1 f/w?
if can, how to do it?

easily done, use the recovery boot.  Disconnect power, hold reset, connect power.  Hold reset for at least 30 seconds.  Connect  web browser to 192.168.0.1 (you will need to set your computer to same IP subnet).

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

what is recovery boot ?
I am assume Kamikaze has a page that can load bin file so I can use 615 c1 bin write into it then hold reset for 30 seconds then
the new f/w will apply?

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

Recovery boot is what RoundSparrow said.

Press the reset button at the back for 30 seconds while you power on your router.  Once you do that, set your IP of your computer that's attached to the router to something in the 192.168.0.x subnet and point your browser to 192.168.0.1.  You'll be given a page that will only allow you to upload firmware.  Upload your bin file and let the router do it's thing and you are set.

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

falkyre wrote:

Recovery boot is what RoundSparrow said.

Press the reset button at the back for 30 seconds while you power on your router.  Once you do that, set your IP of your computer that's attached to the router to something in the 192.168.0.x subnet and point your browser to 192.168.0.1.  You'll be given a page that will only allow you to upload firmware.  Upload your bin file and let the router do it's thing and you are set.

I see.
just so curious, cause normal router like d-link, don't even need to press the reset button for 30 second. 192.168.0.1(router ip) is always available there to let user upload firmware.

so kamikaze doesn't? it will always need recovery boot to be able to bring up the router IP?

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

The recovery reboot is for emergency's I guess is the best way of putting it.  If your other firmware, openwrt or whatever, doesn't allow you in AND you don't over right the recovery portion, then pressing the reset button for 30 seconds gets you the emergency screen.

The IP that the recovery boot uses is 192.168.0.1 and will always be there (unless you really brick the router bad).

Right now, RoundSparrow has not found a way to reflash from kamikaze on these routers.  I have no doubt that it will come.

23 (edited by RoundSparrow 2009-01-21 21:21:46)

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

codier wrote:

I see. just so curious, cause normal router like d-link, don't even need to press the reset button for 30 second. 192.168.0.1 (router ip) is always available there to let user upload firmware.
so kamikaze doesn't? it will always need recovery boot to be able to bring up the router IP?

You seem to be mixing up a few issues.  These are complex issues, we gave you the simple answer the first time wink

The 192.168.0.1 recovery IP Address is hard-coded into the router base firmware and not something you can change.  It works even if you flash a broken build onto the system (assuming you don't overwrite the recovery flash, make sure you never flash > 3.8MB on this router). It isn't normal router function when booted this way, it is only a way to flash the routers.  Many other routers, like Linksys WRT54G, normally use tftp pull for recovery mode.   I don't think these particular routers in this thread support tftp recovery.

Yes, you can flash a new firmware from the running OpenWRT.  In this thread directions were posted on how to flash a newer version of OpenWRT from OpenWRT using mtd command.  However, flashing back to factory firmware (from running OpenWRT) is something I don't believe anyone has tried.  Flashing can be risky business, I already bricked one router by not paying close attention (flashed 4.8MB onto the router and overwrote u-boot and recovery flash; can probably only be recovered from JTAG which on Atheros is rare experience).  So you better know what the heck you are doing or be willing to take some risks (I donate one $25 TrendNet to the router gods).

I encourage you to realize you are on bleeding edge with these routers.  OpenWRT seems to draw people with older hardware, we are the pioneers here on 802.11n with OpenWRT.  Only 10 or so people in the world are running OpenWRT on them and experimenting.  You are participating in an open source project, a lot of learning and trial and error can be required.  Weeks and months down the road, it will hopefully be simpler and better documented.  For now, we need people participating, testing, and experimenting.

Be glad these specific routers have a nice web browser recovery mode, it is a lot easier than getting the tftp process on most routers.

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

I uploaded new builds to: http://sites.google.com/site/stephengutknecht/  - I also noted on first post that the WAN LED isn't working with ath9k.  This build is svn14142, I updated hostapd to 0.6.7 but not iw command.  I had no problems flashing from within openwrt to upgrade!  used command: "mtd -r write openwrt-ar71xx-tew-652brp-squashfs.bin firmware"

25 (edited by RoundSparrow 2009-01-22 15:32:52)

Re: Trendnet TEW-632BRP, TEW-652BRP, DLink DIR-615 C1, CC WLN2206 working!

ok, so I dig deeper into why no WAN port.  I don't really understand the original drivers or hardware.  Is it two Ethernet devices with different drivers or is it a single port with a switch trick?

currently on OpenWRT build 14142, we are getting:

ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth0: connected to 0 PHYs

I notice that irq 5 seems notably unused, from svn 14142:

root@OpenWrt:/# cat /proc/interrupts
           CPU0       
  2:        149            MIPS  ath9k
  4:         31            MIPS  eth0
  6:          0            MIPS  cascade [AR71XX MISC]
  7:       2234            MIPS  timer
 10:          0     AR71XX MISC  cascade [AR71XX GPIO]
 11:        110     AR71XX MISC  serial

Ok, I booted up the D-Link vendor firmware on the Trendnet 652:

/ # cat /proc/interrupts
           CPU0       
  2:       1160            MIPS  wifi0
  4:          0            MIPS  eth0
  5:          0            MIPS  eth1
  6:          0            MIPS  cascade
  7:      40593            MIPS  timer
 18:          0     AR7100 MISC  cascade
 19:        538     AR7100 MISC  serial
 44:          1     AR7100 GPIO  SW JUMPSTART

I've seen on the Routerboard threads (http://forum.openwrt.org/viewtopic.php?id=14765) a dmesg like this:

ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xba000000, irq 5
eth1: Atheros AG71xx at 0xb9000000, irq 4

Help ;)