> 2.14.2 | Changing SIM PIN2

> 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.2.1 | Description

> This chapter describes the steps required to change the SIM PIN2 with AT+CPWD. The SIM PUK2 is needed after entering a wrong SIM PIN2 three times. When using AT^SPIC, please consider that its functionality is product dependent (see “General remark” in Section 2.14).

> 2.14.2.2 | Used AT commands

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

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

> 2.14.2.3 | Flow chart

> Figure 121: Changing SIM PIN2 and retrieving PIN counter with AT^SPIC exec command
> Figure 122: Changing SIM PIN2 and retrieving PIN counter with write command AT^SPIC

> 2.14.2.4 | Hints

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

> • | For unlocking a blocked SIM PIN2 see Section 2.5.6.

> 2.14.2.5 | Example

> Example 1:
> ***************************************
> Comment: Changing SIM PIN2 (password for “P2” lock)
> To request the PIN counter example 1 uses the AT^SPIC execute command supported by all products.
> ***************************************
> ***************************************
> Comment: Request status of PIN2
> ***************************************
> Subscr 3 Send: AT+CPIN2?
> Subscr 3 Receive: AT+CPIN2?
> Subscr 3 Receive: +CPIN2: SIM PIN2
> Subscr 3 Receive:
> Subscr 3 Receive: OK
> ***************************************
> Comment: Request PIN counter with AT^SPIC execute command
> ***************************************
> Subscr 3 Send: AT^SPIC
> Subscr 3 Receive: AT^SPIC
> Subscr 3 Receive: ^SPIC: 3
> Subscr 3 Receive:
> Subscr 3 Receive: OK
> ***************************************
> Comment: Changing SIM PIN2
> Comment: old password=4321, new password =1234
> ***************************************
> Subscr 3 Send: AT+CPWD="P2","4321","1234"
> Subscr 3 Receive: AT+CPWD="P2","4321","1234"
> Subscr 3 Receive: OK
> ***************************************
> Comment: Entering PIN2 (first attempt)
> ***************************************
> Subscr 3 Send: AT+CPWD="P2","1111","4231"
> Subscr 3 Receive: AT+CPWD="P2","1111","4231"
> Subscr 3 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request PIN counter
> ***************************************
> Subscr 3 Send: AT^SPIC
> Subscr 3 Receive: AT^SPIC
> Subscr 3 Receive: ^SPIC: 2
> Subscr 3 Receive:
> Subscr 3 Receive: OK
> ***************************************
> Comment: Entering PIN2 (second attempt)
> ***************************************
> Subscr 3 Send: AT+CPWD="P2","1111","4231"
> Subscr 3 Receive: AT+CPWD="P2","1111","4231"
> Subscr 3 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request PIN counter
> ***************************************
> Subscr 3 Send: AT^SPIC
> Subscr 3 Receive: AT^SPIC
> Subscr 3 Receive: ^SPIC: 1
> Subscr 3 Receive:
> Subscr 3 Receive: OK
> ***************************************
> Comment: Entering PIN2 (third attempt)
> ***************************************
> Subscr 3 Send: AT+CPWD="P2","1111","4231"
> Subscr 3 Receive: AT+CPWD="P2","1111","4231"
> Subscr 3 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request required PIN2
> ***************************************
> Subscr 3 Send: AT+CPIN2?
> Subscr 3 Receive: AT+CPIN2?
> Subscr 3 Receive: +CPIN2: SIM PUK2
> Subscr 3 Receive:
> Subscr 3 Receive: OK
> ***************************************
> Comment: Enter PUK2
> ***************************************
> Subscr 3 Send: AT+CPIN2=87654321,4321
> Subscr 3 Receive: AT+CPIN2=87654321,4321
> Subscr 3 Receive:
> Subscr 3 Receive: OK
> Example 2:
> ***************************************
> Comment: Changing password for P2 (password for “P2” 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 Password for P2.
> Comment: old password=1234, new password =0000.
> ***************************************
> Subscr 1 Send: AT+CPWD="P2","1234","0000"
> Subscr 1 Receive: AT+CPWD="P2","1234","0000"
> Subscr 1 Receive: OK
> ***************************************
> Comment: Which PIN is required (read command is not supported by all products).
> ***************************************
> Subscr 1 Send: AT^SPIC?
> Subscr 1 Receive: AT^SPIC?
> Subscr 1 Receive: ^SPIC: SIM PIN2
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request PIN counter for P2.
> ***************************************
> Subscr 1 Send: AT^SPIC="P2"
> Subscr 1 Receive: AT^SPIC="P2"
> Subscr 1 Receive: ^SPIC: 3
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong password for P2 (first attempt).
> ***************************************
> Subscr 1 Send: AT+CPWD="P2","11113","12334"
> Subscr 1 Receive: AT+CPWD="P2","11113","12334"
> Subscr 1 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request PIN counter for P2-
> ***************************************
> Subscr 1 Send: AT^SPIC="P2"
> Subscr 1 Receive: AT^SPIC="P2"
> Subscr 1 Receive: ^SPIC: 2
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong password for P2 (second attempt).
> ***************************************
> Subscr 1 Send: AT+CPWD="P2","3333","1255"
> Subscr 1 Receive: AT+CPWD="P2","3333","1255"
> Subscr 1 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request PIN counter for P2.
> ***************************************
> Subscr 1 Send: AT^SPIC="P2"
> Subscr 1 Receive: AT^SPIC="P2"
> Subscr 1 Receive: ^SPIC: 1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Entering wrong password for P2 (third attempt).
> ***************************************
> Subscr 1 Send: AT+CPWD="P2","4711","1331"
> Subscr 1 Receive: AT+CPWD="P2","4711","1331"
> Subscr 1 Receive: +CME ERROR: incorrect password
> ***************************************
> Comment: Request PIN counter for P2.
> ***************************************
> Subscr 1 Send: AT^SPIC="P2"
> Subscr 1 Receive: AT^SPIC="P2"
> Subscr 1 Receive: ^SPIC: 10
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Enter SIM PUK2 and set new P2.
> ***************************************
> Subscr 1 Send: AT+CPIN2=87654321,1234
> Subscr 1 Receive: AT+CPIN2=87654321,1234
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request PIN counter for P2.
> ***************************************
> Subscr 1 Send: AT^SPIC="P2"
> Subscr 1 Receive: AT^SPIC="P2"
> Subscr 1 Receive: ^SPIC: 1
> Subscr 1 Receive:
> Subscr 1 Receive: OK