1 (edited by ldpinney 2012-05-23 08:44:26)

Topic: TP-Link TL-WR841N v8.0

The TP-Link TL-WR841N v8.0 is a wireless N MIMO router it has 1 WAN Port and 4 LAN Ports.
The CPU is The Atheros AR9341 SoC @ 500 Mhz. It has 4 MB Flash but has only 16 MB RAM.
With 4MB of Flash It is capable of running OpenWrt.


Factory Boot :


                            Software Platform for MIPS
Creation date: Jul  5 2011, 09:13:06 (huangqingjia@tp-link.net)
Copyright(C) 2001-2012 by TP-LINK TECHNOLOGIES CO., LTD.
CPU: AR9341: AP123 Board
CPU freq: 500 MHZ
SDRAM size: 16 MB
ipaddr:192.168.1.1
serverip:192.168.1.100
file:vxWorks.img


Press Ctrl+C to stop auto-boot...
0
auto-booting...
Uncompressing...done
Starting at 0x80001000...

Attaching interface lo0... done
Rx clbufs 512 each of size 1756
eth_rx_netpool_init: allocated, pDmaBuf=0x80e4e3e0, buffend = 80f2abe4
ATHRS27: resetting s27
ATHRS27: s27 reset done
eth_rx_netpool_init: done already!
Attached IPv4 interface to mirror unit 0
usrAppInitEx: 112: GPIO_OE = 30300
usrAppInitEx: 113: CP0 CONFIG = 80208483
usrAppInitEx: 114: CP0 CONFIG1 = bee3519e

-->starting wireless...
APCFG task id 80c85970
sysWlanInit ...
Create WLAN event task tWLANEventTask
Create mem partion 0x80c72140 for size 28672
AH_CAL_IN_FLASH_AHB
Boostrap clock 25MHz
ar9300RadioAttach: Need analog access recipe!!
Restoring Cal data from Flash
ath_get_caps[4703] rx chainmask mismatch actual 3 sc_chainmak 0
ath_get_caps[4678] tx chainmask mismatch actual 3 sc_chainmak 0
Create OS_MESGQ Successfully at 0x80c60b50
osifp->queue_head = 0x80c60e50
ag7240MemInit: allocated, dmabuf=0x80bac130, buffend = 80c54334
Entering Task Loop
Entering WLAN event Task Loop
ERROR:wireless OR ACL disable
sending message 80b87900,24
sending message 80b87900,24
TDDP: Now listening client request.
tddp is running.
httpInit: System File Registry successfully initialized.
httpInit: System File Manager successfully initialized.
httpInit: File System RPM successfully initialized.
httpInit: RPM dispatcher successfully initialized.
httpInit: MIME type guessing RPM successfully initialized.
httpInit: http Password Checking successfully initialized.
httpInit: http Access Control successfully initialized.



                            Software Platform for MIPS
  Copyright(C) 2001-2010 by TP-LINK TECHNOLOGIES CO., LTD.
Starting W  Creation date: LANJul  5 2011, 10:13:42 !!!!

# AP_STARTMODE=standard
AP_ENABLE=1
ATH_COUNTRYCODE=156
wlan_vap_create : enter. devhandle=0x8043ef60, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x8043ef60, opmode=IEEE80211_M_HOSTAP, flags=0x1.
osif_ioctl_create_vap: vap 0x80ffe970 vap->iv_unit 0
ieee80211_end_load: load done
ath0 end flag = 0x00028802
default
default
default
IEE80211-FREQ IOCTL vap 0x80ffe970 0,0,0
AP_CHMODE=11NGHT40PLUS

WLAN IOCTL AP_CHMODE=11NGHT40PLUS=11NGHT20=11NGHT40PLUS=1003
IEE80211-MODE IOCTL 1,11NGHT40PLUS,13
set mode 11,-2130709132,6
set mode retv 0

WLAN IOCTL AP_PRIMARY_CH=auto=6=auto=1002
IEE80211-FREQ IOCTL vap 0x80ffe970 0,0,11

WLAN IOCTL PUREG=0=0=0=1004
IEEE80211-SETPURGE IOCTL 0

WLAN IOCTL AP_HIDE_SSID=0=0=0=1005
IEEE80211-SETHIDESSIDIOCTL 0

WLAN IOCTL AP_ISOLATION=0=0=0=1034
IEE80211-setparam-nobridge 0

WLAN IOCTL AP_TX11NRATE==0x0=0x0=1041
set auto rate

WLAN IOCTL AP_11G_PROTECTION==0=0=1042

WLAN IOCTL AP_BEACON_INTERVAL=100=100=100=1043

WLAN IOCTL AP_FRAGMENT_THRESHOLD=2346=2346=2346=1044

WLAN IOCTL AP_RTS_THRESHOLD=2346=2347=2346=1046

WLAN IOCTL AP_DTIM_PERIOD=1=1=1=1045

WLAN IOCTL AP_WMM_ENABLE=1=1=1=1051

WLAN IOCTL AP_WMM_NOACK==0=0=1052
IOCTL set wmm noack 0

WLAN IOCTL AP_CYPHER_2==CCMP=CCMP=1000
Get EIOCGADDR

WLAN IOCTL AP_NO_EDGE_CH==0=0=1056

WLAN IOCTL AP_MCASTRATE==0=0=1018

WLAN IOCTL AP_MACFILTER_MODE==0=0=1038

WLAN IOCTL AP_MACFILTER_LIST====1000
Get EIOCGADDR

WLAN IOCTL AP_SHORT_GI=1=1=1=1055

WLAN IOCTL AP_DISABLECOEXT=1=0=1=1075

WLAN IOCTL AP_SSID=WR841N=Ath_AP123ng=WR841N=1001
IEE80211-ESSID IOCTL 1,WR841N,7
AP_CHMODE=11NGHT40PLUS
AP_CWMMODE=1
IEE80211-CWMMODE IOCTL 1
AP_AMPDU=0
AP_PURE_N=0
AP_TX_CHAINMASK=3
AP_RX_CHAINMASK=3
AP_SECMODE=WPA
WPS_ENABLE=1
AP_MACFILTER_MODE=0
ieee80211_open

WLAN IOCTL AP_BASICRATES==0=0=1039

WLAN IOCTL AP_DEBUG=0=0=0=1062

WLAN IOCTL AP_TX_POWER==0=0=1073
Starting Hostapd
AP_SSID=WR841N
AP_HOSTAPD_DEBUG=0
AP_IPADDR=192.168.1.2
AP_SECMODE=WPA
WPS BSS init
WPS_ENABLE=1
WPS_PIN=4724XXXX <--EDIT
WPS_STATE=2
1136073605.416667: wps_led_init: LED state CONFIGURED
AP_SECMODE=WPA
WPA BSS init
PSK_KEY=XXXXXXXXX <--EDIT
AP_CYPHER=TKIP
AP_WPA_GROUP_REKEY=3600
starting hostapd ...
Hostapd task Created 80ff5a90
Task details [80ff5a90,,64,80c85708]
Adding ath0 in bridge ...
default
Set EIOCGMIB2
default
Entering Hostapd Main
default
Set EIOCGMIB2
attached backend socket .
Attached backend socket for eth0
Attached backend socket for eth1
Attached backend socket for mirror 0
@@@@ kris-hostapd @@@@@ wiface=ath0 @@@@
**** [2,1,0,0192.168.1.2,]****
Just before eloop_run()
*** setup interface1 started ****
Eapol sockfd=23
Get EIOCGADDR
MAC address 5c,63,ffffffbf,XXXXX,XXXX,XXXXXX <--EDIT
link _ubind0,0,0,0,0,0
IEE80211-IWMODE IOCTL  3
IEE80211-setparam-privacy 0
1136073607.416667: Defaulted uuid based on mac addr 5c:63:bf:XX:XX:XX <--EDIT
ieee80211_ioctl_setappiebuf
ieee80211_ioctl_setappiebuf
ieee80211_ioctl_setappiebuf
1136073607.416667: madwifi_start_receive_prob_req Enter

