> 2.14.1 | Changing SIM PIN

> This section comprises the subsections Description, Used AT Commands, Flow Chart, Hints and Example. To move to these subsections please use the Navigation Frame or the appropriate buttons on the toolbar.

> 2.14.1.1 | Description

> This chapter lists the steps required to change the SIM PIN and describes what happens, if a wrong PIN was entered too many times. The command AT+CPWD can be used to change the SIM PIN. The SIM PIN must be entered, if the lock command is issued before configuring the password. After entering a wrong SIM PIN three times in succession, the SIM PUK is required. When using AT^SPIC please consider that its functionality is product dependent (see “General remark” in Section 2.14).

> 2.14.1.2 | Used AT commands

> Command | Explanation
> AT^SPIC | Display PIN counter
> AT+CPIN | Enter PIN
> AT+CPWD | Change password

> For further details about the commands see [2].

> 2.14.1.3 | Flow chart

> Figure 119: Changing SIM PIN
> Figure 120: Changing SIM PIN and retrieving PIN counter with write command AT^SPIC

> 2.14.1.4 | Hints

> • | If the response to AT+CPWD=”SC”,xxxx,yyyy is “+CME ERROR: operation not allowed”, SIM PIN authentication must be done first.

> • | As an alternative to the AT+CPWD you can use the command AT^SPWD=”SC””,”old password”,”new password” or the command AT+CPIN=<password>,<new password>.

> • | For unlocking a blocked SIM PIN see Section 2.5.2.

> 2.14.1.5 | Example

> Example 1:
> ***************************************
> Comment: Changing SIM PIN
> To request the PIN counter example 1 uses the AT^SPIC execute command supported by all products.
> ***************************************
> ***************************************
> Comment: Request counter for SIM PIN (“SC” lock)
> ***************************************
> Subscr 1 Send: AT^SPIC="SC"
> Subscr 1 Receive: AT^SPIC="SC"
> Subscr 1 Receive: ^SPIC: 3
> Subscr 1 Receive:
> Subscr 1 Receive: OK(password for “SC” lock).
> ***************************************
> Comment: Changing SIM PIN
> Comment: old password=9999, new password =1111
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","9999","1111"
> Subscr 1 Receive: AT+CPWD="SC","9999","1111"
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request PIN counter with AT^SPIC execute command
> ***************************************
> Subscr 1 Send: AT^SPIC
> Subscr 1 Receive: AT^SPIC
> Subscr 1 Receive: ^SPIC: 3
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong SIM PIN (first attempt)
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","0001","1111"
> Subscr 1 Receive: AT+CPWD="SC","0001","1111"
> Subscr 1 Receive: +CME ERROR: incorrect password
> Subscr 1 Send: AT^SPIC
> Subscr 1 Receive: AT^SPIC
> Subscr 1 Receive: ^SPIC: 2
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong SIM PIN (second attempt)
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","0001","1111"
> Subscr 1 Receive: AT+CPWD="SC","0001","1111"
> Subscr 1 Receive: +CME ERROR: incorrect password
> Subscr 1 Send: AT^SPIC
> Subscr 1 Receive: AT^SPIC
> Subscr 1 Receive: ^SPIC: 1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong SIM PIN (third attempt)
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","0001","1111"
> Subscr 1 Receive: AT+CPWD="SC","0001","1111"
> Subscr 1 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request required PIN
> ***************************************
> Subscr 1 Send: AT+CPIN?
> Subscr 1 Receive: AT+CPIN?
> Subscr 1 Receive: +CPIN: SIM PUK
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering SIM PUK
> ***************************************
> Subscr 1 Send: AT+CPIN=12345678,9999
> Subscr 1 Receive: AT+CPIN=12345678,9999
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> Example 2:
> ***************************************
> Comment: Changing SIM PIN (password for “SC” lock)
> To request the PIN counter example 2 uses the read command AT^SPIC? and the write command AT^SPIC=<facility>. Keep in mind that both command types are not supported by all products.
> ***************************************
> ***************************************
> Comment: Changing SIM PIN
> Comment: old password=0000, new password =1234
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","0000","1234"
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong SIM PIN (first attempt)
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","1113","1233"
> Subscr 1 Receive: AT+CPWD="SC","1113","1233"
> Subscr 1 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request counter for SIM PIN (“SC” lock)
> ***************************************
> Subscr 1 Send: AT^SPIC="SC"
> Subscr 1 Receive: AT^SPIC="SC"
> Subscr 1 Receive: ^SPIC: 2
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong SIM PIN (second attempt)
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","3333","1255"
> Subscr 1 Receive: AT+CPWD="SC","3333","1255"
> Subscr 1 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request counter for SIM PIN (“SC” lock)
> ***************************************
> Subscr 1 Send: AT^SPIC="SC"
> Subscr 1 Receive: AT^SPIC="SC"
> Subscr 1 Receive: ^SPIC: 1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong SIM PIN (third attempt)
> ***************************************
> Subscr 1 Send: AT+CPWD="SC","4711","1331"
> Subscr 1 Receive: AT+CPWD="SC","4711","1331"
> Subscr 1 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request counter for SIM PIN (“SC” lock)
> ***************************************
> Subscr 1 Send: AT^SPIC="SC"
> Subscr 1 Receive: AT^SPIC="SC"
> Subscr 1 Receive: ^SPIC: 10
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Ask which PIN is required (via AT^SPIC read command)
> ***************************************
> Subscr 1 Send: AT^SPIC?
> Subscr 1 Receive: AT^SPIC?
> Subscr 1 Receive: ^SPIC: SIM PUK
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Enter SIM PUK and specify new SIM PIN (activates new “SC lock).
> ***************************************
> Subscr 1 Send: AT+CPIN=12345678,0000
> Subscr 1 Receive: AT+CPIN=12345678,0000
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request counter for SIM PIN (“SC” lock)
> ***************************************
> Subscr 1 Send: AT^SPIC="SC"
> Subscr 1 Receive: AT^SPIC="SC"
> Subscr 1 Receive: ^SPIC: 3
> Subscr 1 Receive:
> Subscr 1 Receive: OK