Support for tp-link ec220-g5

Is it possible to change dts file by building in firmware-selector ?

It can be added to the list by making such a correction at https://github.com/openwrt/openwrt/ but this requires testing first. I don't have such a router, so I can't check if it works.

Hello everyone, I have this EC220-G5, but I don't have any knowledge to compile a firmware for this router. If someone has done and tested it, could you share the firmware?! Thanks.

hello
I try to build with your config and got this error Unable to parse input tree

nt/data/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/image-mt7620a_tplink_archer-c5-v4.dtb.tmp ../dts/mt7620a_tplink_archer-c5-v4.dts
/mnt/data/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-5.15.150/scripts/dtc/dtc -O dtb -i../dts/ -Wno-unit_address_vs_reg -Wno-simple_bus_reg -Wno-unit_address_format -Wno-pci_bridge -Wno-pci_device_bus_num -Wno-pci_device_reg -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-graph_port -Wno-unique_unit_address    -o /mnt/data/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/image-mt7620a_tplink_archer-c5-v4.dtb /mnt/data/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/image-mt7620a_tplink_archer-c5-v4.dtb.tmp
Error: ../dts/mt7620a_tplink_archer-c5-v4.dts:30.15-16 syntax error
FATAL ERROR: Unable to parse input tree
make[5]: *** [Makefile:235: /mnt/data/tmp/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/image-mt7620a_tplink_archer-c5-v4.dtb] Error 1
make[5]: Leaving directory '/mnt/data/tmp/openwrt/target/linux/ramips/image'
make[4]: *** [Makefile:22: install] Error 2
make[4]: Leaving directory '/mnt/data/tmp/openwrt/target/linux/ramips'
make[3]: *** [Makefile:11: install] Error 2
make[3]: Leaving directory '/mnt/data/tmp/openwrt/target/linux'
time: target/linux/install#14.79#4.51#18.35
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:32: target/linux/install] Error 1
make[2]: Leaving directory '/mnt/data/tmp/openwrt'
make[1]: *** [target/Makefile:26: /mnt/data/tmp/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/mnt/data/tmp/openwrt'
make: *** [/mnt/data/tmp/openwrt/include/toplevel.mk:232: world] Ошибка 2

-download and extract zip file: https://codeload.github.com/openwrt/openwrt/zip/refs/heads/main
-edit file: mt7620a_tplink_archer-c5-v4.dts
-run:

./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make menuconfig
make -j$(nproc) download
make -j$(nproc) V=s

select:
Target System -> Mediatek Ralink Mips
Subtarget->MT7620 Based Boards
Target Profile ->TP-Llink Archer C5 v4
Luci->Collections->luci *

The images are located in a subfolder: bin/target/ramips/mt7620

@ricardovitor: Link to binaries: https://easyupload.io/2ym3ol_

A little note: Since there are problems with the performance of 2.4GHz WiFi for Mediatek MT7620, disable 802.11w Management Frame Protection in Wireless Security.

However, it should be borne in mind that, like the Archer C5 v4, the router can be used with two different families of chips: rtl8367c or rtl8367d. Compiled images only support the rtl8367c family. If it is incorrect, there will be no LAN communication and the need to restore the previous flash.

After led-3 { you should close the '{':

led-3 {
			function = LED_FUNCTION_WLAN;
			color = <LED_COLOR_ID_GREEN>;
			function-enumerator = <2>;
			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "phy0tpt";
};   // <-- here

unfortunately those links doesn't work for me :confused:

Fortunately, it is possible to download directly from TP-Link from the links below:

1 Like

Thanks for the binaries. I was able to install using the TFTP recovery file, but there were no LED lights and no Wan port. I noticed that all the ports were Lans.

Without connecting a serial terminal, it will not be known for sure what the cause is, but your router probably has an unsupported rtl8367d family chip.

The experimental flash image for this family can be downloaded here: https://disk.yandex.ru/d/HrT5PMczO8PPBw but it is for Archer c5 v4.

hello.
so after editing the dts config I was able to assemble the image. LED indication works. All ports were also only in the LAN segment and were confused with each other. I manually found wan port, it was Lan1 and replaced it with Vlan2. more details in the screenshot below. after that my internet started working. I also had 2 switches displayed in my system. deleted it with command

uci delete network.@switch[0] && uci commit

Hi zenck, could you send your firmware file and your configuration correcting the Vlan? Thanks

You probably just need to replace the WLAN definitions
at target/linux/ramips/mt7620/base-files/etc/board.d/02_network

	tplink,archer-c5-v4)
		ucidef_add_switch "switch0"
		ucidef_add_switch_attr "switch0" "enable" "0"
		ucidef_add_switch "switch1" \
			"0:wan" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "7@eth0"

Probably too target/linux/ramips/mt7620/base-files/etc/board.d/01_leds

tplink,archer-c5-v4)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch1" "0x1e"
	ucidef_set_led_switch "wan" "wan" "orange:wan" "switch1" "0x01"
	;;

Please check.
If everything is OK, it will be possible to generate a PR supporting this router at https://github.com/openwrt/openwrt
To make it easier for others to install OpenWRT on a router, a description of the installation and restoration, parameters and order of the serial port, etc. are also required.

Thanks mietekn, with your file I was able to make it work and thanks to the @zench1k I was able to make the wan port work and now I have internet although I measure the speed and I'm stuck at /100 whereas my connection is /1000 and I have more than 300 megs on the network. My LEDs are not functional, I'm waiting for someone who made them to work to test them on mine.

As it doesn't "see" the wan port fisical, Vlan is limiting the speed. Thank you to anyone who fixes this, it will be valuable to use my full bandwidth. And I hope it is supported by Openwrt. I have no words to thank those who helped me at the time and now it is working within these limits and is possible to use.

Try this: https://easyupload.io/2ym3ol_
Install without keeping the previous configuration.

Since there are problems with the performance of 2.4GHz WiFi for Mediatek MT7620, disable 802.11w Management Frame Protection in Wireless Security.

I'll test it and I'll let you know what happened!

I have good and "bad" news. The good thing is that I now have a physical Wan and now I have access to the LEDs. The bad thing is that the physical Wan port is on "Lan 3" and the Wan became a Lan port. I also have a Switch 0 on the interface. I will attach the photos.

This Switch 0 remained, which Zench1k managed to remove, but I don't know how he did it.

Install without keeping the previous configuration.

Switch0 is created automatically, its display does not interfere in any way.

don't install it. after flash I can't connect to the router. lan ports go up but can't get the address