TP-Link TL-WR841ND

The device is a wireless N router with

  • 2 detachable antennas
  • 4 Port 100/10 Switch
  • 1 Port 100/10 Wan Interface
  • 4 MB Flash

Note1: The TL-WR841N is identical except that the antennas are not detachable. TP-Link naming scheme is, that devices ending in a D have detachable antennas.
Note2: v5.4, v5.2 etc. are all v5. The only difference is the firmware version the come with.

Clones

Known clones of this device:

  • TP-Link TL-WR841ND v7: Rosewill Wireless N Router RNX-N300RT – see rnx-n300rt
  • TP-Link TL-WR841ND v8: Mercury MW300R v3 and Fast FW300R v3.

Supported Versions

The TP-Link versioning scheme seems to be:

  • major-number.minor-number, where the major-number refers to hardware changes, and the minor-number refer to software (firmware) changes; this includes the bootloader!
  • If there is a language-code. e.g. (DE)v1.0, that means, that the TP-Link WebUI is that language. (Of course LuCI has Native Language Support)
  • Sometimes, version x. is only available in the PRC and version y. is intended for sale world-wide. The hardware between version x. and version y. can differ significantly but does not have to.
  • Sometimes, there is Version x. for PRC only and Version x. for world-wide sale. If there is a special chinese-Version with the same major-number, then that version has usually significantly different hardware
Version/Model Launch Date OpenWrt Version Supported Model Specific Notes
v3 - 10.03 Report
v5 - 10.03 Report
v5 - 10.03.1-rc4 Works pretty well
v5.x - 12.09 fully working with 12.09
v7.1 - 12.09 UFO shape – Fully working with 12.09
v7.2 - 12.09 UFO shape – Fully working with 12.09
v8.x (chinese version) - Trunk r29631(modified) need hardware mod
v8.x (Intl) 2012-Aug 12.09 DB120 - IPv6 bug
v9 2014 trunk r40400 it's booting (tested with r40449)

Hardware

Version v3 v5 v7.1 v7.2 v8.0 v9.0
Instruction set: MIPS
Vendor: Atheros
Bootloader: UBoot
System-On-Chip: AR9130 AR7240 rev 2 AR7241 rev 1 AR7241-AH1A AR9341 QCA9533-AL3A
CPU Frq: 400 Mhz 400 Mhz 400 Mhz 400 Mhz 535 Mhz 550 MHz
BogoMIPS: 265.42 266.24 265.42 265.42 266.64 366.18
Flash-Chip: ? ? ? cFeon F32-100HIP (?) FL032PIF ?
Flash size: 4 MiB 4 MiB 4 MiB 4 MiB 4 MiB 4 MiB
RAM-Chip: ? ? ? Zentel A3S56D40ETP-G5 ? ?
RAM size: 32 MiB 32 MiB 32 MiB 32 MiB 32 MiB 64 MiB
Wireless No1: Atheros AR9100 Rev:7 Atheros AR9280 Rev:2 Atheros AR9287 Rev2, 2.4GHz, 802.11bgn Atheros AR9287-BL1A 2.4ghz 802.11bgn AR9341 QCA9533-AL3A
Wireless No2: none
Switch: ? AR7240 built-in switch AR7240/AR9330 built-in switch ? AR9341 built-in switch QCA9533-AL3A build-in
USB: ? Unpopulated unpopulated ? ? ?
Serial: Yes Yes Yes Yes Yes Remove R26
JTAG: ? ? ? ? JTAGlYes ?

Installation

Flash the 12.09 squashfs images only, the jffs images will brick the router (not enough space on 4Mb flash) (bug report).

Installing OpenWrt on TP-Link TL-WR841ND V5:

  1. Log in to router web interface and select the firmware image you just uploaded as an update
  2. Sit and wait while it flashes. It will reboot and be accessible at 192.168.1.1.

Installing OpenWrt on TP-Link TL-WR841ND V7.x:

  1. Log in to router web interface and select the firmware image you just uploaded as an update
  2. Sit and wait while it flashes. It will reboot and be accessible at 192.168.1.1.

:!: Warning! in some cases after reboot you don't have web interface (GUI), only telnet and ssh access. You can install GUI, for details see: luci.essentials, but before install LuCI (GUI) you need to configure your router to have access to internet, for configuration see: internet.connection

Installing OpenWrt on TP-Link TL-WR841ND V8.x:

  1. Log in to router web interface http://192.168.0.1/ and select the firmware image you just uploaded as an update
  2. Sit and wait while it flashes. It will reboot and be accessible at 192.168.1.1.