Madwifi init completed
1136073607.416667: ENTER eap_wps_disable, reason=7
*** setup interface1 completed ****
*** setup interface2 started ****
1136073607.433333: Flushing old station entries
IOCTL setmlme
[ieee80211_ioctl_setmlme:1887] data=0x80ff55b0,data->pointer=0x80ff5600, data->length=42
[ieee80211_ioctl_setmlme:1893] mlme->im_op=3
1136073607.450000: Deauthenticate all stations
IEE80211-setparam-privacy 0
ieee80211_ioctl_delkey : idk_keyix=0
ieee80211_ioctl_delkey : idk_keyix=1
ieee80211_ioctl_delkey : idk_keyix=2
ieee80211_ioctl_delkey : idk_keyix=3
Using interface ath0 with hwaddr 5c:63:bf:XX:XX:XX and ssid 'WR841N' <--EDIT
1136073607.483333: SSID - hexdump_ascii(len=6):
     XX XX XX XX XX XX                                 WR841N <--EDIT         
1136073607.483333: PSK (ASCII passphrase) - hexdump_ascii(len=9):
     XX XX XX XX XX XX XX <-- EDIT                        password <-- EDIT       
1136073607.783333: PSK (from passphrase) - hexdump(len=32): XX XX XX XX XX XX XX <-- EDIT
IEE80211-ESSID IOCTL 1,WR841N,7
osif_vap_init :vap up
IEE80211-setparam-mcastcipher 1
Warning: wlan_set_mcast_cipher failed. cache the mcast cipher
IEE80211-setparam-unicipher 2
Warning: wlan_set_ucast_cipher failed. cache the ucast cipher
IEE80211-setparam-keymgmtalgs 2
ieee80211_rsncaps
IEE80211-setparam-wpa 1
set IEEE80211_IOC_WPA to WPA
[ieee80211_ioctl_setparam_wpa:1721]
IEE80211-setparam-authmode 5
osif_vap_init :vap up
osif_vap_init 0
1136073607.833333: WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
1136073607.833333: GMK - hexdump(len=32): XX XX XX XX XX XX XX <-- EDIT
1136073607.833333: GTK - hexdump(len=32): XX XX XX XX XX XX XX <-- EDIT
1136073607.833333: WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
ieee80211_ioctl_setkey


ieee80211_ioctl_setkey: ******** SETKEY : error: 0 , key_type=1, macaddr=ff:ff:ff:ff:ff:ff, key_len=16

IEE80211-setparam-privacy 1
hostapd_ctrl_iface_init
1136073607.866667: upnp_wps_device_init called
1136073607.866667: upnp_wps_device ssdp_listener_start failure!
1136073607.866667: upnp_wps_device_stop ENTER
1136073607.883333: upnp_wps_device_deinit called
1136073607.883333: upnp_wps_device_stop ENTER
1136073607.883333: Failed to initialize UPnP state machine
1136073607.883333: Continuing with WPS UPnP disabled.
****setup interface2 completed****
1136073607.900000: ath0: Setup of interface done.
****setup interface finalized ****

DIR-615 E3 : DIR-825 B1 : WNDR3700 V2 : WDR4310 V1.0 : Hardware Hacks  WR703n V1.6 : WR841n V8.0 : WR1041n V2.0 : Latest Toy : Kingston Mobilelite MLW221

2 (edited by ldpinney 2012-05-23 06:13:53)

Re: TP-Link TL-WR841N v8.0

I sent this device to Huang Fang Cheng in Shenzhen China for a 64M RAM upgrade.
The Results :

U-Boot 1.1.4 (May 14 2012 - 21:01:27)

U-boot for WR841V8 OR 300RV3

Build by < huangfc  QQ:343669866>
huangfangcheng@163.com
TaoBao:  http:// huangfc.taobao.com


DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 152k for U-Boot at: 83fd8000
Reserving 192k for malloc() at: 83fa8000
Reserving 44 Bytes for Board Info at: 83fa7fd4
Reserving 36 Bytes for Global Data at: 83fa7fb0
Reserving 128k for boot params() at: 83f87fb0
Stack Pointer at: 83f87f98
Now running in RAM - U-Boot at: 83fd8000
id read 0x100000ff
flash size 4MB, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
Fetching MAC Address from 0x83ff23d8
Fetching MAC Address from 0x83ff23d8
wasp  reset mask:c03300
WASP ----> S27 PHY
: cfg1 0x5 cfg2 0x7114
eth0: 00:00:00:00:00:01
s27 reg init
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
eth0 up
WASP ----> S27 PHY
: cfg1 0xf cfg2 0x7214
eth1: 00:00:00:00:00:00
s27 reg init lan
ATHRS27: resetting s27
ATHRS27: s27 reset done
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth1 up
eth0, eth1
Hit any key to stop autoboot:  0
you get the PASS!!
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 3.3.3 (huangfc@huangfc) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #50 Mon May 14 20:45:49 CST 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9341 rev 1
[    0.000000] Clocks: CPU:525.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00004000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00004000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=TL-WR841N-v8 console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61800k/65536k available (2068k kernel code, 3736k reserved, 395k data, 200k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] Calibrating delay loop... 261.73 BogoMIPS (lpj=1308672)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 22 on device: ath79
[    0.100000] MIPS: machine is TP-LINK TL-WR841N v8
[    0.510000] bio: create slab <bio-0> at 0
[    0.520000] Switching to clocksource MIPS
[    0.530000] NET: Registered protocol family 2
[    0.530000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.530000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.540000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.540000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.550000] TCP reno registered
[    0.550000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.560000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560000] NET: Registered protocol family 1
[    0.590000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.590000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.600000] msgmni has been set to 120
[    0.610000] io scheduler noop registered
[    0.610000] io scheduler deadline registered (default)
[    0.620000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.640000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.650000] console [ttyS0] enabled, bootconsole disabled
[    0.650000] console [ttyS0] enabled, bootconsole disabled
[    0.660000] m25p80 spi0.0: found s25sl032a, expected m25p80
[    0.670000] m25p80 spi0.0: s25sl032a (4096 Kbytes)
[    0.680000] Creating 5 MTD partitions on "spi0.0":
[    0.680000] 0x000000000000-0x000000020000 : "u-boot"
[    0.690000] 0x000000020000-0x000000120000 : "kernel"
[    0.690000] 0x000000120000-0x0000003f0000 : "rootfs"
[    0.700000] mtd: partition "rootfs" set to be root filesystem
[    0.710000] mtd: partition "rootfs_data" created automatically, ofs=2F0000, len=100000
[    0.720000] 0x0000002f0000-0x0000003f0000 : "rootfs_data"
[    0.720000] 0x0000003f0000-0x000000400000 : "art"
[    0.730000] 0x000000020000-0x0000003f0000 : "firmware"
[    0.760000] ag71xx_mdio: probed
[    1.000000] ag71xx_mdio: probed
[    1.000000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    1.620000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    1.630000] eth1: Atheros AG71xx at 0xba000000, irq 5
[    2.220000] eth1: Found an AR934X built-in switch
[    3.450000] TCP westwood registered
[    3.450000] NET: Registered protocol family 17
[    3.450000] 8021q: 802.1Q VLAN Support v1.8
[    3.460000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    3.470000] Freeing unused kernel memory: 200k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[    8.770000] JFFS2 notice: (557) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 13 of xref (0 dead, 1 orphan) found.
switching to jffs2
- init -

