This article describes the AT commands for reading, sending and deleting SMS from the SIM300 GSM modem inbox. Before you send any SMS or CALL command to the SIM300 modem via the UART interface after power up, wait for the CALL READY message from the SIM300.

The CALL READY message from the SIM300 indicates that the modem is powered up and has acquired a valid network. Next thing is to make sure you have set the SIM300 into TEXT mode by sending the command AT+CMGF=1; followed by a carriage return(\r\n).

If you are facing any problem with respect to modem not responding to commands read my previous article to solve it.. 

Reading a SMS message from the Inbox:

  • To read the first SMS from the inbox send the command AT+CMGL=1; followed by \r\n. The modem will reply with the text of the first SMS in the inbox along with senders mobile number and date and time.
  • To read the second SMS from the inbox send the command AT+CMGL=2; followed by \r\n. The modem will reply with the text of the second SMS in the inbox along with senders mobile number and date and time.

... and so on. The maximum number of SMS messages in the inbox depends on the SIMCARD you have put in the modem.

  • To read all the SMS messages from the inbox send the command AT+CMGL=ALL; followed by \r\n.  The modem will reply with the text, senders number, timestamp of the all the messages in the inbox in one shot. 

Sending SMS message from SIM300:

  • To send SMS from SIM300 send the command AT+CMGS=9900243245; followed by /r/n and then the message text and then the ascii code of Ctrl^Z character which is 0x1A;

ex: To send "Hello" to 9900243245 mobile number

AT+CMGS=9900243245; followed by \r\n 

Hello

Ctrl^Z ascii code 0x1A followed by \r\n (Ascii code for \n is 0x0A and Ascii code for \r is 0x0D)


Deleting a SMS message from the Inbox:

  • To delete the first message from the inbox send the command AT+CMGD=1; followed by \r\n. The modem will delete the first message in the inbox.
  • To delete the second message from the inbox send the command AT+CMGD=2; followed by \r\n. The modem will delete the second message in the inbox.

... and so on. The maximum number of messages in the inbox depends on the SIMCARD you have put in the modem.


Calling to a number using SIM300:

  • To call to a number send the command ATD followed by the mobile number and carriage return ,

To call the mobile number 9900243245 send the command as,

ATD9900243245; \r\n


Hanging up a call in SIM300:

  • To hang up a ringing call or a call in progress send the command ATH; followed by carriage return

ATH;\r\n


Recieving a call in SIM300:

  • To receive a ringing call, Send the command ATA; followed by carriage return

ATA;\r\n

 


Finding the number of the incoming call in SIM300:

  • To get the number of the incoming call you need to enable the Caller Line Identification in SIM300.
  • To enable the incoming caller line identification issue the command AT+CLIP=1 followed by carriage return

AT+CLIP=1\r\n  

Once you issue this command, any incoming call will be notified in the following format,

RING

+CLIP:+9916258273

Here +9916259273 is the number of the incoming call. 

 

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

Cheap PCB Manufacturing