Support for TL-WR840N Ver 6.0

There is already version 14 in openwrt. You do not need mine :slight_smile:

Hi.
Link http://212.50.69.96/mt7628/ not worked (

Try:
http://212.50.69.96/mt7628/index.html

If something does not work notify me...

3 Likes

I tried your sysupgrade.bin on my v6.2 but I was unable to do anything with it once I flashed it. Everything looked good, but I couldn't update package list or even change the ip address of the device. I have since reverted back to stock tplink firmware without issues. Too bad because it was actually working, but I need to add sqm at least... otherwise I would of kept it.

Hello,
If you want to add just compile it by yourself.
There is so little space left on the device so i removed almost all.
If you plan to add php or stuff like that just forget it. There is no space even for tcpdump.....

1 Like

that's why I tried backporting it to my LEDE based tree ([Testing] lede-17.01 security backports for 4/32 devices) but it seems I still need to do some stabilizing work on it

2 Likes

Im using your build and things runs great!, thanks man I hope to see another update on this.
ps: mine is TL-WR840N V6.2

Hello all,

I'm new in the forum and newbie with OpenWrt.
I'd like to know if anyone have the factory.bin ready to upload to router wr840n V6 (BR).
As @gaspare explain, the wr840n V6 (BR) is a MEDIATEK MT7628NN, with 4M of flash and 32M of RAM.

Thanks

Thanks ! It's working very well on my TL-WR840N v6.2 with your binary.

I tried to compile it myself but the target device strangely doesn't show up on make menuconfig (there are no TL-WR840N targets available at all).

Also, file 02_network access is forbidden.

Hello,
You need 02_network in order for the router switch to work correct.
Add:

    tplink,tl-wr840n-v6|\
    tplink,tl-wr840n-v6.1|\
    tplink,tl-wr840n-v6.2|\

after tplink,tl-wr840n-v5|\

on both places.
If you want to compile alone you must add/patch all the files and remove a lot of stuff
because space is not enough.
I think you should select tiny targets.
If you clone latest git you must change wifi encryption type to be old one. (no space)

1 Like

any chance you have build with IPv6 removed?

If you do not want ipv6 just remove it via uci.

Hello!

Thanks for the very helpful guide!
I've managed to build OpenWRT 19.07 for v6.2 with your guide, however the leds don't work properly (only first led lighting up), is there any way to fix this? I've slightly modified the dts to make it build.

Edit: led problem fixed, used gpios from https://github.com/milankragujevic/openwrt-wr840n-v620-old/blob/master/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v6.dts

/dts-v1/;

#include "mt7628an.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "tplink,tl-wr840n-v6.2", "mediatek,mt7628an-soc";
	model = "TP-Link TL-WR840N v6.2";

	aliases {
		led-boot = &led_power_orange;
        led-failsafe = &led_power_green;
        led-running = &led_power_green;
        led-upgrade = &led_power_orange;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio1 38 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};
	};

	/* LED used is dual-color,dual lead LED */
    leds {
        compatible = "gpio-leds";

        lan {
            label = "green:lan";
            gpios = <&gpio1 39 GPIO_ACTIVE_LOW>;
        };

        wlan {
            label = "green:wlan";
            gpios = <&gpio1 44 GPIO_ACTIVE_LOW>;
        };

        led_power_green: power {
            label = "green:power";
            gpios = <&gpio1 42 GPIO_ACTIVE_HIGH>;

        };

        led_power_orange: wan {
            label = "orange:wan";
            gpios = <&gpio1 40 GPIO_ACTIVE_HIGH>;
        };
    };
};

&spi0 {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <10000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

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

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

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

&ehci {
	status = "disabled";
};

&ohci {
	status = "disabled";
};

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

&ethernet {
	mtd-mac-address = <&factory 0xf100>;
    mtd-mac-address-increment = <1>;
};

&esw {
    mediatek,portmap = <0x3e>;
};

&pinctrl {
	state_default: pinctrl0 {
		gpio {
			ralink,group = "p1led_an", "p3led_an", "p4led_an", "wled_an", "perst", "wdt";
			ralink,function = "gpio";
		};
	};
};

Also, would it be fine to post the clone with your files via GitHub? Thanks in advance.

Hello,
Post the clone no problem ! Even if you have time create official patches. Thank you :slight_smile:

2 Likes

kindly share your build, im not familiar with compiling stuff, thanks

Will send in a few days or so, it's currently running with luci, SQM and zram, with IPv6 & PPPoE completely removed. It still tends to run out of memory with SQM turned on with around 10 DHCP leases on it, so ill need to tweak a few of sysctl/zram settings a bit.

2 Likes

fantastic, thank you so much mate, really appreciate it.

Feel free to try. Mine's currently running for 2 days now with SQM turned on, with about 4mb still free on ram.

sysupgrade: https://www.dropbox.com/s/185otrdv7rjph02/openwrt-ramips-mt76x8-tplink_tl-wr840n-v6.2-squashfs-sysupgrade.bin?dl=1
tftp-recovery: https://www.dropbox.com/s/dot2666znxltb1n/openwrt-ramips-mt76x8-tplink_tl-wr840n-v6.2-squashfs-tftp-recovery.bin?dl=1

2 Likes

thank you so much, i'll report later for the result

so far so good, no random reboot after 20hrs+ usage with 5+ clients

Hostname WR840N_V6.20
Model TP-Link TL-WR840N v6.2
Architecture MediaTek MT7628AN ver:1 eco:2
Firmware Version OpenWrt 19.07.7 r11306-c4a6851c72 / LuCI openwrt-19.07 branch git-21.044.30835-34e0d65
Kernel Version 4.14.221
Local Time 2021-05-04 09:52:25
Uptime 22h 38m 54s
Load Average 0.71, 0.81, 0.67

1 Like