OpenWrt support for TP-Link Deco M4R

Have enabled all ports in 02_network, and get this

so the network device is potentially there, LAN1 and LAN2 are the ports on the back of P9, the others are the internal ports, so potentially the AR72400 is on one. plc tools not finding anything yet, hence thinking that there may need to be a config reg write to set them up in the right way

Have you tried putting two P9s with that firmware in the same extension cord and tested if they're able to ping each other while one is only connected to the extension cord? Might just work without any additional tinkering.

on the original firmware, they've added an extra tagged ethernet port to the PLC, and you can see it there as part of the swconfig switch, so its definitely happening in the linux side under control of the hyfi networking stack from Qualcomm. The PLC is being configured by a proprietary tool called plcManager.

The open plc tools are finding the plc interfaces of the other P9's, I will flash the image and config into a second one and see if the first one still see's it with the OpenWrt firmware.

Hello all, I followed the guide in this thread and I was able to successfully install open wrt on my 2 Decos M4r. Currently they are used as an access point to extend a wifi already in place.
Everyhting seems fine except wifi performances.
With stock firmware I was able to get in 802.11AC download speed (speedtest) up to 600mbps while with openwrt I can only reach 200-220 Mbps (same with iperf3).
This are the conenction details from Luci:
6.0 Mbit/s, 20 MHz
650.0 Mbit/s, 80 MHz, VHT-MCS 7, VHT-NSS 2, Short GI
Any idea on how to improve wifi performances?


Have you checked the boxes for Software flow offloading and Hardware flow offloading under Network->Firewall?

Additionally there seem to be possible things you could do with a custom built firmware (The P9 is the M4R with additional Powerline capabilities): Deco P9 switch config - #22 by quarky

Apart from that OpenWrt is of course open source, so people will only put unpaid work into it until they're satisfied. I'm satisfied with the performance of my devices and my main concerns were VLANs and multiple SSIDs which I can use now, so I've stopped putting work into it. Others have moved on to other devices that get you better download speeds.

Thanks for all the pretty amazing work here from @bobthebuilder and @KinteLiX
Using your guide I first got v19 going then saw the steps for v21, I tried to do the upgrade via the webui and it "seemed" to work but I couldn't access it at all, considered it bricked, and grabbed the TPLink stock and started from there again with the latest release from @KinteLiX - Works and I'm now on OpenWrt 21.02-SNAPSHOT.

I tried to push to get to the newer build because I wanted to try the non -ct drivers for the 5GHZ lan.
So far, I've gotten the two Decos to talk perfectly via a mesh using 802.11s, but I'm not able to use that same radio for a client AP (even if its not recommended, I expected it to at least work!)

After some hours of digging around, I see here:
They mention:
" The community version supports all features EXCEPT connecting multiple vifs to the same AP when using encryption."
Which, well, seems to be the buzz kill. It seems as if its limited to a single AP with encryption, so my second client-AP wont ever show up.

Using the latest shared version, it looks like it was built from a snapshot and those only have limited-time packages, and most of the kmod packages wont install anymore.
Should I take a swing a building my own image, or is there a mechanism to get back on mainline from a snapshot?

Thanks in advance!

EDIT: Skip that, once I went to JUST a client network I still couldn't see the network, and I figured out that the channel I was using didnt seem to work on the device I tested with (136?)
Using channel 100 solved it, now I could do both the mesh and a client network.
I'll have to evaluate the performance dip using it this way and report back. Seems great so far!

From what I remember the open source drivers don't like running multiple modes at the same time because they constantly have to switch between them and performance will be super bad.

TP-Link uses a proprietary solution for their backhaul mesh network so you can use a 5GHz AP on the same radio. But OpenWrt doesn't have that.

Usually people resort to setting up the mesh on 5GHz or 2.4GHz and then set up the AP on the other frequency.

I did some more tinkering, and I was able to get at least 200mbps/200mbps between the two Decos attached to wired devices.
In this design there is a 5Ghz AP that might have some slow devices connected to it, but the main function is to do a backhaul link. It works pretty flawlessly!

I'd consider the build to be pretty stable, and your modifications seem to work well in getting the devices supported by OpenWRT. Would you consider pushing it and enabling official support for it?

Hi, I just wanted to thank everyone involved in this thread who did a great job getting firmware working on Deco. I wanted to install for a long time, but there was no solution. Now I am running 3 OpenWrt routers in my home. So thanks again.


Greetings to all from Greece,

I have read the whole thread and i found very valuable the work done here. Can i kindly ask if the custom firmware is compatible with deco m4 V3?

Thank you in advance.


The Deco M4 v3 is different from the v1 and v2. You can't use this on a v3.

Someone with a M4 V3 sent me pictures of the inside and a bootlog and it very much looks like you need to talk to the Deco M5 people.

I'm not saying that you can just use the M5 firmware. That will very likely brick your device.
But they both use the same hardware and have very similar flash layouts so it should be much easier for the M5 folks to port the M4 V3.


Thanx guys for the prompt replies! Much appreciated.

I will try the M5 thread.


After a month of usage I want to rollback back to stock firmware, any tips how to do that without brickind device?

You can simply follow my flashing guide up until you flash the firmware in bootloader recovery but instead of flashing the debug/beta firmware in bootloader recovery, you can simply flash a normal version from TP-Link's website (make sure you select the correct hardware version).

This tutorial is out of date, the device has been added to upstream, support has been added to safeloader, and firmware-utils was bumped to git head.

Only for V1 and V2!

Soon, prebuilt images (snapshots do not contain LuCi by default) should become available or you can build your own image.

If your Decos are running the OEM firmware and have internet access you may download my newer flashing helper (old 19.07 build has broken sysupgrade) and then flash a newer build in OpenWrt.

You can also transfer the prebuilt or your own image directly through other means like FTP without using the helper as an intermediate.

The helper for flashing is outdated and flashing a newer build is highly recommended.

Curl command with my flashing helper:

curl -LJO -k

You can download openwrt snapshots from here
and you can dl it directly to the router:

curl -LJO -k

1 Like

I want to buy an M4 v3 just for this. I feel a CPU bump would very much make it a very affordable mesh system. Sadly that v3 model is only available in the US currently.

Two things:

  1. it has been said multiple times that the V3 is an ARM device and not supported by the firmware discussed in here. So if you're buying one, don't forget that you will have to create custom firmware based on the Deco M5 or a similar device.

  2. there is no specific mesh hardware in these devices. You can literally use any other device supported by OpenWrt and use all the same mesh packages. And because of that I would advice against buying an M4R V3 if you want to install OpenWrt anyway.

1 Like

Actually I wanted it for non-openwrt for a location. The v2 seems to be too slow tbh and I’ve had issues on stock. I don’t use M4 with openwrt, I use the E8450 and E5600.

If you think it will help you then go for it. I just don't understand why you're telling us if you don't intent to run OpenWrt on it.

1 Like