BGS2T AT Command Set
13.8 AT+CMGW
BGS2T_ATC_V01.301 Page 382 of 554 1/31/12
c
13.8 AT+CMGW Write Short Messages to Memory
AT+CMGW execute and write commands transmit a short message (either SMS-DELIVER or SMS-SUBMIT) from
TE to memory storage <mem2>. Memory location <index> of the stored message is returned. Message status
will be set to 'stored unsent' unless otherwise given in parameter <stat>.
After invoking the execute or write command wait for the prompt ">" and then start to write the message. To save
the message simply enter
<CTRL-Z>. After the prompt a timer will be started to observe the input. To abort writing
use
<ESC>. Abortion is acknowledged with "OK", though the message will not be saved.
Message Length in Text Mode: The maximum length of a short message depends on the used coding scheme
configured with <dcs> of AT+CSMP:
7 bit GSM coding scheme: 160 characters
8 bit GSM coding scheme: 140 characters
16 bit GSM coding scheme: 70 characters.
The length of 8-bit data coded short messages has to be greater than 0.
For more information on data coding schemes and character sets refer to 3GPP TS 23.038 [27] and Section
1.6.1, GSM alphabet tables and UCS2 character values.
Syntax
Test Command
AT+CMGW=?
Response(s)
OK
Exec Command
If text mode (see AT+CMGF=1):
AT+CMGW
Response(s)
<CR> Text can be entered. <CTRL-Z>/<ESC>
+CMGW: <index>
OK
If writing fails
ERROR
+CMS ERROR: <err>
Write Command
If text mode (see AT+CMGF=1):
AT+CMGW=<oa>/<da>[, [<tooa>/<toda>][, <stat>]]
<CR> Text can be entered. <CTRL-Z>/<ESC>
Response(s)
+CMGW: <index>
OK
If writing fails see notes below.
Write Command
If PDU mode (see AT+CMGF=0):
AT+CMGW=<length>[, <stat>]
<CR> PDU can be entered. <CTRL-Z>/<ESC>
Response(s)
+CMGW: <index>
OK
If writing fails see notes below.