7 reading an sms, At+cmgr=<index><cr – Rainbow Electronics GM862-QUAD-PY User Manual

Page 72

Advertising
background image





GM862-QUAD / PY Software User Guide

1vv0300747 Rev. 3 - 10/07/07

Reproduction forbidden w ithout Telit Communications S.p.A. w ritten authorization - All Rights Reserved

page 72 of 96

wait for response:

Response

Reason

Action

OK

Message has been successfully
deleted.

proceed ahead

ERROR

some error occurred

Enable the extended error
codes report (see par.2.5.2.1)
and retry.

+CMS ERROR: 321

Invalid memory index
e.g. the given record was
already empty

Check the <index> number and
retry.

For example:
1- Let's assume you want to delete a previously written SMS that was written to the storage index
position number 3. We suppose you already have set up the device for text SMS mode as described
on the previous paragraphs:

command:
AT+CMGD=3
response:
OK

In this case, the SMS was successfully deleted.

2- Let's assume you want to delete a received SMS that was stored to the index position number 7:

command:
AT+CMGD=7
response:
OK

3.5.7 Reading an SMS

A new SMS can be read with the command:

send command

AT+CMGR=<index><cr>

where:

<index>: SMS location index

wait for response in the format:

Output format for received messages (the information written in italics will be present depending on
+CSDH last setting):
+CMGR: <stat>,<oa>,<alpha>,<scts>[,<tooa>,<fo>,<pid>,
<dcs>,<sca>,<tosca>,<length>]
<CR><LF><data>

Output format for sent messages:

Advertising