In Text mode the +CMGW command has the following syntax:
AT+CMGW[=<da>[,<toda>[,<stat>]]]
After command line is terminated with <CR>, the module responds sending a four-
character sequence prompt:
<CR><LF><greater_than><space> (IRA 13, 10, 62, 32)
After this prompt, you can enter text that should be formatted as follows:
• if current <dcs> (see +CSMP) indicates that GSM03.38/23.038 default alphabet
is used and current <fo> (see +CSMP) indicates that 3GPP TS 03.40/23.040
TP-User-Data-Header-Indication is not set, then ME/TA converts the entered
text into GSM alphabet, according to 3GPP TS 27.005, Annex A; backspace
can be used to delete last character and carriage returns can be used..
• if current <dcs> (see +CSMP) indicates that 8-bit or UCS2 data coding scheme
is used or current <fo> (see +CSMP) indicates that 3GPP TS 23.040 TP-User-
Data-Header-Indication is set, the entered text should consist of two IRA
character long hexadecimal numbers which ME/TA converts into 8-bit octet
(e.g. the 'asterisk' will be entered as 2A (IRA50 and IRA65) and this will be
converted to an octet with integer value 0x2A)
The command 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).