Multi-Tech Systems GPRS (MTMMC-G) 사용자 설명서

다운로드
페이지 203
Chapter 9 – Short Messages Commands  
Multi-Tech Systems, Inc. Wireless GSM/GPRS AT Commands (Document Number S000293I) 
69 
 
List Message   +CMGL 
Description: 
This command allows the application to read stored messages, by indicating the type of the message to 
read. The messages are read from the memory selected by the 
+CPMS command. 
Values: 
<stat> possible values (status of messages in memory):  
Text mode 
possible values 
PDU mode
possible values
Status of messages in 
memory 
“REC UNREAD” 
received unread messages 
“REC READ” 
received read messages 
“STO UNSENT” 
stored unsent messages 
“STO SENT” 
stored sent messages 
“ALL” 4 
all 
messages 
Note: 
For SMS Status Reports, only “ALL” / 4 and “READ” / 1 values of the <stat> parameter 
will list messages; other values will only return OK. 
Syntax: 
Command syntax:  AT+CMGL=<stat> 
Response syntax for text mode: 
+CMGL: <index>,<stat>,<da/oa>[,<alpha>], [<scts>, <tooa/toda>, <length>] <CR><LF><data> (for 
SMS-DELIVER and SMS-SUBMIT.  May be followed by other <CR><LF>+CMGL:<index>…) 
+CMGL: <index>,<stat>,<fo>,<mr>,[<ra>],[<tora>],<scts>,<dt>,<st> (for 
SMS-STATUS-REPORT 
only. May be followed by other <CR><LF>+CMGL:<index>…) 
Response syntax for PDU mode: 
+CMGL: <index>,<stat>, [<alpha>], <length> <CR><LF> <pdu> (for 
SMS-DELIVERSMS-SUBMIT 
and 
SMS-STATUS-REPORT.  May be followed by other <CR><LF>+CMGL:<index>…) 
Command 
Possible responses
AT+CMGL=“REC UNREAD” 
Note: List unread messages in text 
mode 
+CMGL: 1,”REC UNREAD”,”0146290800”, 
<CR><LF> I will be late 
+CMGL: 3,”REC UNREAD”, “46290800”,  
<CR><LF>See you tonight! 
OK 
Note: 2 messages are unread, these messages will then 
have their status changed to “REC READ”  
AT+CMGL=”REC READ” 
Note: List read messages in text 
mode 
+CMGL: 2,”REC READ”,”0146290800”,<CR><LF>   
Keep cool 
OK 
AT+CMGL=”STO SENT” 
Note: List stored and sent messages 
in text mode 
OK 
Note: No message found 
AT+CMGL=1 
Note: List read messages in PDU 
mode 
+CMGL: 1,1,,26 
<CR><LF> 
07913366003000F3040B913366920547F400130011904125
30400741AA8E5A9C5201 
OK