gobi2000: Reading enabled locks

Torsten Hilbrich torsten.hilbrich at secunet.com
Wed Nov 12 02:09:34 PST 2014


Am 11.11.2014 um 17:11 schrieb Aleksander Morgado:
> This wouldn't be the correct approach I'm afraid.
> 
> This case is very similar to the SMS messaging implementation in QMI
> modems, where QMI is used if WMS is supported and otherwise we
> fallback to AT-based SMS messaging see:
> http://cgit.freedesktop.org/ModemManager/ModemManager/commit/src/mm-broadband-modem-qmi.c?id=fcede1a80acfdc299c5aa0015012a68846dfc763
> 
> So, instead of subclassing a whole new object, the generic
> MMBroadbandModemQmi should: if qmi_client_dms_uim_get_ck_status()
> works, use that approach. If qmi_client_dms_uim_get_ck_status() fails
> because the command isn't supported, then call parent interface's
> load_enabled_facility_locks(), which is AT-based.

I have now implemented an alternate approach. I noticed that the qmi get
ck status command didn't have any support to retrieve the SIM lock
facility (which in the AT+CLCK command is named SC). So the current code
simply cannot fill the MM_MODEM_3GPP_FACILITY_SIM bit.

However, this information is available as part of the pin status. So I
added a new function to retrieve the PIN enabled/disabled state based on
that PIN status. This function is called when the other facility locks
were queried.

Patch and logs of a test run with initially disabled PIN which is then
set to enabled are attached. Of course, I also tested the opposite
direction.

These are the new debug messages added:

<debug> [1415786280.215306] [mm-broadband-modem-qmi.c:3396]
get_sim_lock_status_via_pin_status(): Retrieving PIN status to check for
enabled PIN
<debug> [1415786280.222673] [mm-broadband-modem-qmi.c:3371]
get_sim_lock_status_via_pin_status_ready(): PIN is reported disabled

	Torsten


-------------- next part --------------
A non-text attachment was scrubbed...
Name: modem-manager.log
Type: text/x-log
Size: 137339 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20141112/bec8729a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-qmi-Retrieve-MM_MODEM_3GPP_FACILITY_SIM.patch
Type: text/x-patch
Size: 6118 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20141112/bec8729a/attachment-0003.bin>


More information about the ModemManager-devel mailing list