Read SMS Using AT Commands (AT+CMGR, AT+CMGL)
The +CMGL AT command can be used to read all SMS messages stored in the message storage area. To list all SMS in message storage, the command line should be:List All SMS from SIM to Hyper Terminal |
Here are the message details that can be retrieved by the +CMGL AT command in SMS text mode from Hyper Terminal:-
+CMGL: <index>,<stat>,<oa/da>,[<alpha>],[<scts>][,<tooa/toda>,<length>]<CR><LF><data>[<CR><LF>
- The index specifying the location of the SMS message in the message storage area.
- Status of the SMS message ("received unread", "received read", "stored unsent", "stored sent", etc).
- Originator/recipient phone number stored in the SMS message header and the type of the phone number.
- Text associated to the originator/recipient phone number in the phonebook.
- Time and date at which the SMS message arrived at the SMSC (available to incoming SMS messages only).
- Body of the SMS message and its length.