AT Commands Reference Guide
80529ST10815A Rev.2– 2017-09-14
ReproductionforbiddenwithoutTelitCommunicationsS.p.A.writtenauthorization‐AllRightsReserved page95of233
+CMGW - Write Message To Memory
<length> - length in bytes of the PDU to be written.
7..164
<stat> - message status.
0 - new message
1 - read message
2 - stored message not yet sent (default)
3 - stored message already sent
The device responds to the command with the prompt '>' and waits for the
specified number of bytes.
To write the message issue
Ctrl-Z char (0x1A hex).
To exit without writing the message issue
ESC char (0x1B hex).
If message is successfully written in the memory, then the result is sent in the
format:
+CMGW: <index>
where:
<index> - message location index in the memory <memw>.
If message storing fails for some reason an “error” code reported.
Note: to ensure that during the command execution, no other SIM interacting
commands issued care must be taken of.
(Text Mode)
AT+CMGW[=<da>
[,<toda>
[,<stat>]]]
(Text Mode)
Execution command writes in the
<memw> memory storage a new message.
Parameters:
<da> - destination address, string type represented in the currently selected
character set (see +CSCS).
<toda> - type of destination address.
129 - number in national format
145 - number in international format (contains the "
+")
<stat> - message status.
"REC UNREAD" - new received message unread
"REC READ" - received message read
"STO UNSENT" - message stored not yet sent (default)
"STO SENT" - message stored already sent
After command line is terminated with
<CR>, the device responds sending a four
character sequence prompt:
<CR><LF><greater_than><space> (IRA 13, 10, 62, 32)