gobi2000: Reading enabled locks (was: Re: Readings IMSI)
Aleksander Morgado
aleksander at aleksander.es
Tue Nov 11 08:11:30 PST 2014
On Tue, Nov 11, 2014 at 11:37 AM, Torsten Hilbrich
<torsten.hilbrich at secunet.com> wrote:
> Am 10.11.2014 um 11:01 schrieb Aleksander Morgado:
>> On Mon, Nov 10, 2014 at 8:24 AM, Torsten Hilbrich
>> <torsten.hilbrich at secunet.com> wrote:
> ...
>>> However, there seems to be some problem reading or interpreting the lock
>>> state. SIM_PIN1 is unlocked and set. I would then (as seen with other
>>> modems) expect to see this information in the 3GPP section of the modem
>>> information in the "enabled locks". However, I see 'none' there.
>>> Expected output is at least the presence of pin.
>>>
>>> The command "qmicli -d /dev/cdc-wdm9 --dms-uim-get-pin-status" outputs
>>> information that seem to be correct (see attached
>>> qmicli-read-pin-status.txt).
>>>
>>> I have also added the output of "mmcli -m 0" (mmcli-modem.txt) and
>>> "mmcli -i 0" (mmcli-sim.txt) as well as the complete modem-manager.log.
>>>
>>> Version of libqmi was the current qmi-1-10 branch (5778785
>>> libqmi,message: fix qmi_message_set_transaction_id() in non-CTL
>>> messages) with the IMSI patch applied.
>>>
>>> The version of modemmanager is still 1.4.0 as in the original report.
>>
>> This is not a bug, it's a missing implementation. Listing enabled
>> locks isn't implemented for QMI modems yet, that's why you see a
>> "none" there. Not sure if it's just something I forgot to do, or if I
>> couldn't find correct QMI DMS/UIM messages to query those. Patches
>> welcome :)
>
> The reading of enabled locks seems to be well implemented in the qmi
> modem driver, but the gobi2000 modem do not support the according qmi
> command (qmi_client_dms_uim_get_ck_status). However, I don't have any
> other qualcomm modem so no way to test it.
>
> I found that the AT command +CLCK can be used there. I have implemented
> a gobi2000 variant of the qmi modem which basically uses only uses the
> load_enabled_facility_locks method from the mm-broadband-modem driver
> and everything else from the mm-broadband-modem-qmi.
>
> As I can only test the gobi2000 I have in my possession the driver is
> limited to this gobi2000 type which was used in a number of lenovo
> thinkpads (e.g. T410).
>
> The attached patch (git-am format) was created against version 1.4.0 of
> modemmanager.
>
> With the patch applied the retrieval of enabled locks works correctly. I
> also tested the enable and disable PIN commands (which can now be
> triggered correctly by our software now that the PIN enabling state is
> correct).
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.
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list