![Wavecom WMO2 Manual Download Page 62](http://html1.mh-extra.com/html/wavecom/wmo2/wmo2_manual_3834769062.webp)
WMO2 G900 / G1800 / G1900
WCOM/GSM/WMO2/WMO2ATDOC
Friday 21 May 1999
WAVECOM confidential ©
56
4.6.12
Write Message to Memory
+CMGW
This command stores a message to memory storage (either SMS-SUBMIT
or SMS-DELIVERS). The memory location <index> is returned (no choice
possible as with phonCPBW).
The entering of text or PDU is done similarly as specified in command Send
MCMGS.
Command syntax in text mode:
(<index> is returned in both cases)
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
Parameter Definition:
<oa/da>: Originating or Destination Adress Value in string format. If
<oa/da> is omitted it must be entered with +CMSS command.
<tooa/toda>: Type of Originating / Destination Adress.
<stat>: Integer type in PDU mode
(default 2 for +CMGW)
, or string type in
text mode
(default
"
STO UNSENT
"
for +CMGW)
. It indicates the status of
message in memory. If <stat> is omitted , the stored message is
considered like a message to be send.
Defined <stat> values:
PDU mode
Text mode
0
"REC UNREAD"
1
"REC READ"
2
"STO UNSENT"
3
"STO SENT"
<length>: The length of the actual data unit in octets
Example:
Application to GSM
AT+CMGW="+33146290800"<CR>
Hello, how are you ?<ctrl-Z>
Write a message in text mode
GSM to application
+CMGW: 4
OK
Message stored in index 4
Application to GSM
AT+CMGW=<length><CR>
<pdu><ctrl-Z>
Write a message in PDU mode
GSM to application
+CMGW: <index>
OK
Message stored in <index>