<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr" data-ogsc="" style="">
<div dir="ltr">
<div dir="ltr" data-ogsc="" style="">
<div></div>
<div>
<div>
<div dir="ltr" style="text-align: left;"></div>
</div>
<div>> Would you be able to <span style="font-size: 1rem;">draft a MM patch doing that?</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"><br>
</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">Well-l-l...</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"><br>
</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">I like to be challenged. Last time I coded in C is 20 years ago and I never contributed to open source. I might check out the sources and try to understand some basics over the next weeks,
 but cannot promise anything.</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"><br>
</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">Apart from that: I had reproduced the issue with disappearing modem about 10 times now. I was always able to recover by issuing</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"><br>
</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">systemctl restart ModemManager.service</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"><br>
</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">and everything worked fine. I also had the impression that the primary port had somehow recovered by then.</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"><br>
</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">One more question:</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">I found the following in the Huawei doc. When you talk about primary/secondary port, are we actually talking about Modem port/Uart port? Are they exchangeable?</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"><br>
</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">...</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">The ME909s provides four ports to interact with its host:</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"> MODEM port: simulated using USB, for AT command interaction and establishing data connection.</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">Port name: HUAWEI Mobile Connect-3G Modem</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"> PCUI port: simulated using USB, for AT command interaction only.</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">Port name: HUAWEI Mobile Connect-3G PCUI Interface</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"> UART port: physical serial port, for AT command interaction and establishing data connection.</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"> ECM port: simulated using USB, for establishing communication connection. Port name: CDC Ethernet Control Model (ECM)</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;">The ME909s also provides a port for debugging:</span></div>
<div dir="ltr" style="text-align: left;"><span style="font-size: 1rem;"> DIAG port: simulated using USB, for DIAG (diagnostic) command interaction (mainly used to debug modules at present).</span></div>
</div>
<!--{"start":[1,15,0,0],"end":[1,15,0,0]}--></div>
<!--{"start":[1],"end":[1]}--></div>
<!--{"start":[0,0,1,16,0,0,154],"end":[0,0,1,16,0,0,154]}--></div>
<!--{"start":[0],"end":[0]}--></div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Aleksander Morgado <aleksander@aleksander.es><br>
<b>Gesendet:</b> Wednesday, December 18, 2019 6:54:20 PM<br>
<b>An:</b> Bruno Vetter <bruno.vetter@outlook.com><br>
<b>Cc:</b> modemmanager-devel@lists.freedesktop.org <modemmanager-devel@lists.freedesktop.org><br>
<b>Betreff:</b> Re: Huawei ME909s-120 modem goes offline and disappears</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">> > No idea what else to do to solve this I'm afraid... :/ Maybe we could<br>
> > extend the logic and add some automatic recovery mechanism to reset<br>
> > the modem using the secondary port if we end up seeing that the<br>
> > primary port is stuck like that? That wouldn't be ideal, but I assume<br>
> > it's better to have one modem reset than having MM flag the modem as<br>
> > failed.<br>
><br>
> I am afraid I cannot give a suggestion here. I am just an MM user. Could you offer some advice for me how to work around the issue?<br>
> We are dealing with a fleet of edge devices with a GSM only connection. So it is crucial for them to recover after such an issue.<br>
> I could implement a watchdog service that detects the issue and resolves it. The question is how to detect and how to resolve.<br>
> Without any further knowledge I could:<br>
><br>
> Detect the issue by frequently executing mmcli -L to see if the modem has disappeared<br>
> Resolve it by restarting the ModemManager service.<br>
><br>
> Does that sound reasonable? If there is a more elegant way to do it please let me know.<br>
><br>
<br>
I assume the issue is "solved" by restarting ModemManager just because<br>
we end up using the previously secondary TTY as primary, but if that<br>
gets also stuck, you may end up with the device completely stuck.<br>
<br>
A better approach would be to detect that the primary control port is<br>
stuck, and if there is a valid secondary port, try to run a modem<br>
reset automatically using that secondary port. Would you be able to<br>
draft a MM patch doing that?<br>
<br>
-- <br>
Aleksander<br>
<a href="https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faleksander.es&amp;data=02%7C01%7C%7Cc1433d0f8b96445ac06c08d783e35622%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637122884726105702&amp;sdata=HcaGfa2b4QYiUTczqamkP%2FUuiYStD5rThv6JFaYjbh4%3D&amp;reserved=0">https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faleksander.es&amp;data=02%7C01%7C%7Cc1433d0f8b96445ac06c08d783e35622%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637122884726105702&amp;sdata=HcaGfa2b4QYiUTczqamkP%2FUuiYStD5rThv6JFaYjbh4%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</body>
</html>