TL-MR6400 v5 can't start built in modem

You'll need to ssh to the router and execute it in cli.

Put the patch file in /tmp, the path to the patched to be sh seemed to be absolute in the .patch.

Ok. I will try it tomorrow and hopefully wil get the LTE back to working condition. Thanks again for your time and your help. I will come back tomorrow with the results

1 Like

To do it on the router you will need to opkg install patch first, since patch is an optional program.

So if I understand correctly after making the .patch file I will use the "opkg install whatevernameigave.patch" command in order to install the patch to the router. Is that correct?

No

opkg update
opkg install patch
patch < file.patch

I am unsure if I should've made a seperate thread, but seeing as this is active I will chime in.

I've bought a TP-Link MR-6400v5 3 weeks ago and have been struggling with LTE configuration for over 2 weeks.

Problem: LTE configuration using ModemManager works completely fine, but I cannot get the QMI module to work for the hell of me.

I've compiled my own firmware using the SDK/Build image tools. I installed all mandatory and optional packages following the guides at [OpenWrt Wiki] How to use LTE modem in QMI mode for WAN connection
I have applied the /lib/netifd/proto/qmi.sh patch as recommended and have set network.3g.dhcp to 0.

Having the LTE module work under ModemManager shows me that it indeed is a configuration problem. I have tried a lot of things in getting the module to respond to UQMI commands, but to no avail.

The LTE module responds to uqmi commands, but only once every 10 or so commands ( I guess it is somehow time based as the rest of the time it just 'hangs' and shows 'Failed to connect to device' OR 'Failed to connect to service' )

Some uqmi proccesses I find with ps

 4862 root      1280 S    uqmi -s -d /dev/cdc-wdm0 --uim-verify-pin1 0000
 5590 root      1280 S    uqmi -s -d /dev/cdc-wdm0 --verify-pin1 0000
 9315 root      1280 S    uqmi -s -d /dev/cdc-wdm0 --wda-set-data-format 802.3
