<div dir="ltr"><div>> Is this extra "#QSS: 1" indication maybe a way the modem has to say<br class="gmail_msg">
> "SIM ready" when it has been configured with "#QSS=1" instead of<br class="gmail_msg">> #QSS=2? If it happens just after SIM-PIN unlock, it could very well<br class="gmail_msg">
> be.<br><br></div>I think the same, but it shouldn't do it. #QSS: 0/1 are for physical changes on SIM, #QSS: 2 should be for SIM unlock, but we're not listening to it.<br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 16 Mar 2017 at 11:17 Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Mar 16, 2017 at 10:58 AM, Carlo Lobrano <<a href="mailto:c.lobrano@gmail.com" class="gmail_msg" target="_blank">c.lobrano@gmail.com</a>> wrote:<br class="gmail_msg">
> Sorry for the late reply, but I was double checking this change because of<br class="gmail_msg">
> the last paragraph in +CSIM reference:<br class="gmail_msg">
><br class="gmail_msg">
>> After the locking of the SIM-ME interface (AT+CSIM=1) the SIM will be<br class="gmail_msg">
>> accessible only by AT+CSIM commands (#QSS: 0). The GSM and GPRS services<br class="gmail_msg">
>> will be automatically de-registered to avoid the TE commands alter the GSM<br class="gmail_msg">
>> application. They will be automatically reconditioned after the unlocking<br class="gmail_msg">
>> of the<br class="gmail_msg">
>> SIM-ME interface. After the unlocking of the SIM-ME interface if PIN is<br class="gmail_msg">
>> required<br class="gmail_msg">
>> it will be necessary to enter it another time.<br class="gmail_msg">
><br class="gmail_msg">
> But this does not seems to affect the behaviour of the modem, which still<br class="gmail_msg">
> works fine.<br class="gmail_msg">
> In my environment I can't reproduce the issue this patch fixes (tty locked),<br class="gmail_msg">
> but I do not see any side effect, so for me it's ok.<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
Good!<br class="gmail_msg">
<br class="gmail_msg">
> But, while this patch does not cause regression, I did observe a problem<br class="gmail_msg">
> testing this use case: when SIM is locked and then unlocked, with SIM hot<br class="gmail_msg">
> swap enabled, we receive an unsolicited "#QSS: 1", which is not related to<br class="gmail_msg">
> any physical SIM insertion, and release the modem:<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> mar 16 09:55:00 d2092 ModemManager[542]: <debug> (ttyACM0): --> 'AT+CSQ<CR>'<br class="gmail_msg">
> mar 16 09:55:00 d2092 ModemManager[542]: <debug> (ttyACM0): <-- '<CR><LF>'<br class="gmail_msg">
> mar 16 09:55:00 d2092 ModemManager[542]: <debug> (ttyACM0): <-- '+CSQ:<br class="gmail_msg">
> 9,4<CR><LF><CR><LF>OK<CR><LF>'<br class="gmail_msg">
> mar 16 09:55:00 d2092 ModemManager[542]: <debug> (ttyACM0) device open count<br class="gmail_msg">
> is 3 (close)<br class="gmail_msg">
> mar 16 09:55:00 d2092 ModemManager[542]: <debug> Modem<br class="gmail_msg">
> /org/freedesktop/ModemManager1/Modem/0: signal quality updated (29)<br class="gmail_msg">
> mar 16 09:55:00 d2092 ModemManager[542]: <debug> Periodic signal quality<br class="gmail_msg">
> checks rescheduled (interval = 30s)<br class="gmail_msg">
> mar 16 09:55:02 d2092 ModemManager[542]: <debug> (ttyACM3): <--<br class="gmail_msg">
> '<CR><LF>+CIEV: service,1<CR><LF>'<br class="gmail_msg">
> mar 16 09:55:02 d2092 ModemManager[542]: <debug> (ttyACM3): <--<br class="gmail_msg">
> '<CR><LF>+CIEV: roam,0<CR><LF>'<br class="gmail_msg">
> mar 16 09:55:05 d2092 ModemManager[542]: <debug> (ttyACM0) device open count<br class="gmail_msg">
> is 4 (open)<br class="gmail_msg">
> mar 16 09:55:05 d2092 ModemManager[542]: <debug> (ttyACM0): --><br class="gmail_msg">
> 'AT+CCLK?<CR>'<br class="gmail_msg">
> mar 16 09:55:05 d2092 ModemManager[542]: <debug> (ttyACM0): <-- '<CR><LF>'<br class="gmail_msg">
> mar 16 09:55:05 d2092 ModemManager[542]: <debug> (ttyACM0): <-- '+CCLK:<br class="gmail_msg">
> "17/03/16,09:55:05+04"<CR><LF><CR><LF>OK<CR><LF>'<br class="gmail_msg">
> mar 16 09:55:05 d2092 ModemManager[542]: <debug> (ttyACM0) device open count<br class="gmail_msg">
> is 3 (close)<br class="gmail_msg">
> mar 16 09:55:09 d2092 ModemManager[542]: <debug> (ttyACM3): <--<br class="gmail_msg">
> '<CR><LF>#QSS: 1<CR><LF>'<br class="gmail_msg">
> mar 16 09:55:09 d2092 ModemManager[542]: <info>  QSS: SIM inserted<br class="gmail_msg">
> mar 16 09:55:09 d2092 ModemManager[542]: <debug> Releasing SIM hot swap<br class="gmail_msg">
> ports context<br class="gmail_msg">
><br class="gmail_msg">
> This happens with master ModemManger too.<br class="gmail_msg">
><br class="gmail_msg">
> I'm working on this now, probably a solution would be to borrow Aleksander<br class="gmail_msg">
> patch about #QSS: 3, in order to keep an internal state of the SIM presence<br class="gmail_msg">
> and just ignore #QSS: 1 when we already know that SIM is inserted.<br class="gmail_msg">
<br class="gmail_msg">
Is this extra "#QSS: 1" indication maybe a way the modem has to say<br class="gmail_msg">
"SIM ready" when it has been configured with "#QSS=1" instead of<br class="gmail_msg">
#QSS=2? If it happens just after SIM-PIN unlock, it could very well<br class="gmail_msg">
be.<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Aleksander<br class="gmail_msg">
<a href="https://aleksander.es" rel="noreferrer" class="gmail_msg" target="_blank">https://aleksander.es</a><br class="gmail_msg">
</blockquote></div>