User Manual

Table Of Contents
SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R11
9Short Messages Service
Page 82 of 308
9.15Delete message +CMGD
+CMGD
SARA-R404M SARA-R410M-01B SARA-R410M-02B SARA-R410M-52B SARA-R412MModules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial Yes No No < 55 s +CMS Error
9.15.1Description
Deletes the message from the preferred message storage <mem1>, if <flag>= 0 or not present, in location
<index>. Otherwise the messages are deleted following the rules specified by <flag>.
When deleting a message from an empty location, the module returns the "OK" final result code.
If the <index> value is out of range (it depends on AT+CPMS command setting), then the "+CMS ERROR:
invalid memory index" error result code is returned.
9.15.2Syntax
Type Syntax Response Example
Set AT+CMGD=<index>[,<flag>] OK AT+CMGD=3
OK
Test AT+CMGD=? +CMGD: (list of supported
<index>s),(list of supported <flag>s)
OK
+CMGD: (1-350),(0-4)
OK
9.15.3Defined values
Parameter Type Description
<index> Number Storage position
<flag> Number Deletion flag. If present, and different from 0, the <index> parameter is ignored:
0 (default value): delete the message specified in <index>
1: delete all the read messages from the preferred message storage, leaving unread
messages and stored mobile originated messages (whether sent or not) untouched
2: delete all the read messages from the preferred message storage and
sent mobile originated messages, leaving unread messages and unsent mobile
originated messages untouched
3: delete all the read messages from the preferred message storage, sent and
unsent mobile originated messages leaving unread messages untouched
4: delete all the messages from the preferred message storage including unread
messages
9.16Service center address +CSCA
+CSCA
SARA-R404M SARA-R410M-01B SARA-R410M-02B SARA-R410M-52B SARA-R412MModules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full Yes No No < 10 s +CMS Error
9.16.1Description
Updates the SMSC address, through which mobile originated SMSes are transmitted. In text mode the setting
is used by send and write commands. In PDU mode the setting is used by the same commands, but only when
the length of SMSC address coded into <pdu> parameter equals zero.
SARA-R4 / SARA-N4
This command sets the service center value both in the RAM (this value is actually the SMSC address
used) and in the SIM card. Through the read command the value of current service center stored in the