Powered by Blogger.

Tuesday 25 March 2014

AT+CMGL="ALL" - AT Command to List SMS Messages from Preferred Store

by realfinetime  |  in SIM900-TTL GSM MODEM at  06:47

Sometimes we have to list SMS messages from a preferred store using AT commands. Here is the demonstration to list messages from preferred store by AT commands using SIM900-TTL GSM Modem and Arduino. AT+CMGL is the command used to list messages from preferred store.  Modem, I used is given here.
Step 1: Connections are done as shown in figure given below.  

Step 2: Connect Arduino board to your computer.
Step 3: Open Arduino IDE.
Step 4: Now upload the below given program to Arduino board.

Some Important Facts :
1. For successfull uploading, wires connected to the RX and TX pins of Arduino board must be             disconnected before uploading the code.     
2. Don't forget to put a SIM having sufficient balance in the SIM900-TTL MODEM.
3. External power supply should be capable of handling 1A output current.

void setup() 

  Serial.write("AT+CMGF=1\r");           //set GSM to text mode

  Serial.write("AT+CPMS=\"SM\"\r");         //Preferred SMS Message Storage
  Serial.write("AT+CMGL=\"ALL\"\r");       //List SMS Messages from Preferred Storage

void loop() 

Step 4:
Open your Serial Monitor. Change the baud rate to 2400.

Step 5: Press the Reset button on Arduino board.  Now all the messages in the SIM Memory will be              displayed in the Serial Monitor.

1 comment:

  1. mySerial.println("AT+CMGL=\"ALL\"\r");

    Above code gives output:

    +CMGL: 1,"REC READ","+12xxxxxxxxxx","","17/05/23,15:10:25+22"

    the message content is not displayed



All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips

Proudly Powered by Blogger.