Read Message +Cmgr - Multitech MMCModem GPRS (MTMMC-G) Reference Manual

Wireless gsm/gprs modems at commands reference guide
Table of Contents

Advertisement

Read Message +CMGR

Description:
This command allows the application to read stored messages. The messages are read from the
memory selected by the +CPMS command.
Syntax:
Command syntax:
Response syntax for text mode:
Response syntax for PDU mode:
Notes:
A message read with status "REC UNREAD" will be updated in memory with the status "REC READ".
The <stat> parameter for the SMS Status Reports is always "READ".
Syntax:
Command Syntax: AT+CMGR=<index>
Command
AT+CMGR=1
Note: Read the message
AT+CMGR=1
Note: Read the message again
AT+CMGR=2
AT+CMGF=0 ;+CMGR=1
Note: In PDU mode
AT+CMGF=1;+CPMS="SR";+CNMI=,,,2
Reset to text mode, set read memory to
"SR", and allow storage of further SMS
Status Report into "SR" memory
AT+CMSS=3
Send an SMS previously stored
AT+CMGR=1
Read the SMS Status Report
Multi-Tech Systems, Inc. Wireless GSM/GPRS AT Commands (Document Number S000293I)
AT+CMGR=<index>
For SMS-DELIVER only
+CMGR: <stat>,<oa>,[<alpha>,] <scts> [,<tooa>,<fo>,<pid>,<dcs>,<sca>,<tosca>,<length>]
<CR><LF> <data>
For SMS-SUBMIT only
+CMGR: <stat>,<da>,[<alpha>,] [,<toda>,<fo>,<pid>,<dcs>, [<vp>], <sca>,
<tosca>,<length>]<CR><LF> <data>
For SMS-STATUS-REPORT only)
+CMGR: <stat>,<fo>,<mr>,[<ra>],[<tora>],<scts>,<dt>,<st>
+CMGR: <stat>, [<alpha>] ,<length> <CR><LF> <pdu>
Chapter 9 – Short Messages Commands
Possible responses
AT+CMTI: "SM",1
Note: New message received
+CMGR: "REC UNREAD","0146290800",
"98/10/01,18:22:11+00",<CR><LF>
ABCdefGHI
OK
+CMGR: "REC UNREAD","0146290800",
"98/10/01,18:22:11+00",<CR><LF>
ABCdefGHI
OK
Note: Message is read now
OK
Note: Location empty
+CMGR: 2,,<length> <CR><LF><pdu>
OK
Note: Message is stored but unsent, no <alpha>field
OK
+CMSS: 160
OK
+CDSI: "SR",1
New SMS Status Report stored in "SR" memory at
index 1
+CMGR: "REC UNREAD",6,160, "+33612345678",129,
"01/05/31,15:15:09+00",
"01/05/31,15:15:09+00",0
OK
68

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents