GSM/GPRS Module
M35
AT Commands Manual
M35
_AT_Commands_Manual Confidential / Released 92 / 186
Example
AT+CMGF=1
// Set SMS message format as text mode
OK
AT+CSCS=”GSM”
// Set character set as GSM which is used by the TE
OK
AT+CMGS="15021012496"
> This is a test from Quectel
// Enter in text,<CTRL+Z> send message,<ESC> quits
without sending
+CMGS: 247
OK
8.9. AT+CMGW Write SMS Message to Memory
Parameter
AT+CMGW Write SMS Message to Memory
Test Command
AT+CMGW=?
Response
OK
Write Command
1) If text mode (+CMGF=1):
AT+CMGW[=<oa/da>[,<tooa/toda>[,<s
tat>]]]
<CR>
text is entered
<
ctrl-Z/ESC>
<ESC> quits without sending
2) If PDU mode (+CMGF=0):
AT+CMGW=<length>[,<stat>]
<CR>
PDU is given
<ctrl-Z/ESC>
Response
TA transmits SMS message (either SMS-DELIVER or
SMS-SUBMIT) from TE 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>
also allows other status values to be given.
If writing is successful:
+CMGW:
<index>
OK
If error is related to ME functionality:
+CMS ERROR: <err>
Reference
GSM 07.05
<oa>
GSM 03.40 TP-Originating-Address Address-Value field in string format; BCD numbers (or
GSM default alphabet characters) are converted to characters of the currently selected TE
character set (specified by
+CSCS
in TS 07.07);type of address given by
<tooa>
<da>
GSM 03.40 TP-Destination-Address Address-Value field in string format; BCD numbers (or
GSM default alphabet characters) are converted to characters of the currently selected TE