Support for tp-link ec220-g5

I tried to install it but the LAN ports are as if they were slow or stuck, I was even able to get the IP and get the wifi to work but then the "Lans" got stuck and didn't work anymore (One time the connection occurs, another time the network remains unidentified). But I confirm that now the Wan port is in the right place with this issue of "lans" stuck.

I thought it was because I had installed it wrong. So that's it, mietekn correction regarding Wan was correct, however, the Lans are "freezing" and having difficulty accessing the WRT panel. I still can't see if the speed is now above /100.

I'm going to use this version one while we see this "stuck" Lan issue!

But there was a lot of progress compared to what was before. We are certainly close to having WRT support for this EC220-G5 once these small errors are fixed.

I only changed:

diff -ruN mt7620/base-files/etc/board.d/01_leds mt7620.new/base-files/etc/board.d/01_leds
--- mt7620/base-files/etc/board.d/01_leds	2024-03-27 10:13:22.843126016 +0100
+++ mt7620.new/base-files/etc/board.d/01_leds	2024-03-29 13:52:49.820000000 +0100
@@ -226,8 +226,8 @@
 	ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x01"
 	;;
 tplink,archer-c5-v4)
-	ucidef_set_led_switch "lan" "lan" "green:lan" "switch1" "0x0f"
-	ucidef_set_led_switch "wan" "wan" "green:wan" "switch1" "0x10"
+	ucidef_set_led_switch "lan" "lan" "green:lan" "switch1" "0x17"
+	ucidef_set_led_switch "wan" "wan" "orange:wan" "switch1" "0x08"
 	;;
 tplink,archer-c50-v1)
 	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
diff -ruN mt7620/base-files/etc/board.d/02_network mt7620.new/base-files/etc/board.d/02_network
--- mt7620/base-files/etc/board.d/02_network	2024-03-27 10:13:22.843126016 +0100
+++ mt7620.new/base-files/etc/board.d/02_network	2024-03-29 13:50:57.176000000 +0100
@@ -239,7 +239,7 @@
 		ucidef_add_switch "switch0"
 		ucidef_add_switch_attr "switch0" "enable" "0"
 		ucidef_add_switch "switch1" \
-			"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "7@eth0"
+			"0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "4:lan:4" "7@eth0"
 		;;
 	tplink,archer-mr200)
 		ucidef_add_switch "switch0" \

I've try compile it from source and your binaries too, but none of them seems to work with the EC220 G5 Br (EC220-G5(BR)v2_Build 230404 Rel.29979n). The router boot up but it can't communicate with the RTL8367 external switch, therefore neither LAN nor WAN ports works.

on boot there is the message:

Failed to connect to the switch. Use the "list" command to see which switches are available.

and the only switch available is:

root@OpenWrt:/# swconfig list
Found: switch0 - mt7620

as shown it can't detect the switch chip:

root@OpenWrt:/# dmesg | grep rtl8367
[    3.710963] rtl8367b rtl8367s: using MDIO bus 'mdio'
[    3.717056] rtl8367b rtl8367s: unknown chip num:6642 ver:0010, mode:0014
[    3.723901] rtl8367b rtl8367s: chip detection failed, err=-19

maybe it uses a differente CPU port to connect to the external switch? or maybe another PHY-ID?

could you help me find out from the stock firmware? I have uart serial console/shell access to it (not so hard, the "EC220-G5 login: " is just admin : 1234)

In your case it is 100% a problem with the chipset version, you have a chip from the rtl8367d family which is not yet supported.
The experimental flash image for this family can be downloaded here: https://disk.yandex.ru/d/HrT5PMczO8PPBw but it is for Archer c5 v4.

Or Luacs, I'm from Brazil and I assume you are too. Mietkn compiled this one that works on the EC220-G5 (At least the one distributed here in Brazil) and it worked! Apparently the only issue is that the physical wan port is on Lan3 which is limiting internet speed. Mietkn even managed to hit the wan port but it had a side effect in which the "Lans" are frozen which is making access to the Openwrt panel difficult. At least the one that mietkn sent is working, although as I said, with this issue of Lan 3 being the wan port.

Strange, this is somehow causing the LAN ports to freeze. I went back to the previous one that you compiled and it worked again, although the Lan3 port is the "Wan" port.

so after some time I entered to web panel
in def setup we have 3th vlan, very strange

Restore default settings.

I went back to the configuration where the Wan port is Lan 3 and it looked like this. Now if I update to the latest Mietken modification by placing the Wan port in the correct place, the LAN no longer works. And look, mietken said he only changed a few things. There must be something more to this issue.

Was it at some point in the compilation that something was missing? Or does this change cause a side effect on the EG220 interface?

The problem with LAN ports occurs if a wan cable is connected during booting. If you remove the wan cable befor boot, the lan ports are available.
just rapid research

unfortunately the chip detection failed error persists :confused:

I did this, but after I connected the WIFI interfaces, the LANs no longer worked. How is it for you now, can you use it?

Try this:

"0:lan:3" "1:lan:2" "2:lan:1" "4:lan:4" "3:wan" "7@eth0"

Binaries: https://easyupload.io/2ym3ol

@zench1k Can you test this mietkn modification on your side to see if it works? If so, we can now compile a functional one.

Due to CVE-2024-3094 (https://www.openwall.com/lists/oss-security/2024/03/29/4) please redownload binaries: https://easyupload.io/2ym3ol

Please update all links to my binaries in your replies to this or remove them.

After several reboots the new image works well. the leds shine correctly. The designation of the ports in the switch is correct. It’s a little strange to see lan4, but this is cosmetic and can be removed later. ec220 has only 3 lan ports. good job

I know this, but currently it is not possible to remove ports from the switch.