Network drivers not working on TP-Link EX220

Hello, I’m a 16-year-old Full Stack Developer, and I’ve recently been working on getting OpenWrt running on my TP-Link EX220 router. I’ve soldered wires to the TTL port and captured the serial logs from the OEM boot, OpenWrt SNAPSHOT boot, and OpenWrt 23.05.5 boot (please see attached logs from the comments).

Following the official OpenWrt guide, I encountered an issue where the router's hardware differs slightly from the version described on the website. I understand that these routers are often sold to ISPs, who may modify the hardware to suit their needs. However, I believe the differences are minor enough that there’s still hope for getting OpenWrt running properly—if I can identify the correct Ethernet and wireless drivers.

From what I can gather, the OEM firmware appears to be based on an older, modified version of OpenWrt with a Linux kernel 4.4.198. When I attempted to install OpenWrt via the serial + TFTP method, using both the latest SNAPSHOT and the 23.05.5 release, I ran into a problem: the Ethernet drivers don't seem to load in either version. While I haven’t yet verified the wireless drivers, I suspect they might not be functional either.

I also tried compiling OpenWrt myself, guessing at which drivers could work, but this approach didn’t resolve the issue. Upon reviewing the logs, I noticed that when comparing the OEM to OpenWrt, the drivers appear to be the same, but without an "e" at the end, and I’m unable to disable this driver in menuconfig. Should I attempt to disable it, or would it still give no good outcome.

Any guidance on how to properly identify the correct drivers, or insights into what might be going wrong, would be greatly appreciated!

Edit: I've added the U-Boot log aswell, with mtdparts and printenv.

are we supposed to guess which driver(s) those would be ?

These are the serial logs: (I had to use pastebin except for U-Boot log)

U-Boot log

U-Boot SPL 2018.09 (Jul 12 2024 - 02:26:35 +0000)
Trying to boot from NAND

Initializing NMBM ...
Signature found at block 1023 [0x07fe0000]
First info table with writecount 0 found in block 960
Second info table with writecount 0 found in block 963
NMBM has been successfully attached


U-Boot 2018.09 (Jul 12 2024 - 02:26:35 +0000)

CPU:   MediaTek MT7621AT ver 1, eco 3
Clocks: CPU: 880MHz, DDR: 1200MHz, Bus: 220MHz, XTAL: 40MHz
Model: MediaTek MT7621 reference board (NAND)
DRAM:  256 MiB
NAND:  128 MiB

Initializing NMBM ...
Signature found at block 1023 [0x07fe0000]
First info table with writecount 0 found in block 960
Second info table with writecount 0 found in block 963
NMBM has been successfully attached

Loading Environment from NMBM... OK
In:    uartlite0@1e000c00
Out:   uartlite0@1e000c00
Err:   uartlite0@1e000c00
Net:
Warning: eth@1e100000 (eth0) using random MAC address - 16:29:bd:47:91:f4
eth0: eth@1e100000
Hit any key to stop autoboot:  0

  *** U-Boot Boot Menu ***

     1. Startup system (Default)
     2. Upgrade firmware
     3. Upgrade bootloader
     4. Upgrade bootloader (advanced mode)
     5. Load image
     0. U-Boot console


  Press UP/DOWN to move, ENTER to select
=> mtdparts

device nmbm0 <nmbm0>, # parts = 9
 #: name                size            offset          mask_flags
 0: boot                0x00080000      0x00000000      0
 1: boot-env            0x00080000      0x00080000      0
 2: misc_ro             0x00600000      0x00100000      0
 3: misc_rw             0x00600000      0x00700000      0
 4: firmware1           0x01600000      0x00d00000      0
 5: firmware2           0x01600000      0x02300000      0
 6: bflag               0x00600000      0x03900000      0
 7: misc_rw_bak         0x00600000      0x03f00000      0
 8: misc_isp            0x00600000      0x04500000      0

active partition: nmbm0,0 - (boot) 0x00080000 @ 0x00000000

