GL-MiFi how to auto reconnect Quectel EC20-A 3G modem?

@MozOz Well, here is the thing, I made an extension board on top of GL-MiFi, so frequent rebooting the whole system is less preferable. GL-MiFi reboot time is about 1 minute, but if somehow it is possible just to restart the modem service (and potentially additional, related services to it) it would cut the connection down time a lot less. How do you find out about memory leak and how often the cron job takes place in your current setup?

Iā€™m dying to know what it looks like when itā€™s disconnected.
I just looked at the device in my home, it has been running steadily for 7 days, this time indicates that the device has not been disconnected from the network since I powered it up

1 Like

Interestingļ¼ŒCan you see which process has a memory leak?
Could you tell me what environment your device is running in?Is it a home environment?

Thanks

uqmi -d /dev/ cdc-wdm0-s --get-signal-info is not a reliable command, but I havenā€™t found a better one yet.
If something goes wrong with your device again, you can use AT+CPIN? first,the command verifies whether the SIM card is normal and then looks for other information

@luochongjun is it EC20 or EC25? Mine is still connected by now.

I use EP06-E now, but I have tested EC25-E before, and it can work stably.
Is your EC25-A?

Hereā€™s how a disconnect looks in the logs.

Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.270556] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from tt
yUSB0
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.279092] option 1-1.2:1.0: device disconnected
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.284282] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from tt
yUSB1
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.292865] option 1-1.2:1.1: device disconnected
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.297977] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from tt
yUSB2
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.306549] option 1-1.2:1.2: device disconnected
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.311705] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from tt
yUSB3
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.320290] option 1-1.2:1.3: device disconnected
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.379087] qmi_wwan 1-1.2:1.4 wwan0: unregister 'qmi_wwan' usb-ehci-platform-1.2,
 WWAN/QMI device
Fri Mar 15 23:37:20 2019 daemon.notice netifd: Network device 'wwan0' link is down
Fri Mar 15 23:37:20 2019 daemon.notice netifd: Network alias 'wwan0' link is down
Fri Mar 15 23:37:20 2019 daemon.notice netifd: Interface 'modem_1_1_2_4' has link connectivity loss
Fri Mar 15 23:37:20 2019 daemon.notice netifd: Interface 'modem_1_1_2_4' is disabled
Fri Mar 15 23:37:20 2019 kern.info kernel: [ 8173.550054] usb 1-1.2: reset high-speed USB device number 4 using ehci-platform
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.743843] option 1-1.2:1.0: GSM modem (1-port) converter detected
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.750865] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.758538] option 1-1.2:1.1: GSM modem (1-port) converter detected
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.765473] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.773136] option 1-1.2:1.2: GSM modem (1-port) converter detected
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.780088] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.787706] option 1-1.2:1.3: GSM modem (1-port) converter detected
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8173.794640] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB3
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8174.046920] qmi_wwan 1-1.2:1.4: cdc-wdm0: USB WDM device
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8174.052615] qmi_wwan 1-1.2:1.4: QuectelEC25&EC21&EG91&EG95&EG06&EP06&EM06&BG96&AG3
5 work on RawIP mode
Fri Mar 15 23:37:21 2019 daemon.notice netifd: Interface 'modem_1_1_2_4' is enabled
Fri Mar 15 23:37:21 2019 kern.info kernel: [ 8174.112477] qmi_wwan 1-1.2:1.4 wwan0: register 'qmi_wwan' at usb-ehci-platform-1.2
, WWAN/QMI device, 5a:c4:9c:ac:d6:bc
Fri Mar 15 23:37:21 2019 daemon.notice netifd: modem_1_1_2_4 (12803): udhcpc: received SIGTERM

I then did:

root@cellgw:~# ifdown modem_1_1_2
root@cellgw:~# ifup modem_1_1_2

and that seems to have started the connection process, except that itā€™s now stuck waiting for network registrationā€¦

root@cellgw:~# timeout -t 2 uqmi -d /dev/cdc-wdm0 -s --get-serving-system
{"registration":"searching","plmn_mcc":311,"plmn_mnc":480,"plmn_description":"V\u0015"}

Mine is EC20-A. Anyway, the 4G LTE indicator was turned off at some point, as well as the WiFi one, and all got stuck with no way to ssh in. I had to power cycle it once and it is connected just fine by now.

Waiting for some more hours to see when the modem is trying to reconnect again and fails.

Thanks, is very useful for us .
Youā€™re using EP06-A, right? Could you tell me the test environment and signal quality of your side? Is it at a fixed test point? I will try to reproduce it.

you canā€™t login in your router? What is the status of the LED indicator?

I canā€™t login into it. The power indicator is on, the WiFi indicator is half brightness and constantly on. This has happened for the third time. If you need me to pull the log, please let me know, otherwise I am gonna wipe this out and reinstall the same GL-MiFi testing firmware.

I tried also to get connected over ethernet, no luck. There is no sign of any activity that I can see.

Could you try another firmware?You can try 3.009
Confirm whether there is a firmware problem.

@luochongjun This is weird, I remember exactly that the firmware uploaded was 3.013, but the firmware upgrade page says that the current version is 3.009. I hope this is only version numbering issue. I will try to reflash 3.013 and see if it still says 3.009. Then I am gonna proceed with the one you gave in the link.

Update:
gl-mifi-3.013-0129.bin MD5: 80584c9e07093a92cfc78cb4cf539cbf
3.009 MD5: bf46bb97a0cffe07bc7cf02213ca7367

I can confirm that when I upgraded with both firmware, each of these said that the version is 3.009. Is there a way I can confirm from the SSH for specific build just to make sure it is running the correct firmware?

You can view the build date in /etc/version.date

It is in a fixed location. I can run arbitrary experiments on it as it is a backup link.

Getting signal info is difficult due to:

root@cellgw:~# cat /tmp/modem.1-1.2/signal 
"Unknown error"

AT command to the rescue:

+QCAINFO: "pss",2050,100,"LTE BAND 4",1,356,-98,-11,-66,11
+QCAINFO: "sss",2585,25,"LTE BAND 5",1,356,-90,-13,-69,0

@luochongjun I am giving up on this. No matter which firmware I installed, 009 or 013, they both are not working. It gets even worse with WiFi disconnection. I confirm that for both firmwares, it does not last more than 24 hours before I need to hard reset it. @MozOz is probably right, there is some kind of memory leak, if it is not hardware defect.

I am gonna test other firmware from here (other than testing): GL.iNet download center, and come back with the result. It is very weird.

UPDATE: I just re-flashed lede-mifi-2.271.bin, just to make sure that my mifi is working. I am pretty sure it was installed with this firmware and it had been working with EC20-A for almost 3 years without touching it. Will update with the result.

Is your situation similar to @tve?Do you check the background log?

@luochongjun Do you mean System log? I am on lede-mifi-2.271.bin and the modem is still connected just fine. I am gonna leave it for a couple of days, then I will try 009 or 013 testing firmware again.

1 Like

Would you export results of logread for me?

Itā€™s been 6 weeks on customerā€™s side with lede-mifi-2.271.bin, and it all works just fine. I am going to replace the firmware again to 009 or 013 and try to solve the last issue of disconnection. @luochongjun I will send the logread once I got it updated. Is there anything else I can do beside exporting the logread?