Chapter 7 – Security Commands
Multi-Tech Systems, Inc. Wireless GSM/GPRS AT Commands (Document Number S000293I) 42
Enter PIN2 +CPIN2
Description: This command validates the PIN2 code (CHV2) or the PUK2 code (UNBLOCK CHV2) and defines a
new PIN2 code.
Of course, the +CPIN command allows PIN2 or PUK2 codes to be validated, but only when the last
command executed resulted in PIN2 authentication failure.
PIN2 length is between 4 and 8 digits; PUK2 length is 8 digits only.
Values: <pin2> is the personal identification number 2
<puk2> is the personal unblocking key 2 needed to change the PIN 2
<newpin2>
Note: PIN2 length is between 4 and 8 digits; PUK2 length is 8 digits only.
Syntax: AT+CPIN2=<pin2>
Command Possible responses
AT+CPIN2=1234
Note: Enter PIN2 OK
Note: PIN2 code is correct
AT+CPIN2=5678
Note: Enter PIN2 +CME ERROR: 3
Note: Operation not allowed, PIN2 previously entered
After 3 unsuccessful attempts, PUK2 will be required. PUK2 validation forces the user to enter a new PIN2
code as a second parameter and this will be the new PIN2 code if PUK1 validation succeeds. The
application uses this command:
AT+CPIN2=<puk2>,<NewPin2>
Command Possible responses
AT+CPIN2=00000000,1234
Note: Enter PUK2 and new PIN2 +CME ERROR: 16
Note: Incorrect Password (PUK2)
AT+CPIN2=12345678,1234
Note: Enter PUK2 and new PIN2, 2nd attempt OK
Note: PUK2 correct, new PIN2 stored
To determine which code must be entered (or not), the following query command can be used:
AT+CPIN2?
The possible responses are:
+CPIN2: READY No PIN2 is needed
+CPIN2: SIM PIN2 PIN2 is required
+CPIN2: SIM PUK2 PUK2 is required
+CME ERROR: <err> Absent (10) etc…
PIN Remaining Attempt Number +CPINC
Description: This command gets the number of valid attempts for PIN1 (CHV1), PIN2 (CHV2), PUK1 (UNBLOCK
CHV1) and PUK2 (UNBLOCK CHV2) identifiers.
Values <n1>, <n2> are the attempts left for PIN1, PIN2 (0 = blocked, 3 max)
<k1>, <k2> are the attempts left for PUK1, PUK2 (0 = blocked, 10 max)
For this to work, the card should be present at the time of initialization; otherwise, an error will be sent
(+CME ERROR: 10).
Syntax: Command Syntax: AT+CPINC
Response syntax: +CPINC: <n1>,<n2>,<k1>,<k2>
Command Possible respo nses
AT+CPINC
Note: Get the number of attempts left +CPINC: 2,3,10,10
OK
Note: First CHV1 attempt was a failure
AT+CPINC?
Note: Get current values +CPINC: 2,3,10,10
OK
Note: First attempt was a failure
AT+CPINC=?
Note: Get possible values OK