Blogroll

Powered by Blogger.

Wednesday, 26 March 2014

AT+CPMS - AT Command for Preferred SMS Message Storage

by realfinetime  |  in SIM900-TTL GSM MODEM at  20:11

AT+CPMS is the AT command used to get the number of messages stored and the maximum capacity of preferred memory. Here is the demonstration of AT command using Arduino. GSM Modem I used is given in this page

Step 1: Complete the circuit as shown in the 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.begin(2400);
  Serial.write("AT+CMGF=1\r");           //set GSM to text mode
  delay(1500);

  Serial.write("AT+CPMS=\"SM\"\r");     //Preferred SMS Message Storage
  delay(1000);
  while(1)
  {
    if(Serial.available())
    {
      Serial.write(Serial.read());  
    }   
  }   
}

void loop() 
{

}

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

Step 5: Press the Reset button on Arduino board. Now total number of messages and the maximum capacity of the memory will be displayed in the Serial Monitor (Encircled in black).

0 comments:

IMPORTANT NOTICE

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.