Please press Enter to activate this console.
[   10.400000] Compat-wireless backport release: compat-wireless-2012-04-17-1-r31540
[   10.410000] Backport based on wireless-testing.git master-2012-04-17
[   10.440000] cfg80211: Calling CRDA to update world regulatory domain
[   10.820000] cfg80211: World regulatory domain updated:
[   10.830000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   10.840000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.850000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.850000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.860000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.870000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.890000] usbcore: registered new interface driver usbfs
[   10.890000] usbcore: registered new interface driver hub
[   10.900000] usbcore: registered new device driver usb
[   11.430000] ieee80211 phy0: Atheros AR9340 Rev:0 mem=0xb8100000, irq=47
[   11.430000] cfg80211: Calling CRDA for country: US
[   11.560000] cfg80211: Regulatory domain changed to country: US
[   11.570000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   11.580000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   11.580000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   11.590000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.600000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.610000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.620000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   11.640000] PPP generic driver version 2.4.2
[   11.760000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.860000] NET: Registered protocol family 24
[   11.970000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   11.980000] ath79-ehci ar934x-ehci: Atheros built-in EHCI controller
[   11.990000] ath79-ehci ar934x-ehci: new USB bus registered, assigned bus number 1
[   12.030000] ath79-ehci ar934x-ehci: irq 3, io mem 0x1b000000
[   12.050000] ath79-ehci ar934x-ehci: USB 2.0 started, EHCI 1.00
[   12.050000] hub 1-0:1.0: USB hub found
[   12.060000] hub 1-0:1.0: 1 port detected
[   12.080000] nf_conntrack version 0.5.0 (968 buckets, 3872 max)
[   15.320000] device wlan0 entered promiscuous mode
[   18.400000] device wlan0 left promiscuous mode
[   18.410000] br-lan: port 1(wlan0) entered disabled state
[   18.580000] device eth1 entered promiscuous mode
[   18.630000] device wlan0 entered promiscuous mode
[   20.030000] br-lan: port 2(wlan0) entered forwarding state
[   20.040000] br-lan: port 2(wlan0) entered forwarding state
[   35.080000] br-lan: port 2(wlan0) entered forwarding state


BusyBox v1.19.4 (2012-04-16 03:17:21 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
-----------------------------------------------------
ATTITUDE ADJUSTMENT (Bleeding Edge, r31540)
-----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
-----------------------------------------------------
root@OpenWrt:/#

DIR-615 E3 : DIR-825 B1 : WNDR3700 V2 : WDR4310 V1.0 : Hardware Hacks  WR703n V1.6 : WR841n V8.0 : WR1041n V2.0 : Latest Toy : Kingston Mobilelite MLW221

Re: TP-Link TL-WR841N v8.0

mach-tl-wr841n-v8.c

/*
* Atheros DB120 reference board support
*
* Copyright (c) 2011 Qualcomm Atheros
* Copyright (c) 2011 Gabor Juhos <juhosg@openwrt.org>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
*  * Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
*
*  * Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in the
*    documentation and/or other materials provided with the
*    distribution.
*
*  * Neither the name of Qualcomm Atheros nor the names of its
*    contributors may be used to endorse or promote products derived
*    from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>

#include <asm/mach-ath79/ar71xx_regs.h>

#include "common.h"
#include "dev-ap9x-pci.h"
#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
#include "dev-spi.h"
#include "dev-usb.h"
#include "dev-wmac.h"
#include "machtypes.h"

#define TL_WR841NV8_GPIO_LED_WPS        15
//#define TL_WR841NV8_GPIO_LED_USB        17
#define TL_WR841NV8_GPIO_LED_WLAN       13
#define TL_WR841NV8_GPIO_LED_SYS        14
#define TL_WR841NV8_GPIO_BTN_RESET      17

//#define DB120_GPIO_BTN_WPS        16

//#define DB120_KEYS_POLL_INTERVAL    20    /* msecs */
//#define DB120_KEYS_DEBOUNCE_INTERVAL    (3 * DB120_KEYS_POLL_INTERVAL)

//#define DB120_MAC0_OFFSET    0
//#define DB120_MAC1_OFFSET    6
#define WR841NV8_WMAC_CALDATA_OFFSET 0x1000
//#define DB120_PCIE_CALDATA_OFFSET 0x5000

#define TL_WR841NV8_KEYS_POLL_INTERVAL    20    /* msecs */
#define TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV8_KEYS_POLL_INTERVAL)

static struct mtd_partition tl_wr841nv8_partitions[] = {
{
        .name        = "u-boot",
        .offset        = 0,
        .size        = 0x020000,
        .mask_flags    = MTD_WRITEABLE,
    }, {
        .name        = "kernel",
        .offset        = 0x020000,
        .size        = 0x100000,
    }, {
        .name        = "rootfs",
        .offset        = 0x120000,
        .size        = 0x2d0000,
    }, {
        .name        = "art",
        .offset        = 0x3f0000,
        .size        = 0x010000,
        .mask_flags    = MTD_WRITEABLE,
    }, {
        .name        = "firmware",
        .offset        = 0x020000,
        .size        = 0x3d0000,
    }
};

static struct flash_platform_data tl_wr841nv8_flash_data = {
    .parts        = tl_wr841nv8_partitions,
    .nr_parts    = ARRAY_SIZE(tl_wr841nv8_partitions),
};

static struct gpio_led tl_wr841nv8_leds_gpio[] __initdata = {
     {
        .name        = "tp-link:green:wps",
        .gpio        = TL_WR841NV8_GPIO_LED_WPS,
        .active_low    = 1,
    },
    {
        .name        = "tp-link:green:system",
        .gpio        = TL_WR841NV8_GPIO_LED_SYS,
        .active_low    = 1,
    },    {
        .name        = "tp-link:green:wlan",
        .gpio        = TL_WR841NV8_GPIO_LED_WLAN,
        .active_low    = 1,
    }
};

static struct gpio_keys_button tl_wr841nv8_gpio_keys[] __initdata = {
    {
        .desc        = "reset",
        .type        = EV_KEY,
        .code        = KEY_RESTART,
        .debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
        .gpio        = TL_WR841NV8_GPIO_BTN_RESET,
        .active_low    = 1,
    },
};

static void __init tl_wr841nv8_gmac_setup(void)
{
    void __iomem *base;
    u32 t;

    base = ioremap(AR934X_GMAC_BASE, AR934X_GMAC_SIZE);

    t = __raw_readl(base + AR934X_GMAC_REG_ETH_CFG);
    t &= ~(AR934X_ETH_CFG_RGMII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0 |
           AR934X_ETH_CFG_MII_GMAC0 | AR934X_ETH_CFG_SW_ONLY_MODE);
    __raw_writel(t, base + AR934X_GMAC_REG_ETH_CFG);

    iounmap(base);
}

static void __init tl_wr841nv8_setup(void)
{
    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
//    u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
    u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
//    ar71xx_gpio_output_select(DB120_GPIO_LED_USB, AR934X_GPIO_OUT_GPIO);//db120

//    ar71xx_add_device_usb();//db120
   

    ath79_register_m25p80(&tl_wr841nv8_flash_data);
    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841nv8_leds_gpio),
                 tl_wr841nv8_leds_gpio);
    ath79_register_gpio_keys_polled(-1, TL_WR841NV8_KEYS_POLL_INTERVAL,
                    ARRAY_SIZE(tl_wr841nv8_gpio_keys),
                    tl_wr841nv8_gpio_keys);
    ath79_register_usb(); // 2543
    ath79_register_wmac(art + WR841NV8_WMAC_CALDATA_OFFSET, mac);
    tl_wr841nv8_gmac_setup();

    ath79_register_mdio(0, 0x0);
    ath79_register_mdio(1, 0x0);

    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
#if 0
    /* GMAC0 is connected to an AR8327 switch */
    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
    ath79_eth0_data.speed = SPEED_1000;
    ath79_eth0_data.duplex = DUPLEX_FULL;
#else
    /* GMAC0 is connected to PHY4 of the internal switch */
    ath79_switch_data.phy4_mii_en = 1;

    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
    ath79_eth0_data.phy_mask = BIT(4);
    ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev;
#endif
    ath79_register_eth(0);

//    ath79_eth0_data.mii_bus_dev = &tl_wr2543n_rtl8367_device.dev;//2543
//    ar71xx_add_device_eth(0);
    ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
    ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
    ath79_eth1_data.speed = SPEED_1000;
    ath79_eth1_data.duplex = DUPLEX_FULL;

    ath79_register_eth(1);
}

MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-WR841N v8",
         tl_wr841nv8_setup);

DIR-615 E3 : DIR-825 B1 : WNDR3700 V2 : WDR4310 V1.0 : Hardware Hacks  WR703n V1.6 : WR841n V8.0 : WR1041n V2.0 : Latest Toy : Kingston Mobilelite MLW221

Re: TP-Link TL-WR841N v8.0

patch

Index: target/linux/ar71xx/image/Makefile
===================================================================
--- target/linux/ar71xx/image/Makefile    (revision 31813)
+++ target/linux/ar71xx/image/Makefile    (working copy)
@@ -405,13 +405,13 @@
        -k $(KDIR_TMP)/kernel-$(2).bin \
        -r $(KDIR)/root.$(1) \
        -a $(call rootfs_align,$(1)) -j \
-        -o $(call factoryname,$(1),$(2))
+        -o $(call factoryname,$(1),$(2)_$(REVISION))
    -$(STAGING_DIR_HOST)/bin/mktplinkfw \
        -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
        -k $(KDIR_TMP)/kernel-$(2).bin \
        -r $(KDIR)/root.$(1) \
        -a $(call rootfs_align,$(1)) -j \
-        -o $(call sysupname,$(1),$(2))
+        -o $(call sysupname,$(1),$(2)_$(REVISION))
endef

define Image/Build/TPLINK/initramfs
@@ -429,13 +429,13 @@
        -k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \
        -r $(KDIR)/root.$(1) \
        -a $(call rootfs_align,$(1)) -j \
-        -o $(call factoryname,$(1),$(2))
+        -o $(call factoryname,$(1),$(2)_$(REVISION))
    -$(STAGING_DIR_HOST)/bin/mktplinkfw \
        -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s \
        -k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \
        -r $(KDIR)/root.$(1) \
        -a $(call rootfs_align,$(1)) -j \
-        -o $(call sysupname,$(1),$(2))
+        -o $(call sysupname,$(1),$(2)_$(REVISION))
endef

define Image/Build/TPLINK-LZMA/initramfs
@@ -904,6 +904,31 @@
    $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK-LZMA,tl-wr703n-v1,$(tlwr703_cmdline),0x07030101,1,4Mlzma)
endef

+tlwr700_cmdline=board=TL-WR700N console=ttyATH0,115200
+define Image/Build/Profile/TLWR700
+    $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK-LZMA,tl-wr700n-v1,$(tlwr700_cmdline),0x07000101,1,4Mlzma)
+endef
+
+tlwr702_cmdline=board=TL-WR702N console=ttyATH0,115200
+define Image/Build/Profile/TLWR702
+    $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK-LZMA,tl-wr702n-v1,$(tlwr702_cmdline),0x07020101,1,4Mlzma)
+endef
+
+tlwr710_cmdline=board=TL-WR710N console=ttyATH0,115200
+define Image/Build/Profile/TLWR710
+    $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK-LZMA,tl-wr710n-v1,$(tlwr710_cmdline),0x07100101,1,4Mlzma)
+endef
+
+tlwr800_cmdline=board=TL-WR800N console=ttyATH0,115200
+define Image/Build/Profile/TLWR800
+    $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK-LZMA,tl-wr800n-v1,$(tlwr800_cmdline),0x08000101,1,4Mlzma)
+endef
+
+tlwr841v8_cmdline=board=TL-WR841N-v8 console=ttyATH0,115200
+define Image/Build/Profile/TLWR841V8
+    $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK-LZMA,tl-wr841n-v8,$(tlwr841v8_cmdline),0x08410008,1,4Mlzma)
+endef
+
tlwr740_cmdline=board=TL-WR741ND console=ttyS0,115200
tlwr740v4_cmdline=board=TL-WR741ND-v4 console=ttyATH0,115200
define Image/Build/Profile/TLWR740
Index: target/linux/ar71xx/config-3.3
===================================================================
--- target/linux/ar71xx/config-3.3    (revision 31813)
+++ target/linux/ar71xx/config-3.3    (working copy)
@@ -56,6 +56,11 @@
CONFIG_ATH79_MACH_TL_WR1043ND=y
CONFIG_ATH79_MACH_TL_WR2543N=y
CONFIG_ATH79_MACH_TL_WR703N=y
+CONFIG_ATH79_MACH_TL_WR700N=y
+CONFIG_ATH79_MACH_TL_WR702N=y
+CONFIG_ATH79_MACH_TL_WR710N=y
+CONFIG_ATH79_MACH_TL_WR800N=y
+CONFIG_ATH79_MACH_TL_WR841N_V8=y
CONFIG_ATH79_MACH_TL_WR741ND=y
CONFIG_ATH79_MACH_TL_WR741ND_V4=y
CONFIG_ATH79_MACH_TL_WR841N_V1=y
Index: target/linux/ar71xx/patches-3.3/615-MIPS-ath79-WR1041N-support.patch
===================================================================
--- target/linux/ar71xx/patches-3.3/615-MIPS-ath79-WR1041N-support.patch    (revision 31813)
+++ target/linux/ar71xx/patches-3.3/615-MIPS-ath79-WR1041N-support.patch    (working copy)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
-@@ -451,6 +451,17 @@ config ATH79_MACH_TL_WR941ND
+@@ -451,6 +451,64 @@ config ATH79_MACH_TL_WR941ND
      select ATH79_DEV_M25P80
      select ATH79_DEV_WMAC
 
@@ -15,26 +15,83 @@
+    select ATH79_DEV_USB
+    select ATH79_DEV_WMAC
+
++config ATH79_MACH_TL_WR700N
++    bool "TP-LINK TL-WR700N support"
++    select SOC_AR933X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_WMAC
++
++config ATH79_MACH_TL_WR702N
++    bool "TP-LINK TL-WR702N support"
++    select SOC_AR933X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_WMAC
++
++config ATH79_MACH_TL_WR710N
++    bool "TP-LINK TL-WR710N support"
++    select SOC_AR933X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_USB
++    select ATH79_DEV_WMAC
++
++config ATH79_MACH_TL_WR800N
++    bool "TP-LINK TL-WR800N support"
++    select SOC_AR934X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_USB
++    select ATH79_DEV_WMAC
++
++config ATH79_MACH_TL_WR841N_V8
++    bool "TP-LINK TL-WR841N v8 support"
++    select SOC_AR934X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_WMAC
++
  config ATH79_MACH_TL_WR1043ND
      bool "TP-LINK TL-WR1043ND support"
      select SOC_AR913X
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
-@@ -64,6 +64,7 @@ enum ath79_mach_type {
+@@ -64,6 +64,12 @@ enum ath79_mach_type {
      ATH79_MACH_TL_MR3420,        /* TP-LINK TL-MR3420 */
      ATH79_MACH_TL_WA901ND,        /* TP-LINK TL-WA901ND */
      ATH79_MACH_TL_WA901ND_V2,    /* TP-LINK TL-WA901ND v2 */
+    ATH79_MACH_TL_WR1041N_V2,    /* TP-LINK TL-WR1041N v2 */
++    ATH79_MACH_TL_WR700N,        /* TP-LINK TL-WR700N */
++    ATH79_MACH_TL_WR702N,        /* TP-LINK TL-WR702N */
++    ATH79_MACH_TL_WR710N,        /* TP-LINK TL-WR710N */
++    ATH79_MACH_TL_WR800N,        /* TP-LINK TL-WR800N */
++    ATH79_MACH_TL_WR841N_V8,    /* TP-LINK TL-WR841N V8 */
      ATH79_MACH_TL_WR1043ND,        /* TP-LINK TL-WR1041ND */
      ATH79_MACH_TL_WR2543N,        /* TP-LINK TL-WR2543N/ND */
      ATH79_MACH_TL_WR703N,        /* TP-LINK TL-WR703N */
--- a/arch/mips/ath79/Makefile
+++ b/arch/mips/ath79/Makefile
-@@ -74,6 +74,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WR741ND)    += m
+@@ -74,6 +74,12 @@ obj-$(CONFIG_ATH79_MACH_TL_WR741ND)    += m
  obj-$(CONFIG_ATH79_MACH_TL_WR741ND_V4)    += mach-tl-wr741nd-v4.o
  obj-$(CONFIG_ATH79_MACH_TL_WR841N_V1)    += mach-tl-wr841n.o
  obj-$(CONFIG_ATH79_MACH_TL_WR941ND)    += mach-tl-wr941nd.o
+obj-$(CONFIG_ATH79_MACH_TL_WR1041N_V2)    += mach-tl-wr1041n-v2.o
++obj-$(CONFIG_ATH79_MACH_TL_WR700N)    += mach-tl-wr700n.o
++obj-$(CONFIG_ATH79_MACH_TL_WR702N)    += mach-tl-wr702n.o
++obj-$(CONFIG_ATH79_MACH_TL_WR710N)    += mach-tl-wr710n.o
++obj-$(CONFIG_ATH79_MACH_TL_WR800N)    += mach-tl-wr800n.o
++obj-$(CONFIG_ATH79_MACH_TL_WR841N_V8)    += mach-tl-wr841n-v8.o
  obj-$(CONFIG_ATH79_MACH_TL_WR1043ND)    += mach-tl-wr1043nd.o
  obj-$(CONFIG_ATH79_MACH_TL_WR2543N)    += mach-tl-wr2543n.o
  obj-$(CONFIG_ATH79_MACH_TL_WR703N)    += mach-tl-wr703n.o
Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/ar71xx.sh    (revision 31813)
+++ target/linux/ar71xx/base-files/lib/ar71xx.sh    (working copy)
@@ -73,6 +73,21 @@
    "070300"*)
        model="TP-Link TL-WR703N"
        ;;
