HUAWEI MG323 GSM M2M Module

 

AT Command Interface Specification

Commands for Short Messages

11.1.2 Deleting Short Messages

Write

AT++CMGD=<index>[,<delflag>]

command

 

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.

z0 (default value): deletes the short messages that are specified by <index>.

z1: 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.

z2: 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.

z3: 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.

z4: deletes all the short messages that are stored on the preferred memory <mem1>, including the unread short messages.

11.1.3Examples

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

 

 

 

 

 

 

Issue 02 (2010-11-23)

 

Huawei Proprietary and Confidential

157

Copyright © Huawei Technologies Co., Ltd.

 

 

Page 174
Image 174
Huawei MG323 manual Deleting Short Messages, Case of an error related to the MS CRLF+CMS, AT+CMGD=1