Will TP-Link TL-WR941ND be supported?

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3, ... 24, 25, 26  Next
Author Message
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Sat Nov 29, 2008 18:06    Post subject: Reply with quote
Ok, I have some more progress here.

With RoundSparrow's information (http://www.dd-wrt.com/phpBB2/viewtopic.php?t=43228), I download SDK from Trendnet. Although the SDK looks buggy and in a mess, I made some tweaks, built kernel modules to test the kernel tree and succeeded :)

Quote:

# insmod scsi_mod.ko
insmod: cannot insert 'scsi_mod.ko': invalid module format
# insmod scsi_mod.ko
insmod: cannot insert 'scsi_mod.ko': unknown symbol in module
# insmod scsi_mod.ko
# dmesg|tail
br0: port 1(ath0) entering learning state
br0: topology change detected, propagating
br0: port 2(eth0) entering forwarding state
br0: topology change detected, propagating
br0: port 1(ath0) entering forwarding state
scsi_mod: version magic '2.6.15- MIPS32_R2 32BIT gcc-3.4' should be '2.6.15--LSDK-6.1.1.40 MIPS32_R2 32BIT gcc-3.4'
scsi_mod: version magic '2.6.15- MIPS32_R2 32BIT gcc-3.4' should be '2.6.15--LSDK-6.1.1.40 MIPS32_R2 32BIT gcc-3.4'
scsi_mod: version magic '2.6.15- MIPS32_R2 32BIT gcc-3.4' should be '2.6.15--LSDK-6.1.1.40 MIPS32_R2 32BIT gcc-3.4'
scsi_mod: Unknown symbol __might_sleep
SCSI subsystem initialized


So usb
Quote:

# insmod ehci_hcd.ko
# insmod ohci_hcd.ko
# dmesg | more
<snip>
0 Dec 2004 USB 2.0 'Enhanced' Host Controller (EHCI) Driver (AR7100_EHCI)
In ar7100_ehci_drv_probe
probing ehci...
hcd->regs is 0xbb000000
/home/TEW-652BRP/TEW-652BRP_GPL/platform/AR9100/kernels/mips-linux-2.6.15/drivers/usb/host/ehci-ar7100.c: starting AR7100 EHCI USB Controller...done. reset 0x0 usb config 0x2
ehci->caps is 0xbb000000
ehci->caps->hc_base is 0x42fa05
ar7100-ehci ar7100-ehci.0: AR7100 EHCI
ar7100-ehci ar7100-ehci.0: new USB bus registered, assigned bus number 1
ar7100-ehci ar7100-ehci.0: irq 3, io mem 0x1b000000
hcc_params addr 0xbb000008 val 0x10020001 hcs_params addr 0xbb000004 val 0x22
ar7100-ehci ar7100-ehci.0: USB 0.0 started, EHCI 0.42, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
...probing done
2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (ar7100_ohci)block sizes: ed 64 td 64
In ohci_hcd_ar7100_drv_probeprobing...
/home/TEW-652BRP/TEW-652BRP_GPL/platform/AR9100/kernels/mips-linux-2.6.15/drivers/usb/host/ohci-ar7100.c: starting AR7100 OHCI USB Controller...<6>ar7100-ohci ar7100-ohci.0: AR7100 OHCI
ar7100-ohci ar7100-ohci.0: new USB bus registered, assigned bus number 2
ar7100-ohci ar7100-ohci.0: irq 22, io mem 0x1c000000
ar7100-ohci ar7100-ohci.0: init err (00000000 0038)
/home/TEW-652BRP/TEW-652BRP_GPL/platform/AR9100/kernels/mips-linux-2.6.15/drivers/usb/host/ohci-ar7100.c: can't start ar7100_usb
ar7100-ohci ar7100-ohci.0: startup error -79
ar7100-ohci ar7100-ohci.0: USB bus 2 deregistered
/home/TEW-652BRP/TEW-652BRP_GPL/platform/AR9100/kernels/mips-linux-2.6.15/drivers/usb/host/ohci-ar7100.c: stopping ar7100 OHCI USB Controller
ar7100-ohci: probe of ar7100-ohci.0 failed with error -79


I am also looking at the USB port's power supply circuit. It is 12v to 5v DC-DC converter, and yes it's not that complex as I thought before.

AR913x support USB On-The-Go, but WR941N seems to use it as pure host, so power supply is simplified.

I think I can figure out the USB PSU soon, then USB port can be used --- that is one of reasons that I bought WR941N.
Sponsor
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Tue Dec 02, 2008 19:04    Post subject: Reply with quote
I contacted TP-Link (China) support to ask for source code. They refused at first but after I wrote another email, they gave me a link
http://www.tplink.com/support/gpl.asp

I downloaded source code for WR941ND (it is hot fresh, timestamp is 2008-11-26). This link is not public yet, with only one google result
http://forums.whirlpool.net.au/forum-replies-archive.cfm/1014261.html
TP-Link was slow but they took right action at last.