+    "070000"*)
+        model="TP-Link TL-WR700N"
+        ;;
+    "070200"*)
+        model="TP-Link TL-WR702N"
+        ;;
+    "071000"*)
+        model="TP-Link TL-WR710N"
+        ;;
+    "080000"*)
+        model="TP-Link TL-WR800N"
+        ;;
+    "084100"*)
+        model="TP-Link TL-WR841N"
+        ;;
    "070100"*)
        model="TP-Link TL-WA701N/ND"
        ;;
@@ -322,6 +337,21 @@
    *"TL-WR703N v1")
        name="tl-wr703n"
        ;;
+    *"TL-WR700")
+        name="tl-wr700n"
+        ;;
+    *"TL-WR702")
+        name="tl-wr702n"
+        ;;
+    *"TL-WR710")
+        name="tl-wr710n"
+        ;;
+    *"TL-WR800")
+        name="tl-wr800n"
+        ;;
+    *"TL-WR841N v8")
+        name="tl-wr841n-v8"
+        ;;
    *"TL-MR11U")
        name="tl-mr11u"
        ;;
Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh    (revision 31813)
+++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh    (working copy)
@@ -131,6 +131,11 @@
    tl-wa901nd | \
    tl-wa901nd-v2 | \
    tl-wr703n | \
+    tl-wr700n | \
+    tl-wr702n | \
+    tl-wr710n | \
+    tl-wr800n | \
+    tl-wr841n-v8 | \
    tl-wr741nd | \
    tl-wr741nd-v4 | \
    tl-wr841n-v1 | \
Index: target/linux/ar71xx/base-files/etc/uci-defaults/leds
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/leds    (revision 31813)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/leds    (working copy)
@@ -188,6 +188,7 @@
    set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
    ;;

+tl-wr841n-v8 | \
tl-wr941nd | \
tl-wr1041n-v2)
    set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
Index: target/linux/ar71xx/base-files/etc/uci-defaults/network
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/network    (revision 31813)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/network    (working copy)
@@ -110,6 +110,12 @@
    ucidef_add_switch_vlan "switch0" "2" "0 9t"
    ;;

+tl-wr841n-v8)
+    ucidef_set_interfaces_lan_wan "eth1" "eth0"
+    ucidef_add_switch "switch0" "1" "1"
+    ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
+    ;;
+
tl-wr841n-v1|\
tl-wr941nd)
    ucidef_set_interface_raw "eth" "eth0"
@@ -137,6 +143,9 @@
tl-wa901nd |\
tl-wa901nd-v2 |\
tl-wr703n |\
+tl-wr700n |\
+tl-wr702n |\
+tl-wr800n |\
wp543)
    ucidef_set_interface_lan "eth0"
    ;;
@@ -166,6 +175,7 @@
tl-mr3220 |\
tl-mr3420 |\
tl-wr741nd |\
+tl-wr710n |\
tl-wr741nd-v4 |\
tl-wr841n-v7 |\
whr-g301n |\
Index: target/linux/ar71xx/base-files/etc/diag.sh
===================================================================
--- target/linux/ar71xx/base-files/etc/diag.sh    (revision 31813)
+++ target/linux/ar71xx/base-files/etc/diag.sh    (working copy)
@@ -118,9 +118,14 @@
    tl-wr741nd-v4 | \
    tl-wr841n-v1 | \
    tl-wr841n-v7 | \
+    tl-wr841n-v8 | \
    tl-wr941nd)
        status_led="tp-link:green:system"
        ;;
+    tl-wr700n | \
+    tl-wr702n | \
+    tl-wr710n | \
+    tl-wr800n | \
    tl-wr703n)
        status_led="tp-link:blue:system"
        ;;
Index: target/linux/ar71xx/generic/profiles/tp-link.mk
===================================================================
--- target/linux/ar71xx/generic/profiles/tp-link.mk    (revision 31813)
+++ target/linux/ar71xx/generic/profiles/tp-link.mk    (working copy)
@@ -180,3 +180,58 @@
    Package set optimized for the TP-LINK TL-WR2543N/ND.
endef
$(eval $(call Profile,TLWR2543))
+
+
+define Profile/TLWR700
+    NAME:=TP-LINK TL-WR700N
+    PACKAGES:=
+endef
+
+define Profile/TLWR700/Description
+    Package set optimized for the TP-LINK TL-WR700N
+endef
+$(eval $(call Profile,TLWR700))
+
+
+define Profile/TLWR702
+    NAME:=TP-LINK TL-WR702N
+    PACKAGES:=
+endef
+
+define Profile/TLWR702/Description
+    Package set optimized for the TP-LINK TL-WR702N
+endef
+$(eval $(call Profile,TLWR702))
+
+
+define Profile/TLWR710
+    NAME:=TP-LINK TL-WR710N
+    PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
+endef
+
+define Profile/TLWR710/Description
+    Package set optimized for the TP-LINK TL-WR710N.
+endef
+$(eval $(call Profile,TLWR710))
+
+
+define Profile/TLWR800
+    NAME:=TP-LINK TL-WR800N
+    PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
+endef
+
+define Profile/TLWR800/Description
+    Package set optimized for the TP-LINK TL-WR800N.
+endef
+$(eval $(call Profile,TLWR800))
+
+
+define Profile/TLWR841V8
+    NAME:=TP-LINK TL-WR841N-v8
+    PACKAGES:=
+endef
+
+define Profile/TLWR841V8/Description
+    Package set optimized for the TP-LINK TL-WR841N-v8.
+endef
+$(eval $(call Profile,TLWR841V8))
Index: tools/firmware-utils/src/mktplinkfw.c
===================================================================
--- tools/firmware-utils/src/mktplinkfw.c    (revision 31813)
+++ tools/firmware-utils/src/mktplinkfw.c    (working copy)
@@ -37,6 +37,11 @@
#define HWID_TL_WA901ND_V1    0x09010001
#define HWID_TL_WA901ND_V2    0x09010002
#define HWID_TL_WR703N_V1    0x07030101
+#define HWID_TL_WR700N_V1    0x07000101
+#define HWID_TL_WR702N_V1    0x07020101
+#define HWID_TL_WR710N_V1    0x07100101
+#define HWID_TL_WR800N_V1    0x08000101
+#define HWID_TL_WR841N_V8    0x08410008
#define HWID_TL_WR741ND_V1    0x07410001
#define HWID_TL_WR741ND_V4    0x07410004
#define HWID_TL_WR740N_V1    0x07400001
@@ -276,6 +281,31 @@
        .hw_rev        = 1,
        .layout_id    = "4Mlzma",
    }, {
+        .id        = "TL-WR700Nv1",
+        .hw_id        = HWID_TL_WR700N_V1,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
+        .id        = "TL-WR702Nv1",
+        .hw_id        = HWID_TL_WR702N_V1,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
+        .id        = "TL-WR710Nv1",
+        .hw_id        = HWID_TL_WR710N_V1,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
+        .id        = "TL-WR800Nv1",
+        .hw_id        = HWID_TL_WR800N_V1,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
+        .id        = "TL-WR841Nv8",
+        .hw_id        = HWID_TL_WR841N_V8,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
        /* terminating entry */
    }
};

