User Manual
16. SHORT MESSAGE SERVICES - POINT TO POINT
243
LZT 123 7263 R1A
16.6 AT+CMGW Write Message to Memory
PDU Mode
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 other status
values to be given. ME/TA manufacturer may choose to use different
default <stat> values for different message types. Entering PDU is the
same as specified by the send message command, +CMGS. If writing
fails, final result code +CMS ERROR: <err> is returned.
Description Command Possible Responses
Write message to
memory
AT+CMGW=<length>
[,<stat>]<CR>
PDU is given<ctrl-Z/ESC>
•+CMGW:<index>
• +CMS ERROR: <err>
•OK
•ERROR
Show if the command
is supported
AT+CMGW=? •OK
•ERROR
<stat> Description
0 Received unread message (i.e. new message). Not
supported
1 Received read message. Not supported
2 Stored unsent message (only applicable to SMs)
3 Stored sent message (only applicable to SMs). Not
supported
16 Template message. Not supported
<index> Description
Integer type Value in the range of location numbers supported by the
associated memory
<length> Description
Integer type Value indicating in PDU mode (+CMGF=0), the length of
the actual TP data unit in octets (i.e. the RP layer SMSC
address octets are not counted in the length)
<pdu> Description
... InthecaseofSMS:GSM04.11SCaddressfollowedby
GSM 03.40 TPDU in hexadecimal format: ME/TA converts
each octet of TP data unit into two IRA character long
hexadecimal number (e.g. octet with integer value 42 is
presented to TE as two characters 2A (IRA 50 and 65))
In the case of CBS: GSM 03.41 TPDU in hexadecimal format