Support for TL-WR840N(ES) Ver 5.0 (EU)

Dude. Amazing work. Will test Monday when I'm back. What commit on your
git?

Latest in 840N-v5 branch, still gotta make some adjustments tomorrow.

@robimarko, I would love a copy to test as well, I have a 840N-v5 right next to me, just waiting to install LEDE on it :slight_smile:

Ok.
Here is the sysupgrade image:
https://drive.google.com/file/d/0B1VOQQ-_EIXKNWU0SFBPVnBSODA/view?usp=sharing

Just flash it through the firmware upgrade in TP-Link web UI.
Wait until the green LED stops flashing and the device should be ready for use.

NOTE:There is no LUCI web interface in the image since device has only 4MB of flash and therefore it does not fit with LUCI,so you can manage your router through SSH.

Also,on my router TFTP recovery is broken since TP-Link reused bootloader code for v4 and that does not take int account only 4 MB of flash and bricks the device.
So do not use TFTP Recovery or you will have to rewrite SPI flash like I had to 3 times.

1 Like

Confirmed, issues with TFTP recovery are due to reuse of v4 bootloader.
I have compiled new one that correctly flashes over TFTP.

If you want to test it contact me.

Absolutely, ready to test, thank you very much! Do you know if the adjustments you made to the wireless make it more stable? in V4, it was terribly unstable. Constant disconnects render it virtually unusable.

Like so.

Thu Nov  2 11:31:18 2017 daemon.info hostapd: wlan0: STA b8:53:ac:81:b4:7e WPA: pairwise key handshake completed (RSN)
Thu Nov  2 11:36:50 2017 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED b8:53:ac:81:b4:7e
Thu Nov  2 11:36:50 2017 daemon.info hostapd: wlan0: STA b8:53:ac:81:b4:7e IEEE 802.11: disassociated
Thu Nov  2 11:36:50 2017 daemon.info hostapd: wlan0: STA b8:53:ac:81:b4:7e IEEE 802.11: disassociated
Thu Nov  2 11:36:50 2017 daemon.info hostapd: wlan0: STA b8:53:ac:81:b4:7e IEEE 802.11: disassociated
Thu Nov  2 11:36:50 2017 daemon.info hostapd: wlan0: STA b8:53:ac:81:b4:7e IEEE 802.11: disassociated
Thu Nov  2 11:36:51 2017 daemon.info hostapd: wlan0: STA b8:53:ac:81:b4:7e IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Thu Nov  2 12:07:24 2017 daemon.notice hostapd: wlan0: STA 84:89:ad:53:fe:07 IEEE 802.11: did not acknowledge authentication response
Thu Nov  2 12:07:30 2017 daemon.info hostapd: wlan0: STA 84:89:ad:53:fe:07 IEEE 802.11: disassociated
Thu Nov  2 12:07:31 2017 daemon.info hostapd: wlan0: STA 84:89:ad:53:fe:07 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Thu Nov  2 12:55:30 2017 daemon.info hostapd: wlan0: STA 84:89:ad:53:fe:07 IEEE 802.11: authenticated
Thu Nov  2 12:55:30 2017 daemon.info hostapd: wlan0: STA 84:89:ad:53:fe:07 IEEE 802.11: associated (aid 1)
Thu Nov  2 12:55:30 2017 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 84:89:ad:53:fe:07
Thu Nov  2 12:55:30 2017 daemon.info hostapd: wlan0: STA 84:89:ad:53:fe:07 WPA: pairwise key handshake completed (RSN)
Thu Nov  2 12:55:30 2017 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED 84:89:ad:53:fe:07
Thu Nov  2 12:55:30 2017 daemon.info hostapd: wlan0: STA 84:89:ad:53:fe:07 IEEE 802.11: disassociated
Thu Nov  2 12:55:31 2017 daemon.info hostapd: wlan0: STA 84:89:ad:53:fe:07 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)


Sat Nov  4 06:16:39 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: authenticated
Sat Nov  4 06:16:39 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: associated (aid 1)
Sat Nov  4 06:16:39 2017 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 2c:33:61:52:c1:e2
Sat Nov  4 06:16:39 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 WPA: pairwise key handshake completed (RSN)
Sat Nov  4 07:17:23 2017 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED 2c:33:61:52:c1:e2
Sat Nov  4 07:17:23 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: disassociated
Sat Nov  4 07:17:23 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: disassociated
Sat Nov  4 07:17:23 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: disassociated
Sat Nov  4 07:17:23 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: disassociated
Sat Nov  4 07:17:23 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: disassociated
Sat Nov  4 07:17:24 2017 daemon.info hostapd: wlan0: STA 2c:33:61:52:c1:e2 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

With this as setting in wireless.

config wifi-device 'radio0'
option type 'mac80211'
option channel '11
option hwmode '11g'
option path 'platform/10300000.wmac'
option htmode 'HT20'
option country 'US'
option disabled '0'
option txpower '27'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option key 'D46E0EF37AAA'
option disassoc_low_ack '0'
option max_inactivity '86401'
option skip_inactivity_poll '1'
option wpa_group_rekey '0'
option encryption 'psk2+aes'
option ssid ’TestNetwork2Nov'

I dont know about that,newer driver is used.
That is only difference.

I will send you sysupgrade image with unlocked boot partition.
From it you can flash new bootloader.

Any bugs found or I can open PR?

nice one...

I can test monday morning since i'm out of the office until then. quite sure it will work well! I'll just git clone your 840 branch and flash the TFTP, correct?

You gotta build if you want to clone my branch.
You can use the provided images,and do not use TFTP because you will have bricked board.

Just flash sysupgrade image through stock web ui.

In order to use TFTP you need to have image with unlocked bootloader partition and then flash new bootloader

Ok built the commit you made 2 days ago from 840v5 branch. (sysupgrade)

Código de Error: 4503

El archivo cargado no fue aceptado por el dispositivo.

The loaded file was not accepted by the device.

Versión del Firmware:0.9.1 3.16 v01e4.0 Build 170503 Rel.71903n
Versión del Hardware:TL-WR840N v5 00000005

This directly from the WebGUI of 840v5

I tried your Google Drive Image - it did not flash.

I checked out

commit 4c74f19a858ea6b93a0f92768615b5e47d6a7193

From your 840v5 branch. and built

lede-ramips-mt76x8-tl-wr840n-v5-squashfs-sysupgrade.bin - it didnt flash either. same error - 4503

Weird, that means that firmware version on your router was probably different.
This worked on EU firmware, what version is yours?
UN or other?

If so It may be needed to append regional metadata for the router to accept it.
Do you maybe USB to serial cable so that you can pick up an actual error message?

ok done. 840V5 GUI FLASH:

[ rsl_sys_updateFirmware ] 2126: Firmware version check failed

[ rdp_updateFirmware ] 345: perror:4503

Ok,
what version of firmware and which region are you running?

Firmware:0.9.1 3.16 v01e4.0 Build 170503 Rel.71903n
It reads as 840n Ver 5.0 (ES)

Can you try downgrading to oldest firmware available?
If that does not help I will look into adding regional metadata tommorow

Tried flashing TL-WR840N(EU)_V5_170608 onto this ES via TFTP - Apparently bricked the device. I can still flash via TFTP, but now it just flashed a green led after flashing the image. TL-WR840N(ES) does not have an image to download and flash.