TP-Link TL-WR842ND

For more details (including a latest install link (precompiled binary firmware download!)) see the cumulative page: TP-Link TL-MR3420, TL-MR3220, TL-WR841ND v7 & TL-WR842ND.

Supported Versions

Version/Model Release Date Supported Since OpenWrt Version Model Specific Notes
v1.0 Nov-2011 AA (r30508)
v1.1 May-2013 AA (r30508) Internal sticker v1.1, board rev1.0, /proc/cpuinfo same as v1.0.
v2.0 June-2013 BB (r38815)

Unsupported TL-WR842N chinese-only version

Version/Model Release Date OpenWrt Version Supported Model Specific Notes
V1 - V4 2013 probably unsupportable only 2M flash? http://www.tp-link.com.cn/product_298.html

Hardware

Info

Model TL-WR842ND
Version 1 2
Architecture: MIPS 24Kc V7.4 MIPS 74Kc V4.12
Manufacturer: Atheros
Bootloader: U-Boot
System-On-Chip: Atheros AR7241 Atheros AR9341
CPU Speed: 400 MHz 535 MHz
Flash chip: Spansion S25FL064P (FL064PIF) Winbond 25Q64FV or Spansion S25FL064
Flash size: 8 MiB
RAM chip: A3S56D40FTP -G5 Winbond W9425G6JH-5
RAM size: 32 MiB
Wireless Atheros AR9287-bl1a Atheros AR9341
Antenae(s) 2 Removables
Ethernet: 4 LAN, 1 WAN 10/100
USB: 1 x 2.0
Serial: Unfriendly

Flash Layout

Please read the article Flash Layout for a better understanding. It contains a couple of explanations. Then let's have a quick view at flash layout of this particular device:

TP-Link WR842ND Visual Flash Layout OpenWrt 12.09
Offset 0 128 1071 2944 8128
x64KiB Blocks 2 14. … 29. … 81 1
TP-Link WR842ND Flash Layout OpenWrt 12.09
Layer0 m25p80 spi0.0: s25sl064a 8192KiB
Layer1 mtd0 u-boot 128KiB mtd5 firmware 8000KiB mtd4 art 64KiB
Layer2 mtd1 kernel 943KiB mtd2 rootfs 7057KiB
mountpoint /
filesystem mini_fo
Layer3 mtd3 rootfs_data 5184KiB
Size in KiB 128KiB 943KiB 1873KiB 5184KiB 64KiB
Name u-boot kernel rootfs_data art
mountpoint none none /rom /overlay none
filesystem none none SquashFS JFFS2 none

ART = Atheros Radio Test - it contains mac addresses and calibration data for the wifi (EEPROM). If it is missing or corrupt, ath9k won't come up anymore.

Here is a LibreOffice Calc ODS for better understanding: http://ubuntuone.com/5eT1OJweXjF6aa3lMciaLw .

Photos

Version 1.0

TL-WR842ND v1.0

Serial

Pinout
1 2 3 4
TX RX GND VCC SJ1

20120107193104.jpg
Pin 1 is clearly marked on the board.

