HUAWEI MG323 GSM M2M Module

 

AT Command Interface Specification

Commands for Short Messages

11.5 AT+CMGS - Command for Sending Short Messages

The AT+CMGS command sends short messages in two steps:

In PDU mode (AT+CMGF=0):

First, send +CMGS=<length> that ends with (CR).

Then, upon receiving > that is returned by the MT, the TE sends a PDU data packet that ends with <ctrl-Z>(IRA 26).

11.5.1Testing Whether the Command for Sending Short Messages Exists

Test AT+CMGS=? command

Function Tests whether the command for sending short messages exists.

Response

z In case of successful execution: <CR><LF>OK<CR><LF>

zIn case of an error during command execution: <CR><LF>ERROR<CR><LF>

zIn case of an error related to the MS: <CR><LF>+CMS ERROR: <err><CR><LF>

11.5.2Sending Short Messages

This command sends short messages in PDU mode (+CMGF=0).

Write command

AT+CMGS=<length><CR>PDU is given <Ctrl-Z/Esc>

Function

Sends short messages.

Response

z In case of successful execution:

 

<CR><LF>+CMGS: <mr>[,<ackpdu>] <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: <CR><LF>+CMS

 

ERROR: <err><CR><LF>

Parameter description

<mr>: identifier of short messages, which is a decimal number consisting of digits 0–

9.Value range: 0–65535. For details, see 3GPP TS 23.040[3] TP-Message-Reference integer format.

<length>: number of characters of the actually sent TPDU / 2; a decimal number consisting of digits 0–9; GSM 7-bit coding; the maximum length is 160 characters; for Chinese characters in UCS2 coding, the maximum length is 70 characters; otherwise, ERROR is returned.

Issue 02 (2010-11-23)

Huawei Proprietary and Confidential

164

Copyright © Huawei Technologies Co., Ltd.

 

 

Page 181
Image 181
Huawei MG323 manual 11.5 AT+CMGS Command for Sending Short Messages, Test AT+CMGS=? command, Write command