User guide

Developers guidelines | AT commands
186 June 2010
AT+CMGW Write message to memory (ver. 2)
<toda> Description
129 ISDN/telephony numbering plan, national/
international unknown. Default value if “+” is not
in <da>
145 ISDN/telephony numbering plan, international
number. Default value if “+” is in <da>
161 ISDN/telephony numbering plan, national number
128–255 Valid values, see GSM 04.08 section 10.5.4.7
<mr>: Integer. GSM 03.40 TP-Message-Reference.
Description: Stores a message to memory storage <mem2>. Memory location <index>
of the stored message is returned. By default message status will be set to
“stored unsent”, but parameter <stat> allows also other status values to
be given. (ME/TA manufacturer may choose to use different default <stat>
values for different message types.) The entering of PDU is done in a
similar way as with command AT+CMGS.
Execution
command: AT+CMGW=<length>[,<stat>]<CR><pdu><ctrl-Z/ESC>
Execution command
response: +CMGW: <index>
Test command: AT+CMGW=? Shows if the command is supported.
Parameters:
<stat>:
<stat> Description
0 Received unread message (new message)
1 Received read message
2
Stored unsent message. (Only applicable to SMs)
3 Stored sent message. (Only applicable to SMs)
16 Template message
<index>:
<index> Description
Integer type Value in the range of location numbers supported
by the associated memory
<length>:
<length> Description
Integer type Value indicating in PDU mode (AT+CMGF=”0”), the
length of the actual TP data unit in octets. The RP
layer SMSC address octets are not counted in the
length
<pdu>: