beautypg.com

Westermo GS-01 User Manual

Page 41

background image

41

6195-2201

GSM to application

+CMGS: 7

Successful

OK

transmission

GSM to application

+CDS: 2, 116, ”+33146290800”,

Message was

145,

delivered correctly

”98/10/01,12:30:07+04”,
”98/10/01 12:30:08+04”, 0

+CMGR – Read message

This command allows the application to read stored messages.

Command syntax:

AT+CMGR=

Response syntax for text mode:

+CMGR:,,[,] [,,,
,,,,]
(for SMS-DELIVER only)

+CMGR:,,[,] [,,,,, [],
, ,]
(for SMS-SUBMIT only)

Response syntax for PDU mode:

+CMGR: , [] ,

A message read with status ”REC UNREAD” will be updated in memory with the status
”REC READ” because it has been read.

Example:

GSM to application

+CMTI: ”SM”,1

New message received

Application to GSM

AT+CMGR=1

Read the message

GSM to application

+CMGR: ”REC UNREAD”,
”0146290800”,”98/10/01,18:22:11+0
0” ,
ABCdefGHI
OK

Application to GSM

AT+CMGR=1

Read the message

again

GSM to application

+CMGR: ”REC READ”,

Message is read now

”0146290800”,”98/10/01,18:22:11+0
0”,
ABCdefGHI
OK

Application to GSM

AT+CMGR=2

Read a bad index

GSM to application

+CMS ERROR: 321

Error: invalid index

Application to GSM

AT+CMGF=0 ;+CMGR=1

in PDU mode

GSM to application

+CMGR: 2,,

Message is stored but

unsent,

OK

No field