Installing OpenWrt on TP-Link WR849N v5 & v6

I tried some tutorials but no success. What command i can use exactly?

I tried dd if=original.bin of=mod.bin skip=257 bs=512 but the router still bricked.
Im using the v5 and with the openwrt image the router keeps disconnecting the wifi clients at any distance. That's why i want to revert to stock firmware. I'm totally new to the openwrt world, so please help me.

Thanks

I used the tutorial on the C20i page (https://pwassi.privatedns.org/lede/archerc20i/)

To strip the header, use:

dd if=original_firwmare.bin of=tp_recovery.bin bs=512 skip=1

Then you can use TFTP to upload

This is tested.

I think you could also go the route of striping the header and the bootloader (which seems you did), then upgrade using sysupgrade, but I never did that - if this is what you did, try the TFTP way.

S.

PS. There is a third way, writing the mtd directly, but I never did that either.

1 Like

thank you very much! you saved my life haha

I was unable to do a request, and I have run out of time - the University will be closed until next Tuesday. Will this help?

schara@camboinhas:~/849/openwrt$ git show
commit 0c979724ac6b7fe2dd0a3cf9f52990af23dd50dc
Author: schara < >
Date:   Wed Nov 14 18:23:38 2018 -0200

    Add suport for TP-Link WR849Nv6

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 76b6fe9..e0d19b6 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -208,6 +208,7 @@ ramips_setup_interfaces()
        tplink,tl-wr842n-v5|\
        tl-wr840n-v4|\
        tl-wr840n-v5|\
+       tl-wr849n-v6|\
        tl-wr841n-v13|\
        u7628-01-128M-16M|\
        ubnt-erx|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 5741cbd..64b0fea 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -499,6 +499,9 @@ ramips_board_detect() {
        *"TL-WR841N v13")
                name="tl-wr841n-v13"
                ;;
+        *"TL-WR849N v6")
+                name="tl-wr849n-v6"
+               ;;
        *"U25AWF-H1")
                name="u25awf-h1"
                ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index ffdc5e7..032daf6 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -261,6 +261,7 @@ platform_check_image() {
        tplink,tl-wr902ac-v3|\
        tl-wr840n-v4|\
        tl-wr840n-v5|\
+       tl-wr849-v6|\
        tl-wr841n-v13)
                [ "$magic" != "03000000" ] && {
                        echo "Invalid image type."
diff --git a/target/linux/ramips/dts/TL-WR849NV6.dts b/target/linux/ramips/dts/TL-WR849NV6.dts
new file mode 100644
index 0000000..d4c4527
--- /dev/null
+++ b/target/linux/ramips/dts/TL-WR849NV6.dts
@@ -0,0 +1,105 @@
+/dts-v1/;
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "tplink,tl-wr849n-v6", "mediatek,mt7628an-soc";
+       model = "TP-Link TL-WR849N v6";
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x2000000>;
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+       /* LED used is dual-color,dual lead LED */
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               power {
+                       label = "tl-wr849n-v6:green:power";
+                       gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+               };
+
+               orange {
+                       label = "tl-wr849n-v6:orange:power";
+                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&spi0 {
+       status = "okay";
+
+       m25p80@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <10000000>;
+               m25p,chunked-io = <32>;
+
+               partition@0 {
+                       label = "boot";
+                       reg = <0x0 0x10000>;
+                       read-only;
+               };
+
+               partition@10000 {
+                       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>;
+       mediatek,mtd-eeprom = <&factory 0x10000>;
+};
+
+&ethernet {
+       mtd-mac-address = <&factory 0xf100>;
+       mediatek,portmap = "wllll";
+};
+
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "p0led_an", "p2led_an", "perst";
+                       ralink,function = "gpio";
+               };
+       };
+};
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 21c5357..b9fdf83 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -143,6 +143,25 @@ define Device/tl-wr840n-v5
 endef
 TARGET_DEVICES += tl-wr840n-v5

