© Microhard Systems Inc.
149
5.0 AT Command Line Interface
AT+CMGR
Command Syntax
This command allows the application to read stored
messages. The messages are read from the SIM card
memory.
AT+CMGR=<index>
Description
Example
Input:
AT+CMGR=<index><enter>
Response:
+CMGR: <stat>,<oa>,,<dt>
<data>
OK
Parameters:
<index> Index in SIM card storage of the message
<stat> Status of Message in Memory (Text Mode)
“REC UNREAD” Received unread messages
“REC READ” Received read messages
<oa> Originator Address
String type
<dt> Discharge Time
String format: "yy/MM/dd,hh:mm:ss±zz" (year [00-99]/ month [01-12]/Day [01-31],
Hour:Min:Second and TimeZone [quarters of an hour])
<data> SMS User Data in Text Mode
String type
AT+CMGL
Command Syntax
This command allows the application to read stored
messages by indicating the type of the message to
read. The messages are read from the SIM card
memory.
AT+CMGL=<status>
Status:
0 - Lists all unread messages
1 - Lists all read messages
4 - Lists all messages
Description
Example
Input:
AT+CMGL=1 <enter>
Response:
AT+CMGL=1
+CMGL: 0,"REC READ","+14035553776",,"2013/10/04,11:12:27-06"
Test Message 1
+CMGL: 1,"REC READ","+14035553776",,"2013/10/04,11:12:53-06"
Test Message 2
+CMGL: 2,"REC READ","+14035553776",,"2013/10/04,11:13:06-06"
Another test message!
OK