Huawei MG323 Recording Equipment User Manual


 
HUAWEI MG323 GSM M2M Module
AT Command Interface Specification Commands for Short Messages
Issue 02 (2010-11-23)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
157
11.1.2 Deleting Short Messages
Write
command
AT++CMGD=<index>[,<delflag>]
Function
Deletes the short messages that are stored on the storage media.
Response
z
In case of successful execution: <CR><LF>OK<CR><LF>
In case of an error during command execution:
<CR><LF>ERROR<CR><LF>
z
In case of an error related to the MS: <CR><LF>+CMS
ERROR: <err><CR><LF>
Note:
When the value of the <delflag> parameter is not 0, the first parameter <index> can be ignored
and executed according to the <delflag> parameter.
Parameter description
<index>: numeric, which indicates the location for storing short messages. The value
range is related to the storage media. The storage media is set by +CPMS. Currently,
only SM is supported.
< delflag >: numeric, which specifies the short messages to be deleted.
z
0 (default value): deletes the short messages that are specified by <index>.
z
1: deletes all the read short messages that are stored on the preferred memory
<mem1>, and retains the unread short messages, sent short messages, and
unsent short messages.
z
2: deletes all the read short messages and sent short messages that are stored
on the preferred memory <mem1>, and retains the unread short messages and
unsent short messages.
z
3: deletes all the read short messages, sent short messages, and unsent short
messages that are stored on the preferred memory <mem1>, and retains the
unread short messages.
z
4: deletes all the short messages that are stored on the preferred memory
<mem1>, including the unread short messages.
11.1.3 Examples
Example:
AT+CMGD=?
+CMGD:(1-255), (0-4)
OK Check the parameter range.
AT+CMGD=1
OK Delete the first short message.
AT+CMGD=1, 4