[PATCH] telit: enable 'SIM ready' notifications with #QSS=2

Carlo Lobrano c.lobrano at gmail.com
Fri May 12 14:18:04 UTC 2017


​> Maybe it wouldn't be a bad idea to keep track of which operations may
> fail due to SIM being busy, and perform automatic retry later if we
> get that specific error, something like that.

Hey,

I made a little proof of concept of this improvement. So far, it's
restricted to *loading unlock retries again once #QSS:3* is received, but I
can't get to have the retries values updated at a higher level. This is
likely due to *mm-iface-modem.c:load_unlock_retries_ready* callback not
being called I guess, but I'm not really sure my approach is totally
correct.

I do the following:

A. When mm_telit_parse_csim_response fails:
    1. The *GSimpleAsyncResult* instance is saved
    2. load_unlock_retries is marked to be called again later
B. When QSS: 3 arrives:
    1. a newly *LoadUnlockRetriesContext* is created using the saved
*GSimpleAsyncResult* (the idea is to re-use the original callback
reference, but not really sure it's correct).
    2. *load_unlock_retries_step* is called again with the above mentioned
LoadUnlockRetriesContext instance

Step 2 is done in a GSourceFunc called by the mainloop, using g_add_idle.

What I see is the load_unlock_retries_step logs, so this function is
actually called (as it looks to me) correctly, but the output of "mmcli -m
<ID>" still shows the same incomplete list of unlock retries as if the data
have not been updated.​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170512/bc69f7a8/attachment.html>


More information about the ModemManager-devel mailing list