[PATCH 1/2] Provide mechansim to disable PIN2 on QMI modems

David McCullough david.mccullough at accelecon.com
Mon Sep 15 14:30:16 PDT 2014


Aleksander Morgado wrote the following:
> On Mon, Sep 15, 2014 at 1:10 PM, David McCullough
> <david.mccullough at accelecon.com> wrote:
> >
> > Some modems report PIN2 support via QMI even though they do not actually
> > support PIN2.  Here is a snippet of debug on the Sierra Wireless MC7354
> > sghowing this.  mmcli would incorrectly report PIN unlocking errors.
> >
> 
> The thing here is that some modems may report PIN2-locked, which is
> true, BUT which doesn't prevent going on with enabling the modem and
> getting a connection. ModemManager handles this case already, by
> ensuring that even if the modem says it is PIN2-locked, the modem
> state doesn't got to LOCKED.
> 
> In your case you have PIN1 disabled, PIN2 locked, so the modem will
> (should) directly go to the DISABLED state when it's detected.
> 
> If instead you have PIN1 enabled you'll get PIN1-locked first (so
> modem will go to LOCKED until PIN1 is unlocked), and once that happens
> it will go to PIN2 locked (so DISABLED).
> 
> All modems in DISABLED state can all directly be ENABLED with Enable().
> 
> Note that UnlockRequired property will still say PIN2; even if it went
> into DISABLED state.
> 
> 
> >     <debug> [1410404595.230075] [mm-broadband-modem-qmi.c:1535] modem_load_unlock_required(): loading unlock required...
> >     [/dev/cdc-wdm0] Sent message...
> >     <<<<<< RAW:
> >     <<<<<<   length = 13
> >     <<<<<<   data   = 01:0C:00:00:02:02:00:09:00:2B:00:00:00
> >     [/dev/cdc-wdm0] Sent message (translated)...
> >     <<<<<< QMUX:
> >     <<<<<<   length  = 12
> >     <<<<<<   flags   = 0x00
> >     <<<<<<   service = "dms"
> >     <<<<<<   client  = 2
> >     <<<<<< QMI:
> >     <<<<<<   flags       = "none"
> >     <<<<<<   transaction = 9
> >     <<<<<<   tlv_length  = 0
> >     <<<<<<   message     = "UIM Get PIN Status" (0x002B)
> >     [/dev/cdc-wdm0] Received message...
> >     >>>>>> RAW:
> >     >>>>>>   length = 32
> >     >>>>>>   data   = 01:1F:00:80:02:02:02:09:00:2B:00:13:00:02:04:00:00:00:00:00:12:03:00:01:03:0A:11:03:00:03:03:0A
> >     [/dev/cdc-wdm0] Received message (translated)...
> >     >>>>>> QMUX:
> >     >>>>>>   length  = 31
> >     >>>>>>   flags   = 0x80
> >     >>>>>>   service = "dms"
> >     >>>>>>   client  = 2
> >     >>>>>> QMI:
> >     >>>>>>   flags       = "response"
> >     >>>>>>   transaction = 9
> >     >>>>>>   tlv_length  = 19
> >     >>>>>>   message     = "UIM Get PIN Status" (0x002B)
> >     >>>>>> TLV:
> >     >>>>>>   type       = "Result" (0x02)
> >     >>>>>>   length     = 4
> >     >>>>>>   value      = 00:00:00:00
> >     >>>>>>   translated = SUCCESS
> >     >>>>>> TLV:
> >     >>>>>>   type       = "PIN2 Status" (0x12)
> >     >>>>>>   length     = 3
> >     >>>>>>   value      = 01:03:0A
> >     >>>>>>   translated = [ current_status = 'enabled-not-verified' verify_retries_left = '3' unblock_retries_left = '10' ]
> >     >>>>>> TLV:
> >     >>>>>>   type       = "PIN1 Status" (0x11)
> >     >>>>>>   length     = 3
> >     >>>>>>   value      = 03:03:0A
> >     >>>>>>   translated = [ current_status = 'disabled' verify_retries_left = '3' unblock_retries_left = '10' ]
> >
> 
> Ok, so this is good. We get PIN1 disabled and PIN2 locked. The modem
> should go into DISABLED state right just after being detected.
> 
> Isn't this the case?

It works,  the modem connects despite the pin2 state,  but it just doesn't
feel right to me that the modem is reporting retry errors and state that
just doesn't apply.

The first thing that came to mind when I looked at it was "something is
wrong". So I thought it should be cleaned up.

If the modem supported dual SIM's and PINs I would be fine with seeing the
PIN2 state like this,

Cheers,
Davidm

-- 
David McCullough,  david.mccullough at accelecon.com,   Ph: 0410 560 763


More information about the ModemManager-devel mailing list