sim hot swap problem with Telit GE910-QUAD

Carlo Lobrano c.lobrano at gmail.com
Mon Jul 24 10:02:30 UTC 2017


> What would happen if you completely disable and enable the handlers >
with the method I'm suggesting, and then you just let the #QSS=1 >
indication happen? If the modem already had a SIM inserted, an extra >
#QSS=1 wouldn't harm, right? Won't it be just ignored when it's
> processed?

You're right, we don't need to process #QSS=1, but we absolutely need to
wait for it before sending any other SIM command.

Since #QSS=1 arrives in a couple of seconds, even a sleep will do, but if
anything goes wrong we will get stuck in the next command (not sure if it
is a bug, but it looks like it to me).

In the meantime I tried the my proposal and I'm not really sure about how
to wait for the unsolicited. I cannot let the thread go on, otherwise we
call +CRSM and get stuck, but if I put a simple sleep, we do not process
any unsolicited...

On Mon, 24 Jul 2017 at 10:59 Aleksander Morgado <aleksander at aleksander.es>
wrote:

> Hey,
>
> >
> >> I just reproduced the issue on my hardware, so I can develop a patch for
> >> this
> >
> >
> >
> > after some analysis, I think that the fix for this issue should count two
> > steps
> >
> > 1. When +CSIM=1 is sent, the QSS handler should ignore QSS unsolicited
> -> I
> > brefly solved this with a "is_csim_locked" boolean in
> MMBroadbandModemTelit
> > priv, set by csim_lock_ready and read by the handler.
> >
> > 2. As well as +CSIM=1 causes a #QSS=0, even +CSIM=0 causes a #QSS=1, but
> > this time we need to wait for this unsolicited to come before accepting
> any
> > other call to the SIM. Considering that the very next call is +CSRM, we
> need
> > to stop soon after unlocking SIM interface.
> >
> > I think I can do this in csim_unlock_ready, waiting 'till the QSS handler
> > receives #QSS=1 (and up to some maximum amount of time, like 3-5 seconds,
> > just to be sure), but since this will stop the entire process I
> preferred to
> > share this idea with you before working on it.
> >
> > what do you think?
>
> I was going to suggest you use
> mm_port_serial_at_enable_unsolicited_msg_handler() as that allows you
> to temporarily disable/enable an already configured unsolicited
> message handler, but in this case you do want to use the handler as
> you're expecting the #QSS=1 after +CSIM=0...
>
> What would happen if you completely disable and enable the handlers
> with the method I'm suggesting, and then you just let the #QSS=1
> indication happen? If the modem already had a SIM inserted, an extra
> #QSS=1 wouldn't harm, right? Won't it be just ignored when it's
> processed?
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170724/1bc400ba/attachment.html>


More information about the ModemManager-devel mailing list