LTE connection on a TP-Link MR6400 v5 and OpenWrt 22.03.05


I try to use a TP-Link MR6400 as a LTE modem router.
The exact reference written on the device is : TL-MR6400(EU) Ver:5.20

That device page on the OpenWrt website is :
TP-Link TL-MR6400 v5 Openwrt webpage

I already installed OpenWrt 22.03.05 using the TFTP method.

Here are the status page information given by OpenWrt :
Hostname: MR6400
Model: TP-Link TL-MR6400 v5
Architecture: MediaTek MT7628AN ver:1 eco:2
Target Platform: ramips/mt76x8
Firmware Version: OpenWrt 22.03.5 r20134-5f15225c1e / LuCI openwrt-22.03 branch git-23.093.57104-ce20b4a

I access the device using the LAN interface.

Now I try to use the LTE modem, but I can't get it to work.

I installed the luci-proto-qmi package. Here are the *qmi packages installed :
luci-proto-qmi git-21.231.25157-5ff3ef7 ~2.31 KiB Support for QMI
kmod-usb-net-qmi-wwan 5.10.176-1 ~8.16 KiB QMI WWAN driver for Qualcomm MSM based 3G and LTE modems
uqmi 2022-05-04-56cb2d40-1 ~35.16 KiB uqmi is a command line tool for controlling mobile broadband modems using…

I then get :

ls -l /dev/cdc-wdm0
crw-------    1 root     root      180, 176 May 27 17:56 /dev/cdc-wdm0

In the /etc/config/network file I added :

config interface '4G'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth 'none'
        option dhcp '0'
        option autoconnect '1'
        option pdptype 'ipv4v6'
        option apn ''
        option force_link '1'

I removed the SIM card PIN on my smartphone. I tried it on my smartphone and I get voice and 4G connectivity.
The apn value is the good one : it's written on the paper sent by the ISP with the SIM.

However, the 4G connection seems unestablished on the MR6400:

uqmi -d /dev/cdc-wdm0 --get-data-status

I don't understand what's wrong. Is there no connection because the default route isn't set on the 4G interface ? I don't know.

Thanks for your help.

post a screen shot for your network -> interfaces, feel free to mask the MACs.

Here is the interface page:

The device page:

You don't need to add anything to /etc/config/network file yet, use Luci to configure.
ipv4v6 could be wrong, check what is on your phone.

That was it! :grinning:

I changed the PDP Type value from "IPv4/IPv6" to "IPv6":

and it worked:

Thank you very much for your help!

Both OpenWrt and its community are very good and helpful. Definitely an excellent solution for our devices.

1 Like

Then you may need to install 464xlat, see Unable to get Quectel EC25-E to connect in QMI mode - #7 by AndrewZ

If your question was answered please mark the topic as [Solved].

Damn, it doesn't work anymore. I made some changes which could explain that. Therefore, I restored a backup I made just after I got it working.

But it still doesn't work anymore:

 uqmi -d /dev/cdc-wdm0 --start-network internet --autoconnect
^C"Failed to connect to service"

I noticed when it worked I had:

Now, it's not working and I get:

I can't "choose" the device when creating the interface. The name which appears under the interface name is, whatever I do, qmi- and the name I give to the new interface.

I suppose this happens when the device configured in option device '/dev/cdc-wdm0' is unavailable.
Check your system log for cdc-wdm related records.

I don't see anything special in the system log.

dmesg | grep -E "qmi|wdm"
[   17.234930] usbcore: registered new interface driver cdc_wdm
[   19.043551] qmi_wwan 1-1:1.4: cdc-wdm0: USB WDM device
[   19.050447] qmi_wwan 1-1:1.4 wwan0: register 'qmi_wwan' at usb-101c0000.ehci-1, WWAN/QMI device, xxxxxxxxxxx
[   19.061419] usbcore: registered new interface driver qmi_wwan

OK, then check with ll /dev/cdc*

Here's the output:

ll /dev/cdc*
crw-------    1 root     root      180, 176 May 29 19:35 /dev/cdc-wdm0

Well, then make sure this device is selected in interface configuration and see if interface restart will give any result.

I created the interface again, and restarted it, without success.


Trying this.

Still no LTE connection. :thinking:

You can try my customized uqmi.
Download and install with:

opkg install uqmi_2022-11-29-0.10_mipsel_24kc.ipk

Other MR6400 users has used this version.

I did that, and it immediately worked:

Thank you very much for your advice and your shared work!

Why doesn't your change go to the main repository of OpenWrt ?

I'm a bit worried because that LTE router will be installed 700km away from me, without any way to access it apart from the LTE connection. If a new version of OpenWrt goes out, I worry there won't be immediately a new version of your package. I also think I won't be able to install it after having upgraded to a new OpenWrt version. I would have to download the new package before upgrading and keep it somewhere where it wouldn't be deleted by the upgrade process. But even if I do manage to do that, I won't be able to install the new package, since I won't be able to connect to the newly upgraded OpenWrt.

Some of my changes are included in the official version of uqmi, but not all. It take some time to get all approved.
You have my source code available at

When you are about to upgrade your router I think you will do that locally. Then you can download and install my uqmi as well.

BTW. Did you try to use PDP Type = IPv4v6?

1 Like

I hope your code will be approved, it really helps! Thank you for sharing your work.

I just tried to use PDP Type=IPv4/IPv6. After rebooting, here's what I get:

It works fine again if I set PDP Type=IPv6 and reboot.