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.
163
11.4.2 Reading Short Messages
Write
command
AT+CMGR=<index>
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):
z
0: indicates messages that have been received but not read.
z
1: indicates messages that have been received and read.
z
2: indicates messages that have been stored but not sent.
z
3: 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