HUAWEI MG323 GSM M2M Module

 

AT Command Interface Specification

Commands for Short Messages

11.4.2 Reading Short Messages

Write

AT+CMGR=<index>

command

 

Function

Reads the short messages whose storage location is index from the

 

preferred memory <mem1>.

Response

z When short messages are in PDU mode (+CMGR=0) and the

 

command is successfully executed:

 

[<CR><LF>+CMGR:

 

<stat>,[<alpha>],<length><CR><LF><pdu><CR><LF>

 

<CR><LF>OK<CR><LF>

 

z In case of an error during command execution:

 

<CR><LF>ERROR<CR><LF>

 

z In case of an error related to the MS during command execution:

 

<CR><LF>+CMS ERROR: <err><CR><LF>

 

z When the index of the location to be read exceeds the maximum

 

index of the SIM card: <CR><LF>+CME ERROR:

 

<err><CR><LF>

Parameter description

<index>: integer, indicates the storage position of the short message in the memory.

<length>: integer, indicates the number of bytes in the TPDU.

<stat>: message type.

For messages in PDU mode (AT+CMGF=0):

z0: indicates messages that have been received but not read.

z1: indicates messages that have been received and read.

z2: indicates messages that have been stored but not sent.

z3: indicates messages that have been sent and stored

<alpha>: not supported currently

<pdu>: PDU. For details, see the AT+CMGL command.

Example 1:

Run AT+CMGR to read short messages.

Run AT+CMGR=1 to read the short message whose storage location is 1.

+CMGL: 1,,160

…(Short messages in PDU mode)

OK

Issue 02 (2010-11-23)

Huawei Proprietary and Confidential

163

Copyright © Huawei Technologies Co., Ltd.

 

 

Page 180
Image 180
Huawei MG323 manual Reading Short Messages, When short messages are in PDU mode +CMGR=0, CRLF+CMS Error errCRLF, Crlf+Cmgr