beautypg.com

Westermo GS-01 User Manual

Page 16

background image

16

6195-2201

To know which code has to be entered (or not), the following interrogation command can
be used:

AT+CPIN?

The possible responses are:

+CPIN: READY

ME is not pending for any password

+CPIN: SIM PIN

CHV1 is required

+CPIN: SIM PUK

PUK1 is required

+CPIN: SIM PIN2

CHV2 is required

+CPIN: SIM PUK2

PUK2 is required

+CPIN: PH-SIM PIN

SIM lock (phone-to-SIM) is required

+CPIN: PH-NET PIN

Network personnalisation is required

+CME ERROR:

SIM failure (13) absent (10) etc...

Please note that in this case the mobile does not finish its response with the OK string.
The response +CME ERROR: 13 (SIM failure) is returned after 10 unsuccessful PUK
presentations. The SIM card is then out of order and shall be replaced by a new one.

Example: 3 failed PIN validations + 1 successful PUK validation

AT+CPIN?

Read the PIN status

+CPIN: SIM PIN

The GSM module requires SIM PIN

AT+CPIN=1235

First attempt to enter a SIM PIN

+CME ERROR: 16

Bad PIN

AT+CPIN=1236

Second attempt

+CME ERROR: 16

Bad PIN

AT+CPIN=1237

Third attempt

+CME ERROR: 16

Bad PIN

AT+CPIN?

Read PIN state

+CPIN: SIM PUK

The GSM module requires PUK

AT+CPIN=99999999,5678

The PUK is entered, the new PIN shall be

OK

5678 PUK validation is OK. New Pin is 5678

AT+CPIN?

Read PIN state

+CPIN: READY

GSM module is ready

If the user try to do something which requires PIN2 (CHV2) the GSM module will refuse
his action with a ”+CME ERROR: 17” (SIM PIN2 required).
Then the GSM module is waiting SIM PIN2 to be given.