LTE modem on Teltonika RUT955 keeps flapping

I have a Teltonika RUT955 running OpenWRT 21.02.1. Based on the thread I applied following WWAN configuration to /etc/config/network file:

config interface 'wwan0'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option apn 'Internet'
        option auth 'none'
        option mode 'preferlte'
        option delay '5'

Router successfully establishes LTE connection and I can see an address from 10/8 network issued by my ISP under the wwan0 interface. However, for some odd reason, the WWAN adapter keeps flapping after every 10 - 30 seconds. dmesg output can be seen below:

[ 2078.977702] usb 1-1.4: new high-speed USB device number 56 using ehci-platform
[ 2079.103044] option 1-1.4:1.0: GSM modem (1-port) converter detected
[ 2079.109888] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
[ 2079.117892] option 1-1.4:1.1: GSM modem (1-port) converter detected
[ 2079.124640] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
[ 2079.132663] option 1-1.4:1.2: GSM modem (1-port) converter detected
[ 2079.139451] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2
[ 2079.147437] option 1-1.4:1.3: GSM modem (1-port) converter detected
[ 2079.154219] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB3
[ 2079.238215] qmi_wwan 1-1.4:1.4: cdc-wdm0: USB WDM device
[ 2079.250989] qmi_wwan 1-1.4:1.4 wwan0: register 'qmi_wwan' at usb-1b000000.usb-1.4, WWAN/QMI
device, 8e:9d:6c:09:30:b1

What might cause such behavior?

Sorry, I only use ppp with an EC25.

Could you please share your ppp configuration for EC25. I tried with configuration below, but the wwan0 interface stayed down:

config interface 'wwan0'
        option pincode 1234
        option device /dev/ttyUSB0
        option apn internet
        option pppd_options debug
        option service umts
        option proto 3g

Do not use PIN on the SIM. This (practically) never works. Re-configure SIM, not to have PIN.

config interface 'wwan'
        option device '/dev/ttyUSB3'
        option service 'umts'
        option proto '3g'
        option ipv6 '0'
        option defaultgateway '1'
        option disabled '0'
        option apn 'myAPN'

This works for EC25-EU

Thanks for sharing your configuration. I tried with basically identical configuration to yours:

config interface 'wwan'
        option device '/dev/ttyUSB3'
        option service 'umts'
        option proto '3g'
        option ipv6 '0'
        option defaultgateway '1'
        option disabled '0'
        option apn 'Internet'
        option 'pppd_options' 'debug'

However, the connection establishment ends with Modem hangup:

Mon Nov  8 12:57:57 2021 daemon.notice pppd[13719]: Connect: 3g-wwan <--> /dev/ttyUSB3
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x314c6937>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: rcvd [LCP ConfReq id=0xda <asyncmap 0x0> <auth chap MD5> <magic 0x68ff0c1b> <pcomp> <accomp>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: No auth is possible
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: sent [LCP ConfRej id=0xda <auth chap MD5> <pcomp> <accomp>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x314c6937>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: rcvd [LCP ConfReq id=0xdb <asyncmap 0x0> <magic 0x68ff0c1b>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: sent [LCP ConfAck id=0xdb <asyncmap 0x0> <magic 0x68ff0c1b>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: sent [LCP EchoReq id=0x0 magic=0x314c6937]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: sent [IPV6CP ConfReq id=0x1 <addr fe80::99a7:a292:bf4b:2882>]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: rcvd [LCP DiscReq id=0xdc magic=0x68ff0c1b]
Mon Nov  8 12:57:58 2021 daemon.debug pppd[13719]: rcvd [LCP EchoRep id=0x0 magic=0x68ff0c1b 31 4c 69 37]
Mon Nov  8 12:57:58 2021 daemon.notice pppd[13719]: Modem hangup
Mon Nov  8 12:57:58 2021 daemon.notice pppd[13719]: Connection terminated.
Mon Nov  8 12:57:59 2021 daemon.info pppd[13719]: Exit.
Mon Nov  8 12:57:59 2021 daemon.notice netifd: Interface 'wwan' is now down

I also tried with option 'pppd_options' 'debug noipdefault' and option 'pppd_options' 'noipdefault refuse-chap refuse-mschap refuse-mschap-v2 refuse-eap', but I still received the Modem hangup message. In addition, I tried with several service types like option service 'cdma', option service 'evdo' or option service 'gprs', but nothing worked. I'm starting to suspect that perhaps my carrier does not support 3G connectivity and supports 2G and 4G only.

As I'm not able to get the protocol "3g" working, I removed all the WWAN related configuration from /etc/config/network file and tried manually with uqmi utility.

# uqmi -d /dev/cdc-wdm0 --get-data-status
"disconnected"
#
# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
        "type": "wcdma",
        "rssi": -61,
        "ecio": 5
}
#
# uqmi -d /dev/cdc-wdm0 --start-network Internet --autoconnect
"No effect"
#
# uqmi -d /dev/cdc-wdm0 --get-data-status
"disconnected"
#

Sometimes, after several reboots, the uqmi -d /dev/cdc-wdm0 --get-signal-info reports that it receives the LTE signal:

# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
        "type": "lte",
        "rssi": -80,
        "rsrq": -7,
        "rsrp": -104,
        "snr": 160
}
#

Still, the uqmi -d /dev/cdc-wdm0 --start-network Internet --autoconnect always returns either "Call failed" or "No effect" and the uqmi -d /dev/cdc-wdm0 --get-data-status is "disconnected".

Any ideas, what else to try?

Which carrier do yo use ? Which EC25, exactly ?
Frankly speaking, I had same effect as you, with EC25-V, for Verizon, especially. However, the strange effect was/is (still unsolved), few RUTs from same batch work with the set up I posted, and some work not with Verizon, even in case, positioned side by side. However, same setup works with EC25-A for AT&T or Mobilcom. Or with EC25-EU with O2, A1, without problem.

Carrier is Telia Sweden and the exact EC25 model is EC25EUGA-512-SGNS.

Sorry, having no idea any more. Besides checking the firmware version of the modem. "ATI" should do it. And then to go to https://forums.quectel.com/, to check whether you have most recent firmware.
Your pppd debug looks exactly like what I have on the "bad" Verizon modems. BUT they all connect finally, sometimes after 10h of retries !
So, you might leave your RUT running over night, trying to connect.
I got in touch with Quectel already about it, no success.
https://forums.quectel.com/t/ec25-v-connection-issue-with-verizon/11597

You might try to use another carriers SIM. Same effect ? I can not change, because the EC25-V is especially for Verizon.

Hej :slight_smile:

I think you should use qmi.
Have you tried a bigger/better power adapter? It looks like your modem reboots after you have started it.