User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
8Device lock
Page 72 of 401
8Device lock
8.1Enter PIN +CPIN
+CPIN
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No < 10 s +CME Error
8.1.1Description
Enter PIN. If no PIN request is pending, the corresponding error code is returned. If a wrong PIN is given three
times, the PUK must be inserted in place of the PIN, followed by the <newpin> which replaces the old pin in
the SIM.
8.1.2Syntax
Type Syntax Response Example
Set AT+CPIN=<pin>[,<newpin>] OK AT+CPIN="0933"
OK
Read AT+CPIN? +CPIN: <code>
OK
+CPIN: SIM PIN
OK
Test AT+CPIN=? OK
8.1.3Defined values
Parameter Type Description
<pin>, <newpin> String 4-to-8 characters long string of decimal digits.
If only PIN is required, <newpin> is not to be entered.
If PUK is required, <pin> must be the PUK and <newpin>, the new PIN code, must be
entered as well.
<code> String
READY: MT is not pending for any password
SIM PIN: MT is waiting SIM PIN to be given
SIM PUK: MT is waiting SIM PUK to be given
SIM PIN2: MT is waiting SIM PIN2 to be given
SIM PUK2: MT is waiting SIM PUK2 to be given
PH-NET PIN: MT is waiting network personalization password to be given
PH-NETSUB PIN: MT is waiting network subset personalization password to be
given
PH-SP PIN: MT is waiting service provider personalization password to be given
PH-CORP PIN: MT is waiting corporate personalization password to be given
PH-SIM PIN: MT is waiting phone to SIM/UICC card password to be given
8.1.4Notes
The command needs the SIM module to work correctly
If PIN is not inserted the following situation can occur:
Command Response
AT+CMEE=2 OK
AT+COPS=0 +CME ERROR: SIM PIN required
AT+CMEE=0 OK
AT+COPS=0 ERROR
To change the PIN the user must use the AT+CPWD="SC",<old_pin>,<new_pin> command (see +CPWD
AT command for details). Example:
AT+CPWD="SC","1234","4321"