beautypg.com

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

Page 68

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=

Response syntax for text mode:

For

SMS-DELIVER only

+CMGR: ,,[,] [,,,,,,,]

For

SMS-SUBMIT only

+CMGR: ,,[,] [,,,,, [], ,
,]

For

SMS-STATUS-REPORT only)

+CMGR: ,,,[],[],,

,

Response syntax for PDU mode:

+CMGR: , [] ,

Notes:

A message read with status “REC UNREAD” will be updated in memory with the status “REC READ”.

The parameter for the SMS Status Reports is always “READ”.

Syntax: Command

Syntax: AT+CMGR=

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”,
ABCdefGHI
OK

AT+CMGR=1
Note: Read the message again

+CMGR: “REC UNREAD”,”0146290800”,
”98/10/01,18:22:11+00”,
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,,
OK
Note: Message is stored but unsent, no 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

This manual is related to the following products: