IPQ4019: Adding support for TP-Link Deco M5

Thanks for sharing. Does the mesh function work seamlessly, complete with IEEE 802.11k/v/r as per stock firmware? What modules or packages need to be installed to make this happen?

Because I miss having a VPN on my router :stuck_out_tongue:

But with the stock firmware now I also like the 'device connection alert' function, don't think they have this in OpenWRT? (unless the roaming doesn't trigger connect/disconnect in the individual APs)

Nice. Have you experienced any issues or is it running well?

I've got an issue with the stock fw, can't select channel manually and the optimise option keeps selecting ch 36 which is one of the worst from my scans. TP-Link support has been useless, asking me to do one pointless test after another. So considering try alternative FW, rather then banging my head against a brick wall until I lose the will to live.

1 Like

yeah. I got the Deco because I was never able to successfully replicate seamless roaming with my bunch of old OpenWRTed routers.... I really enjoy it.... but as an OpenWRT user, the Deco's feature access is really limiting... fair enough it was designed for plug-and-play and not power tweakers

Running well for several weeks now with 802.11r enabled. Mine are on auto channel and currently using channel 149, so no issues here... Uptime 26 days and counting.

3 Likes

Hi,

I have the TP-Link Deco M5 v2, and I really hate that I cannot create multiple SSID's with it (other than the 2) I see that there is an OpenWRT available/ under works for version 3, can the same be used or ported over to v2?

1 Like

so are your decos working in the same way as when on stock? mesh /fast roaming and suchlike?

although i think i'm running on v2 hardware, not 3.

1 Like

Thank you, thats great to hear. Did you enable 802.11 K/V as well?

Running on Mac so I guess I should be able to build your repo using a sparse bundle.

1 Like

I never used them on stock firmware so I wouldn't know. The V2 is hardware is a bit different. I haven't tried 802.11k/v.

1 Like

at least based on what TP-Link has written in their FAQs, 802.11 K and V are by default enabled (can't change in settings) while 802.11r is the one you can turn on or off.

2 Likes

@frankveltmans I built your sources, what wonderful work you did!

In order to get VLAN tagging to work I had to define the switch0 in /etc/config/network, then the switch appeared in LuCI. I am using 3 M5's, wired to a main switch, with an untagged SSID and two tagged SSIDs, 802.11r enabled.

Works flawlessly. Have you or are you planning to submit a pull request upstream? Either way, thank you for this.

1 Like

I've got a Deco M4 system which doesn't allow me to use wifi5 on some devices since those M4 works on some other channels which aren't present on devices in my country.

Would you care to share a basic guide as to how you added support for deco m5. So that I can use those references to build for M4

Newbie here trying to install this on my Deco M5 V3s.

I've compiled the firmware using @frankveltmans code.

I selected the following options:

  • Target System = Qualcomm Atheros IPQ40XX
  • Subtarget = Generic
  • Target Profile = TP-Link Deco M5 EU v3.0

Didn't select any other thing that wasn't selected by default (should I select the OpenWRT Image Builder, SDK or toolchain? or some particular option in the firmware?)

After building the firmware I got the openwrt-ipq40xx-generic-tp-link_deco-m5-eu-v3.0-squashfs-factory.bin file from the bin/targets/ipq40xx/generic folder.

Over on a windows box, I followed the firmware flashing TFTP description from https://www.tp-link.com/us/support/faq/2958/, renaming that file to M5v1_tp_recovery.bin as indicated.

The Deco M5 unit connects to the tftp and downloads the firmware, but keeps on doing so in a loop as long as I keep the reset button on. If I release the reset button it stops, but the LED keeps as solid yellow and appears non functioning.

I tried to manually configure my IP address as 192.168.1.2 and connect/ping to 192.168.1.1, but no luck.

I believe this either is:
a) a problem with how I'm building the firmware. Perhaps someone could send me theirs or tell me how to build it correctly?
b) i'm using the wrong file. Should I be using the sysupdate file instead?
c) I'm missing some step after the flashing procedure.

Can anyone help?
Thanks!

How long do you leave it alone after letting go the reset button? It should eventually blink blue then turn green after a few minutes. Also, LuCI wasn't pre-selected, I had to select it during make menuconfig.

The factory.bin is the right file to flash. I used Debian bullseye to build.

@ljr kindly provided his binary firmware file for me to try (thanks!).
It didn't work, so I at least know its not an issue with the compilation settings.

I also checked with the firmware available at tp-link's website, specifically this one.

Following the procedure with this firmware, if I keep the reset button pressed I still get a loop. However, if I release the reset button after the download finishes, on the next boot the LED turns blue (flashing). At least I know I don't have a bricked device.

Could it be that my device is blocking non official firmware in some way?
Or maybe that the firmware developed here doesn't support device's version?
This is the info I got on the back sticker:

IC: 8853A-M5V3
FCC ID: TE7M5V3
HVIN: Deco M5V3
S/N: 22116A6A00290 EU/3.0

Hi @jprafael

I have double checked my Decos. The only thing different to yours is the SN. Yours ends with "EU/3.0" and mine end in "CA/3.0".

Confirmed @frankveltmans sources work with Canadian bought Deco M5 V3.

Thanks for confirming @ljr!

@frankveltmans I was looking at the changes in your repository and I wonder if the issue could be that my specific device ID is not listed under the supported list.
Is this related at all? if it is where did the list come from and how can I read/check my hardware ID?

@jprafael I have some good news.

I opened the tp-link eu .bin (https://static.tp-link.com/2021/202102/20210219/Deco_M5_V1_V2_V3_210203.zip) in a hex editor and found some more special_id's for you to try. These ones are not in frank's sources.

{product_name:M5,product_ver:1.0.0,special_id:53570000}
{product_name:M5,product_ver:1.0.0,special_id:42340000}
{product_name:M5,product_ver:3.0.0,special_id:53570000}
{product_name:M5,product_ver:3.0.0,special_id:42340000}
{product_name:M5,product_ver:3.0.0,special_id:54570000}

I would suggest swapping two of the ver:1.0.0 id's and three of the 3.0.0 ones in frank's sources for these, and recompile. That should get you a flashable firmware! :slight_smile:

Here is the relevant section in tplink-safeloader.c -- just copy-paste this over the original code, you'll notice that I already swapped the id's for you. Let me know if it works.

	/** Firmware layout for the Deco M5 EU v3.0 */
	{
		.id = "DECO-M5-EU-V3.0",
		.vendor = "",
		.support_list =
			"SupportList:\n"
			"{product_name:M5,product_ver:1.0.0,special_id:55530000}\n"
			"{product_name:M5,product_ver:1.0.0,special_id:45550000}\n"
			"{product_name:M5,product_ver:1.0.0,special_id:43410000}\n"
			"{product_name:M5,product_ver:1.0.0,special_id:4A500000}\n"
			"{product_name:M5,product_ver:1.0.0,special_id:53570000}\n"
			"{product_name:M5,product_ver:1.0.0,special_id:42340000}\n"
			"{product_name:M5,product_ver:3.0.0,special_id:53570000}\n"
			"{product_name:M5,product_ver:3.0.0,special_id:42340000}\n"
			"{product_name:M5,product_ver:3.0.0,special_id:54570000}\n"
			"{product_name:M5,product_ver:3.0.0,special_id:4A500000}\n"
			"{product_name:M5,product_ver:3.0.0,special_id:41550000}\n"
			"{product_name:M5,product_ver:3.0.0,special_id:4B520000}\n"
			"{product_name:M5,product_ver:3.0.0,special_id:49440000}\n",
		.support_trail = '\x00',
		.soft_ver = NULL,
1 Like

Awesome! I'll try this today after work. Thanks!

@frankveltmans Would you be ok with someone creating a PR with your changes so we can get full upstream support? Or could you just create one. That would be very beneficial for the OpenWrt project!

Thank you a lot for adding device support!

1 Like

The fact that there were missing IDs in the firmware showed promise, but I still can't get my device to flash properly :frowning: . I tried with your code, the original firmware's special_ids, and a combination of @frankveltmans's, your's and the original firmwares. None worked.

I do beleive it might have done something, since now the router takes longer between tftp downloads, as if it is failing somewhere else down the process.

I wonder what else could be the issue?

After each flash attempt I leave the router on for over 10 mins and still have a yellow light.
I don't change my laptop's IP address from 192.168.0.66 (Also tried changing to DCHP but got nothing).

Is there anyway to get more info on the flashing process status?