Problems with PUK handling (CLIENT-8155)

Torsten Hilbrich torsten.hilbrich at secunet.com
Mon Jul 20 06:41:36 PDT 2015


When testing the PUK handling in ModemManager 1.4.6 I noticed some problems.

The PUK is triggered by trying to change the PIN with the wrong old PIN:

# mmcli -i 0 --change-pin 1111 --pin 0815
error: couldn't change PIN code in the SIM:
'GDBus.Error:org.freedesktop.libmbim.Error.Status.Failure: Failure'
<repeated some times>
# mmcli -i 0 --change-pin 1111 --pin 0815
error: couldn't change PIN code in the SIM:
'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: Need
to be unlocked to allow changing PIN'

Now the PUK is required. Problem 1: But this is not shown in the state
of SIM or modem:

# mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id
'3e4e3d78ec186aa790387e228a2a8fbafaec4a48')
  -------------------------
  Hardware |   manufacturer: 'Ericsson MBM'
           |          model: 'MBIM [0BDB:193E]'
           |       revision: 'CXP 901 8700/1 - R3C18'
           |      supported: 'gsm-umts'
           |        current: 'gsm-umts'
           |   equipment id: '353997050320019'
  -------------------------
  System   |         device:
'/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10'
           |        drivers: 'cdc_acm, cdc_mbim, cdc_wdm'
           |         plugin: 'Ericsson MBM'
           |   primary port: 'cdc-wdm2'
           |          ports: 'ttyACM1 (at), wwan0 (net), cdc-wdm2
(mbim), ttyACM2 (at), ttyACM0 (at)'
  -------------------------
  Numbers  |           own : 'unknown'
  -------------------------
  Status   |           lock: 'none'
           | unlock retries: 'sim-puk (10)'
           |          state: 'enabled'
           |    power state: 'on'
           |    access tech: 'unknown'
           | signal quality: '0' (cached)
  -------------------------
  Modes    |      supported: 'allowed: 2g, 3g; preferred: none'
           |        current: 'allowed: 2g, 3g; preferred: none'
  -------------------------
  Bands    |      supported: 'unknown'
           |        current: 'unknown'
  -------------------------
  IP       |      supported: 'ipv4, ipv6, ipv4v6'
  -------------------------
  3GPP     |           imei: '353997050320019'
           |  enabled locks: 'sim'
           |    operator id: 'unknown'
           |  operator name: 'unknown'
           |   subscription: 'unknown'
           |   registration: 'unknown'
  -------------------------
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers  |          paths: 'none'

[mobil-toh:~] mmcli -m 0   i 0
SIM '/org/freedesktop/ModemManager1/SIM/0'
  -------------------------
  Properties |          imsi : '262022913989449'
             |            id : '89492029307551762080'
             |   operator id : '26202'
             | operator name : 'Vodafone.de'

When trying to unlock the PUK everything works fine when the correct PUK
is sent. However, if I sent a wrong PUK the following happens:

# mmcli -i 0 --puk 1234 --pin 1234
successfully sent PUK code to the SIM

Problem 2: There is no indication that the PUK was wrong. But the PUK
lock remains active.

Is there something I'm missing in the API here? With this behaviour it
seems impossible to write client-side code supporting PUK unlocking with
failure handling.

Log files from ModemManager attached to this mail.

Versions of related components:

ModemManager 1.4.6
libmbim 1.12.2
libqmi 1.12.4

With regards,

	Torsten Hilbrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modem-manager.log
Type: text/x-log
Size: 82316 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20150720/30b87005/attachment-0001.bin>


More information about the ModemManager-devel mailing list