:!: Warning! in some cases after reboot you don't have web interface (GUI), only telnet and ssh access. You can install GUI, for details see: luci.essentials, but before install LuCI (GUI) you need to configure your router to have access to internet, for configuration see: internet.connection

TFTP install

Beware that this installation method needs a TTL level serial console and a working TFTP server and should not be attempted unless you have experience with this sort of thing or are eager to learn.

This is taken more or less verbatim from https://forum.openwrt.org/viewtopic.php?id=24203, thanks to dl3daz.

  1. Hook your routers WAN ethernet port up to your network (for v8.2 it's LAN1 ethernet port)
  2. Hook up the serial console as explained in the section "serial console". At the prompt "Autobooting in 1 seconds" type "tpl" quickly to start a uboot console.
  3. Now we need to set router and server IP addresses (here named ROUTERIP and SERVERIP, substitute these with the real IP addresses). Type in the console:
    setenv ipaddr ROUTERIP
    setenv serverip SERVERIP
    printenv
    
  4. Double check that the output of printenv lists the IP addresses you just set.
  5. At least on v8.2, uboot needs the tftp server to be listening on port 69. Make sure your server is configured to listen to that port. Now we can load the firmware over TFTP with "tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin":
    ar7240> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin
    Using eth0 device
    TFTP from server 192.168.32.253; our IP address is 192.168.32.246
    Filename 'openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin'.
    Load address: 0x80000000
    Loading: checksum bad
    #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ######################################################
    done
    Bytes transferred = 3932160 (3c0000 hex)
    
  6. Note the "3c0000" in the last line (your number may differ). Now execute the following commands, if necessary replacing 3c0000 with the number you got from tftpboot

For TL-WR841ND v3:

ar7100> erase 0xbf020000 +0x3c0000
                                                                             
First 0x2 last 0x3d sector size 0x10000                                      
  61                                                                         
Erased 60 sectors
ar7100> cp.b 0x80000000 0xbf020000 0x3c0000                                  
Copy to Flash... write addr: bf020000                       
done                                                        
ar7100> reset                                               
                                                            
Resetting...

For TL-WR841ND v5, v7 and v8:

ar7240> erase 0x9f020000 +0x3c0000
...
ar7240> cp.b 0x80000000 0x9f020000 0x3c0000
ar7240> bootm 0x9f020000

For TL-WR841ND v8.2:

First of all, you need a TTL-RS232 level shifter, like this or DKU-5 data cable. It's work with other boards.

1. Hook your computer into the LAN1 ethernet port and configure this static ip for your LAN card 192.168.1.100. If your computer containing other LAN or Wifi card, disable it!

2. Type in the console

setenv ipaddr 192.168.1.111
setenv serverip 192.168.1.100
192.168.1.111 is the router ip, 192.168.1.100 is the TFTP server ip.

3. Check settings with this command, but it's not necessary.

printenv
4. Load the firmware to RAM, witch is not containing the bootloader:
wasp> tftp 0x81000000 firmwarename.bin
Using eth0 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.111
Filename 'firmwarename.bin'.
Load address: 0x81000000
Loading:
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################################
done
Bytes transferred = 3932160 (3c0000 hex)

Firmware is now in the RAM.

5. Erase the flash:

wasp> erase 0x9f020000 +0x3c0000
6. Copy RAM content to flash:
wasp> cp.b 0x81000000 0x9f020000 0x3c0000
7. Set up the boot
wasp> bootm 0x9f020000
## Booting image at 9f020000 ...
Uncompressing Kernel Image ... OK

Starting kernel ...

8. Done ;-)

Go back to original firmware

  • Download the original firmware from TP-Link's site (IMPORTANT: Download a firmware which has does not contain the word boot in it's filename (such as wr741nv1_en_3_9_18_up_boot(100104).bin), extract the file and rename it to something short and simple such as tplink.bin.

TP-Link wr841n v.8 firmware w/o boot in title

  • tested to work on n, might work on nd 9-11-2013 - note - edited link to ND and it also downloaded the same file. Thanks to Undermonster on openwrt forum.
  • Note: restore to old (smaller) firmware mentioned above to avoid "[e]Failed to erase block" error, then upgrade in the TP-Link web interface to the latest firmware TL-WR841N_V8_130506
  • Upload it to /tmp-directory on your router and execute:
    mtd -r write /tmp/tplink.bin firmware
    
  • Be careful, if you were hit by the "missing web interface" problem described above, you will be probably see the same issue when flashing back to OEM and the box will lack in telnet or ssh, too, so no way to get out without hardware intervention.

