TP-Link TL-WR802N V2 Support

I've been trying to flash my TL-WR802N V2 with not much success.

The current LEDE build is for V1 but I believe V2 is quite similar but attempting to flash the router gives me this message:

Error code: 18005
Upgrade unsuccessfully because the version of the upgraded file was incorrect. Please check the file name.

This is the info from the factory firmware:

Firmware Version:
3.16.9 Build 151231 Rel.53503n
Hardware Version:
WR802N v2 00000000

Here are some links to the GPL Source + FCC listing


PR is prepared and wait to accept: https://github.com/lede-project/source/pull/725

Thanks for the fast reply! Eagerly awaiting the PR merge

These are my latest images if you want to have play while the pull request is waiting to be merged.

*factory.bin is for TL-WR802N Ver:2.0
*factory-eu.bin is for TL-WR802N(eu) Ver:2.0

Should flash fine through the OEM web interface although I flashed mine using tftp and debug serial port on the board.

Thank you for providing this build, I tried it to flash it on my 802N v2 and it uploads via tftp fine but it's like the flash doesn't "take".
Eventually it just acts like a fresh set up with the default TP-Link firmware.

I do have an FTDI adapter here but from the pics of the board I didn't see any serial headers to hook it up to, where would they be located?

Flashing through the web interface brings up the usual 18005 error.

EDIT:
I worked around this by flashing dd-wrt first using this build:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=260224&sid=0905bc25869700b4f65921a94afde027

It might take a bit of fiddling but if you can get the lede image over to /tmp you can flash it with the mtd command.

What's the exact model number of your device? For example mine is "TL-WR802N(EU) Ver:2.0". I can flash my device using the TP-Link factory firmware web interface with "lede-ar71xx-generic-tl-wr802n-v2-squashfs-factory-eu.bin" with no errors (Note the *-eu.bin at the end of the file. I can also flash it using USB TTL cable can tftp using u-boot.

If you wish to connect a USB TTL cable to the router you need to solder some wires to TP_OUT, TP_IN and some GND point on the board. I have attached a photo but it's not too clear.

Installation through tftp and USB TTL:
Note: T_OUT, T_IN and GND on the board must be connected to USB TTL
Serial Configuration 115200 8n1

  • Boot the TL-WR802N
  • When "Autobooting in 1 seconds" appears type "tpl" followed by enter
  • Connect to the board Ethernet port
    (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10)
  • tftpboot 0x80000000 [Firmware Image Name]
  • Record the result of "printenv bootcmd"
  • Enter "erase [Result of 'printenv bootcmd'] +0x3c0000"
    (e.g erase 0x9f020000 +0x3c0000)
  • Enter "cp.b 0x80000000 [Result of 'printenv bootcmd'] 0x3c0000"
    (e.g cp.b 0x80000000 0x9f020000 0x3c0000)
  • Enter "bootm [Result of 'printenv bootcmd']"
    (e.g bootm 0x9f020000)

Ah, it looks like despite being Canadian I get the US version which from what I've read is purposely locked down or something.

I'll have to see if I get brave enough to solder wire onto the PCB, my hands aren't the steadiest so maybe I'll see if I can get around that somehow.
Luckily, if anyone runs into the same problem it is work-aroundable using the dd-wrt first method and once you have LEDE installed you can use it's web flash with no issues at all.

I have updated my images. I used release candidate 2 tag and built EU and US variants of the firmware. I have updated my pull request as well. Please note that TL-WR802N Ver:2.0 is a 4 MiB device and doesn't support LuCi so all configuration will have to be through ssh. Also you may struggle to install other packages because it is 4 MiB device.

Here's the link for the images.

You should be able to flash lede-ar71xx-generic-tl-wr802n-v2-squashfs-factory-us.bin using the factory firmware through the web interface.

1 Like

Thank you! I've just used this thread to get the image working on a v2 (eu).

I had been trying with OpenWRT and getting nowhere. As TaraHoleInIt said, going via ddwrt and the mtd command is what finally worked for me to get to a working LEDE image.

I like how the image has OpenVPN and AdBlock on it by default.

Keep up the good work

Ed

Hi guys, i have small issue with v2 (eu). I need to reset password to device, but I cannot get device in failsafe mode. Can someone tell me correct way? LED is flashing in complete wrong way than is described on lede page =/

@nextlooper42
my 802n v2 has the same issue on lede 17.01

@TaraHoleInIt After flashing TL-WR802N Ver:2.0 with the above image through the web interface, after that I lost access to the device. It's not showing any WiFi name nor I cannot access it with USB cable through my macbook. How to get the access back and finally install openWrt on this device?

@vdeva22 the USB cable is only used for power and any form of communication to the router. After you install the image you need to connect to the router through SSH using the device only ethernet port.

Refer to here: https://wiki.openwrt.org/doc/howto/firstlogin

If that doesn't work it seems like something has gone wrong and your only option will be through the debug serial interface which will require some soldering.

FYI - TL-WR802N v2 is officially supported since 18.06.0

OpenWrt firmware downloads for TL-WR802N v2

Please open a new topic for any questions not related to adding support for this device.

@TPRoberts thanks for the reply, my device's web interface showed the upgrade of the @TaraHoleInIt image was successful, however, I cannot see any Wifi SSID, but my device's led indicator is constant. Do I need to perform any further steps to get web interface of LEDE after connecting through LAN cable? Any documentation in this regard is really helpful. My main goal is to install OpenWrt on this device.

@tmomas I tried flashing that image only first from https://openwrt.org/toh/tp-link/tl-wr802n , but it failed with an error message "Error code: 18005 Upgrade unsuccessfully because the version of the upgraded file was incorrect. Please check the file name"

@vdeva22
You got error because you need to flash *-eu.bin or *-us.bin signed image depending on your device. Otherwise the factory web interface will throw that error. Here are the links, however it doesn't help you now.
http://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/tiny/openwrt-18.06.0-ar71xx-tiny-tl-wr802n-v2-squashfs-factory-eu.bin
http://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/tiny/openwrt-18.06.0-ar71xx-tiny-tl-wr802n-v2-squashfs-factory-us.bin

I posted a link in my previous post explaining what to do on your first boot of OpenWRT. I suggest you read that. You will not a get a WiFi SSID on your first boot, you will need configure this. The best way is through SSH as the device has 4 MiB of flash I don't believed it supports a web interface.

Once you access to the device I would suggest flashing the latest 18.06.0 image, when you have OpenWRT installed you do not need *-eu.bin or *-us.bin you can just the *.bin you previously tried.

@TPRoberts, is there a way to go back to device's default factory firmware at this point and start afresh from there?

@vdeva22

Yes you can, but have you even tried to SSH to the router yet? I strongly suggest following the first boot guide (https://wiki.openwrt.org/doc/howto/firstlogin) I sent to make sure you can talk to the router and it works, as the go back to stock method is complicated and you still need to SSH to the router.

You can get the stock EU firmware from here:
https://www.tp-link.com/de/download/TL-WR802N_V2.html#Firmware
If you need the US firmware you will need to go to US site and find it.

It is little more complicated as the firmware from TPLink comes with the the boot segment within the .bin file. So you need to remove that from the image using DD before doing a generic uninstall. If go to Back To Original Firmware section in this link https://openwrt.org/toh/tp-link/tl-wdr4300?s[]=back&s[]=original&s[]=firmware

@TPRoberts, Okay..got it, I haven't tried to SSH yet, because I do not have thunderbolt to ethernet cable, I will get it tomorrow and try your suggestion. Thank you so much for your help.

I have another question, I bought a tl-wr902ac_v2 yesterday to install openWrt on it, but I could not find openWrt images for v2 version of tl-wr902ac, could you please provide me links where I can get it? Does OpenWrt support tl-wr902ac V2 officially?