Enabling TL-MR6400 v5 LTE

I'm trying to activate the LTE connection in my MR6400 v5.
This seems to be a QMI device. It is my first-time configuring QMI. I have no clue if I've done it right or not.

Below is the output uci show network.wan

network.wan=interface
network.wan.proto='qmi'
network.wan.delegate='0'
network.wan.auto='0'
network.wan.device='/dev/cdc-wdm0'
network.wan.apn='smartsites.t-mobile'
network.wan.pincode='nnnn' <-- deleted
network.wan.auth='pap'
network.wan.pdptype='ip'
network.wan.modes='lte'

When I try to ifup wan the script stops on "Waiting for SIM initialization"

Any help appreciated.

thanks to Filip Moc I learned that two changes were needed

1 is a patch to /lib/netifd/prot/qmi.sh adding a timeout to uqmi. Patch below

--- /lib/netifd/proto/qmi.sh.orig	2021-01-04 20:44:11.000000000 +0000
+++ /lib/netifd/proto/qmi.sh	2020-12-31 22:31:01.000000000 +0000
@@ -81,7 +81,7 @@
 
 	echo "Waiting for SIM initialization"
 	local uninitialized_timeout=0
-	while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
+	while uqmi -t 1000 -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
 		[ -e "$device" ] || return 1
 		if [ "$uninitialized_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then
 			let uninitialized_timeout++
@@ -94,7 +94,7 @@
 		fi
 	done
 
-	if uqmi -s -d "$device" --get-pin-status | grep '"Not supported"\|"Invalid QMI command"' > /dev/null; then
+	if uqmi -t 1000 -s -d "$device" --get-pin-status | grep '"Not supported"\|"Invalid QMI command"' > /dev/null; then
 		[ -n "$pincode" ] && {
 			uqmi -s -d "$device" --verify-pin1 "$pincode" > /dev/null || uqmi -s -d "$device" --uim-verify-pin1 "$pincode" > /dev/null || {
 				echo "Unable to verify PIN"

2 is setting network.wan.dhcp=0

4 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.