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

Page 76

Advertising
background image





GM862-GPS Software User Guide

1vv0300729 Rev. 5 - 05/07/07

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

page 76 of 120

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:
+CMGR: <stat>,<da>,<alpha>[,<toda>,<fo>,<pid>,<dcs>,,
<sca>,<tosca>,<length>]
<CR><LF><data>

Output format for message delivery confirm:
+CMGR: <stat>,<fo>,<mr>,,,<scts>,<dt>,<st>

where:
<stat> - status of the message
"REC UNREAD" - new received message unread
"REC READ" - received message read
"STO UNSENT" - message stored not yet sent
"STO SENT" - message stored already sent
<fo> - first octet of the message PDU
<mr> - message reference number
<scts> - arrival time of the message to the SC
<dt> - sending time of the message
<st> - message status as coded in the PDU
<pid> - Protocol Identifier
<dcs> - Data Coding Scheme
<oa> - Originator address, string type represented in the currently selected character set (see

+CSCS)

<da> - Destination address, string type represented in the currently selected character set (see

+CSCS)

<alpha> - string type alphanumeric representation of <da> or <oa>, corresponding to an entry found

in the phonebook; used character set is the one selected with command +CSCS. NB: this
optional field is currently not supported.

<sca> - Service Centre number
<tooa>,<toda >,<tosca> - type of number <oa>,<da>,<sca>
129 - number in national format

Advertising