QUECTEL EP06 LTE modem falls to offline spontaneously

Hello, I have an issue with QUECTEL EP06 LTE modem. It works even in failover scenario as a backup WAN (mwan3), but cca 1x per day it falls to offline spontaneously and it seems there is no way except router reboot to make it functional again.

My config:

config interface ‘lte’
option proto ‘3g’
option apn ‘internet’
option device ‘/dev/ttyUSB2’
option service ‘umts’
option ipv6 ‘auto’
option metric ‘50’
option pincode ‘3639’
option force_link ‘1’

After it falls to offline, it says:

root@turris:/etc/config# ifstatus lte
{
“up”: false,
“pending”: false,
“available”: true,
“autostart”: false,
“dynamic”: false,
“proto”: “3g”,
“data”: {

},
"errors": [
	{
		"subsystem": "3g",
		"code": "PIN_FAILED"
	}
]

}

/var/log/messages says after “ifup lte” command:

Sep 28 12:43:09 turris netifd: Interface ‘lte’ is setting up now
Sep 28 12:43:09 turris netifd: lte (23472): comgt 14:43:09 → – Error Report –
Sep 28 12:43:09 turris netifd: lte (23472): comgt 14:43:09 → ----> ^
Sep 28 12:43:09 turris netifd: lte (23472): comgt 14:43:09 → Error @118, line 9, Could not write to COM device. (1)
Sep 28 12:43:09 turris netifd: lte (23472):
Sep 28 12:43:10 turris netifd: lte (23472): comgt 14:43:10 → – Error Report –
Sep 28 12:43:10 turris netifd: lte (23472): comgt 14:43:10 → ----> ^
Sep 28 12:43:10 turris netifd: lte (23472): comgt 14:43:10 → Error @153, line 10, Could not write to COM device. (1)
Sep 28 12:43:10 turris netifd: lte (23472):
Sep 28 12:43:10 turris netifd: Interface ‘lte’ is now down

Card has pin set off (when put into mobile phone, it boots without PIN code)

Any help? Thank you!

If the pin is disabled delete the line in config related to pin. Maybe that will help.

My problems with EC20 originated from the sim card holder and rarely from the modem itself.
So I suggest that you also look at the sim card when you experience the issue.
I suggest to use qmicli for this
/usr/bin/qmicli -d /dev/cdc-wdm0 --uim-get-card-status

1 Like

Line deteted, but modem still fails to offline time by time (cca 1x per 2 days). Can this be HW problem or firmware update needed? Is it possible to update FW under Open WRT? Thank you.

It seems there were more issues. SIM PIN deactivation helped, but it seems there is network connection limit set ro 48h (O2 CZ) what causes periodical disconnects after 2 days. But unfortunately I haven’t found way how to make modem online via script (ifup lte, uqmi….), only router restart helps :-/

I was using these commands in a script for EC20. I know that others use AT commands in a script (based on quectel AT commands manual for the modem) to initialize the modem.

Summary
#!/bin/sh

#Ping DNS server twice through Lte, should ping fail, test ip, protocol and card state
/usr/bin/ping -c2 -w 5 -I wwan0 8.8.8.8 >/dev/null 2>&1 && { logger "Lte DNS ping success"; exit 2; } || { ifup Lte; sleep 10; logger "Ping failed"; }

#Check IPv4 and exit on success
/usr/bin/qmicli -d /dev/cdc-wdm0 --wds-get-current-settings >/dev/null 2>&1 && { logger "IPv4 present"; exit 3; }

#Qmi protocol test, if it fails use AT command to reset the modem and bring up the interface
/usr/bin/qmicli -d /dev/cdc-wdm0 --dms-uim-get-state >/dev/null 2>&1 && { logger "Qmi proto test success"; } || { ifdown Lte; sleep 2; echo -e "AT+CFUN=1,1" > /dev/ttyUSB2; sleep 28; ifup Lte; logger "Reseting modem"; sleep 3; }

# Sim card power state test, if it fails power on sim card and bring up the interface
/usr/bin/qmicli -d /dev/cdc-wdm0 --uim-get-card-status | grep "Card state: 'present'" >/dev/null 2>&1 && { logger "Sim test success"; exit 5; } || { ifdown Lte; sleep 2; /usr/bin/qmicli -d /dev/cdc-wdm0 --uim-sim-power-on=1 >/dev/null 2>&1; sleep 10; ifup Lte; logger "Powering on Sim"; }

# Try to repower Sim card if first attempt fails
/usr/bin/qmicli -d /dev/cdc-wdm0 --uim-get-card-status | grep "Card state: 'present'" >/dev/null 2>&1 && { logger "Sim test No2 success"; exit 6; } || { ifdown Lte; sleep 2; /usr/bin/qmicli -d /dev/cdc-wdm0 --uim-sim-power-on=1 >/dev/null 2>&1; sleep 10; ifup Lte; logger "Powering on Sim 2nd attempt"; }

exit 0
1 Like