Westermo GD-01 User Manual
Page 66
66
6196-2220
+CMGW – Write Message to Memory
Description:
This command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERS).
The memory location <index> is returned (no choice possible as with phonebooks
+CPBW).Text or PDU is entered as described for the Send Message +CMGS command.
Command syntax in text mode:
AT+CMGW= <oa/da> [,<tooa/toda> [,<stat> ] ] <CR>
enter text <ctrl-Z / ESC>
Command syntax in PDU mode:
AT+CMGW= <length> [,<stat>] <CR>
give PDU <ctrl-Z / ESC>
Response syntax:
+CMGW: <index> or
+CMS ERROR: <err> if writing fails
Command example
Possible responses
Note
AT+CMGW=
+CMGW: 4
Write a message in text
”+33146290800”<CR> mode, result:
Hello how are you? <ctrl-Z>
OK
Message stored in index 4
AT+CMGW=<length><CR>
+CMGW: <index>
Write a message in PDU
<pdu><ctrl-Z>
OK
mode, result:
message stored in <index>
Defined values:
Parameter Definition:
<oa/da>:
Originating or Destination Address Value in string format.
<tooa/toda>:
Type of Originating / Destination Address.
<stat>:
Integer type in PDU mode (default 2 for +CMGW), or string type
in text mode (default “STO UNSENT” for +CMGW). Indicates the
status of message in memory. If <stat> is omitted, the stored mes-
sage is considered as a message to send.
<stat>
0:
“REC UNREAD”
1:
“REC READ”
2:
“STO UNSENT”
3:
“STO SENT”
<length>
Length of the actual data unit in octets.
B A C K