<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello,<br>
</p>
<p><br>
</p>
<p>Having an odd issue where ModemManager has trouble reading SIM PIN status from Sierra MC7750 (Verizon US, LTE+CDMA, QMI interface) modules after a modem reset.<br>
</p>
<p><br>
</p>
<p>At first system boot, MM has no issue detecting the modem and activating a connection. These are in mobile devices, so it's common to lose signal and later need to reconnect when back in a coverage area. These modems can be a little cranky, and sometimes
 at this point won't build a data connection after repeated attempts (known Qualcomm-level issue according to Sierra), so we have a separate process that watches for that and issues a Reset() via the MM DBus interface. Reset() on these does a "full power cycle",
 as if the modem was unplugged from USB and plugged back in. <br>
</p>
<p><br>
</p>
<p>When the device turns back on, during detection NM says it doesn't have a SIM object:<br>
</p>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>​NetworkManager[6651]: <info>  [1539101206.9778] modem-broadband[cdc-wdm1]: failed to retrieve SIM object: No SIM object available<br>
</div>
</blockquote>
<div><br>
MM reports this:<br>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>
<div>ModemManager[8643]: <warn>  Couldn't load unlock retries: 'Couldn't get unlock retries: QMI protocol error (3): 'Internal''<br>
</div>
</div>
<div>
<div>ModemManager[8643]: <warn>  couldn't load list of Own Numbers: 'Couldn't get MSISDN: QMI protocol error (25): 'DeviceUnsupported''<br>
</div>
</div>
</blockquote>
<div>
<div><br>
Looking into MM debug logs, it's failing the "UIM Get PIN Status" step<span style="font-size: 12pt;">, the first time for IncorrectPin, then Internal QMI error for the rest of the retries. The SIMs don't have a PIN we're aware of.</span></div>
</div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><debug> [1539101547.534249] [mm-iface-modem.c:3902] load_current_capabilities_ready(): Setting EPS network as supported</div>
<div><debug> [1539101547.538395] [mm-iface-modem.c:3928] load_current_capabilities_ready(): Checking if multimode device has a SIM...</div>
<div><debug> [1539101547.542528] [mm-broadband-modem-qmi.c:1845] load_unlock_required_context_step(): loading unlock required (DMS)...</div>
<div>[/dev/cdc-wdm1] sent message...</div>
<div><<<<<< RAW:</div>
<div><<<<<<   length = 13<br>
</div>
<div><<<<<<   data   = 01:0C:00:00:02:01:00:02:00:2B:00:00:00<br>
</div>
<div>[/dev/cdc-wdm1] sent generic request (translated)...<br>
</div>
<div><<<<<< QMUX:<br>
</div>
<div><<<<<<   length  = 12</div>
<div><<<<<<   flags   = 0x00</div>
<div><<<<<<   service = "dms"</div>
<div><<<<<<   client  = 1</div>
<div><<<<<< QMI:</div>
<div><<<<<<   flags       = "none"</div>
<div><<<<<<   transaction = 2</div>
<div><<<<<<   tlv_length  = 0</div>
<div><<<<<<   message     = "UIM Get PIN Status" (0x002B)</div>
<div>[/dev/cdc-wdm1] received message...</div>
<div><<<<<< RAW:</div>
<div><<<<<<   length = 20</div>
<div><<<<<<   data   = 01:13:00:80:02:01:02:02:00:2B:00:07:00:02:04:00:01:00:0C:00</div>
<div>[/dev/cdc-wdm1] received generic response (translated)...</div>
<div><<<<<< QMUX:</div>
<div><<<<<<   length  = 19</div>
<div><<<<<<   flags   = 0x80</div>
<div><<<<<<   service = "dms"</div>
<div><<<<<<   client  = 1</div>
<div><<<<<< QMI:</div>
<div><<<<<<   flags       = "response"</div>
<div><<<<<<   transaction = 2</div>
<div><<<<<<   tlv_length  = 7</div>
<div><<<<<<   message     = "UIM Get PIN Status" (0x002B)</div>
<div><<<<<< TLV:</div>
<div><<<<<<   type       = "Result" (0x02)</div>
<div><<<<<<   length     = 4</div>
<div><<<<<<   value      = 01:00:0C:00</div>
<div><<<<<<   translated = FAILURE: IncorrectPin</div>
<div><debug> [1539101547.550223] [mm-iface-modem.c:268] load_unlock_required_ready(): Couldn't check if unlock required: 'Couldn't get PIN status: QMI protocol error (12): 'IncorrectPin''<br>
</div>
</blockquote>
<span style="font-size: 12pt;">​</span>
<div><span style="font-size: 12pt;"></span>(removed retries 1-5 here, they're identical)<br>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>
<div><br>
</div>
<div><debug> [1539101558.280189] [mm-iface-modem.c:292] load_unlock_required_ready(): Retrying (6) unlock required check</div>
</div>
<div>
<div><debug> [1539101560.270256] [mm-broadband-modem-qmi.c:1845] load_unlock_required_context_step(): loading unlock required (DMS)...</div>
</div>
<div>
<div>[/dev/cdc-wdm1] sent message...</div>
</div>
<div>
<div><<<<<< RAW:</div>
</div>
<div>
<div><<<<<<   length = 13</div>
</div>
<div>
<div><<<<<<   data   = 01:0C:00:00:02:01:00:08:00:2B:00:00:00</div>
</div>
<div>
<div>[/dev/cdc-wdm1] sent generic request (translated)...</div>
</div>
<div>
<div><<<<<< QMUX:</div>
</div>
<div>
<div><<<<<<   length  = 12</div>
</div>
<div>
<div><<<<<<   flags   = 0x00<br>
</div>
</div>
<div>
<div><<<<<<   service = "dms"</div>
</div>
<div>
<div><<<<<<   client  = 1</div>
</div>
<div>
<div><<<<<< QMI:</div>
</div>
<div>
<div><<<<<<   flags       = "none"</div>
</div>
<div>
<div><<<<<<   transaction = 8</div>
</div>
<div>
<div><<<<<<   tlv_length  = 0</div>
</div>
<div>
<div><<<<<<   message     = "UIM Get PIN Status" (0x002B)</div>
</div>
<div>
<div>[/dev/cdc-wdm1] received message...</div>
</div>
<div>
<div><<<<<< RAW:</div>
</div>
<div>
<div><<<<<<   length = 20</div>
</div>
<div>
<div><<<<<<   data   = 01:13:00:80:02:01:02:08:00:2B:00:07:00:02:04:00:01:00:03:00</div>
</div>
<div>
<div>[/dev/cdc-wdm1] received generic response (translated)...</div>
</div>
<div>
<div><<<<<< QMUX:</div>
</div>
<div>
<div><<<<<<   length  = 19</div>
</div>
<div>
<div><<<<<<   flags   = 0x80</div>
</div>
<div>
<div><<<<<<   service = "dms"</div>
</div>
<div>
<div><<<<<<   client  = 1</div>
</div>
<div>
<div><<<<<< QMI:</div>
</div>
<div>
<div><<<<<<   flags       = "response"</div>
</div>
<div>
<div><<<<<<   transaction = 8</div>
</div>
<div>
<div><<<<<<   tlv_length  = 7</div>
</div>
<div>
<div><<<<<<   message     = "UIM Get PIN Status" (0x002B)</div>
</div>
<div>
<div><<<<<< TLV:</div>
</div>
<div>
<div><<<<<<   type       = "Result" (0x02)<br>
</div>
</div>
<div>
<div><<<<<<   length     = 4</div>
</div>
<div>
<div><<<<<<   value      = 01:00:03:00</div>
</div>
<div>
<div><<<<<<   translated = FAILURE: Internal</div>
</div>
<div>
<div><debug> [1539101560.278384] [mm-iface-modem.c:268] load_unlock_required_ready(): Couldn't check if unlock required: 'Couldn't get PIN status (retry): QMI protocol error (3): 'Internal''</div>
</div>
<div>
<div><debug> [1539101560.282222] [mm-iface-modem.c:3864] current_capabilities_internal_load_unlock_required_ready(): Multimode device without SIM, no 3GPP capabilities</div>
</div>
</blockquote>
<div><br>
<br>
</div>
<p>Running (what I think is) the equivalent status command via qmicli directly, it looks like it works:<br>
</p>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>[root@hostname ~]# qmicli -p -d /dev/cdc-wdm1 --dms-uim-get-pin-status<br>
</div>
<div>[/dev/cdc-wdm1] PIN status retrieved successfully</div>
<div>[/dev/cdc-wdm1] PIN1:</div>
<div>        Status: disabled</div>
<div>        Verify: 3<br>
</div>
<div>        Unblock: 10<br>
</div>
<div>[/dev/cdc-wdm1] PIN2:<br>
</div>
<div>        Status: enabled-not-verified<br>
</div>
<div>        Verify: 3<br>
</div>
<div>        Unblock: 10</div>
</blockquote>
<p><br>
</p>
<p><span style="font-size: 12pt;">Here's the odd part - t<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">his only happens if the modem is reset while MM is running.</span>​ </span><span style="font-size: 12pt;">If
 I </span><span style="font-size: 12pt;">do a 'systemctl restart ModemManager' at this point, the modem+SIM are detected right away, and all is well.  That's my workaround right now, but I'd rather not be restarting services if I can </span><span style="font-size: 12pt;">help
 it: we have 2 modules in the system (second one is either a MC7700 or MC7354) and</span><span style="font-size: 12pt;"> restarting MM</span><span style="font-size: 12pt;"> disrupts the other data session. No detection issues from either one of those models.</span><br>
</p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p>We're using the RHEL7 delivered MM build, 1.6.10, with libqmi 1.18.0.  Both appear unmodified according to the RPM specfile, no odd patches, etc. <br>
</p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">Any ideas where to look next? Thanks in advance!</span></p>
<p><br>
</p>
<p>-- Brendan Bowden<br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" face="Tahoma"></font></div>
</div>
</div>
</div>
<br>
<P class=MsoNormal>
<P class=MsoNormal><span><em><span style="FONT-SIZE: 11px">This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments<span style="COLOR: #1f497d">. </span>Please be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited.</span></em></span><span style="FONT-SIZE: 10.5pt"><?xml:namespace prefix = "o" /><o:p></o:p></span></P>
<P></P></body>
</html>