Detecting whether SIM card is inserted in SIM300

The idea was, if the customer removes the SIM card from GSM modem then the power supply should be disconnected. SIM300 GSM modem was used in the project to send and receive SMS. I am sharing the details of the command i found on SIM300 datasheet.

AT Command to detect SIM card in GSM modem :

SIM300 provides AT command to detect whether SIM card has been inserted or not. 

Command :

AT+CSMINS? 

Response :

+CSMINS: 0,1         – if SIM card is inserted or present

+CSMINS: 0,0         – if SIM card is removed or not present

 As soon as you issue the “AT+CSMINS? “command, The SIM300 modem will respond with ” +CSMINS: 0,1 ” if the SIM card has been inserted, or responds with ” +CSMINS: 0,0 ” if the SIM card has not been inserted. 

Decoding the response : 

As you see that the response from the SIM300 modem for SIM card presence command is the digit after the ‘,'(comma) character. So if you are using a microcontroller to talk to the GSM modem then your program must look for the ‘,’ character and the next character to it will be your answer. 

 

Also see :

 

Leave a Comment

Your email address will not be published. Required fields are marked *