Blocked SIM card keeps on asking for PUK

Bug #1436820 reported by Michael Zanetti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Undecided
Unassigned
indicator-network (Ubuntu)
Fix Released
Medium
Unassigned
indicator-network (Ubuntu RTM)
Fix Released
Medium
Unassigned
ofono (Ubuntu)
Fix Released
Medium
Alfonso Sanchez-Beato
ofono (Ubuntu RTM)
Confirmed
Medium
Alfonso Sanchez-Beato

Bug Description

I managed to enter the wrong PUK for a SIM card for 10 times in a row and the phone keeps on asking me for the PUK. It always says that this will be the last attempt even though it's too late already.

Instead, it should say that this SIM card is rejected and only emergency calls are possible.

Reported on

This is krillin, with RTM image 21.

Related branches

Revision history for this message
Tony Espy (awe) wrote :

@Michael

Tsk, tsk, tsk... No device or image details!

Depending on the device, we may not get the number proper number of PUK retries left. Pretty sure this is a known issue with MTK-based modems, and we have potential fix.

Changed in indicator-network (Ubuntu):
status: New → Incomplete
assignee: nobody → Michael Zanetti (mzanetti)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

This is krillin, with RTM image 21.

Changed in indicator-network (Ubuntu):
status: Incomplete → New
assignee: Michael Zanetti (mzanetti) → nobody
Revision history for this message
Tony Espy (awe) wrote :

Pretty sure this is addressed by:

https://github.com/rilmodem/ofono/pull/169

