Are You Currently Working On An IoT/M2M Project?
Request a free 1-month trial !!! SIM card provided with access to 2G/3G Data, SMS and USSD.Platform for real-time monitoring.Global cellular network across 190 countries, 440 networks.
First Name*       Country*    
Last Name*        Company*  
Email*               Phone*        
                      (Please enter business email address)     Purpose*    
SIM – AT commands for SIM presense and status

With Online AT Command Tester tool, you can get SIM status of the device.

SIM status and presense

First enable the extended error codes to get a verbose format,
AT+CMEE=2
OK

Now get the status of SIM presense,
AT+cpin?
+CME ERROR: SIM not inserted

Above AT command response indicates that SIM card is not present. Verify that SIM is inserted properly and check again,

AT+cpin?
+CPIN: READY
OK

When the SIM card is ready, above AT response will be received from the module.

Try this script included in AT Command Tester Tool.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Script-at_cpin.at

//Test AT+CPIN AT command

//AT+CPIN command is used to enter SIM PIN Code

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

//List of supported responses

AT+CPIN=?

 

//Wait for 1 second

WAIT=3

 

//Check whether PIN code for SIM is required

AT+CPIN?

 

//Wait for 1 second

WAIT=3

 

//Set a PIN code

AT+CPIN=”1234″

 

//Wait for 2 seconds

WAIT=2

 

//Now check SIM PIN status

AT+CPIN?

 

//Remove SIM lock

AT+CLCK=”SC”,0,”1234″

 

//Now check SIM PIN status

AT+CPIN?

 

 

Response to above output script in AT Command Tester Tool.

AT+CPIN=?

OK

AT+CPIN?

+CPIN: READY

 

OK

SIM is ready.

 

AT+CPIN=”1234″

ERROR

AT+CPIN?

+CPIN: READY

 

OK

SIM is ready.

 

AT+CLCK=”SC”,0,”1234″

ERROR

AT+CPIN?

+CPIN: READY

 

OK

SIM is ready.

 

 

 

Keywords: Module SIM, M2M SIM, GPRS SIM, 3G SIM, SIM through AT commands,