Failsafe mode

generic.failsafe

  1. When the SYS led (under gear icon) starts to blink push the QSS/reset button for around 5-10 sec. Now the led should blink a lot faster than before.

Debricking

v7.2 (July 2012)

  1. Disconnect the router from the internet, connect it with a PC via RJ45 cable and perform a 30/30/30 restart
  2. Change the ip on the PC to 192.168.1.2, subnet mask must be 255.255.255.0 and restart the router by unplugging the power cable
  3. Perform a failsafe boot, quickly use
    telnet 192.168.1.1

If this didnt work check the ip adress on the PC or if you were too slow to connect during the failsafe mode. Still not working? Read this!

In telnet do the following things one after another:

  • Define a password
    passwd
    enter
    yourpassword
    enter
    againyourpassword
    enter
  • Kill the broken OWRT firmware
    mtd -r erase rootfs_data
    enter
    firstboot
    enter
    reboot -f
    After rebooting log in again just to check if the router is accessable. If you cant start again at the beginning.

Now change the network settings on the PC back to "Aquire IP adress automatically" and connect the router with the internet. Do a manual reboot by simply turning it off and back on again. The PC should now get an ip adress by DHCP. If this is the case you successfully resetted the router. If not repeat from the beginning or do this if you like.

Basically the router now works like after the initial flash to OWRT. Now you have to configure the internet connection and probably you want to install LUCI. After that open your browser, connect to 192.168.1.1 and log in with the data you entered via telnet.

v8.x note

Debricking see the above, but you will have to plug your cable to WAN port in failsafe to be able to telnet 192.168.1.1.

Basic configuration

Wifi on/off toggle by QSS button

Read this howto to use buttons on TP-Link

Found in WR741ND wiki page and coppied. It works on WR841ND too.

(Thanks to obsy) Wifi toggle by QSS button Simply create a new file called 01onoff in /etc/hotplug.d/button/

vi /etc/hotplug.d/button/01onoff

and copy these lines inside (remember to push 'i' for insert)

#!/bin/sh

[ "$BUTTON" = "wps" ] && [ "$ACTION" = "pressed" ] && {
 SW=$(uci get wireless.@wifi-device[0].disabled)
 [ $SW == '0' ] && uci set wireless.@wifi-device[0].disabled=1
 [ $SW == '0' ] || uci set wireless.@wifi-device[0].disabled=0
 wifi
}

Save and exit

(esc :wq)

Serial console

Getting serial console is pretty standard fare. You need a MAX323 or similar level-shifter. The pinout on the router is RX - TX - GND - +5V (Power connector).

If you do not have serial port on your PC, use Nokia CA-42 data USB cable.

For TP-LINK WR841ND V7.2 power conector (+5V) is ignored, just connect RX - TX - GND and router power cord, work fine…

Another user notes: My TP-LINK WR841ND V7.2 has a VCC of +3.3V and like the TL-MR3420 http://wiki.openwrt.org/toh/tp-link/tl-mr3420#serial needed to connect a 10k pullup resistor between the TX and the 3.3V pin to get reliable serial.

Yet another user notes: My TP-Link WR841ND V7.1 also requires the 10k pullup resistor between TX and the 3.3V pin. Without the resistor I just get garbage when I type, but can see some console output.

Yet another-another user notes:just swap TX and GND pin in serial and no garbage in serial console, but this is read-only.

Yet another-another-another user notes: For my TP-Link TL-WR841ND v8.4 was not required 10K resistor. Connection you can see on the following image:

Futher notes: For my TP-Link TL841N v9.0 i had to remove R26. It's a pull-up between RX (device side) and VCC. My ftdi device couldn't send data with R26 attached.

I think my TTL to RS232 converter has bad marking of Tx and Rx pins. So, it was necessary to connect Tx-Tx and Rx-Rx. Connection of Vcc (3.3V) was necessary too.

Tip: Connecting TL-WR841N v8.1 via Arduino Due R3 ( forum link):

Serial port settings:

Version v3.2 v5 v7.X v8.4 v9.0
Image serial console connection on TL-WR841N(D) v8.4 ASCII
U-Boot speed 9600 115200
kernel speed 115200 - switch automaticaly 115200
Data format always 8N1

After connecting, you will be greeted by something like this:

AP93 (ar7240) U-boot
DRAM:  
sri
#### TAP VALUE 1 = 9, 2 = 9
32 MB
id read 0x100000ff
flash size 4194304, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7014
eth0: 00:03:7f:09:0b:ad
eth0 up
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Autobooting in 1 seconds
You now have one second to enter "tpl" (without the quotes) to get to the Uboot console prompt.

JTAG

Near the two biggest capacitor you could see a HE10 connector with 14 pin (V8).

Pin Function Pin
1 ? GND 2
3 TCK GND 4
5 TDI GND 6
7 TDO GND 8
9 TMS GND 10
11 ? ? 12
13 ? ? 14

For JTAG interface you need VCC. You could take it on the TP1 point test.

Troubleshooting

Stuck at 130Mbps? Get 300Mbps

This violates regulatory requirements

Edit the file /etc/config/wireless

  1. Below config 'wifi-device' 'radio0' add
    option 'noscan' '1'
    
  2. option 'htmode' should be set either to HT40+ or HT40-(HT40+ wont work with Channel 11)
    option 'htmode' 'HT40+'
    
  3. Restart wireless
    wifi

Can not connect to v8?

check whether eth0/eth1 are switched!

Bootloader Mods

  1. you could read about bootloader in general and about Das U-Boot in particular.

U-Boot 1.1.4 modification for routers

Forum member pepe2k made a modification of U-Boot 1.1.4 for Qualcomm Atheros SoCs based devices (the project is still being developed, so new devices and SoCs will be supported in the future). Up to date information, binary images and sources can be found on official GitHub repository.

This modification started from wr703n-uboot-with-web-failsafe project, but supports more devices, all modern web browsers, has a lot of improvements and other modifications (like U-Boot NetConsole, custom commands, overclocking possibilities etc.).

More information:

Hardware Mods

USB 1.1 Port

Tested on WR841n_v5.1

Attention. Firmware of TP-Link TL-MR 3420 is coming to WR841ND v7.2 - verified. (OpenWrt Firmware Attitude Adjustment (r28380) / LuCI Trunk (trunk+svn7612)) But working usb port has not been verified. Probably enough to use this firmware, but do not compile a new one :)

Overview of the board:

Soldering (wire with red accent means D+). R185 and R183 can be shorted then D+/D- will appear in J1.

To get working USB the new firmware build is required. Files to edit are listed below:

1. Edit file target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841nd.c

    Add line #include "dev-usb.h" after line #include "dev-leds-gpio.h"
    Add line ar71xx_add_device_usb(); before line ar71xx_add_device_mdio(0x0);

2. Edit file target/linux/ar71xx/files/arch/mips/ar71xx/setup.c

   Add line ar71xx_pll_wr(0x08, 0x00001030); before line ar71xx_detect_mem_size();

3. Edit file target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig:

config AR71XX_MACH_TL_WR841N_V1
        bool "TP-LINK TL-WR841N v1 support"
        select AR71XX_DEV_M25P80
        select AR71XX_DEV_PB42_PCI if PCI
        select AR71XX_DEV_DSA
        select AR71XX_DEV_GPIO_BUTTONS
        select AR71XX_DEV_LEDS_GPIO
        select AR71XX_DEV_USB
        default n

For newer version of trunk (as of 2013 March) 1.Edit file target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n.c

    Add line #include "dev-usb.h" after line #include "dev-leds-gpio.h"
    Add line ath79_register_usb(); after line ath79_register_eth(0);

2. Edit file target/linux/ar71xx/generic/profiles/tp-link.mk, add packages in the definition of TLWR841 as following.

define Profile/TLWR841
	NAME:=TP-LINK TL-WR841N/ND
	PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
endef

i.e L7805 with 470uF and 100uF can be used to obtain 5V from the stock power supply.

NOTE: in case of v5.1 sections for WR741N instead of WR841N_V1 have to be edited (Kconfig, mach-tl-wr741nd.c).

USB 2.0 Port on v7

tested with WR841 v7.1 and trunk revision 30430. New patch for rev. 32461 available

Hardware mod is on pictures, nothing changed.

Kernel mod is different, because new kernel version is released in revision 30430.

Here is patch for kernel 3.3: http://mysicka.ics.muni.cz/openwrt/usb-patch-final.patch

Apply this patch and build…

Version 8.0 forum thread

Tags

For some Help with the Tags, please have a look here: tags

Back to top

toh/tp-link/tl-wr841nd.txt · Last modified: 2014/04/15 17:15 by skyhirider