DIR-615 E3 : DIR-825 B1 : WNDR3700 V2 : WDR4310 V1.0 : Hardware Hacks  WR703n V1.6 : WR841n V8.0 : WR1041n V2.0 : Latest Toy : Kingston Mobilelite MLW221

Re: TP-Link TL-WR841N v8.0

Hello ?i need this device TTL info,
where is the ttl? i connect TP4 TP5,but there is unread code!

Re: TP-Link TL-WR841N v8.0

In this picture  http://www.right.com.cn/forum/thread-78372-1-1.html  you can see the TTL connection location marked.
You will also need a ground connection. I used a Nokia CA-42 clone cable with a pl-2303 chip.

DIR-615 E3 : DIR-825 B1 : WNDR3700 V2 : WDR4310 V1.0 : Hardware Hacks  WR703n V1.6 : WR841n V8.0 : WR1041n V2.0 : Latest Toy : Kingston Mobilelite MLW221

Re: TP-Link TL-WR841N v8.0

http://i47.tinypic.com/zyeipg.jpg
http://i49.tinypic.com/144070p.jpg
http://i49.tinypic.com/211rneu.jpg

Re: TP-Link TL-WR841N v8.0

@ldipinney
Did you submit your patch to the development mailing list? If not, you should.
The patch probably needs refreshing as some of the files have recently changed with the inclusion of tp-link tl-wdr4300 for example.
Have you tested some or all of these models? Please advise

Cheers

chillifire

9 (edited by ldpinney 2012-07-16 23:20:00)

Re: TP-Link TL-WR841N v8.0

This router REALLY needs a Hardware Hack.
Namely a RAM upgrade which mine has. (64M)
With only 16M of RAM the web interface is a real slug. (not recommended)
Mine runs Firmware built from OpenWrt-Dreambox.
https://dev.openwrt.org.cn/ (in Simplified Chinese)
No hacking required...the 841v8 is supported there.

DIR-615 E3 : DIR-825 B1 : WNDR3700 V2 : WDR4310 V1.0 : Hardware Hacks  WR703n V1.6 : WR841n V8.0 : WR1041n V2.0 : Latest Toy : Kingston Mobilelite MLW221

10 (edited by smooney 2012-07-28 13:24:51)

Re: TP-Link TL-WR841N v8.0

Right, so, a couple of things here:

* TP2 is ground.  TP5 is RX, and TP6 is TX.

* the boot loader is not the same u-boot as used elsewhere; it lacks various commands (cp.b, tftpboot, and so forth) and can not handle u-boot images.  I managed to get it to boot a raw vmlinuz (which killed itself as soon as it probed the serial port), so it might be possible to feed it a custom image with an embedded ramdisk to flash the bootloader, then do the usual bootstrap procedure.

* there's a standard 14-pin MIPS JTAG block (minus headers) at the upper right.  I expect that your friends in Shenzhen used that to flash the u-boot that they've got on their site and loaded OpenWRT on it from there.

* the diff that you uploaded is incomplete.  Although you've got everything there for the 841v8, it's missing .c files for the other platforms that came along for the ride.  I've cleaned it up a bit and made it apply cleanly to a -current tree.

* I'm not convinced that 16 megs is insufficient to run the GUI.  These routers are only about 180 RMB at Cybermall, so it's not cost-effective to ship it up to those thieves in Shenzhen for a memory upgrade.

I nuked the bootloader by screwing around with "update boot ${SERVER} ${IMAGE}", so I need to borrow a JTAG programmer from work before I can look at this further.  Once I get it running again, I'll document my findings and make my image available.

Cheers ...

11 (edited by ldpinney 2012-07-28 14:09:30)

Re: TP-Link TL-WR841N v8.0

smooney wrote:

* I'm not convinced that 16 megs is insufficient to run the GUI.

The factory bootloader is from wind river vxworks.
I can copy the bootloader from my 841v8 for you if you like.
I AM convinced that the luci GUI doesn't run well with only 16MB RAM...but don't let me stop you from trying smile
Perhaps X-Wrt would work OK..I didn't try.

I don't bother patching for this one as it is supported by OpenWrt-Dreambox.

DIR-615 E3 : DIR-825 B1 : WNDR3700 V2 : WDR4310 V1.0 : Hardware Hacks  WR703n V1.6 : WR841n V8.0 : WR1041n V2.0 : Latest Toy : Kingston Mobilelite MLW221

Re: TP-Link TL-WR841N v8.0

Could you please "bother" patching anyway? V8 is now sold in europe too, I don't speak chinese, so support in "OpenWrt-Dreambox" is for nothing, it is the same as if it would be supported in dd-wrt, when I'd like a pure openwrt in english. 16MB is low memory, but I'm running openwrt on older boxes with 16MB perfectly fine, I'm not using web interface neither on 32MB.

Re: TP-Link TL-WR841N v8.0

hi this is my wr841nd v8:


U-Boot 1.1.4 (Apr 12 2012 - 09:57:00)

U-boot AP123


DRAM:  32 MB
id read 0x100000ff
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
wasp reset mask:c03300
WASP ----> S27 PHY
GMAC: cfg1 0x5 cfg2 0x7114
eth0: ba:be:fa:ce:08:41
s27 reg init
athrs27_phy_setup ATHR_PHY_CONTROL 4: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4: 0x10
eth0 up
WASP ----> S27 PHY
GMAC: cfg1 0xf cfg2 0x7214
eth1: ba:be:fa:ce:08:41
s27 reg init lan
ATHRS27: resetting s27
ATHRS27: s27 reset done
athrs27_phy_setup ATHR_PHY_CONTROL 0: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 1: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 2: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 3: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3: 0x10
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

Booting Atheros AR934x

Linux version 2.6.31--LSDK-9.2.0_U5.508 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #3 Thu Apr 12 09:57:51 CST 2012
flash_size passed from bootloader = 4
Ram size passed from bootloader =33554432
CPU revision is: 0001974c (MIPS 74Kc)
ath_sys_frequency: cpu srif ddr srif cpu 535 ddr 400 ahb 200
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,115200 root=31:2 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art) mem=32M
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 30132k/32768k available (1722k kernel code, 2636k reserved, 426k data, 112k init, 0k highmem)
NR_IRQS:128
plat_time_init: plat time init done
Calibrating delay loop... 267.26 BogoMIPS (lpj=534528)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
ATH GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 58
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
PPP generic driver version 2.4.2
NET: Registered protocol family 24
5 cmdlinepart partitions found on MTD device ath-nor0
Creating 5 MTD partitions on "ath-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000003e0000 : "rootfs"
0x0000003e0000-0x0000003f0000 : "config"
0x0000003f0000-0x000000400000 : "art"
->Oops: flash id 0x1c3016 .
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Port Status 1c000004
ath-ehci ath-ehci.0: ATH EHCI
ath-ehci ath-ehci.0: new USB bus registered, assigned bus number 1
ehci_reset Intialize USB CONTROLLER in host mode: 13
ehci_reset Port Status 1c000000
ath-ehci ath-ehci.0: irq 3, io mem 0x1b000000
ehci_reset Intialize USB CONTROLLER in host mode: 13
ehci_reset Port Status 1c000000
ath-ehci ath-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
athwdt_init: Registering WDT success
ath_otp_init: Registering OTP success
ath_clksw_init: Registering Clock Switch Interface success
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 112k freed

