Dual SIM on Telit LE910C1-EU

Aleksander Morgado aleksander at aleksander.es
Wed Jul 13 09:59:23 UTC 2022


Hey,

> >> I use a telit LE910C1-EU with mbim interface. This modem has support for two sim slots and we want to use this feature with ModemManager (I am using Version 1.19.0)
> >>
> >> What I want to do is
> >>
> >> find out which slot is currently active
> >> switch active slot if possible
> >>
> >> I am able to switch the slot using AT commands directly. Using qmicli works as well. But I am not able to use mmcli to do so.
> >>  From looking at the code, it seems that using AT commands is not implemented in the telit plugin and using qmi-over-mbim is not implemented for the uim service. It seems to me that there is some code for that in the mbim broadband modem, but I don't understand how that can work, since the service QMI_SERVICE_UIM is not included in the list of QMI service in the mbim implementation. I tried to include the service in the list, but that caused modem manager to crash since the modem is not a QMI modem (invalid cast)
> >>
> > That's a bug to fix. QMI_SERVICE_UIM should definitely be in that
> > qmi_services list in MMBroadbandModemMbim, otherwise the shared utils
> > using the UIM client will all fail.
> That matches my expectation that it will not work without the
> QMI_SERVICE_UIM in the list of qmi services.
> > What's the exact crash you got
> > when doing that? can you get a backtrace?
>
> Here is the backtrace when I iclude the QMI_SERVICE_UIM in the list of
> services:
>
> (gdb) back
> #0  mm_broadband_modem_qmi_peek_port_qmi (self=0x5cc270) at
> ../../../../../../../modemmanager-dev/src/mm-broadband-modem-qmi.c:218
> #1  0x004b6cee in ensure_qmi_client (task=task at entry=0x5bb1f0,
> self=self at entry=0x579150, service=service at entry=QMI_SERVICE_UIM,
> o_client=o_client at entry=0xbeffe890)
>      at ../../../../../../../modemmanager-dev/src/mm-sim-qmi.c:64
> #2  0x004b8e10 in wait_sim_ready (_self=<optimized out>,
> callback=<optimized out>, user_data=0x579810) at
> ../../../../../../../modemmanager-dev/src/mm-sim-qmi.c:208
> #3  0x0047b5fe in interface_initialization_step (task=0xb4b0db60) at
> ../../../../../../../modemmanager-dev/src/mm-iface-modem.c:5739
> #4  0xb6d803a8 in ?? () from /usr/lib/libgio-2.0.so.0
>

Ah, the MMSimQmi object assumes the parent modem is a
MMBroadbandModemQmi, and that may not be true. It should use the
MMSharedQmi interface instead.

