<div dir="ltr"><div>Update on gdb:</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 7, 2021 at 9:23 PM Jack Broderick <<a href="mailto:jbroderick@councilrock.com">jbroderick@councilrock.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hello,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 7, 2021 at 4:10 PM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br>
<br>
>> Could you please test showing the failed case where, upon boot,<br>
>> --uim-get-card-status shows one single SIM instead of two?<br>
>><br>
> My apologies if this wasn't clear. The above case is the "failing" case. --uim-get-card-status shows two SIMs, it doesn't, however, show the ICCID for that card, which makes it appear from software as if that SIM card is not installed.<br>
<br>
Oh, I see. Then the issue has nothing to do with my assumption :)<br>
<br>
> I know there are "SIM Detect" lines on the SIM cards, however, we leave them both floating because we do not know if a SIM will be installed or not during production. We also do not have SIM slots that physically short that pin to ground if a SIM is inserted.<br>
<br>
If the modem reports a second SIM is available, even if it does not<br>
read its ICCID, I would assume that the modem is doing some kind of<br>
SIM probing of some sort on the secondary slot too. But then I'm not<br>
sure; I believe I haven't seen before a case where SIM detect isn't<br>
being actively used.<br></blockquote><div>Yeah it's not ideal but the hardware SIM detect line always reports "SIM Present" regardless of whether the SIM is there. Ideally it would probe the non-active SIM slot as well. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Get Slot Status:<br>
> root@EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-slot-status<br>
> [/dev/lte/qmi_b] Successfully got slots status<br>
> [/dev/lte/qmi_b] 2 physical slots found:<br>
> Physical slot 1:<br>
> Card status: present<br>
> Slot status: inactive<br>
> ICCID: unknown<br>
<br>
Ok, present but ICCID unknown, as you said. You're actively querying<br>
the modem with qmicli, so I would rule out a timing issue (e.g. I<br>
don't think the SIM is taking too much to initialize or something like<br>
that).<br>
<br>
> Physical slot 2:<br>
> Card status: present<br>
> Slot status: active<br>
> Logical slot: 1<br>
> ICCID: 89011703278374634023<br>
><br>
> root@EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-card-status<br>
> [/dev/lte/qmi_b] Successfully got card status<br>
> Provisioning applications:<br>
> Primary GW: slot '1', application '1'<br>
> Primary 1X: session doesn't exist<br>
> Secondary GW: session doesn't exist<br>
> Secondary 1X: session doesn't exist<br>
> Slot [1]:<br>
> Card state: 'present'<br>
> UPIN state: 'not-initialized'<br>
> UPIN retries: '0'<br>
> UPUK retries: '0'<br>
> Application [1]:<br>
> Application type: 'usim (2)'<br>
> Application state: 'ready'<br>
> Application ID:<br>
> A0:00:00:00:87:10:02:FF:FF:FF:FF:89:03:02:00:00<br>
> Personalization state: 'ready'<br>
> UPIN replaces PIN1: 'no'<br>
> PIN1 state: 'disabled'<br>
> PIN1 retries: '3'<br>
> PUK1 retries: '10'<br>
> PIN2 state: 'enabled-not-verified'<br>
> PIN2 retries: '3'<br>
> PUK2 retries: '10'<br>
> Application [2]:<br>
> Application type: 'isim (5)'<br>
> Application state: 'detected'<br>
> Application ID:<br>
> A0:00:00:00:87:10:04:FF:FF:FF:FF:89:03:02:00:00<br>
> Personalization state: 'unknown'<br>
> UPIN replaces PIN1: 'no'<br>
> PIN1 state: 'disabled'<br>
> PIN1 retries: '3'<br>
> PUK1 retries: '10'<br>
> PIN2 state: 'not-initialized'<br>
> PIN2 retries: '0'<br>
> PUK2 retries: '0'<br>
> Slot [2]:<br>
> Card state: 'absent'<br>
> UPIN state: 'not-initialized'<br>
> UPIN retries: '0'<br>
> UPUK retries: '0'<br>
><br>
> *** Switch primary to slot 1<br>
> A potentially unrelated issue is that it appears MM restarts when switching slots on a modem that needs to switch profiles as a result:<br>
> Apr 7 10:56:07 EDG4600 ModemManager[15523]: <info> ModemManager (version 1.16.2) starting in system bus...<br>
><br>
> I have not looked into this, only just noticed as I switched the slot...<br>
><br>
<br>
Oh that looks like a segfault. If you could get a backtrace and MM<br>
debug log after running with "gdb --args /usr/sbin/ModemManager debug"<br>
(then "r" for run, wait for it to crash, and "bt" for backtrace).<br>
you'll need to make sure the system-started MM is stopped before doing<br>
that also (e.g. "sudo systemctl stop ModemManager if using systemd")<br></blockquote></div></div></blockquote><div>ModemManager[18089]: <info> [base-manager] port ttyUSB2 released by device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1'<br>ModemManager[18089]: <info> [base-manager] port ttyUSB3 released by device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1'<br>ModemManager[18089]: <info> [base-manager] port ttyUSB4 released by device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1'<br>ModemManager[18089]: <info> [base-manager] port wwan1 released by device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1'<br>ModemManager[18089]: <info> [base-manager] port cdc-wdm1 released by device '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1'<br>ModemManager[18089]: <info> [device /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1] creating modem with plugin 'sierra' and '2' ports<br>ModemManager[18089]: <warn> [modem1/sim2] couldn't wait for SIM to be ready: failed waiting for SIM readiness<br>ModemManager[18089]: <warn> [modem1/sim2] couldn't load IMSI: Couldn't peek QMI port<br>ModemManager[18089]: <warn> [modem2] couldn't start initialization: Couldn't query file info: Error when getting information for file “/dev/cdc-wdm2”: No such file or directory<br>ModemManager[18089]: <warn> [modem2] couldn't initialize: 'Modem is unusable, cannot fully initialize'<br>ModemManager[18089]: <warn> [modem1/sim2] couldn't load operator identifier: Couldn't peek QMI port<br>ModemManager[18089]: <warn> [modem1/sim2] couldn't load operator name: Couldn't peek QMI port<br>ModemManager[18089]: <warn> [modem1/sim2] couldn't load list of emergency numbers: No AT port available to run command<br><br>Thread 1 "ModemManager" received signal SIGSEGV, Segmentation fault.<br>0x76f38e9c in mm_gdbus_modem_get_unlock_required () from /usr/lib/libmm-glib.so.0<br>(gdb) bt<br>#0 0x76f38e9c in mm_gdbus_modem_get_unlock_required () from /usr/lib/libmm-glib.so.0<br>#1 0x0007071c in ?? ()<br>Backtrace stopped: previous frame identical to this frame (corrupt stack?)<br></div><div><br></div><div>I'm not terribly familiar with gdb, please let me know if there is any other useful information to help analyze this problem. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote><div><br></div><div>I'll look into that. We don't bundle gdb or gdbserver in our OpenWRT version but I will build those packages and see what I can get out of it. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> After changing SIM slots only slot info 1 is shown. If the profile doesn't switch, then the ICCID for both SIM's will be shown<br>
(which is the example I shared previously of --uim-get-card-status):<br>
> root@EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-card-status<br>
> [/dev/lte/qmi_b] Successfully got card status<br>
> Provisioning applications:<br>
> Primary GW: slot '1', application '1'<br>
> Primary 1X: session doesn't exist<br>
> Secondary GW: session doesn't exist<br>
> Secondary 1X: session doesn't exist<br>
> Slot [1]:<br>
> Card state: 'present'<br>
> UPIN state: 'not-initialized'<br>
> UPIN retries: '0'<br>
> UPUK retries: '0'<br>
> Application [1]:<br>
> Application type: 'usim (2)'<br>
> Application state: 'ready'<br>
> Application ID:<br>
> A0:00:00:00:87:10:02:FF:86:FF:FF:89:FF:FF:FF:FF<br>
> Personalization state: 'ready'<br>
> UPIN replaces PIN1: 'no'<br>
> PIN1 state: 'disabled'<br>
> PIN1 retries: '3'<br>
> PUK1 retries: '3'<br>
> PIN2 state: 'enabled-not-verified'<br>
> PIN2 retries: '3'<br>
> PUK2 retries: '3'<br>
> Slot [2]:<br>
> Card state: 'absent'<br>
> UPIN state: 'not-initialized'<br>
> UPIN retries: '0'<br>
> UPUK retries: '0'<br>
> root@EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-slot-status<br>
> [/dev/lte/qmi_b] Successfully got slots status<br>
> [/dev/lte/qmi_b] 2 physical slots found:<br>
> Physical slot 1:<br>
> Card status: present<br>
> Slot status: active<br>
> Logical slot: 1<br>
> ICCID: 89860000502000180722<br>
> Physical slot 2:<br>
> Card status: present<br>
> Slot status: inactive<br>
> ICCID: unknown<br>
><br>
> An EM7511 with dual SIM shows the ICCID for both SIM's on bootup:<br>
<br>
Are you using the latest EM7455 firmware available? Maybe this is an<br>
issue already solved by a newer firmware.<br></blockquote><div>We have the following PRI's installed: Very useful feature in MM, much easier to consume the json output of this than the output of qmicli :)</div>root@EDG4600:~# mmcli -m 1 --firmware-list<br> ----------------<br> Firmware | list: 02.32.11.00_ATT_002.070_000<br> | current: yes<br> | gobi pri unique id: 002.070_000<br> | gobi modem unique id: ?_?<br> | 02.24.05.06_BELL_001.005_000<br> | current: no<br> | gobi pri unique id: 001.005_000<br> | gobi modem unique id: ?_?<br> | 02.33.03.00_GENERIC_002.072_000<br> | current: no<br> | gobi pri unique id: 002.072_000<br> | gobi modem unique id: ?_?<br> | 02.32.11.00_ROGERS_001.040_000<br> | current: no<br> | gobi pri unique id: 001.040_000<br> | gobi modem unique id: ?_?<br> | 02.32.11.00_SPRINT_002.062_000<br> | current: no<br> | gobi pri unique id: 002.062_000<br> | gobi modem unique id: ?_?<br> | 02.32.11.00_TELUS_001.040_000<br> | current: no<br> | gobi pri unique id: 001.040_000<br> | gobi modem unique id: ?_?<br> | 02.33.03.00_VERIZON_002.079_001<br> | current: no<br> | gobi pri unique id: 002.079_001<br> | gobi modem unique id: ?_?<br> | 02.24.03.00_VODAFONE_001.001_000<br> | current: no<br> | gobi pri unique id: 001.001_000<br> | gobi modem unique id: ?_?<br><div><br></div><div>We have an AT&T and a private SIM installed so we are switching between 02.32.11.00_ATT_002.070_000 and 02.33.03.00_GENERIC_002.072_000 which I believe are the latest (the Sierra site was subjected to some sort of attack and "The Source" hasn't been back up since...)<br></div><div><br></div><div>Apologies for my ignorance, but if libqmi is just querying the modem, and it is "working" (showing ICCID/IMSI) for both slots on the EM7511, could this just be a difference between the MDM9230 and MDM9250? I am not familiar enough with libqmi to understand how low of a level it looks when --uim-get-slot-status/--get-card-status is called. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a></blockquote><div><br></div><div>Thanks </div></div></div>
</blockquote></div></div>