Blocked SIM card keeps on asking for PUK
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
Undecided
|
Unassigned | ||
| | indicator-network (Ubuntu) |
Medium
|
Unassigned | ||
| | indicator-network (Ubuntu RTM) |
Medium
|
Unassigned | ||
| | ofono (Ubuntu) |
Medium
|
Alfonso Sanchez-Beato | ||
| | ofono (Ubuntu RTM) |
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
- Alfonso Sanchez-Beato: Approve on 2015-04-23
- PS Jenkins bot: Approve (continuous-integration) on 2015-04-23
-
Diff: 500 lines (+306/-10) (has conflicts)11 files modifieddebian/changelog (+18/-1)
drivers/rilmodem/gprs-context.c (+7/-8)
drivers/rilmodem/sim.c (+61/-0)
drivers/rilmodem/voicecall.c (+11/-1)
gril/grilreply.c (+32/-0)
gril/grilreply.h (+3/-0)
gril/grilrequest.c (+22/-0)
gril/grilrequest.h (+3/-0)
test/create-ia-context (+47/-0)
unit/test-grilreply.c (+56/-0)
unit/test-grilrequest.c (+46/-0)
| Tony Espy (awe) wrote : | #1 |
| Changed in indicator-network (Ubuntu): | |
| status: | New → Incomplete |
| assignee: | nobody → Michael Zanetti (mzanetti) |
| Michael Zanetti (mzanetti) wrote : | #2 |
This is krillin, with RTM image 21.
| Changed in indicator-network (Ubuntu): | |
| status: | Incomplete → New |
| assignee: | Michael Zanetti (mzanetti) → nobody |
| Tony Espy (awe) wrote : | #3 |
Pretty sure this is addressed by:
| 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) |
| Tony Espy (awe) wrote : | #4 |
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.
@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/
3. Reboot
4. Insert a wrong PUK once
5. Execute:
/usr/share/
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.
| Michael Zanetti (mzanetti) wrote : | #6 |
@abeato: Here's the output after entering a PUK for an already blocked SIM card.
phablet@
[ /ril_1 ]
Manufacturer = Fake Manufacturer
Revision = MOLY.WR8.
Lockdown = 0
Online = 1
Model = Fake Modem Model
Emergency = 0
Type = hardware
Features = rat sim
Interfaces = org.ofono.
Powered = 1
Serial = 354142060412485
[ org.ofono.
[ org.ofono.
Present = 0
[ org.ofono.
Has3G = 0
[ org.ofono.
Muted = 0
[ org.ofono.
[ org.ofono.
[ /ril_0 ]
Manufacturer = Fake Manufacturer
Revision = MOLY.WR8.
Lockdown = 0
Online = 1
Model = Fake Modem Model
Emergency = 0
Type = hardware
Features = rat sim
Interfaces = org.ofono.
Powered = 1
Serial = 354142060132489
[ org.ofono.
[ org.ofono.
Retries =
Present = 1
LockedPins = pin
PinRequired = puk
[ org.ofono.
Has3G = 1
[ org.ofono.
Muted = 0
[ org.ofono.
[ org.ofono.
@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/
<<
...
env OFONO_RIL_TRACE=""
env OFONO_RIL_
exec ofonod -d -P stktest,
>>
then do exactly the same steps as in comment #5, and attach syslog ?
| Michael Zanetti (mzanetti) wrote : | #8 |
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.
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.
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.
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.
Mar 27 16:00:35 ubuntu-phablet kernel: [ 31.676858]lipeng debug|[
Mar 27 16:00:35 ubuntu-phablet kernel: [ 38.157867]
Mar 27 16:00:35 ubuntu-phablet kernel: [ 38.157948]type=1400 audit(142746843
| Michael Zanetti (mzanetti) wrote : | #9 |
Sorry... this didn't work out well, here it is a bit nicer formatted: http://
@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_
https:/
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/
| 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) |
| Michael Zanetti (mzanetti) wrote : | #11 |
| Michael Zanetti (mzanetti) wrote : | #12 |
After installing the patched ofono binary, this is the output of list-modems:
phablet@
[ /ril_1 ]
Serial = 354142060412485
Interfaces = org.ofono.
Revision = MOLY.WR8.
Online = 1
Emergency = 0
Features = rat sim
Powered = 1
Lockdown = 0
Type = hardware
Model = Fake Modem Model
Manufacturer = Fake Manufacturer
[ org.ofono.
[ org.ofono.
Present = 0
[ org.ofono.
Has3G = 0
[ org.ofono.
Muted = 0
[ org.ofono.
[ org.ofono.
[ /ril_0 ]
Serial = 354142060132489
Interfaces = org.ofono.
Revision = MOLY.WR8.
Online = 1
Emergency = 0
Features = rat sim
Powered = 1
Lockdown = 0
Type = hardware
Model = Fake Modem Model
Manufacturer = Fake Manufacturer
[ org.ofono.
[ org.ofono.
Present = 1
LockedPins = pin
Retries = [pin = 0] [pin2 = 3] [puk = 0] [puk2 = 10]
PinRequired = puk
[ org.ofono.
Has3G = 1
[ org.ofono.
Muted = 0
[ org.ofono.
[ org.ofono.
| Tony Espy (awe) wrote : | #13 |
@Alfonso
Have you confirmed whether or not this works on arale?
@Tony
Yes, I checked in both krillin and arale.
| 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 |
| Changed in indicator-network (Ubuntu): | |
| status: | Incomplete → Fix Released |
| Changed in indicator-network (Ubuntu RTM): | |
| status: | Incomplete → Fix Released |


@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.