Handling QSS unsolicited in power state transitions
Carlo Lobrano
c.lobrano at gmail.com
Tue Aug 1 08:04:36 UTC 2017
Hi all,
last week I was working to handle a behavior that most of the Telit modem
have, that is, they emit *#QSS* unsolicited in consequence of *+CFUN*
commands. Most of the times, the modems are already in *+CFUN=1* at the
start so we did not notice it in a normal power up, but if we put the modem
in power low state, the *+CFUN=4* triggers a *#QSS=0* that the ModemManager
considers as a SIM swap. Note that this is receved as soon as the modem is
enabled again, because currently we release SIM swap ports while disabling
the modem, and, if we set power state on, ***together with the #QSS=1 due
to +CFUN=1*** causing a crash.
Generally speaking this behavior isn't wrong per se (a part from the crash,
that can be fixed), because the SIM is actually turned off, but in this
configuration we cannot re-enable the modem, while sending a *+CFUN=1* the
modem would be usable again.
So, I made a couple of patches, (1) avoid releasing SIM swap ports on modem
disable, so we can still receive SIM notifications at the right moment, and
(2) ignore QSS unsolicited when changing *+CFUN* state and only for a short
amount of time. The problem is that there isn't a specific timeout within
which this unsolicited must arrive and according to my tests it is quite
variable (about between 3 and 10 seconds).
One solution is then to ignore *#QSS* for like 10 seconds, while the other
one is to keep ignoring them in the whole time between *+CFUN=4* and*
+CFUN=1*. This last solution is more consistent, but it won't let us get
SIM removal/insertion when the modem is in power-state-low.
I'd like to know your opinion about this. Thank you!
Carlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170801/0c9524d5/attachment.html>
More information about the ModemManager-devel
mailing list