init started:  BusyBox v1.01 (2012.04.13-11:59+0000) multi-call binary
This Board use 2.6.31
xt_time: kernel timezone is -0000
nf_conntrack version 0.5.0 (512 buckets, 5120 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_raw.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/flashid.ko': No such file or directory
PPPoL2TP kernel driver, V1.0
PPTP driver version 0.8.3
insmod: cannot open module `/lib/modules/2.6.31/kernel/harmony.ko': No such file or directory

Now flash open!
Now flash open!
(none) mips #3 Thu Apr 12 09:57:51 CST 2012 (none)

(none) login: ATHR_GMAC: Length per segment 1536
ATHR_GMAC: fifo cfg 3 01f00140
ATHR_GMAC: RX TASKLET - Pkts per Intr:32
mac:1 Registering S27....
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   128
ATHR_GMAC: Mac capability flags    :   2D82
ATHR_GMAC: RX TASKLET - Pkts per Intr:32
mac:0 Registering S27....
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   128
ATHR_GMAC: Mac capability flags    :   2582
athr_gmac_ring_alloc Allocated 640 at 0x81e88c00
athr_gmac_ring_alloc Allocated 2048 at 0x81ccb000
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
athr_gmac_ring_alloc Allocated 640 at 0x81e88800
athr_gmac_ring_alloc Allocated 2048 at 0x81e9b800
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
ATHRS27: resetting s27
ATHRS27: s27 reset done
++++ athrs27_igmp_setup once
port0 vid is 0xb000b
port1 vid is 0x30003
port2 vid is 0x50005
port3 vid is 0x70007
port4 vid is 0x90009
++ PVID: 0x0000000b, bitmap: 0x0000001f
++ PVID: 0x00000003, bitmap: 0x0000001f
++ PVID: 0x00000005, bitmap: 0x0000001f
++ PVID: 0x00000007, bitmap: 0x0000001f
++ PVID: 0x00000009, bitmap: 0x0000001f
vtable vid: 0x00000002, bitmap 0x00000003
vtable vid: 0x00000004, bitmap 0x00000005
vtable vid: 0x00000006, bitmap 0x00000007
vtable vid: 0x00000008, bitmap 0x00000009
vtable vid: 0x0000000a, bitmap 0x0000000b
vtable vid: 0x0000000c, bitmap 0x0000000d
vtable vid: 0x0000000e, bitmap 0x0000000f
vtable vid: 0x00000010, bitmap 0x00000011
vtable vid: 0x00000012, bitmap 0x00000013
vtable vid: 0x00000014, bitmap 0x00000015
vtable vid: 0x00000016, bitmap 0x00000017
vtable vid: 0x00000018, bitmap 0x00000019
vtable vid: 0x0000001a, bitmap 0x0000001b
vtable vid: 0x0000001c, bitmap 0x0000001d
vtable vid: 0x0000001e, bitmap 0x0000001f
vtable vid: 0x00000020, bitmap 0x00000021
Setting PHY...
device eth0 entered promiscuous mode
athr_gmac_ring_free Freeing at 0x81e88c00
athr_gmac_ring_free Freeing at 0x81ccb000
athr_gmac_ring_alloc Allocated 640 at 0x81e88c00
athr_gmac_ring_alloc Allocated 2048 at 0x81ea3800
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
Now flash open!
athr_gmac_ring_free Freeing at 0x81e88800
athr_gmac_ring_free Freeing at 0x81e9b800
athr_gmac_ring_alloc Allocated 640 at 0x81e88800
athr_gmac_ring_alloc Allocated 2048 at 0x81e9b000
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
====>>>>DHCP start.dhcpc.c,dhcpcStart,396
====>>>>DHCP end.dhcpc.c,dhcpcStart,456
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
asf: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 9.2.0_U10.1020 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
ACBKMinfree = 48
ACBEMinfree = 32
ACVIMinfree = 16
ACVOMinfree = 0
CABMinfree = 48
UAPSDMinfree = 0
Restoring Cal data from Flash
ath_get_caps[5105] rx chainmask mismatch actual 3 sc_chainmak 0
ath_get_caps[5080] tx chainmask mismatch actual 3 sc_chainmak 0
wifi0: Atheros 9340: mem=0xb8100000, irq=2
====>>>>SystemMode : Normal Router
wlan_vap_create : enter. devhandle=0x80c082c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x80c082c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
VAP device ath0 created
====>>>>wlan: rand channel 1


DES SSID SET=TP-LINK_F865F2
ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1
Free buffer count 256

sc_txq[0] :
sc_txq[0] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[1] :
sc_txq[1] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[2] :
sc_txq[2] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[3] :
sc_txq[3] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[6] :
sc_txq[6] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[7] :
sc_txq[7] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[8] :
sc_txq[8] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 

***********************************
athr_gmac_ring_free Freeing at 0x81e88800
athr_gmac_ring_free Freeing at 0x81e9b000
br0: port 1(eth0) entering disabled state
athr_gmac_ring_alloc Allocated 640 at 0x81e88800
athr_gmac_ring_alloc Allocated 2048 at 0x81f01800
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
Free buffer count 256

sc_txq[0] :
sc_txq[0] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[1] :
sc_txq[1] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[2] :
sc_txq[2] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[3] :
sc_txq[3] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[6] :
sc_txq[6] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[7] :
sc_txq[7] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[8] :
sc_txq[8] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 

***********************************
device ath0 entered promiscuous mode
br0: port 2(ath0) entering forwarding state
ieee80211_ioctl_siwmode: imr.ifm_active=918144, new mode=3, valid=1
br0: port 2(ath0) entering disabled state

DES SSID SET=TP-LINK_F865F2
Free buffer count 256

sc_txq[0] :
sc_txq[0] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[1] :
sc_txq[1] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[2] :
sc_txq[2] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[3] :
sc_txq[3] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[6] :
sc_txq[6] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[7] :
sc_txq[7] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 
sc_txq[8] :
sc_txq[8] : depth  is 0
aggr_depth is 0 tidBufCount 0  bufQCount 0 axq_cnt 0
 

***********************************
br0: port 2(ath0) entering forwarding state
====>>>>cmdCtrl open success
====>>>>eventCtrl open success
====>>>>eventCtrl attach success
ATHR_GMAC: GE0 RX DMA ENABLE
ath_paprd_cal PAPRD excessive failure disabling PAPRD now


i see 32mb of ram.. it's possible?? can i help? i'm not a programmer sad and sorry for my english

Re: TP-Link TL-WR841N v8.0

4M flash and 32M ram,no problem to run openwrt.But there is no target profile in openwrt for WR841N v8,so you need reference the patch in this topic and compile firmware by yourself.

Re: TP-Link TL-WR841N v8.0

humm ok but i don't have any idea how to do it... can you help me?

Re: TP-Link TL-WR841N v8.0

hi, I encounter some compile error. The following source codes not exist.
++obj-$(CONFIG_ATH79_MACH_TL_WR700N)    += mach-tl-wr700n.o
++obj-$(CONFIG_ATH79_MACH_TL_WR702N)    += mach-tl-wr702n.o
++obj-$(CONFIG_ATH79_MACH_TL_WR710N)    += mach-tl-wr710n.o
++obj-$(CONFIG_ATH79_MACH_TL_WR800N)    += mach-tl-wr800n.o
where can i get them?

17

Re: TP-Link TL-WR841N v8.0

See target/linux/ar71xx/files/ in the OpenWrt checkout.

Re: TP-Link TL-WR841N v8.0

my openwrt version is 31813, but mach-tl-wr700n.c and other 3 files don't exist in target/linux/ar71xx/files

wfj@warren:~/openwrt/trunk/target/linux/ar71xx/files$ find . -name "mach-tl-wr700n*"
wfj@warren:~/openwrt/trunk/target/linux/ar71xx/files$

found nothing

Re: TP-Link TL-WR841N v8.0

Hello all,i have change the uboot ,and use someone make the firmware it's ok , but  i try to make a 841n v8 rom form Dream-box,  then update to 841n v8 it's not work, and the ttl can't display anything, is there anyone to make the firmware form Dreambox successful?

Re: TP-Link TL-WR841N v8.0

eastwoodnet wrote:

Hello all,i have change the uboot ,and use someone make the firmware it's ok , but  i try to make a 841n v8 rom form Dream-box,  then update to 841n v8 it's not work, and the ttl can't display anything, is there anyone to make the firmware form Dreambox successful?

can you give me the link?

Re: TP-Link TL-WR841N v8.0

mips wrote:

4M flash and 32M ram,no problem to run openwrt.But there is no target profile in openwrt for WR841N v8,so you need reference the patch in this topic and compile firmware by yourself.

Hi mips, I've done as you suggested (create mach-tl-wr841n-v8.c with the code above & created a patch) but when I run the patch I get a lot of failed hunks. Any ideas why that's failing ? Anyone else had luck building firmware for the v8.1 TP Link TL 841N ?

Re: TP-Link TL-WR841N v8.0

Hello!

I want to flash my TP-LINK WR841ND v8 with this firmware (openwrt) beacuse my hardware version is not supported by others.Can you give me flash instructions and the file (bin) that need to upload to the router to start the flash?

Thanks you very much!

Re: TP-Link TL-WR841N v8.0

@neuralnet:
Do you try the patch on the latest trunk code?
The patch is work on some old revision,if you want to let it work on latest trunk code,you need reference this patch and merge it by you hand!
I think you can get some help from ldpinney.

24 (edited by drdaeman 2012-10-04 20:01:04)

Re: TP-Link TL-WR841N v8.0

To repack original v8.0/Intl firmware use:

mktplinkfw -x -i "$FW"
mktplinkfw -H 0x08410008 -F 4Mlzma -N 'TP-LINK Technologies' -V 'ver. 1.0' -k "$FW-kernel" -L 0x80002000 -E 0x801a9c00 -r "$FW-rootfs" -j -o wr841nv8-repacked.bin

Took me some time to get it right. Re-flashing the firmware (with stock U-boot) works fine.

I've built OpenWRT r33602 (for now, without patches from this thread) for WR841ND v7 and packed it this way:

mktplinkfw -H 0x08410008 -F 4Mlzma -N 'OpenWRT' -V 'r33602' -k "openwrt-ar71xx-generic-vmlinux.lzma" -r "openwrt-ar71xx-generic-root.squashfs" -j -o wr841nv8-openwrt.bin

Then flashed it using TFTP:

wasp> tftp 0x81000000 wr841nv8-openwrt.bin
enet1 port0 up
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.111
Filename 'wr841nv8-openwrt.bin'.
Load address: 0x81000000
Loading: #################################################################
         ....
         ######################################################
done
Bytes transferred = 3932160 (3c0000 hex)
wasp> erase 0x9f020000 +0x3c0000

First 0x2 last 0x3d sector size 0x10000                                       61
Erased 60 sectors
wasp> cp.b 0x81000000 0x9f020000 0x3c0000
Copy to Flash... write addr: 9f020000
done
wasp> bootm 0x9f020000
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... Too big uncompressed streamLZMA ERROR 1 - must RESET board to recover

Don't know why in failed to load kernel straight after flashing, but after rebooting everything went almost fine:

wasp> set bootargs=foo bar board=TL-WR741ND console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
wasp> bootm 0x9f020000
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 3.3.8 (drdaeman@kohaku) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #3 Thu Oct 4 01:42:47 MSK 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9341 rev 1
[    0.000000] Clocks: CPU:535.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  foo=bar board=TL-WR741ND console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd mem=32M rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29140k/32768k available (2098k kernel code, 3628k reserved, 399k data, 208k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 266.64 BogoMIPS (lpj=1333248)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 22 on device: ath79
[    0.100000] MIPS: machine is TP-LINK TL-WR741ND
[    0.100000] ar71xx: invalid PHY interface mode for GE1
[    0.110000] ar71xx: invalid PHY interface mode for GE0
[    0.120000] bio: create slab <bio-0> at 0
[    0.130000] Switching to clocksource MIPS
[    0.130000] NET: Registered protocol family 2
[    0.140000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.140000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.150000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.150000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.160000] TCP reno registered
[    0.160000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.170000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.170000] NET: Registered protocol family 1
[    0.190000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.200000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.210000] msgmni has been set to 56
[    0.210000] io scheduler noop registered
[    0.220000] io scheduler deadline registered (default)
[    0.220000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.250000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.260000] console [ttyS0] enabled, bootconsole disabled
[    0.260000] console [ttyS0] enabled, bootconsole disabled
[    0.270000] m25p80 spi0.0: found en25q32b, expected m25p80
[    0.280000] m25p80 spi0.0: en25q32b (4096 Kbytes)
[    0.280000] 5 tp-link partitions found on MTD device spi0.0
[    0.290000] Creating 5 MTD partitions on "spi0.0":
[    0.290000] 0x000000000000-0x000000020000 : "u-boot"
[    0.300000] 0x000000020000-0x000000120000 : "kernel"
[    0.310000] 0x000000120000-0x0000003f0000 : "rootfs"
[    0.310000] mtd: partition "rootfs" set to be root filesystem
[    0.320000] mtd: partition "rootfs_data" created automatically, ofs=300000, len=F0000
[    0.330000] 0x000000300000-0x0000003f0000 : "rootfs_data"
[    0.340000] 0x0000003f0000-0x000000400000 : "art"
[    0.340000] 0x000000020000-0x0000003f0000 : "firmware"
[    0.370000] ag71xx_mdio: probed
[    0.380000] TCP cubic registered
[    0.380000] NET: Registered protocol family 17
[    0.390000] Bridge firewalling registered
[    0.390000] 8021q: 802.1Q VLAN Support v1.8
[    0.400000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.410000] Freeing unused kernel memory: 208k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[    5.650000] JFFS2 notice: (517) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 10 of xref (0 dead, 2 orphan) found.
switching to jffs2
- init -

Please press Enter to activate this console. [    7.060000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    7.070000] Backport based on wireless-testing.git master-2012-09-07
[    7.070000] compat.git: wireless-testing.git
[    7.110000] cfg80211: Calling CRDA to update world regulatory domain
[    7.110000] cfg80211: World regulatory domain updated:
[    7.120000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    7.130000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    7.140000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.140000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.150000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    7.160000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    7.600000] NET: Registered protocol family 10
[    7.670000] cfg80211: World regulatory domain updated:
[    7.670000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    7.680000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    7.690000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.700000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.700000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    7.710000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.440000] PPP generic driver version 2.4.2
[    8.470000] tun: Universal TUN/TAP device driver, 1.6
[    8.470000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    8.590000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.860000] NET: Registered protocol family 24
[    8.880000] nf_conntrack version 0.5.0 (458 buckets, 1832 max)
[    9.360000] xt_time: kernel timezone is -0000
[   10.060000] arp_tables: (C) 2002 David S. Miller
[   10.170000] Ebtables v2.0 registered
[   10.570000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.830000] NF_TPROXY: Transparent proxy support initialized, version 4.1.0
[   10.840000] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
[   11.140000] Error: Driver 'gpio-keys-polled' is already registered, aborting...



BusyBox v1.19.4 (2012-10-03 17:09:05 MSK) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (Bleeding Edge, r33602)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:/#

Unfortunately, at this stage, the console input gets garbled up for some reason (everything was fine in U-Boot), so I haven't tried any further.

(Any suggestions why input may be garbled?)

Re: TP-Link TL-WR841N v8.0

Hey. This is one image I got from some forum. And, it is WORKING on my 841v8. Hope this helps.
http://jnjn.homepc.it:10581/files/downl … actory.rar