Detecting Dual SIM on EM7455

Jack Broderick jbroderick at councilrock.com
Thu Apr 8 01:23:40 UTC 2021


Hello,

On Wed, Apr 7, 2021 at 4:10 PM Aleksander Morgado <aleksander at aleksander.es>
wrote:

> Hey,
>
> >> Could you please test showing the failed case where, upon boot,
> >> --uim-get-card-status shows one single SIM instead of two?
> >>
> > 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.
>
> Oh, I see. Then the issue has nothing to do with my assumption :)
>
> > 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.
>
> If the modem reports a second SIM is available, even if it does not
> read its ICCID, I would assume that the modem is doing some kind of
> SIM probing of some sort on the secondary slot too. But then I'm not
> sure; I believe I haven't seen before a case where SIM detect isn't
> being actively used.
>
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.

>
> > Get Slot Status:
> > root at EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-slot-status
> > [/dev/lte/qmi_b] Successfully got slots status
> > [/dev/lte/qmi_b] 2 physical slots found:
> >   Physical slot 1:
> >      Card status: present
> >      Slot status: inactive
> >            ICCID: unknown
>
> Ok, present but ICCID unknown, as you said. You're actively querying
> the modem with qmicli, so I would rule out a timing issue (e.g. I
> don't think the SIM is taking too much to initialize or something like
> that).
>
> >   Physical slot 2:
> >      Card status: present
> >      Slot status: active
> >     Logical slot: 1
> >            ICCID: 89011703278374634023
> >
> > root at EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-card-status
> > [/dev/lte/qmi_b] Successfully got card status
> > Provisioning applications:
> > Primary GW:   slot '1', application '1'
> > Primary 1X:   session doesn't exist
> > Secondary GW: session doesn't exist
> > Secondary 1X: session doesn't exist
> > Slot [1]:
> > Card state: 'present'
> > UPIN state: 'not-initialized'
> > UPIN retries: '0'
> > UPUK retries: '0'
> > Application [1]:
> > Application type:  'usim (2)'
> > Application state: 'ready'
> > Application ID:
> > A0:00:00:00:87:10:02:FF:FF:FF:FF:89:03:02:00:00
> > Personalization state: 'ready'
> > UPIN replaces PIN1: 'no'
> > PIN1 state: 'disabled'
> > PIN1 retries: '3'
> > PUK1 retries: '10'
> > PIN2 state: 'enabled-not-verified'
> > PIN2 retries: '3'
> > PUK2 retries: '10'
> > Application [2]:
> > Application type:  'isim (5)'
> > Application state: 'detected'
> > Application ID:
> > A0:00:00:00:87:10:04:FF:FF:FF:FF:89:03:02:00:00
> > Personalization state: 'unknown'
> > UPIN replaces PIN1: 'no'
> > PIN1 state: 'disabled'
> > PIN1 retries: '3'
> > PUK1 retries: '10'
> > PIN2 state: 'not-initialized'
> > PIN2 retries: '0'
> > PUK2 retries: '0'
> > Slot [2]:
> > Card state: 'absent'
> > UPIN state: 'not-initialized'
> > UPIN retries: '0'
> > UPUK retries: '0'
> >
> > *** Switch primary to slot 1
> > A potentially unrelated issue is that it appears MM restarts when
> switching slots on a modem that needs to switch profiles as a result:
> > Apr  7 10:56:07 EDG4600 ModemManager[15523]: <info>  ModemManager
> (version 1.16.2) starting in system bus...
> >
> > I have not looked into this, only just noticed as I switched the slot...
> >
>
> Oh that looks like a segfault. If you could get a backtrace and MM
> debug log after running with "gdb --args /usr/sbin/ModemManager debug"
> (then "r" for run, wait for it to crash, and "bt" for backtrace).
> you'll need to make sure the system-started MM is stopped before doing
> that also (e.g. "sudo systemctl stop ModemManager if using systemd")
>

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.

>
> > 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
> (which is the example I shared previously of --uim-get-card-status):
> > root at EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-card-status
> > [/dev/lte/qmi_b] Successfully got card status
> > Provisioning applications:
> > Primary GW:   slot '1', application '1'
> > Primary 1X:   session doesn't exist
> > Secondary GW: session doesn't exist
> > Secondary 1X: session doesn't exist
> > Slot [1]:
> > Card state: 'present'
> > UPIN state: 'not-initialized'
> > UPIN retries: '0'
> > UPUK retries: '0'
> > Application [1]:
> > Application type:  'usim (2)'
> > Application state: 'ready'
> > Application ID:
> > A0:00:00:00:87:10:02:FF:86:FF:FF:89:FF:FF:FF:FF
> > Personalization state: 'ready'
> > UPIN replaces PIN1: 'no'
> > PIN1 state: 'disabled'
> > PIN1 retries: '3'
> > PUK1 retries: '3'
> > PIN2 state: 'enabled-not-verified'
> > PIN2 retries: '3'
> > PUK2 retries: '3'
> > Slot [2]:
> > Card state: 'absent'
> > UPIN state: 'not-initialized'
> > UPIN retries: '0'
> > UPUK retries: '0'
> > root at EDG4600:~# qmicli -p -d /dev/lte/qmi_b --uim-get-slot-status
> > [/dev/lte/qmi_b] Successfully got slots status
> > [/dev/lte/qmi_b] 2 physical slots found:
> >   Physical slot 1:
> >      Card status: present
> >      Slot status: active
> >     Logical slot: 1
> >            ICCID: 89860000502000180722
> >   Physical slot 2:
> >      Card status: present
> >      Slot status: inactive
> >            ICCID: unknown
> >
> > An EM7511 with dual SIM shows the ICCID for both SIM's on bootup:
>
> Are you using the latest EM7455 firmware available? Maybe this is an
> issue already solved by a newer firmware.
>
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 :)
root at EDG4600:~# mmcli -m 1 --firmware-list
  ----------------
  Firmware | list: 02.32.11.00_ATT_002.070_000
           |           current: yes
           |           gobi pri unique id: 002.070_000
           |           gobi modem unique id: ?_?
           |       02.24.05.06_BELL_001.005_000
           |           current: no
           |           gobi pri unique id: 001.005_000
           |           gobi modem unique id: ?_?
           |       02.33.03.00_GENERIC_002.072_000
           |           current: no
           |           gobi pri unique id: 002.072_000
           |           gobi modem unique id: ?_?
           |       02.32.11.00_ROGERS_001.040_000
           |           current: no
           |           gobi pri unique id: 001.040_000
           |           gobi modem unique id: ?_?
           |       02.32.11.00_SPRINT_002.062_000
           |           current: no
           |           gobi pri unique id: 002.062_000
           |           gobi modem unique id: ?_?
           |       02.32.11.00_TELUS_001.040_000
           |           current: no
           |           gobi pri unique id: 001.040_000
           |           gobi modem unique id: ?_?
           |       02.33.03.00_VERIZON_002.079_001
           |           current: no
           |           gobi pri unique id: 002.079_001
           |           gobi modem unique id: ?_?
           |       02.24.03.00_VODAFONE_001.001_000
           |           current: no
           |           gobi pri unique id: 001.001_000
           |           gobi modem unique id: ?_?

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...)

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.

>
>
> --
> Aleksander
> https://aleksander.es


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20210407/3c9293a9/attachment-0001.htm>


More information about the ModemManager-devel mailing list