+define Device/tl-wr849n-v6
+  DTS := TL-WR849NV6
+  IMAGE_SIZE := 3904k
+  DEVICE_TITLE := TP-Link TL-WR849N v6
+  TPLINK_FLASHLAYOUT := 4Mmtk
+  TPLINK_HWID := 0x08400006
+  TPLINK_HWREV := 0x1
+  TPLINK_HWREVADD := 0x6
+  TPLINK_HVERSION := 3
+  KERNEL := $(KERNEL_DTB)
+  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
+  IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \
+        check-size $$$$(IMAGE_SIZE)
+endef
+TARGET_DEVICES += tl-wr849n-v6
+
+
+
+
 define Device/tl-wr841n-v13
   $(Device/tplink)
   DTS := TL-WR841NV13

hey sir. i tried to flash my wr840n v6 with your v6 bin file. i successfully installed it but i want to revert back my wr840n to its original firmware but i cant. can you help me? thanks :slight_smile:

thank you for the answer but i already tried it throug tftp. do i really have to try it many times coz i repeat it for about 5 times but it didnt roll back to its stock firmware
PS. im done. thanks for this info. I use dd if=WR840N_v6_stock.bin of=tp_recovery.bin bs=512 skip=1

I think you already solved the problem, the answer was on this thread.

If you have any problems feel free to contact me, but I do not read the forum everyday, so please be patient.

S.

@schara
I tried to use the bootloader indicated by you, I was able to install it on the router but I lost access, I can not access via http. What is the default port? Always gives connection refused. Whats the password? I tried via SSH and default pass dont work

Portuguese:

Eu tentei usar o bootloader indicado por voce, consegui instalar no roteador porém perdi o acesso, não consigo acessar via http. Qual a porta padrão? Sempre dá conexão recusada. Qual o password? Tentei via SSH e a senha padrão não funciona

When you say bootloader you mean the image I made or did you do something different?
When you change from tp-link to OpenWRT the address changes to 192.168.1.1 (instead of 0.1).
Luci is not installed in my base image, use the cli, via ssh.

S.

Login is root and there is no password, that is the default for new installations.

S.

I see.
Thx.

hello sir i'm noob here. so i have wr840n v6 i try to flash with TFPT with your files tp_recovery.bin v6.. and its work and i try to ssh and change the passwd.. but i don't have web gui, how to install it so i can configure with web gui..?? pls help me step by step...

thanks...

Try

opkg update
opkg install luci

If that does not work, after the update type

opkg list | grep -I luci

And install the packages listed

S.

PS. On the 849 there was not enough space left to install luci, you may be luckier on the 840, or update to the other image that already has luci, but be careful with versions.

thanks solved....

dears anyone can provide image with luci for tp link 840 v6
thanks
@schara @acus

Hello @schara can you please help me on building firmware for TP-Link WR840N v6 with install OpenVPN? I tried your firmware but I can't install openvpn into it. I only need SSH access, OpenVPN & Wi-Fi hope you can help me.

What is the amount of flash memory on your 840 ? Devices with 4MB of flash are very tricky, because they have almost no flash left after installing the basic. OpenVPN requires the crypto libraries, which are large. It may just not fit. If you have a large installation, you can do tricks such as setting up an NFS server and mounting more disk (like we do). But if you have just one router, you may try dumping everything to make OpenVPN fit, but it may not be possible.

If you have 8MB it should be easy.It is even possible to order a 8MB flash and replace the original. We have done that on some routers where the flash died - it is easy, but you need a flash memory writer and some soldering skills.

S.

Thank you so much, you saved me.

I installed the image that for the 849n v6, I configured wifi, ip of the lan but can not make the internet work, the router pinged to google but I did not find the firmware to do the nat, nor could I install because I complained about the kernel

Hello again.

I was wondering if someone have pictures of the PCB from the TL-WR849N v6 for a hardware comparison. I want to see the RAM chip and the FLASH chip to search the datasheet of them.

Thanks you all