Specifications
Chapter 7 – Short Messages Commands
Multi-Tech Systems, Inc. CDMA AT Commands Reference Guide (PN S000294K) 46
Write Message to Memory +CMGW
Description: This command stores a message in memory (SMS-SUBMIT). The memory location <index> is returned (no
choice possible as with phonebooks +CPBW). A text or Unicode message is entered as described for the
Send Message +CMGS command.
Syntax: Command syntax: AT+CMGW=<da> [,<length>] [,<priority>] [,<privacy>] [,<reply>] [,<cbn>] <cr><message
text> [<term>]
Response syntax: +CMGW: <index> or +CMS ERROR: <err> if writing fails
Command Possible responses
AT+CMGW=”8585551212”<cr>
Hello how are you ?<ctrl-Z>
Note: Write a message
+CMGW: 4
OK
Note: Message stored in index 4
AT+CMGS=”8585551212”,19<cr>
<ESC>Call me at 5551212
Note: Write a nineteen byte message that includes the
<ESC> character.
+CMGW: 5
OK
Note: Message stored in index 5
AT+CMGW=”8585551212”,2,1,1”5550000”<cr>
Please call ASAP<ctrl-Z>
Note: Write message with the specified priority, privacy,
reply option and call back number. Note that the
<length> parameter is omitted.
+CMGW: 6
OK
Note: Message stored in index 6
Values: <da> Destination address value; ASCII digit character phone number.
<length> Length of the text message (in bytes). If specified, the message is automatically sent when this
number of message bytes have been entered. Terminator characters that are part of the
message text are ignored. If not specified, a message terminator character <term> must be
used.
<priority> The priority level of the message.
0 Normal (default)
1 Interactive
2 Urgent
3 Emergency
<privacy> The privacy level of the message.
0 Not restricted (default)
1 Restricted
2 Confidential
3 Secret
<reply> The reply options for the message.
0 No acknowledge requested (default)
1 Positive user acknowledge request
2 Delivery acknowledge request
3 Request both user acknowledge and delivery acknowledge
<cbn> The call back number; ASCII digit character phone number.
<cr> Required first line terminator; ASCII carriage return character (0x0d).
<message text> Message text; ASCII or UCS2 Unicode formatted. See section 20.11 for more information
on Unicode formatting.
<term> Message terminator. Ignored if <length> is specified.
ASCII message:
<ctrl Z> (0x1A) to send the message
<ESC> (0x1B) to abort the message
Unicode message:
0x00 0x1A to send the message
0x00 0x1B to abort the message
Note: For the RUIM software edition using some SIM cards, the maximum supported message text length is 99 characters.
Longer message texts will be truncated to 99 characters when read.
The maximum message text length for all other software editions is 160 characters.