Security commands – Westermo GS-01 User Manual

Page 15

Advertising
background image

15

6195-2201

Application to GSM

AT+CREG=<mode>

Disable/enable network
registration
Unsolicited result code

GSM to application

OK

Command valid

Application to GSM

AT+CREG=?

GSM to application

+CREG: (0–2)

0,1,2 <mode> values
are supported

Security commands

+CPIN – Enter PIN

This command is used to enter ME passwords (CHV1 / CHV2 / PUK1 /PUK2…) which
are needed before any other functionality of the ME can be used. The CHV1/CHV2
length is between 4 and 8 digits, the PUK1/PUK2 length is 8 digits only.

If the user application try to establish an outgoing call before having validated the
SIM PIN code (CHV1), then the GSM module will refuse the ”ATD” command with a
”+CME ERROR: 11” (SIM PIN required).

It’s up to the application to validate the PIN after each reset or power on if the PIN was
enabled.
The application shall therefore use the command:

AT+CPIN=<pin>

Application to GSM

AT+CPIN=1234

Enter PIN

GSM to application

OK

PIN code is correct

Application to GSM

AT+CPIN=5678

enter PIN

GSM to application

+CME ERROR: 3

Operation not allowed,
PIN previously entered

After 3 unsuccessful codes, the PUK will then be required. The PUK validation forces
the user to enter as a second parameter a new PIN code which will be the new PIN code
if the PUK validation succeeds. The CHV1 is then enabled if the PUK1 is correct.
The application shall therefore use the command:

AT+CPIN=<Puk>,<NewPin>

Application to GSM

AT+CPIN=00000000,1234

Enter PUK and new PIN

GSM to application

+CME ERROR: 16

Incorrect PUK

Application to GSM

AT+CPIN=12345678,1234

Enter PUK and new PIN,
2nd attempt

GSM to application

OK

PUK correct, new PIN
stored

Advertising