Read message +cmgr – Multi-Tech Systems MMCModem GPRS (MTMMC-G) User Manual

Page 68

Advertising
background image

Chapter 9 – Short Messages Commands

Multi-Tech Systems, Inc. Wireless GSM/GPRS AT Commands (Document Number S000293I)

68

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: AT+CMGR=<index>

Response syntax for text mode:

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>

Response syntax for PDU mode:

+CMGR: <stat>, [<alpha>] ,<length> <CR><LF> <pdu>

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

Possible responses


AT+CMTI: “SM”,1
Note: New message received

AT+CMGR=1
Note: Read the message

+CMGR: “REC UNREAD”,”0146290800”,
”98/10/01,18:22:11+00”,<CR><LF>
ABCdefGHI
OK

AT+CMGR=1
Note: Read the message again

+CMGR: “REC UNREAD”,”0146290800”,
”98/10/01,18:22:11+00”,<CR><LF>
ABCdefGHI
OK
Note: Message is read now

AT+CMGR=2

OK
Note: Location empty

AT+CMGF=0 ;+CMGR=1

Note: In PDU mode

+CMGR: 2,,<length> <CR><LF><pdu>
OK
Note: Message is stored but unsent, no <alpha>field

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

OK

AT+CMSS=3
Send an SMS previously stored

+CMSS: 160
OK

+CDSI:

“SR”,1

New SMS Status Report stored in “SR” memory at
index 1

AT+CMGR=1
Read the SMS Status Report

+CMGR: "REC UNREAD",6,160, "+33612345678",129,
"01/05/31,15:15:09+00",
"01/05/31,15:15:09+00",0
OK

Advertising
This manual is related to the following products: