While doing a project on GSM based energy meter billing system, Students came up with a requirement that the system should be able to detect if the SIM card has been inserted in GSM modem or not.

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 :

 




About the Author

is the author of this blog and is an Embedded systems design engineer by profession & Founder @ Valetron Systems Pvt Ltd


Email:This email address is being protected from spambots. You need JavaScript enabled to view it.

Find us on Google+

HIRE ME FOR YOUR PROJECT AS A FREELANCER

 

EasyEDA: Free Circuit Design Software

  • Easy Schematic Capture
  • Powerful Circuit Simulation
  • Online PCB design

Design Your Circuit and PCB here:

https://easyeda.com/editor

PCB Prototype Manufacturer - JLCPCB

Electronic Components Online Store