11381 root      1280 S    uqmi -s -d /dev/cdc-wdm0 --verify-pin1 0000
15442 root      1272 S    uqmi -s -d /dev/cdc-wdm0 --wda-get-data-format
17237 root      1280 S    uqmi -s -d /dev/cdc-wdm0 --set-device-operating-mode online
17748 root      1452 S    /bin/sh ./qmi.sh qmi setup 3g {"proto":"qmi","device":"/dev/cdc-wdm0","peerdns":false,"dns":["8.8.8.8","1.1.1.1"],"delegate":false,"device":"/dev/cdc-wdm0","apn":"internet.a1.bg","pincode":"0000","auth":"none"
17819 root      1280 S    uqmi -s -d /dev/cdc-wdm0 --stop-network 0xffffffff --autoconnect

It seems to me that qmi is hanging

Part of the network config: ( I have no other interfaces besides 3g and the default br-lan )
(taken from Enabling TL-MR6400 v5 LTE - Installing and Using OpenWrt / Network and Wireless Configuration - OpenWrt Forum)

network.3g=interface
network.3g.proto='qmi'
network.3g.device='/dev/cdc-wdm0'
network.3g.apn='internet.a1.bg'
network.3g.pincode='0000'
network.3g.auth='none'
network.3g.dhcp='0'
network.3g.peerdns='0'
network.3g.dns='8.8.8.8' '1.1.1.1'
network.3g.delegate='0'
network.3g.pdptype='ip'
network.3g.modes='lte'

Some logs I find relevant:

Sun Jun 13 22:03:11 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Opening device with flags 'version-info, proxy'...
Sun Jun 13 22:03:11 2021 daemon.debug [2610]: [/dev/cdc-wdm0] created endpoint
Sun Jun 13 22:03:11 2021 daemon.debug [2610]: cannot connect to proxy: Could not connect: Connection refused
Sun Jun 13 22:03:11 2021 daemon.debug [2610]: spawning new qmi-proxy (try 1)...
Sun Jun 13 22:03:11 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Checking version info (25 retries)...
Sun Jun 13 22:03:12 2021 daemon.info [2610]: <info>  [base-manager] couldn't check support for device '/sys/devices/platform/10300000.wmac': not supported by any plugin
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: transaction 0x2 aborted, but message is not abortable
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0] QMI Device supports 24 services:
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    ctl (1.5)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    wds (1.67)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    dms (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    nas (1.25)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    qos (1.12)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    wms (1.10)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    auth (1.3)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    at (1.2)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    voice (2.1)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    cat2 (2.24)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    uim (1.46)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    pbm (1.4)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    test (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    sar (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    ts (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    tmd (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    wda (1.16)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    csvt (1.1)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    coex (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    pdc (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    rfrpe (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    dsd (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    unknown [0x30] (1.0)
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    unknown [0x36] (1.0)
Sun Jun 13 22:03:12 2021 daemon.info [2610]: <info>  [device /sys/devices/platform/101c0000.ehci/usb1/1-1] creating modem with plugin 'generic' and '2' ports
Sun Jun 13 22:03:12 2021 daemon.info [2610]: <info>  [base-manager] modem for device '/sys/devices/platform/101c0000.ehci/usb1/1-1' successfully created
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Opening device with flags 'version-info, proxy'...
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0] created endpoint
Sun Jun 13 22:03:12 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Checking version info (25 retries)...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] QMI Device supports 24 services:
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    ctl (1.5)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    wds (1.67)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    dms (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    nas (1.25)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    qos (1.12)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    wms (1.10)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    auth (1.3)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    at (1.2)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    voice (2.1)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    cat2 (2.24)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    uim (1.46)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    pbm (1.4)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    test (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    sar (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    ts (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    tmd (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    wda (1.16)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    csvt (1.1)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    coex (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    pdc (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    rfrpe (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    dsd (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    unknown [0x30] (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0]    unknown [0x36] (1.0)
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'wda' (version 1.16) client with ID '1'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Releasing 'wda' client with flags 'release-cid'...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Unregistered 'wda' client with ID '1'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'dms' (version 1.0) client with ID '3'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'nas' (version 1.25) client with ID '1'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'wds' (version 1.67) client with ID '2'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'wms' (version 1.10) client with ID '1'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'uim' (version 1.46) client with ID '1'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'pdc' (version 1.0) client with ID '1'
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Allocating new client ID...
Sun Jun 13 22:03:13 2021 daemon.debug [2610]: [/dev/cdc-wdm0] Registered 'voice' (version 2.1) client with ID '1'
Sun Jun 13 22:03:13 2021 daemon.info dnsmasq-dhcp[2820]: DHCPDISCOVER(br-lan) 3c:2c:30:d2:df:f3
Sun Jun 13 22:03:13 2021 daemon.info dnsmasq-dhcp[2820]: DHCPOFFER(br-lan) 192.168.1.102 3c:2c:30:d2:df:f3
Sun Jun 13 22:03:13 2021 daemon.info dnsmasq-dhcp[2820]: DHCPREQUEST(br-lan) 192.168.1.102 3c:2c:30:d2:df:f3
Sun Jun 13 22:03:13 2021 daemon.info dnsmasq-dhcp[2820]: DHCPACK(br-lan) 192.168.1.102 3c:2c:30:d2:df:f3 DELL-XPS
Sun Jun 13 22:03:13 2021 daemon.warn [2610]: <warn>  [modem0] couldn't load power state: Unhandled power state: 'shutting-down' (5)
Sun Jun 13 22:03:14 2021 daemon.warn [2610]: <warn>  [modem0] couldn't query SIM slots: QMI protocol error (94): 'NotSupported'
Sun Jun 13 22:03:14 2021 daemon.warn [2610]: <warn>  [modem0/sim0] couldn't load operator identifier: Couldn't get home network: QMI protocol error (16): 'NotProvisioned'
Sun Jun 13 22:03:14 2021 daemon.warn [2610]: <warn>  [modem0/sim0] couldn't load operator name: Couldn't get home network: QMI protocol error (16): 'NotProvisioned'
Sun Jun 13 22:03:14 2021 daemon.warn [2610]: <warn>  [modem0/sim0] couldn't load list of emergency numbers: No AT port available to run command
Sun Jun 13 22:03:14 2021 daemon.warn [2610]: <warn>  [modem0] couldn't load list of own numbers: Couldn't get MSISDN: QMI protocol error (16): 'NotProvisioned'
Sun Jun 13 22:03:14 2021 daemon.warn [2610]: <warn>  [modem0] couldn't load UE mode of operation for EPS: No AT port available to run command
Sun Jun 13 22:03:14 2021 daemon.info [2610]: <info>  [modem0] state changed (unknown -> disabled)
Sun Jun 13 22:23:22 2021 daemon.notice netifd: 3g (12814): Waiting for SIM initialization
Sun Jun 13 22:23:23 2021 daemon.notice netifd: 3g (12814): Waiting for network registration
Sun Jun 13 22:23:24 2021 daemon.notice netifd: 3g (12814): Starting network 3g
Sun Jun 13 22:30:36 2021 daemon.notice netifd: 3g (15391): Stopping network 3g
Sun Jun 13 22:30:37 2021 daemon.notice netifd: 3g (15391): Command failed: Permission denied

I am unsure as to what else to try. (I've tried a lot of different options, including setting the wds client-id to 2 ( the id of 2 as seen from the setup of ModemManager in the logs) as described here: [OpenWrt Wiki] How to use LTE modem in QMI mode for WAN connection - Troubleshooting
I have also tried the qmi.sh changes as seen here: [SOLVED] LTE QMI Troubles - Installing and Using OpenWrt - OpenWrt Forum but to no effect

Additionally I find many similar problems with QMI protocol and my specific router on the net, but no where do I see any solution that has worked so far.
It seems to me that this is very relevant to my case:

OpenWrt for TL-MR6400-V5 - Installing and Using OpenWrt - OpenWrt Forum

It seems that I too have dns problems from the LTE as when I open chrome the error give is

DNS_PROBE_FINISHED_NO_INTERNET

Hello again. I spent many many hours in order to activate the qmi built-in modem. I managed to make it work and I could see from the interface that it can send and receive data packages and also has receive an ip address but I couldn't connect to the internet. Also I had another problem. I need to install openvpn. I tried to install it but I get the result that my kernel is incompatible. That I have a different Kernel that is not compatible with OpenVPN in order to install it. Any ideas for what I should do?

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

Do you mind if I could ask what configuration did you use to get it to work?

Are you using qmi protocol (network.wwan.proto=qmi) or modemmanager?

What I did was that: Install the package luci-proto-qmi using Luci (System → Software ) and configure the modem using LuCi (Network → Interfaces ). Then I went to Interface, add new Interface and then I found QMI Modem device

I am back with the same problem which is the LTE built-in modem that has been activate but not be able to connect to the internet. It seems that I have established connections with the carrier but there is no connection to the internet. I get the error DNS_PROBE_FINISHED_NO_INTERNET. Any ideas?

DNS_PROBE_FINISHED_NO_INTERNET who's throwing this error?

This is the error I get on Google Chrome when I try to open any web page

Post a screen shot of your LTE WAN interface in openwrt.

Does the network > diagnostics work in openwrt, if you try them?


Here a screen shot of my LTE interface. In diagnostic I get this error



Waiting for your reply

The DATA interface is running only IPv6. There is something called DATA_4, which might be to transport your IPv4 traffic, but it is inactive. I can't see what is going on with the interface called "DHCP".

Thank you for your response reply. I will check what is going on with DHCP. I found also that I have to do something else on the built-in modem in order to work. This is what I found on an other post:

just edit qmi.sh and add this strings

uqmi -s -d "$device" --get-pin-status &
sleep 3
killall uqmi || echo "UQMI works fine!"

before

while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
	[ -e "$device" ] || return 1
	sleep 1;
done

this workaround works for me.

How can I edit qmi.sh ? I tried but couldn't find anything about editing the qmi.sh

vi is always there

or transfer the file using winscp to your computer, edit it there, then send it back again.

I manage to do that but didn't solve the issue. The issue I have is that LTE built-in modem doesn't always work. Sometimes get ip address but most of them doesn't work. It seems to stuck. Any possible solution?

The problem why the Built-in modem doesn't always work seem to be that the sim card must have a pin code. I doesn't have most of the times want to connect. Now that it always connect with a sim with pin code is that I can not access the internet. Any ideas what this is happening?