To get the serial connection work reliably, you may have to connect a 10k pullup resistor between the TX and the 3.3V pin (same problem as described in tl-mr3420.

The TX pin is connected via a 10k resistor to ground and via a 100nF capacitor to the serial output of the SoC. This gives a 2.5Vpp swing centered on ground. While this may work with some serial adapters, it is on the low side for most. An advantage of this connection scheme is that it protects the serial output to some degree.

The right settings for accessing the serial console are as follows:

Bits per second: 115200
Data bits: 8
Stop bits: 1
Parity: None
Flow control: None

Password to get into uboot prompt is tpl
Password to get root login is 5up

Recovery (v1)

Using the integrated tftp capability of the router.

First, enter failsafe mode:

Remove the power plug from the router.
Press and hold the WPS/RESET button.
Insert the power plug without releasing the RESET button, wait a moment for the USB LED to begin to blink.
Release the RESET button

No LED besides the one for USB (and maybe for attached ethernet ports) should be lit.

The device now uses the IP 192.168.1.86. It repeatedly tries to download a file named: wr842ndv1_tp_recovery.bin from a tftpd server with the IP 192.168.1.66.

The following steps will serve an openwrt fimrware image to the device:

Download an appropriate firmware file from TP-LINK site
Rename the file, so it matches the name required by the router: wr842ndv1_tp_recovery.bin

Configure your PC lan adapter ip address to IP 192.168.1.66 and connect your computer to one of the LAN ports of the router.

Install a tftp server, for windows you can download one from http://tftpd32.jounin.net/

Run the tftp server and browse for the directory that contains the above firmware image. If necesary allow the connection of the server through your PCs firewall, once configured, shutdown the tftp server program, you will launch it again later.

If you connect your pc directly to a lan port on the router, be sure to put the router into failsafe mode FIRST (press reset button and plug power cable release reset button after 3 second), and then launch the tftp server, otherwise it might have problems trying to bind to the PC network interface.

Right after you launch the tftp server, a couple of blank messages will appear into the log window of the tftp server, this is normal, the third or fourth message will indicate that the process of file transfer is in progress.

After some time you will see all LEDs flashing once followed by a normal restart of the router

Now you can install the openwrt factory image of your liking, via the vendor firmware upgrade web page of the router.

You could try to flash directly using this method, an openwrt factory image (for this model obviously) to the router, for me it did not work, maybe you have better luck.

Recovery (v2)

Using the integrated tftp capability of the router.

First, enter failsafe mode:

Remove the power plug from the router.
Press and hold the WPS/RESET button.
Insert the power plug without releasing the RESET button, wait a moment for the Lock LED to come on solid.
Release the RESET button

Connect pc to one of the router LAN ports.

Device IP
router ip 192.168.0.86
set your pc ip 192.168.0.66

Set pc ip:

ifconfig eth0:1 192.168.0.66/24 up

Router repeatedly tries to download wr842ndv2_tp_recovery.bin from a tftpd server running on 192.168.0.66.
Some V2.1 hardware model expect the .bin file to be named wr842nv2_tp_recovery.bin, without the "d".

Install tftpd server:

pacman -S tftp-hpa

Download TP-LINK firmware to tftp root and rename it to wr842ndv2_tp_recovery.bin:

mkdir /srv/tftpd
cd /srv/tftpd
wget http://www.tp-link.com/resources/software/TL-WR842ND_V2_130628.zip
unzip TL-WR842ND_V2_*.zip
mv wr842ndv2_en_3_14_2_up_boot(130628).bin wr842nv2_tp_recovery.bin

Start tftpd server:

systemctl start tftpd.socket
systemctl start tftpd.srvice

Router must in recovery mode before starting tftpd server, otherwise it might have problems trying to bind to the PC network interface.

After some time you will see all LEDs flashing once followed by a normal restart of the router.

Back to stock firmware

generic.uninstall

Warning!
This section describes actions that might damage your device or firmware. Proceed with care!

With the TL-WR842ND router, there is a catch: the stock firmware is obtained from the OEM: http://www.tplink.com/en/support/download/?model=TL-WR842ND

  • in case the file name of this firmware file does not contain the word "boot" in it, you can simply revert back to original firmware
  • in case the file name of this firmware file does contain the word "boot" in it, you need to cut off parts of the image file before flashing it:

The following method applies both for the V1 and V2 since the bootloader is the same size.

An example of an image file with the word "boot" in it is wr842ndv1_en_3_12_25_up_boot(130322).bin.

Cut the first 0x20200 (that is 131,584 = 257*512) Bytes from original firmware:

dd if=orig.bin of=tplink.bin skip=257 bs=512

You should transfer the firmeware image to the /tmp folder and revert back to original firmware (if availlable you can flash the firmware via the webinterface as well):

Via the safer method using sysupgrade:

sysupgrade /tmp/tplink.bin

Or you use the mtd method:

mtd -r write /tmp/tplink.bin firmware

It is also possible to revert to the stock firmware using the method with tftp described in "recovery". (you still need the firmware image without the boot part).

OEM TP-Link firmware for the TL-WR842ND with the boot part removed to revert to the original OEM firmware:

Power

General

This device has two main power regulators, one 12V→3V3 for the CPU, memory, wireless and one 12V→5V for USB.

Main 3V3 Power

This is delivered by a switching regulator with up to 2A at 3V3 output. Power is drawn from external input over one 1A Schottky diode (SS14), with a voltage drop of max .45V at 1A. It should be perfectly safe to draw an additional 100-200mA for your own additions from 3V3.

USB Power

USB power is derived from the 12V input over two SS14 Schottky diodes, the one also feeding the 3V3 regulator and an additional one. The output regulator is capable of delivering up to 1.5A, but there is a USB current switch/limiter that limits output current to 1A (and goes into 50% duty-cycle on/off in addition after about 200ms on short-circuit).

It should be fine to draw something like 700mA long-term from 5V USB and up to a bit less than 1A briefly. This is enough to spin-up and power most external 2.5" USB HDDs. You can try it out. The worst that can happen is that it does not work. The USB power-switch is fully protected and the regulator has reserves, as it uses an external PNP power transistor and has its own over-current protection at 1.1A.

I did run it at 750mA current draw from USB for half an hour without the regulator getting too warm. What I measured was 10C below the main SoC. The external 12V/1A PSU should also be fine with these loads. Still, if anything blows up in your face, or your house burns down, I am not responsible…

Tags

Back to top

toh/tp-link/tl-wr842nd.txt · Last modified: 2014/11/08 10:45 by fct_chx