G5/G6-Family AT Commands User Manual Page
8.1.3 +CPIN, Enter PIN for Unlocking SIM Card or Enter PUK for
Unblocking SIM Card
This command locks the SIM card, and therefore is only relevant for phones that use SIM cards. It unlocks
the SIM card when the proper SIM PIN is provided and unblocks the SIM card when the proper SIM PUK
is provided. The SIM card is unlocked only once the provided pin is verified as the SIM PIN. If the required
PIN (determined by the error code returned from the requested operation or the Read command) is SIM
PUK or SIM PUK2, the second pin is required. This second pin, <newpin>, is used to replace the old pin in
the SIM card. When entering the pin, a <new pin> is not required. A SIM card related error is returned if an
AT command operation is unsuccessful due to a SIM card problem.
The following table shows the SIM card errors.
SIM Card waiting for SIM PIN to be entered
SIM Card is permanently blocked
SIM Card is waiting for SIM PIN2 to be entered
AT+CPIN
=[<puk>
or
<pin>][,<n
ewpin>]
The Set command sends the password to the
Module that is necessary before it can be operated
(SIM PIN or SIM PUK). If there is no PIN request
pending, no action is taken towards the Module, and
an error message, +CME ERROR, is returned to the
terminal.
The Set command issued gives the code (SIM PIN
or SIM PUK) corresponding to the error code
required or returned as the result of the Read
command. For example, if the SIM PIN is blocked,
the error code 11 or "SIM PIN required" is returned.
The user must then issue the Set command with the
SIM PIN.
The Read command returns an alphanumeric string
indicating the status of the SIM card, and whether a
password is required or not. This is an independent