description: updated
Changed in indicator-network (Ubuntu):
status: New → Incomplete
Changed in indicator-network (Ubuntu RTM):
status: New → Incomplete
Changed in ofono (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in ofono (Ubuntu RTM):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in ofono (Ubuntu):
status: New → In Progress
Changed in ofono (Ubuntu RTM):
status: New → In Progress
Changed in ofono (Ubuntu):
importance: Undecided → Medium
Changed in ofono (Ubuntu RTM):
importance: Undecided → Medium
Changed in ofono (Ubuntu):
assignee: Alfonso Sanchez-Beato (alfonsosanchezbeato) → Tony Espy (awe)
Changed in ofono (Ubuntu RTM):
assignee: Alfonso Sanchez-Beato (alfonsosanchezbeato) → Tony Espy (awe)
Revision history for this message
Tony Espy (awe) wrote :

Re-assigned to me, as the pull-request is awaiting review. It's unclear though if this is high enough priority to roll out as an OTA update prior to our vivid -> RTM change.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@mzanetti, would it be possible to get the output of the list-modems script? To do that:

1. Insert the blocked SIM
2. Make sure you can adb the device even with a locked screen:
sudo touch /userdata/.adb_onlock
3. Reboot
4. Insert a wrong PUK once
5. Execute:
/usr/share/ofono/scripts/list-modems

and please attach the output of the script to the bug (do not forget to remove any private information: serial numbers and phone number).

@Tony, the PR you mention would make as know the remaining retries from the very beginning, but inserting the PUK once should give us the same information. So the best thing to do for the moment is let mzanetty follow these instructions and that would confirm if this is an ofono or a unity bug.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

@abeato: Here's the output after entering a PUK for an already blocked SIM card.

phablet@ubuntu-phablet:~$ /usr/share/ofono/scripts/list-modems
[ /ril_1 ]
    Manufacturer = Fake Manufacturer
    Revision = MOLY.WR8.W1315.MD.WG.MP.V37.P5, 2014/05/15 11:49
    Lockdown = 0
    Online = 1
    Model = Fake Modem Model
    Emergency = 0
    Type = hardware
    Features = rat sim
    Interfaces = org.ofono.RadioSettings org.ofono.SimManager org.ofono.MtkSettings org.ofono.CallVolume org.ofono.VoiceCallManager org.ofono.NetworkTime
    Powered = 1
    Serial = 354142060412485
    [ org.ofono.RadioSettings ]
        ModemTechnologies = gsm
        TechnologyPreference = gsm
        FastDormancy = 0
    [ org.ofono.SimManager ]
        Present = 0
    [ org.ofono.MtkSettings ]
        Has3G = 0
    [ org.ofono.CallVolume ]
        Muted = 0
        MicrophoneVolume = 0
        SpeakerVolume = 0
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 08 000 999 110 112 911 118 119
    [ org.ofono.NetworkTime ]

[ /ril_0 ]
    Manufacturer = Fake Manufacturer
    Revision = MOLY.WR8.W1315.MD.WG.MP.V37.P5, 2014/05/15 11:49
    Lockdown = 0
    Online = 1
    Model = Fake Modem Model
    Emergency = 0
    Type = hardware
    Features = rat sim
    Interfaces = org.ofono.RadioSettings org.ofono.SimManager org.ofono.MtkSettings org.ofono.CallVolume org.ofono.VoiceCallManager org.ofono.NetworkTime
    Powered = 1
    Serial = 354142060132489
    [ org.ofono.RadioSettings ]
        ModemTechnologies = gsm umts
        TechnologyPreference = umts
        FastDormancy = 0
    [ org.ofono.SimManager ]
        Retries =
        BarredDialing = 0
        Present = 1
        LockedPins = pin
        FixedDialing = 0
        SubscriberNumbers =
        PreferredLanguages = de en
        CardIdentifier = 89492059511426191168
        PinRequired = puk
    [ org.ofono.MtkSettings ]
        Has3G = 1
    [ org.ofono.CallVolume ]
        Muted = 0
        MicrophoneVolume = 0
        SpeakerVolume = 0
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 112 911
    [ org.ofono.NetworkTime ]

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@mzanetti, definitely looks like an ofono bug. The PR pointed out by Tony should help, but anyway I'd like to gather more traces. Could you modify "/etc/init/ofono.override", changing the "exec" line with the following 3 lines:

<<
...
env OFONO_RIL_TRACE=""
env OFONO_RIL_HEX_TRACE=""
exec ofonod -d -P stktest,provision,sap,udev,dun,smart,hfp
>>

then do exactly the same steps as in comment #5, and attach syslog ?

Revision history for this message
Michael Zanetti (mzanetti) wrote :
Download full text (12.7 KiB)

Mar 27 16:00:24 ubuntu-phablet ofonod[1876]: Slot 0: ff ff ff 7f 2d 01 00 00 ff ff ff 7f 01 00 00 00 ....-...........
Mar 27 16:00:24 ubuntu-phablet ofonod[1876]: Slot 0: 00 00 00 00 dc fe ff ff ab fe ff ff d2 ff ff ff ................
Mar 27 16:00:24 ubuntu-phablet ofonod[1876]: gril/gril.c:handle_unsol_req() RIL Event slot 0: UNSOL_SIGNAL_STRENGTH
Mar 27 16:00:27 ubuntu-phablet powerd[953]: 30094 slow avg 271.692393 fast avg 271.988090 last 272.000000
Mar 27 16:00:30 ubuntu-phablet ofonod[1876]: Slot 0: < 00 00 00 4c 01 00 00 00 f1 03 00 00 0e 00 00 00 ...L............
Mar 27 16:00:30 ubuntu-phablet ofonod[1876]: Slot 0: 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c...............
Mar 27 16:00:30 ubuntu-phablet ofonod[1876]: Slot 0: 00 00 00 00 00 00 00 00 63 00 00 00 ff ff ff 7f ........c.......
Mar 27 16:00:30 ubuntu-phablet ofonod[1876]: Slot 0: ff ff ff 7f 2d 01 00 00 ff ff ff 7f 01 00 00 00 ....-...........
Mar 27 16:00:30 ubuntu-phablet ofonod[1876]: Slot 0: 00 00 00 00 d8 fe ff ff af fe ff ff d8 ff ff ff ................
Mar 27 16:00:30 ubuntu-phablet ofonod[1876]: gril/gril.c:handle_unsol_req() RIL Event slot 0: UNSOL_SIGNAL_STRENGTH
Mar 27 16:00:31 ubuntu-phablet powerd[953]: 34112 slow avg 272.976875 fast avg 273.475874 last 273.500000
Mar 27 16:00:33 ubuntu-phablet ofonod[1876]: Slot 1: < 00 00 00 4c 01 00 00 00 f1 03 00 00 19 00 00 00 ...L............
Mar 27 16:00:33 ubuntu-phablet ofonod[1876]: Slot 1: 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c...............
Mar 27 16:00:33 ubuntu-phablet ofonod[1876]: Slot 1: 00 00 00 00 00 00 00 00 63 00 00 00 ff ff ff 7f ........c.......
Mar 27 16:00:33 ubuntu-phablet ofonod[1876]: Slot 1: ff ff ff 7f 2d 01 00 00 ff ff ff 7f 01 00 00 00 ....-...........
Mar 27 16:00:33 ubuntu-phablet ofonod[1876]: Slot 1: 00 00 00 00 03 ff ff ff 00 00 00 00 00 00 00 00 ................
Mar 27 16:00:33 ubuntu-phablet ofonod[1876]: gril/gril.c:handle_unsol_req() RIL Event slot 1: UNSOL_SIGNAL_STRENGTH
Mar 27 16:00:35 ubuntu-phablet ofonod[1876]: Slot 0: < 00 00 00 4c 01 00 00 00 f1 03 00 00 0e 00 00 00 ...L............
Mar 27 16:00:35 ubuntu-phablet ofonod[1876]: Slot 0: 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c...............
Mar 27 16:00:35 ubuntu-phablet ofonod[1876]: Slot 0: 00 00 00 00 00 00 00 00 63 00 00 00 ff ff ff 7f ........c.......
Mar 27 16:00:35 ubuntu-phablet ofonod[1876]: Slot 0: ff ff ff 7f 2d 01 00 00 ff ff ff 7f 01 00 00 00 ....-...........
Mar 27 16:00:35 ubuntu-phablet ofonod[1876]: Slot 0: 00 00 00 00 d4 fe ff ff b0 fe ff ff de ff ff ff ................
Mar 27 16:00:35 ubuntu-phablet ofonod[1876]: gril/gril.c:handle_unsol_req() RIL Event slot 0: UNSOL_SIGNAL_STRENGTH
Mar 27 16:00:35 ubuntu-phablet kernel: [ 31.676858]lipeng debug|[Sound_Speaker_Turnon] Speaker_Volume: 0
Mar 27 16:00:35 ubuntu-phablet kernel: [ 38.157867]audit_printk_skb: 495 callbacks suppressed
Mar 27 16:00:35 ubuntu-phablet kernel: [ 38.157948]type=1400 audit(1427468435.840:177): apparmor="DENIED" operation="open" profile="com.canonical.scopes.tasks_sctasks_1.3" name="/home/phablet/.local/share/com.canonical.scopes.tasks/Databases/98db8704aaadd1aeebba...

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Sorry... this didn't work out well, here it is a bit nicer formatted: http://paste.ubuntu.com/10689457/

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@mzanetti, thanks for the log.

It looks like, contrarily to what happens when there are remaining retries for the PUK, the number of remaining retries is not returned in the response to RIL_REQUEST_ENTER_SIM_PUK.

https://github.com/rilmodem/ofono/pull/169 should certainly help.

I have attached an ofono binary that includes this change. @mzanetti, mind giving it a try?

Please do:

$ adb push ofonod.gz
$ phablet-shell
$ gunzip /tmp/ofonod.gz
$ chmod +x /tmp/ofonod
$ sudo stop ofono
$ sudo cp /tmp/ofonod /usr/sbin/
$ sudo reboot

After the reboot, please paste output of

/usr/share/ofono/scripts/list-modems

Changed in ofono (Ubuntu):
assignee: Tony Espy (awe) → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in ofono (Ubuntu RTM):
assignee: Tony Espy (awe) → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Revision history for this message
Michael Zanetti (mzanetti) wrote :
Revision history for this message
Michael Zanetti (mzanetti) wrote :

After installing the patched ofono binary, this is the output of list-modems:

phablet@ubuntu-phablet:~$ /usr/share/ofono/scripts/list-modems
[ /ril_1 ]
    Serial = 354142060412485
    Interfaces = org.ofono.RadioSettings org.ofono.SimManager org.ofono.MtkSettings org.ofono.CallVolume org.ofono.VoiceCallManager org.ofono.NetworkTime
    Revision = MOLY.WR8.W1315.MD.WG.MP.V37.P5, 2014/05/15 11:49
    Online = 1
    Emergency = 0
    Features = rat sim
    Powered = 1
    Lockdown = 0
    Type = hardware
    Model = Fake Modem Model
    Manufacturer = Fake Manufacturer
    [ org.ofono.RadioSettings ]
        FastDormancy = 0
        ModemTechnologies = gsm
        TechnologyPreference = gsm
    [ org.ofono.SimManager ]
        Present = 0
    [ org.ofono.MtkSettings ]
        Has3G = 0
    [ org.ofono.CallVolume ]
        SpeakerVolume = 0
        MicrophoneVolume = 0
        Muted = 0
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 08 000 999 110 112 911 118 119
    [ org.ofono.NetworkTime ]

[ /ril_0 ]
    Serial = 354142060132489
    Interfaces = org.ofono.RadioSettings org.ofono.SimManager org.ofono.MtkSettings org.ofono.CallVolume org.ofono.VoiceCallManager org.ofono.NetworkTime
    Revision = MOLY.WR8.W1315.MD.WG.MP.V37.P5, 2014/05/15 11:49
    Online = 1
    Emergency = 0
    Features = rat sim
    Powered = 1
    Lockdown = 0
    Type = hardware
    Model = Fake Modem Model
    Manufacturer = Fake Manufacturer
    [ org.ofono.RadioSettings ]
        FastDormancy = 0
        ModemTechnologies = gsm umts
        TechnologyPreference = umts
    [ org.ofono.SimManager ]
        Present = 1
        LockedPins = pin
        Retries = [pin = 0] [pin2 = 3] [puk = 0] [puk2 = 10]
        SubscriberNumbers =
        PinRequired = puk
        BarredDialing = 0
        PreferredLanguages = de en
        CardIdentifier = 89492059511426191168
        FixedDialing = 0
    [ org.ofono.MtkSettings ]
        Has3G = 1
    [ org.ofono.CallVolume ]
        SpeakerVolume = 0
        MicrophoneVolume = 0
        Muted = 0
    [ org.ofono.VoiceCallManager ]
        EmergencyNumbers = 112 911
    [ org.ofono.NetworkTime ]

Revision history for this message
Tony Espy (awe) wrote :

@Alfonso

Have you confirmed whether or not this works on arale?

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@Tony

Yes, I checked in both krillin and arale.

Tony Espy (awe)
Changed in ofono (Ubuntu):
status: In Progress → Fix Committed
Changed in ofono (Ubuntu RTM):
status: In Progress → Confirmed
Changed in indicator-network (Ubuntu):
importance: Undecided → Medium
Changed in indicator-network (Ubuntu RTM):
importance: Undecided → Medium
Changed in ofono (Ubuntu):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: New → Fix Released
Pete Woods (pete-woods)
Changed in indicator-network (Ubuntu):
status: Incomplete → Fix Released
Changed in indicator-network (Ubuntu RTM):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.