Cinterion
®
EHS6 AT Command Set
12.3 AT+CMGD
EHS6_ATC_V03.001 15/12/3
Confidential / Released
Page 326 of 513
12.3 AT+CMGD Delete short message
The AT+CMGD write command deletes a short message from the preferred message storage <mem1> location
<index>. If <delflag> is present and not set to 0 then the ME shall ignore <index> and follow the rules for
<delflag> shown below. If deleting fails, final result code +CMS ERROR is returned.
The AT+CMGD test command returns the valid <index> locations of the preferred <mem1> and the supported
<delflag> values.
Syntax
Parameter Description
Integer type; value in the range of location numbers supported by the associated memory. See <index>.
0 (Or omitted) delete the message specified in <index>.
1 Delete all read messages from preferred message storage, leaving unread
messages and stored mobile originated messages (whether sent or not)
untouched.
2 Delete all read messages from preferred message storage and sent mobile
originated messages, leaving unread messages and unsent mobile originated
messages untouched.
3 Delete all read messages from preferred message storage, sent and unsent
mobile originated messages leaving unread messages untouched.
4 Delete all messages from preferred message storage including unread mes-
sages.
Note
• If there is no short message stored at the selected index, the response is OK too.
Test Command
AT+CMGD=?
Response(s)
+CMGD: (list of supported <index>s), (list of supported <delflag>es)
OK
Write Command
AT+CMGD=<index>[, <delflag>]
Response(s)
OK
ERROR
+CMS ERROR: <err>
PIN Last Reference(s)
+ + - 3GPP TS 27.005 [44]
<index>
(num)
<delflag>
(num)