The source code they provide is not complete. U-boot is missing, however, kernel code is complete. They use their own GUI implementation and source code is not available.

To make upgradable and reversible replacement firmware, firmware format and config format must be known. I have asked them to provide these information along with u-boot source code. With these information, I will implement nvram interface and firmware packaging scripts.
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Thu Dec 04, 2008 21:24    Post subject: Reply with quote
More progress.

TP-Link's technical staff rejected my request for u-boot source code and firmware format. Then I read disassembled code and write a fixsum tool. Currently, this tool can only be used under big endian system, fixing it is easy but now it is too late and I will go to bed.

I have upgraded via web UI using firmware I repackaged successfully.

So, here is a snapshot what I done
http://download.lark.net.cn/wr941n/hack/

It's time to move on :D

!!! USE AT YOUR OWN RISK !!!

Sash & BrainSlayer, can you spend some time on WR941N now?

Update: fixsum now can run correctly under little endian system (for example, x86) - Fri Dec 5 13:58:12 CST 2008
RoundSparrow
DD-WRT User


Joined: 28 Nov 2008
Posts: 112

PostPosted: Sat Dec 06, 2008 15:29    Post subject: Reply with quote
I see u-boot coming up more and more on the Ahteros systems. Has anyone found a way to access u-boot from etherner (not adding rs232 serial to hardware) like you can with redboot on port 9000?

I have been able to inject my own content into the firmware for the Trednet TEW-652BRP and the D-Link DIR-615 Rev C1 (identical Atheros based routers).

You mentioned replacing BusyBox. do you have the newest one compiled for kernel 2.6.15 on this CPU? can you put that Busybox binary up - might be useful in our quest to get telnet up on these two firmwares.

Our thread: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=236505
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Sat Dec 06, 2008 17:00    Post subject: Reply with quote
RoundSparrow wrote:
I see u-boot coming up more and more on the Ahteros systems. Has anyone found a way to access u-boot from etherner (not adding rs232 serial to hardware) like you can with redboot on port 9000?

I have been able to inject my own content into the firmware for the Trednet TEW-652BRP and the D-Link DIR-615 Rev C1 (identical Atheros based routers).

You mentioned replacing BusyBox. do you have the newest one compiled for kernel 2.6.15 on this CPU? can you put that Busybox binary up - might be useful in our quest to get telnet up on these two firmwares.

Our thread: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=236505


I put busybox_inst.tar.gz compiled from modified 1.12.2 - almost latest Smile - at

http://download.lark.net.cn/wr941n/hack
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7085
Location: Dresden, Germany

PostPosted: Sat Dec 06, 2008 17:25    Post subject: Reply with quote
i will review the source and look what i can do. about the uboot. no there is no way to access it without serial console

but it could take a while until i'm done with ap81 or ap83. i have the sourcecodes for all the 802.11n drivers, but they arent that good and they dont support our current featureset used in other atheros based units where we are using our own driver

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Sat Dec 06, 2008 18:11    Post subject: Reply with quote
BrainSlayer wrote:
i will review the source and look what i can do. about the uboot. no there is no way to access it without serial console

but it could take a while until i'm done with ap81 or ap83. i have the sourcecodes for all the 802.11n drivers, but they arent that good and they dont support our current featureset used in other atheros based units where we are using our own driver


feature set, for example? My suggestion is using their built kernel first, make it work, then expand. Nvram emulation is the first thing should be done now.

u-boot has no server facility, such as httpd, like redboot, but I think it's not a problem. Using 1 GPIO, u-boot script, and some customized command, you can have 2 predefined functions (for example, press GPIO switch less than 5 seconds or longer), including tftp and boot a failsafe image.
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17638
Location: Hesse/Germany

PostPosted: Sat Dec 06, 2008 18:21    Post subject: Reply with quote
lark wrote:
feature set, for example?

years of modding the orig atheros hal within the license agreement. so to many changes to tell
Quote:

u-boot has no server facility, such as httpd, like redboot, but I think it's not a problem.

its a problem when u think of the other 99% of the users that do not have any skills ins coding and hw modding

_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
RoundSparrow
DD-WRT User


Joined: 28 Nov 2008
Posts: 112

PostPosted: Sun Dec 07, 2008 4:07    Post subject: Reply with quote
Does this router have a recovery mode like the d-link and trendnet u-boot Atheros routers?

Hold down reset button, connect power, keep holding reset button (I do it for at least 30 seconds, not sure how long it really needs). Then you can connect on http at 192.168.0.1

Just curious if that's built into the router you have.
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Sun Dec 07, 2008 4:56    Post subject: Reply with quote
RoundSparrow wrote:
Does this router have a recovery mode like the d-link and trendnet u-boot Atheros routers?

Hold down reset button, connect power, keep holding reset button (I do it for at least 30 seconds, not sure how long it really needs). Then you can connect on http at 192.168.0.1

Just curious if that's built into the router you have.


wr941n doesn't support crash recovery mode. The reset button is used to reset to factory default setting. This is useful only when you forget admin password, turn off dhcp server and then forget the admin ip, etc, but usually this kind of reset mode is enough.
RoundSparrow
DD-WRT User


