Professional Documents
Culture Documents
Note that the starting "AT" is the prefix that informs the modem about the start of a
command line. It is not part of the AT command name.
Here are some of the tasks that can be done using AT commands with a GSM/GPRS
modem or mobile phone:
Either of the AT commands +CMGS (command name in text: Send Message) and
+CMSS (command name in text: Send Message from Storage) can be used to send SMS
messages from a PC or Microcontroller.
The key difference between them is that the AT+CMGS command takes the SMS text
input in real time while the AT+CMSS command takes the index number that specifies
the location of the SMS message in the mobile phone memory and then send the selected
message. Let's say the SMS text message is now located at index 3 of the message
storage area. You can use the AT+CMSS command to send the text message to other
mobile phone by the following command line:
AT+CMSS=3
The +CMGR AT command is used to read an SMS message at a certain location of the
message storage area.
AT+CMGR=3
This command will read the message from the location number 3. The GSM/GPRS
modem or mobile phone should return something like this:
The +CPBR AT command is used to read phone book entry at a certain location of
phone book memory.
AT+CPBR=3
The +CPBW AT command is used to write phone book entry at a certain location of
phone book memory.
AT+CPBW
The +CPBF AT command is used to find the name or phone number stored in phone
book at any location of phone book memory.
AT+CPBF=3
USING THE +CMGD COMMAND TO DELETE SMS FROM MEMORY
STORAGE
The +CMGD AT command is used to delete SMS from any location of mobile phone
memory.
+CMGD=index[,flag]
In the above line, index is an integer specifying the location of the SMS message to be
deleted from the message storage area by the +CMGD AT command, and flag is an
integer specifying whether to delete SMS messages according to their message status.
The SMS specification has defined these flag values: 0, 1, 2, 3 and 4.
• 0. Meaning: Delete only the SMS message stored at the location index from the
message storage area. This is the default value.
• 1. Meaning: Ignore the value of index and delete all SMS messages whose status
is "received read" from the message storage area.
• 2. Meaning: Ignore the value of index and delete all SMS messages whose status
is "received read" or "stored sent" from the message storage area.
• 3. Meaning: Ignore the value of index and delete all SMS messages whose status
is "received read", "stored unsent" or "stored sent" from the message storage area.
• 4. Meaning: Ignore the value of index and delete all SMS messages from the
message storage area.
http://www.developershome.com/