Westermo GS-01 User Manual

Page 41

Advertising
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=<index>

Response syntax for text mode:

+CMGR:<stat>,<oa>,[<alpha>,] <scts> [,<tooa>,<fo>,
<pid>,<dcs>,<sca>,<tosca>,<length>] <CR><LF> <data>
(for SMS-DELIVER only)

+CMGR:<stat>,<da>,[<alpha>,] [,<toda>,<fo>,<pid>,<dcs>, [<vp>],
<sca>, <tosca>,<length>]<CR><LF> <data>
(for SMS-SUBMIT only)

Response syntax for PDU mode:

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

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” , <CR><LF>
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”, <CR><LF>
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,,<length> <CR><LF>

Message is stored but

<pdu>

unsent,

OK

No <alpha> field

Advertising