defaults:
mtdids  : nmbm0=nmbm0
mtdparts: mtdparts=nmbm0:512k(boot),512k(boot-env),6144k(misc_ro),6144k(misc_rw),22528k(firmware1),22528k(firmware2),6144k(bflag),6144k(misc_rw_bak),6144k(misc_isp)
=> printenv
addHver=0
autostart=yes
baudrate=115200
bootargs=AC=300 console=ttyS0,115200 ubi.mtd=misc_isp
bootcmd=mtkautoboot
bootdelay=0
bootmenu_0=Startup system (Default)=mtkboardboot
bootmenu_1=Upgrade firmware=mtkupgrade fw
bootmenu_2=Upgrade bootloader=mtkupgrade bl
bootmenu_3=Upgrade bootloader (advanced mode)=mtkupgrade bladv
bootmenu_4=Load image=mtkload
ethact=eth@1e100000
fdtcontroladdr=8ffe2040
flashmac=A8:6E:84:B3:8E:17
fw1_status=3
fw2_checksum=15A608339458F8C80605793121838B79
fw2_length=16252932
fw2_status=8
fw2_version=1
fw_index=2
ipaddr=192.168.0.1
labelMac=A8:6E:84:B3:8E:17
labelMacType=1
mtddevname=boot
mtddevnum=0
mtdids=nmbm0=nmbm0
mtdparts=mtdparts=nmbm0:512k(boot),512k(boot-env),6144k(misc_ro),6144k(misc_rw),22528k(firmware1),22528k(firmware2),6144k(bflag),6144k(misc_rw_bak),6144k(misc_isp)
netmask=255.255.255.0
partition=nmbm0,0
pin=64220277
platformVer=2768371712
productId=1765179393
productVer=393312
serverip=192.168.0.2
sn=22434B4003926
stderr=uartlite0@1e000c00
stdin=uartlite0@1e000c00
stdout=uartlite0@1e000c00
swRevision=1437204498

Environment size: 1066/131068 bytes

OEM boot log:

OpenWrt SNAPSHOT boot log:

OpenWrt 23.05.5 boot log:

Let me point out the error from the SNAPSHOT log, there are no errors from the 23.05.5 log (but the ethernet dosen't work, probably the wireless too).

[   17.102686] mt7915e_hif 0000:01:00.0: enabling device (0000 -> 0002)
[   17.109711] pci 0000:00:01.0: enabling device (0000 -> 0003)
[   17.115527] mt7915e 0000:02:00.0: enabling device (0000 -> 0002)
[   17.298574] mt7915e 0000:02:00.0: HW/SW Version: 0x8a108a10, Build Time: 20240429200716a
[   17.298574] 
[   17.325608] mt7915e 0000:02:00.0: WM Firmware Version: ____000000, Build Time: 20240429200752
[   17.364890] mt7915e 0000:02:00.0: WA Firmware Version: DEV_000000, Build Time: 20240429200812
[   17.536023] mt7915e 0000:02:00.0: eeprom load fail, use default bin
[   17.542547] mt7915e 0000:02:00.0: Direct firmware load for mediatek/mt7915_eeprom_dbdc.bin failed with error -2
[   17.552677] mt7915e 0000:02:00.0: Falling back to sysfs fallback for: mediatek/mt7915_eeprom_dbdc.bin
[   17.654464] urngd: v1.0.2 started.
[   17.717248] mt7915e: probe of 0000:02:00.0 failed with error -12
[   17.802549] PPP generic driver version 2.4.2
[   17.811754] NET: Registered PF_PPPOX protocol family
[   18.113249] jitterentropy: Initialization failed with host not compliant with requirements: 9
[   18.211883] kmodloader: 1 module could not be probed
[   18.217184] kmodloader: - jitterentropy_rng - 0
[   28.196553] platform 1e100000.ethernet: deferred probe pending

I'm sorry if I didn't provide enough information, It's not exactly a shot in the dark. Rather than just guessing, I'm looking to identify the correct drivers by comparing boot logs, noting subtle differences like the missing "e" in the OEM driver name, and cross-referencing.

jitterentropy fips test fails on ramips so it is rejected. It used to serve faux random in 23.05.x
use haveged if running massive ssl service.

Hmm, Okay. I will complie it without jitterentropy, and report back. Thanks!

Device is stable, just use standard image.

Sorry? I didn't understand. What do you mean by "standard image". Do you mean the stock one? I'd rather not use the stock one, The stock is definitely stable & reliable BUT that's because I don't have full access to it, and is mostly all managed by tp-link. But I want that full access, and I understand OpenWrt is as stable as "I" want it to be.

Find ex220 v1 here:

Just sysupgrade to standard stable release from your build.

Oh. Sorry for misunderstanding. I'll use the image for my model here and report back.

1 Like

Well... It didn't work. same error, still no ethernet interfaces.

BUT I compiled a patched linux kernel which increases the default oversampling rate to 3, which fixed the jitterentropy error, but stilll the ethernet isn't working.

908-v6.7-crypto-jitter-Allow-configuration-of-oversampling-rate.patch
909-v6.12-crypto-jitter-set-default-OSR-to-3.patch

ifconfig -a or ip link ?

Checking if the ethernet is there using ifconfig or ip has no point in because the ethernet driver isn't loading or is incorrect. That error message is enough to say that there is no ethernet.

root@OpenWrt:~# ifconfig -a
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:768 errors:0 dropped:0 overruns:0 frame:0
          TX packets:768 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:59904 (58.5 KiB)  TX bytes:59904 (58.5 KiB)

root@OpenWrt:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00