Joined: 28 Nov 2008
Posts: 112

PostPosted: Sun Dec 07, 2008 5:15    Post subject: Reply with quote
Sorry if I'm a bit lost on the details... but it seems to me that there are several routers with u-boot and Atheros 9xxx that we would want to get dd-wrt on.

The one that stands out to me the most is the Netgear WNR2000 - it is based on OpenWRT firmware and uses u-boot.

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=39928

From the software/boot/driver side, is this system similar? Doesn't that give us a rich source of documentation (OpenWRT)?
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Sun Dec 07, 2008 5:55    Post subject: Reply with quote
RoundSparrow wrote:
Sorry if I'm a bit lost on the details... but it seems to me that there are several routers with u-boot and Atheros 9xxx that we would want to get dd-wrt on.

The one that stands out to me the most is the Netgear WNR2000 - it is based on OpenWRT firmware and uses u-boot.

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=39928

From the software/boot/driver side, is this system similar? Doesn't that give us a rich source of documentation (OpenWRT)?


In general, they use similar hardware, so they can use similar software. But at the detail level, at least wr941n is different. Before we figure out how wr941n's uboot verify kernel, we can't replace its kernel, we are locked on it. We can only use modules to expand its function.

BrainSlayer and Sash said a lot of things changed in HAL. But if the user space command is compatible (iwconfig, etc), and socket level API (wireless device configuration interface) is unchanged, then there is no problem in this area.

IMHO, The only problem so far is how we use flash.

The interesting part is that they all have "art" mtd partition. This partition is related to one kernel module "art.ko". TP-Link's engineer says it is very important. Oh, wait, in my wr941n, this module doesn't get insmod-ed, and it works fine, lol. I think art.ko is only insmod-ed when doing upgrade, but this is hard to confirm, because when doing upgrade, telnet and console get locked. The only clue is
Quote:

# strings httpd
insmod /lib/art.ko
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Sun Dec 07, 2008 15:57    Post subject: Reply with quote
More progress.

I compiled dd-wrt httpd (with some path modification) and test it. Because it can't read nvram yet, there is problem here and there, but I think it not a big problem.

I tested official firmware's "Restore factory default" function via reset button. After press it, the kernel will issue "Reset button pressed." message, and press it for a few seconds, kernel will issue "restoring factory default..."

This function needs cooperation between kernel and user space. When "httpd" (main program) is running, the configuration is restored to default and box reboots. But if I kill httpd, only kernel message, no action at all.

This is interrupt information.

Quote:

# cat /proc/interrupts
CPU0
2: 33267 MIPS wifi0
4: 76 MIPS eth0
6: 0 MIPS cascade
7: 767753 MIPS timer
18: 0 AR7100 MISC cascade
19: 1296 AR7100 MISC serial
35: 4 AR7100 GPIO RESTORE_FACTORY_DEFAULT
39: 2 AR7100 GPIO SW_JUMPSTART

ERR: 0


Then I start httpd and it start to restore factory default! So the GPIO device remember the state, httpd can just read the state, no need to poll and calculate if "reset" is pressed enough time.

If I wipe the config partition using
Quote:

# dd if=/dev/zero of=/dev/mtdblock3


The httpd will restore factory default at next boot.

So, flash 3rd party firmware and back is easy and safe.
RoundSparrow
DD-WRT User


Joined: 28 Nov 2008
Posts: 112

PostPosted: Sun Dec 07, 2008 17:30    Post subject: Reply with quote
What does "cat /proc/mtd" look like on this system?

If we can't figure out how to get u-boot to boot dd-wrt kernel, can't we use dd to replace u-boot? This page shows dd being used to replace u-boot: http://buffalo.nas-central.org/index.php/HOWTO_U-Boot

# dd if=u-boot.bin of=/dev/mtdblock1 bs=1k

I know obviously we have to get a compatible u-boot together, etc. Is it possible we could pick the best one (again the netgear wnr2000 looks promising; OpenWRT) and dd it to the other routers?
lark
DD-WRT Novice


Joined: 28 Oct 2008
Posts: 33

PostPosted: Sun Dec 07, 2008 20:31    Post subject: Reply with quote
RoundSparrow wrote:
What does "cat /proc/mtd" look like on this system?


see page 1

Quote:
If we can't figure out how to get u-boot to boot dd-wrt kernel, can't we use dd to replace u-boot? This page shows dd being used to replace u-boot: http://buffalo.nas-central.org/index.php/HOWTO_U-Boot

# dd if=u-boot.bin of=/dev/mtdblock1 bs=1k

I know obviously we have to get a compatible u-boot together, etc. Is it possible we could pick the best one (again the netgear wnr2000 looks promising; OpenWRT) and dd it to the other routers?


The goal is you can flash it back to factory firmware. Replacing u-boot is dangerous and no easy way back.
Goto page Previous  1, 2, 3, ... 24, 25, 26  Next Display posts from previous:    Page 2 of 26
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum