Support for TL-WR840N Ver 6.0

Thank you. I not tried yet, but now i see my faults.

Hi guys! Just got myself tl-wr840n v6.Apparently they do sell them in Russia too.
I want to install openwrt on it, tho I never used the builder and don't want to brick it the first day I got it.
But I need it to be able to connect to one wi-fi (wwan) and host another wi-fi (wlan), which doesnt fit into either WISP mode nor Range extender mode.
So, yeah, openwrt it is.
Can any of you guys who made it work on v6 share the working image and short instructions on installing it?
I did install stable images on multiple tp-link routers before, mainly using web page.

1 Like

Same TP-Link selling in Ukraine - v6.
Still would like to get information how to install OpenWRT to this version of hardware
Thanks in advance!

I have the same problem,i need help.
tlwr840n v6.0 eu

HI guys, Please help me. How can I install OpenWrt on TP-Link WR840n.V6...?

I posted on another thread (search for WR849N) an image for the 849Nv6 that should work on the 840Nv6, just flash it using TFTP. I did the same modifications as @gaspare . In fact, for the 849Nv5 I used the image for the 840Nv5, so it should work both ways.

Please beware that my image does not have LUCI installed, so you may want to compile your own with what you need and install using sysupgrade once you have a running OpenWRT on your router.

S.

PS: Indeed, this Thursday I was buying a 849 and the shop gave a discount because it was sold without the box - they told me that the box had WR840N written on it instead of WR849N, although the sticker said 849, that was why they were selling it discounted.

Hi from Brazil. I buy to one WR840N(BR) and started looking one way to put openwrt on it, and found this forum. I talked to support and they say this router have 256mb of ram and 32mb of flash.
So we have 2 situations. Any one have opened it to check this?

Ps.: update These board have a ZENTEL A3S56D40GTP 256MB DDR 400.

They told you the size in Megabits. 256 Megabits = 32Megabytes ; 32 Megabits = 4 Megabytes.

2 Likes

So https://openwrt.org/supported_devices/432_warning certainly applies

1 Like

You are right. Sorry.

I am using latest openwrt. I compiled and flashed successfully openwrt-ramips-mt76x8-tl-wr840n-v6-squashfs-tftp-recovery.bin but i have no ping and nothing works at all.
I am connected with serial console and i see the kernel and linux information. I can login via that console type etc... ifconfig gives me everything okay but there is no RX traffic on eth0.
What could be the reason for this ? I see no errors or anything...Seems like device switch is not working correctly or is something different like address / eeprom ?

Ok i fixed it. You need to touch two more files:
target/linux/ramips/base-files/etc/board.d/02_network and target/linux/ramips/base-files/lib/ramips.sh
You must add tl-wr840n-v6 in both files.
This activates the chip switch. Now everything works as expected.
Btw you can make version 14 working using same tips.

The big problem is that once you flash with openwrt there is no way you can return back the original firmware.
I tried sysupgrade/tftp with no success. I tried modify binary files like cutting etc.... but nothing helps.

Any one can provide the final working. bin file for for Tp-Link 840ND V6
@sanitariu plz help me i have 20 pcs and need to flash to open wrt mode

Before installing any OpenWrt firmware on the v6, you should be aware that there are usability restrictions to be expected due to low flash and RAM (only 4MB flash / 32MB RAM). See https://openwrt.org/supported_devices/432_warning for details.

For OpenWrt firmware, see above:

Download:

Installation:

Return to stock firmware:

Stripping the header (needed to return to stock firmware):

2 Likes

Version 6.0 is easy. You must touch 4-5 files and compile. There is enough space even for Luci + ipv6. My final images are:
3670726 Jan 8 16:09 openwrt-ramips-mt76x8-tl-wr840n-v6-squashfs-sysupgrade.bin
4063232 Jan 8 16:09 openwrt-ramips-mt76x8-tl-wr840n-v6-squashfs-tftp-recovery.bin
Router is almost the same as version 5.
You must touch the following 2 files:
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/base-files/lib/ramips.sh
Add here your model search for 840 and add after v5 ... v6
Copy ./target/linux/ramips/dts/TL-WR840NV5.dts to ./target/linux/ramips/dts/TL-WR840NV6.dts and edit inside. Just change v5 to v6.
Edit this:

        memory@0 {
                device_type = "memory";
                reg = <0x0 0x2000000>;
        };

Router has 32MB memory. On version 5 it was 64MB. China stuff :slight_smile:
Partiotion in the file must be:

                        partition@0 {
                                label = "boot";
                                reg = <0x0 0x10000>;
                                read-only;
                        };

                        partition@10000 {
                                compatible = "tplink,firmware";
                                label = "firmware";
                                reg = <0x10000 0x3d0000>;
                        };

                        factory: partition@3f0000 {
                                label = "factory";
                                reg = <0x3f0000 0x10000>;
                                read-only;
                        };

&wmac {
        status = "okay";
        mtd-mac-address = <&factory 0xf100>;
        mediatek,mtd-eeprom = <&factory 0x10000>;
};

&ethernet {
        mtd-mac-address = <&factory 0xf100>;
        mediatek,portmap = "wllll";
};

Next edit: ./target/linux/ramips/image/mt76x8.mk and add your model like this:

define Device/tl-wr840n-v6
  $(Device/tplink)
  DTS := TL-WR840NV6
  IMAGE_SIZE := 3968k
  DEVICE_TITLE := TP-Link TL-WR840N v6
  TPLINK_FLASHLAYOUT := 4Mmtk
  TPLINK_HWID := 0x08400006
  TPLINK_HWREV := 0x1
  TPLINK_HWREVADD := 0x6
  TPLINK_HVERSION := 3
  IMAGE/tftp-recovery.bin := pad-extra 64k | $$(IMAGE/factory.bin)
endef
TARGET_DEVICES += tl-wr840n-v6

This makes it working very good. Still i do not know how to make orange led working.
I checked pinout scheme but it does not work. May be i miss something

Also i did changes and make tp-link version 6.2 working too. But on version 6.2 we have 3 leds. I need help making the leds working.

Working on version 14 and almost ready. Need help for leds.

Also if anyone wants to make patches and include support in main openwrt may contact me.

All these versions you can flash direct from original tp-link software.

I still can not make working flash to return from openwrt to original on versions 6,6.2,14

3 Likes

tmomas you are right there is not much free space.
The design of jffs2 about space is the following line:

if (c->flash_size < 5*c->sector_size) {

This means that if you have lower than 5 free block jffs will not create free space partition. So after you make some setup like wifi or passwords they will be lost on router restart.
If I am not wrong one block is 32K. So i decided i do not need so much free space and changed that 5 to 3.
The modifications are in files:
build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/linux-4.14.91/fs/jffs2/fs.c
build_dir/toolchain-mipsel_24kc_gcc-7.4.0_musl/linux-4.14.91/fs/jffs2/fs.c

This gives me 96K free space. This is enough for me for many things :slight_smile:

I still need help for led pins to make the working correct on version 6.2

@sanitariu please proved image link free to download they are asking for money.. or you need payment for this

Hello,
No i do not want money or anything. My image is heavy modified also with other stuff and i can not share it :frowning: I explained all steps i did. If i have enough time tomorrow i will make image.
What router you have exactly ? Look backside. What you need luci ? Ipv6 ?

Looking at openwrt/include/image.mk reveals

JFFS2_BLOCKSIZE ?= 64k 128k

[...]

TARGET_FILESYSTEMS := $(fs-types-y)

FS_64K := $(filter-out jffs2-%,$(TARGET_FILESYSTEMS)) jffs2-64k
FS_128K := $(filter-out jffs2-%,$(TARGET_FILESYSTEMS)) jffs2-128k
FS_256K := $(filter-out jffs2-%,$(TARGET_FILESYSTEMS)) jffs2-256k

so you might want to check the 32k assumption.

I agree that with 3 erase blocks available that minimal configuration can be performed. At least as far as I understand jffs, one always needs one "free" erase block, so a three-block configuration can only handle two blocks' of content before it becomes unusable for write.

1 Like