/dev/ttyUSB2 moved to /dev/ttyUSB3: Lte interface fault - no connection

While testing a configuration, there was a segmentation fault. After that the Lte connection does not work. Nevertheless uqmi shows signal info but kernel log reports nothing and in /var/log/messages there are no AT commands. Ifup Lte command and rebooting does not resolve the problem.

I am wondering if there is any other way to bring up the interface and establish connection other than disconnecting the power. I had the same problem before, and disconnecting the power solved the problem. Now omnia is at a remote area and I am unable to disconnect the power for several days.

# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "hdr",
	"rssi": -125,
	"ecio": 5,
	"io": -106,
	"type": "lte",
	"rssi": -84,
	"rsrq": -8,
	"rsrp": -114,
	"snr": 84
}

dmesg | grep usb
[    8.340620] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.685826] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    8.691179] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    8.698772] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    8.707342] xhci-hcd f10f0000.usb3: irq 46, io mem 0xf10f0000
[    8.721178] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    8.726506] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    8.734045] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    8.750222] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    8.755571] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    8.763167] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    8.771739] xhci-hcd f10f8000.usb3: irq 47, io mem 0xf10f8000
[    8.785544] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    8.790877] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    8.798405] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    8.815846] usbcore: registered new interface driver usb-storage
[    9.060660] usb 3-1: new SuperSpeed USB device number 2 using xhci-hcd
[    9.081735] usb-storage 3-1:1.0: USB Mass Storage device detected
[    9.087949] scsi host2: usb-storage 3-1:1.0
[   16.490491] usbcore: registered new interface driver cdc_wdm
[   16.737916] usbcore: registered new interface driver ums-alauda
[   16.744781] usbcore: registered new interface driver ums-cypress
[   16.751774] usbcore: registered new interface driver ums-datafab
[   16.758618] usbcore: registered new interface driver ums-freecom
[   16.765561] usbcore: registered new interface driver ums-isd200
[   16.772501] usbcore: registered new interface driver ums-jumpshot
[   16.779440] usbcore: registered new interface driver ums-karma
[   16.786608] usbcore: registered new interface driver ums-sddr09
[   16.793491] usbcore: registered new interface driver ums-sddr55
[   16.800492] usbcore: registered new interface driver ums-usbat
[   16.812658] usbcore: registered new interface driver usbserial
[   16.818537] usbcore: registered new interface driver usbserial_generic
[   16.825128] usbserial: USB Serial support registered for generic
[   16.858927] usbcore: registered new interface driver cdc_ether
[   16.878160] qmi_wwan 1-1:1.4 wwan0: register 'qmi_wwan' at usb-f1058000.usb-1, WWAN/QMI device, 72:7d:59:79:91:b6
[   16.888589] usbcore: registered new interface driver qmi_wwan
[   16.895823] usbcore: registered new interface driver rndis_host
[   17.023843] usbcore: registered new interface driver option
[   17.029477] usbserial: USB Serial support registered for GSM modem (1-port)
[   17.037358] usbcore: registered new interface driver qcserial
[   17.043176] usbserial: USB Serial support registered for Qualcomm USB modem
[   17.063086] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0
[   17.077596] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1
[   17.091632] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2
[   17.105408] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB3

Today I found this post https://forum.openwrt.org/viewtopic.php?id=56604 and I tried to get the device info.

# gcom -d "/dev/ttyUSB2" -s /etc/gcom/getcardinfo.gcom
comgt 04:43:31 -> -- Error Report --
comgt 04:43:31 -> ---->              ^
comgt 04:43:31 -> Error @114, line 9, Could not write to COM device. (1)

# gcom -d "/dev/ttyUSB3" -s /etc/gcom/getcardinfo.gcom
ATI
Quectel
EC20
Revision: EC20EQAR02A04E2G

Then I tried with
# ppp /dev/ttyUSB3
and the Lte interface got connected.
I believe this is a bug. Maybe related to https://dev.openwrt.org/ticket/18532
I expect that after poweroff i will need to revert back to /dev/ttyUSB2

OK, today I am “lost”. I would appreciate any idea
See below and LTE is working!!

root@XXX:/etc/config# gcom -d /dev/ttyUSB2
comgt 23:49:03 -> -- Error Report --
comgt 23:49:03 -> ---->                       ^
comgt 23:49:03 -> Error @74, line 4, Could not write to COM device. (1)

root@XXX:/etc/config# gcom -d /dev/ttyUSB3
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "XXXX",7
Signal Quality: 31,99
root@XXX:/etc/config# cat network | grep -i USB
	option device '/dev/ttyUSB2'
root@XXX:/etc/config# uci -P/var/state show network.Lte
network.Lte=interface
network.Lte.proto='3g'
network.Lte.service='umts'
network.Lte.pincode='XXX'
network.Lte.ipv6='auto'
network.Lte.metric='20'
network.Lte.apn='gint'
network.Lte.peerdns='0'
network.Lte.dns='8.8.4.4 8.8.8.8'
network.Lte.delegate='0'
network.Lte.up='1'
network.Lte.ifname='3g-Lte'

I think i have tracked down the problem.
It seems that for some reason pppd does not always exit even using wrong device (/dev/ttyUSBX).

My workaround so far to connect through Lte after a segmentation fault without powering off omnia is:
ifdown Lte (i.e. stop pppd)
change devise in the network config (option device ‘/dev/ttyUSBX’)
ifup Lte (i.e. start pppd)