Adding OpenWrt support for TP-Link Archer MR200 V4?


#1

Hi

Has anyone experimented with getting OpenWRT/LEDE working on newer Archer MR200's (version 4.0)? Kjell & Company (kjell.com) is doing a drive on these at the moment, and they turn out to be a newer version than what is currently supported (d'oh!)

I grabbed the GPL sources from TP-Link's site, but there's so much there it's rather daunting figuring out where to even start..

The main thing I'm after is QoS, since this will be used to control amateur radio stuff in my remote QTH, and I don't want to accidentally run out of data. Backup plan is to just use some small computer for the same task.


#2

Is it the LTE capabilities that make the MR200v4 interesting to you?

If that's what you're looking for, the GL.iNet X750 ("Spitz") would be on the top of my list (~US$139). Ships with current OpenWrt, recent, reputable CAT6 LTE modem, solid OEM support. I have three other GL.iNet products and the build quality on them is excellent.


#3

Yes, or any other already-existing data coverage. GPRS would be fine. I know that 4G works in my intended location. One problem is that I can only get to it half of the year, so I need to be sure the setup doesn't run out of data in winter. And I want to keep costs low.

I picked the MR200 because it's the only device available in town which supposedly works with OpenWRT. I've seen the Spitz recommended in other thread on here, perhaps ordering a few for the future would be a good idea.

A friend of mine pointed out that the MR200 actually has QoS, which I had missed when i poked around with it before posting here. So that'll tide me over at least.


#4

"Friends don't let friends run OEM firmware" -- I'd check to see how ancient and insecure the TP-Link firmware is. It wouldn't surprise me if it is on Linux 3.x or even 2.x. "QoS" in a router, especially as advertised by an OEM, isn't the same thing as SQM or bandwidth shaping, which is likely what you would need to manage latency on a rate-limited link

It looks like the earlier version doesn't support 5 GHz wireless, according to https://openwrt.org/toh/tp-link/archer-mr200.

With no details of the chips in the v4 units, even on https://wikidevi.com/wiki/TP-LINK_Archer_MR200 it is a complete crap shoot if it will ever be supported, and to what level.

Here's the GL.iNet repo -- as you can see, it is kept current with OpenWrt releases. If I had a Spitz in my hand, it would be very easy to directly support it within the OpenWrt project tree.


#5

Currently, The 5GHz wifi (MediaTek MT7610E) on Archer MR200 v1 is supported in snapshot.

EDIT: I examined the rough specification of MR200 v4 based on TP-Link GPL source.

  • SoC: MediaTek MT7628 (or MT7688?)
  • RAM: 64 MiB
  • Flash: 8 MiB
  • WLAN:
    • 2.4GHz: (SoC)
    • 5GHz: MediaTek MT7610E

However, there may be mistakes. For your reference.


#6

Just got one of these. Hooked up serial and started dumping info. I'm dumping everything to GitHub. Uploaded some pictures there also.

So far I've only gotten it to start booting an OpenWrt kernel via TFTP, but it doesn't find the initramfs so it won't finish.


#7

FYI - I have created https://openwrt.org/inbox/tp-link/tp-link_mr200_v4
Just the raw page skeleton, in order to have a place to collect info about this device and ongoing supporting activities.

Feel free to add useful information to this page.


#8

Does the kernel start at all?


#9

Oh nice, I will, thank you.


#10

It does. Bootlog here: https://github.com/Lochnair/openwrt-mr200v4/blob/master/openwrt-bootlog.log


#11

Looks like it has some sort of file system there, or it wouldn't get procd up and running.

Messages like

[    0.123727] rt2880-pinmux pinctrl: invalid group "uartf" for function "gpio"
[    0.130545] rt2880-pinmux pinctrl: invalid group "rgmii1" for function "gpio"
[    0.137375] rt2880-pinmux pinctrl: invalid group "rgmii2" for function "gpio"
[    0.144276] rt2880-pinmux pinctrl: invalid group "wled" for function "gpio"
[    0.150983] rt2880-pinmux pinctrl: invalid group "nd_sd" for function "gpio"
[    0.157799] rt2880-pinmux pinctrl: invalid group "ephy" for function "gpio"
[    0.164507] rt2880-pinmux pinctrl: invalid group "spi refclk" for function "gpio"

suggest that the GPIO assignments are not right for some critical systems; likely Ethernet and SPI for NOR among them.


#12

Yes, you're right. I was mixing initramfs and initrd, which explains my confusion.

Thanks for the tip. After correcting the pinctrl definition in the dts the device is now able to boot via TFTP :slight_smile:

For the most part things are looking good. Ethernet working, WLAN working (both 2.4GHz and 5GHz).
I've yet to add mappings for the LEDs and buttons. Nor have I gotten the RNDIS interface for the modem to work yet, altough adb does work so that's a step in the right direction.


#13

By the way, you wouldn't happen to know where one retrieves the values for TPLINK_HWID and TPLINK_HWREV?


#14

After taking a closer look I found that the modem in the V4 uses QMI instead of RNDIS.

With the related QMI packages installed, the interface shows up and there's /dev/cdc-wdm0.
However running any command against the device with uqmi just stalls.

Update:
I now have OpenWrt installed to flash by using sysupgrade in the TFTP-booted environment.

GPIO mappings for LEDs and buttons are now working, apart from a weird issue with the WLAN LED where if WLAN is disabled, the LED still lights up after boot. If you then enable and disable WLAN, it'll turn off and work as expected until next reboot.

Edit 2:
This modem needs the SET_DTR quirk in qmi_wwan to work at all. However I've only gotten it to search so far.

Edit 3:
Installing OpenWrt via TFTP recovery confirmed working. Also successfully reverted to stock by TFTP recovery.

Edit 4:
The modem is now mostly working. The IP address is not set automatically and it's rather finicky to get to work due to some proprietary executable that needs to be ran in the Android part.