> >> So the question is how to implement that dual SIM support? To me, the most promising seems to support the UIM service via qmi-over-mbim, but it is not clear to me what the best way is to do so? Do you have some guidance how to proceed?
> >>
> > The MMBroadbandModemMbim object already supports multi-SIM management
> > using the Microsoft MBIM extensions (e.g. device slot mappings query).
>
> When I try to use any of the microsoft extensions, I get a failure from
> mbimcli.
>
> This is what I get when I query the device services:
>
>  > mbimcli -d /dev/cdc-wdm0 --query-device-services
> [/dev/cdc-wdm0] Device services retrieved:
>      Max DSS sessions: '0'
>              Services: (13)
>
>                    Service: 'basic-connect'
>                       UUID: [a289cc33-bcbb-8b4f-b6b0-133ec2aae6df]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: device-caps (1),
>                             subscriber-ready-status (2),
>                             radio-state (3),
>                             pin (4),
>                             pin-list (5),
>                             home-provider (6),
>                             preferred-providers (7),
>                             visible-providers (8),
>                             register-state (9),
>                             packet-service (10),
>                             signal-state (11),
>                             connect (12),
>                             provisioned-contexts (13),
>                             ip-configuration (15),
>                             device-services (16),
>                             device-service-subscribe-list (19),
>                             packet-statistics (20),
>                             network-idle-hint (21),
>                             emergency-mode (22),
>                             ip-packet-filters (23)
>
>                    Service: 'sms'
>                       UUID: [533fbeeb-14fe-4467-9f90-33a223e56c3f]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: configuration (1),
>                             read (2),
>                             send (3),
>                             delete (4),
>                             message-store-status (5)
>
>                    Service: 'ussd'
>                       UUID: [e550a0c8-5e82-479e-82f7-10abf4c3351f]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: ussd (1)
>
>                    Service: 'phonebook'
>                       UUID: [4bf38476-1e6a-41db-b1d8-bed289c25bdb]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: configuration (1),
>                             read (2),
>                             delete (3),
>                             write (4)
>
>                    Service: 'auth'
>                       UUID: [1d2b5ff7-0aa1-48b2-aa52-50f15767174e]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: aka (1),
>                             sim (3)
>
>                    Service: 'qmi'
>                       UUID: [d1a30bc2-f97a-6e43-bf65-c7e24fb0f0d3]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: msg (1)
>
>                    Service: 'ms-host-shutdown'
>                       UUID: [883b7c26-985f-43fa-9804-27d7fb80959c]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: notify (1)
>
>                    Service: 'unknown'
>                       UUID: [2d0c12c9-0e6a-495a-915c-8d174fe5d63c]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: 1, 2
>
>                    Service: 'ms-firmware-id'
>                       UUID: [e9f7dea2-feaf-4009-93ce-90a3694103b6]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: get (1)
>
>                    Service: 'atds'
>                       UUID: [5967bdcc-7fd2-49a2-9f5c-b2e70e527db3]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: signal (1),
>                             location (2),
>                             operators (3),
>                             rat (4),
>                             register-state (9),
>                             unknown (10)
>
>                    Service: 'qdu'
>                       UUID: [6427015f-579d-48f5-8c54-f43ed1e76f83]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: update-session (1),
>                             file-open (2),
>                             file-write (3)
>
>                    Service: 'ms-uicc-low-level-access'
>                       UUID: [c2f6588e-f037-4bc9-8665-f4d44bd09367]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: atr (1),
>                             open-channel (2),
>                             close-channel (3),
>                             apdu (4),
>                             terminal-capability (5)
>
>                    Service: 'unknown'
>                       UUID: [54656c69-744d-4249-4d45-7874656e6453]:
>                DSS payload: 0
>          Max DSS instances: 0
>                       CIDs: 1
>
> Seems to me it is in fact not available on that modem.
>

Yep.

> > But, it also supports multi-SIM management using QMI over MBIM, which
> > is actually the preferred way of doing it; i.e.:
> >
> >   * If built with QMI and QMI-over-MBIM support:
> >      ** It'll try QMI-based multi-SIM management first always.
> >      ** If QMI-based multi-SIM management fails (e.g. device doesn't
> > support QMI-over-MBIM), it falls back to MBIM-based multi-SIM
> > management.
> >   * If not built with QMI or QMI-over-MBIM support, it will use
> > MBIM-based multi-SIM management by default.
> >
> > In your case it didn't try QMI over MBIM because of the missing UIM
> > client allocation in MMBroadbandModemMbim.
> So then the way to go (for me) is to fix the QMI-over-MBIM issue.
> >
> >> I attach parts of the starting log ....
> >>
> > Please try to get a debug-level log always:
> > https://modemmanager.org/docs/modemmanager/debugging/
> >
> >> ModemManager[17594]: <info>  [modem0] QMI-based capability and mode switching support enabled
> >> ModemManager[17594]: <warn>  [modem0] couldn't query SIM slots: NoDeviceSupport
> > This error actually shows that no QMI over MBIM was tried, as the
> > NoDeviceSupport is actually a MBIM error, so it only tried MBIM, and
> > maybe that specific Microsoft extension isn't supported by the
> > firmware.
> I think so, see above...
> >
> > We need to fix that UIM client allocation issue, could you please dig into that?
> > And open a new issue in gitlab for that please?
>
> Sure.
>
> https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/592
>
>

Thanks.

-- 
Aleksander


More information about the ModemManager-devel mailing list