Specifications
CUSTOMATCOMMANDS
211 HSPA+ATCommandsReferenceGuide
WriteMessagetoMemory#CMGW
ForbothPDUmodeandtextmode,Executecommandwritesanewmessageinthe<memw>memorystorage.
TestcommandreturnstheOKresultcode.
Syntax
Command Commandtype
AT#CMGW=<length>,<pdu> Execute,PDUmode
AT#CMGW=<da>,<text> Execute,Textmode
AT#CMGW=? Test
ParametersandValuesforPDUMode
<length> lengthinbytesofthePDUtobewritten.
7‐164
<pdu>
PDUinhexadecimalformat(eachoctetofthePDUisgivenastwoIRAcharacter
longhexadecimalnumber)andgiveninoneline.
Ifmessageissuccessfullywritteninthememory,thentheresultissentinthe
format:
#CMGW:<index>
where:
<index>‐mess
agelocationindexinthememory<memw>.
Ifmessagestoringfailsforsomereason,anerrorcodeisreported.
ParametersandValuesforTextMode
<da>
Stringtype,destinationaddressrepresentedinthecurrentlyselectedcharacter
set.See+CSCS.
7‐164
<text>
Texttowrite.Encloseenteredtextbetweendoublequotes.Formattextas
follows:
Ifcurrent<dcs>indicatesthatGSM03.38defaultalphabetisused
andcurrent<fo>indicatesthat3GPPTS23.040TP‐User‐Data‐
Header‐Indicationisnotset,thenME/TAconvertstheentered
textintoGSMalphabet,accordingtoGSM27.005,AnnexA.For
moreinformationabout<dcs>and<fo>,see+CSMP.
Ifcurrent<dcs>indicatesthat8‐bitorUCS2datacodingschemeis
usedorcurrent<fo>indicatesthat3GPPTS23.040TP‐User‐Data‐
Header‐Indicationisset.Formoreinformationabout<dcs>and
<fo>,see+CSMP.
EnteredtextconsistsoftwoIRAcharacterlonghexadecimal
numberswhichME/TAconvertsinto8‐bitoctet.Forexample
the‘asterisk’isenter
edas2A(IRA50andIRA65)andthisis
convertedtoanoctetwithintegervalue0x2A.
Ifmessageissuccessfullywritteninmemory,theresultissentintheformat:
#CMGW:<index>
where:
<index>‐messagelocationindexinthememory<memw>.
Ifmessagestoringfailsforsomereason,anerrorcodeisreported.