3

Does anyone know an AT command that will allow me to query how many retries of entering PIN on a SIM card before it locks me out?

I've tried AT+CPIN? but that does not give me how many times I can enter the PIN before I need a PUK. How do normal phones do it?

Thanks in advance.

jeb
  • 78,592
  • 17
  • 171
  • 225
Clement
  • 73
  • 1
  • 6

3 Answers3

5

The latest 3GPP spec lists the command you want as +CPINR

barry
  • 4,037
  • 6
  • 41
  • 68
2

It's not part of the ETSI spec so it depends on the equipment your using.

It's most often called the "Pin Counter" and can be read via AT^SPIC however your best bet is looking for "Pin Counter" in the devices AT command documentation.

Alex K.
  • 171,639
  • 30
  • 264
  • 288
  • 1
    On telit platforms there is a command called AT#PCT which tells the remaining attempts. – INS Jan 30 '12 at 22:22
2

You could use a generic approach for >=3G, this should work independent of the modem manufacturer, as it directly communicates with the sim card (UICC).
It reads the PIN retry counter from the UICC

AT+CSIM=10,"0020000100"

The AT+CSIM command sends a (raw) command to the sim card.
The sim card responds a bit cryptic with one of:

  • +CSIM: 4,"63CX" X is the hex-value of the remaining retries for pin1 (range 0-A=0-10 retries remaining)
  • +CSIM: 4,"6A88" pin1 is not initialized/available
  • +CSIM: 4,"6983" pin1 is blocked.
jeb
  • 78,592
  • 17
  • 171
  • 225