AT cmd

19
AT Commands AT commands are use to control MODEMs. AT is the abbreviation for Attention. These commands comes from Hayes commands that were used by the Hayes smart modems. The Hayes command started with AT to indicate the attention from MODEM. The dial up and wireless MODEMs(devices that involve machine to machine communication) needs AT command to interact with a computer. These include a Hayes command set as a subset, along with other extended AT commands. AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following information and services: 1. Information and configuration pertaining to mobile device or MODEM and SIM card. 2. SMS service. 3. MMS service. 4. Fax service. 5. Data and voice link over mobile network. The Hayes subset commands are called the basic commands and the commands specific to the GSM network are called extended AT commands. AT COMMAND FEATURES Line Settings A serial link handler is set with the following default values (factory settings): autobaud, 8 bits data, 1 stop bit, no parity, RTS/CTS flow control. Please use the +IPR, +IFC and +ICF commands to change these settings. Command Line Commands always start with AT (which means ATtention) and finish with a <CR> character. Information Responses and Result Codes

Transcript of AT cmd

Page 1: AT cmd

AT Commands

AT commands are use to control MODEMs AT is the abbreviation for Attention These commands comes from Hayes commands that were used by the Hayes smart modems The Hayes command started with AT to indicate the attention from MODEM The dial up and wireless MODEMs(devices that involve machine to machine communication) needs AT command to interact with a computer These include a Hayes command set as a subset along with other extended AT commands

AT commands with a GSMGPRS MODEM or mobile phone can be used to access following information and services

1 Information and configuration pertaining to mobile device or MODEM and SIM card2 SMS service3 MMS service4 Fax service5 Data and voice link over mobile network

The Hayes subset commands are called the basic commands and the commands specific to the GSM network are called extended AT commands

AT COMMAND FEATURES Line Settings

A serial link handler is set with the following default values (factory settings) autobaud 8 bits data 1 stop bitno parity RTSCTS flow control Please use the +IPR +IFC and +ICF commands to change these settings

Command LineCommands always start with AT (which means ATtention) and finish with a ltCRgt character

Information Responses and Result CodesResponses start and end with ltCRgtltLFgt except for the ATV0 DCE response format and the ATQ1 (result

code suppression) commandsbull If command syntax is incorrect an ERROR string is returnedbull If command syntax is correct but with some incorrect parameters the +CME ERROR ltErrgt or +CMSERROR ltSmsErrgt strings are returned with different error codesbull If the command line has been performed successfully an OK string is returnedIn some cases such as ldquoAT+CPINrdquo or (unsolicited) incoming events the product does not return the OKstring as a responseIn the following examples ltCRgt and ltCRgtltLFgt are intentionally omitted

GENERAL BE HAVIORS SIM Card Insertion and Removal Procedures

SIM card Insertion and Removal procedures are supported There are software functions relying on positivereading of the hardware SIM detect pin This pin state (openclosed) is permanently monitoredWhen the SIM detect pin indicates that a card is present in the SIM connector the product tries to set up alogical SIM session The logical SIM session will be set up or not depending on whether the detected card is aSIM Card or not The AT+CPIN command delivers the following responsesbull If the SIM detect pin indicates ldquoabsentrdquo the response to AT+CPIN is ldquo+CME ERROR 10rdquo (SIM notinserted)bull If the SIM detect pin indicates ldquopresentrdquo and the inserted Card is a SIM Card the response toAT+CPIN is ldquo+CPIN xxxrdquo depending on SIM PIN statebull If the SIM detect pin indicates ldquopresentrdquo and the inserted Card is not a SIM Card the response toAT+CPIN is CME ERROR 10bull These last two states are not given immediately due to background initialization Between the hardwareSIM detect pin indicating ldquopresentrdquo and the previous results the AT+CPIN sends ldquo+CME ERROR 515rdquo(Please wait init in progress)When the SIM detect pin indicates card absence and if a SIM Card was previously inserted an IMSI detachprocedure is performed all user data is removed from the product (Phonebooks SMS etc) The product thenswitches to emergency mode

Background InitializationAfter entering the PIN (Personal Identification Number) some SIM user data files are

loaded into the product(Phonebooks SMS status etc) Please be aware that it might take some time to read a large phonebookThe AT+CPIN command response comes just after the PIN is checked After this response user data isloaded (in background) This means that some data may not be available just after PIN entry is confirmed byrsquoOKrsquo The reading of phonebooks will then be refused by ldquo+CME ERROR 515rdquo or ldquo+CMS ERROR 515rdquomeaning ldquoPlease wait service is not available init in progressrdquoThis type of answer may be sent by the product at several pointsbull When trying to execute another AT command before the previous one is completed (beforeresponse)bull When switching from ADN to FDN (or FDN to ADN) and trying to read the relevant phonebookimmediatelybull When asking for +CPIN status immediately after SIM insertion and before the product hasdetermined if the inserted card is a valid SIM Card

GENERAL AT COMMANDS Manufacturer Identification +CGMIDescription Displays the manufacturer identificationValues No parametersCommand syntax AT+CGMICommand Possible responsesAT+CGMINote Get manufacturer identificationWAVECOM MODEMOKNote Command valid Wavecom modem Request Model Identification +CGMMDescription Displays the supported frequency bands With multi-band products the response may be acombination of different bandsValues No parametersCommand syntax AT+CGMMCommand Possible responsesAT+CGMMNote Get hardware versionMULTIBAND 900 E 1800OKNote Multiband GSM 900 MHz extended band and DCS1800AT+CGMMNote Get hardware versionMULTIBAND G850 1900OKNote Multiband GSM 850 and PCS Request Revision Identification +CGMRDescription Displays the revised software versionValues No parametersSyntax AT+CGMRCommand Possible responsesAT+CGMRNote Get software version640b09ggQ2406A 1266500 0704031706OK

SHORT MESSAGES COMMANDSParameters Definitionltdagt Destination Address coded according to the GSM Technical Specification 0340 TP-DAltdcsgt Data Coding Scheme coded according to document [5]ltdtgt Discharge Time in string formatldquoyyMMddhhmmssplusmnzzrdquo(Year [00-99] Month [01-12]Day [01-31] Hour Minute Second and Time Zone [quarters of an hour] )ltfogt First Byte coded according to SMS-SUBMIT first byte in document [4] default value is 17 for SMSSUBMITltindexgt Place of storage in memory

ltlengthgt Text mode (+CMGF=1) number of characters PDU mode (+CMGF=0) length of the TP data unit inbytesltmem1gt Memory used to list read and delete messages (+CMGL +CMGR and +CMGD)ltmem2gt Memory used to write and send messages (+CMGW +CMSS)ltmidgt CBM Message Identifierltmrgt Message Referenceltoagt Originator Addressltpidgt Protocol Identifierltpdugt For SMS GSM 0411 SC address followed by GSM Technical Specification 0340 TPDU inhexadecimal format coded as specified in doc [4] For CBS GSM Technical Specification 0341TPDU in hexadecimal formatltragt Recipient Addressltscagt Service Center Addressltsctsgt Service Center Time Stamp in string format ldquoyyMMddhhmmssplusmnzzrdquo(YearMonthDayHourMinSecondsplusmnTimeZone)ltsngt CBM Serial Numberltstgt Status of a SMS-STATUS-REPORTltstatgt Status of message in memorylttooagt Type-of-Address of ltoagtlttoragt Type-of-Address of ltragtlttoscagt Type-of-Address of ltscagtlttotal1gt Number of message locations in ltmem1gtlttotal2gt Number of messages locations in ltmem2gtltused1gt Total number of messages locations in ltmem1gtltused2gt Total number of messages locations in ltmem2gtltvpgt Validity Period of the short message default value is 167Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 51

Select Message Service +CSMSDescriptionThe supported services include originated (SMS-MO) and terminated short messages (SMS-MT) as well asCell Broadcast Message (SMS-CB) servicesValuesltservicegt0 SMS AT commands are compatible with GSM 0705 Phase 2 version 4701 SMS AT commands are compatible with GSM 0705 Phase 2 + version Syntax AT+CSMS=ltservicegtCommand Possible responsesAT+CSMS=0Note SMS AT command Phase 2 version 470+CSMS 111OKNote SMS-MO SMS-MT and SMS-CB supportedAT+CSMS=1Note SMS AT command Phase 2 ++CSMS 111Note SMS-MO SMS-MT and SMS-CB supportedAT+CSMSNote Current values +CSMS 0111OKNote GSM 0340 and 0341 (SMS AT commandPhase 2 version 470AT+CSMS=Note Possible services+CSMS (01)OK

New Message Acknowledgement +CNMADescription

This command allows reception of a new message routed directly to the TE to be acknowledgedIn TEXT mode only positive acknowledgement to the network (RP-ACK) is possibleIn PDU mode either positive (RP-ACK) or negative (RP-ERROR) acknowledgement to the network ispossibleAcknowledgement with +CNMA is possible only if the +CSMS parameter is set to 1 (+CSMS=1) when a+CMT or +CDS indication is shown (see +CNMI command)If no acknowledgement occurs within the network timeout an RP-ERROR is sent to the network The ltmtgtand ltdsgt parameters of the +CNMI command are then reset to zero (do not show new message indication)Valuesltngt Type of acknowledgement in PDU mode0 send RP-ACK without PDU (same as TEXT mode)1 send RP-ACK with optional PDU message2 send RP-ERROR with optional PDU messageltlengthgt Length of the PDU messageSyntaxCommand syntax in text mode AT+CNMACommand syntax in PDU mode AT+CNMA [ = ltngt [ ltlengthgt [ ltCRgtNote PDU is entered using ltackpdugt format instead of ltpdugt format (eg SMSC address field is notpresent)PDU is entered ltctrl-Z ESCgt ] ] ]Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 52Example of new message acknowledgement in TEXT modeCommand Possible responsesAT+CMGF=1Note Set TEXT modeOKNote TEXT mode validAT+CNMI=22000Note ltmtgt=2OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtReceived messageNote message receivedAT+CNMANote acknowledge the message receivedOKNote send positive acknowledgement to the networkAT+CNMANote try to acknowledge again+CMS ERROR 340Note no +CNMA acknowledgment expectedExample of new message acknowledgement in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode valid+CMT 2907913366003000F1240B913366920547F30000003003419404800B506215D42ECFE7E17319Note message receivedAT+CNMA=2ltlengthgt ltCRgthellip Pdu message hellip ltCtrl-ZESCgtNote negative acknowledgement for themessageOKNote send a negative acknowledgement to the network(RP-ERROR) with PDU message (ltackpdugt format)

Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 53

Preferred Message Storage +CPMSDescriptionThis command allows the message storage area to be selected (for reading writing etc)Valuesltmem1gt Memory used to list read and delete messages It can beldquoSMrdquo SMS message storage in SIM (default)ldquoBMrdquo CBM message storage (in volatile memory)ldquoSRrdquo Status Report message storage (in SIM if the EF-SMR file exists otherwise in the ME non volatilememory)Note ldquoSRrdquo ME non-volatile memory is cleared when another SIM card is inserted It is kept even aftera reset while the same SIM card is usedltmem2gt Memory used to write and send messagesldquoSMrdquo SMS message storage in SIM (default)If the command is correct the following message indication is sent+CPMS ltused1gtlttotal1gtltused2gtlttotal2gtWhen ltmem1gt is selected all following +CMGL +CMGR and +CMGD commands are related to the type ofSMS stored in this memorySyntax AT+CPMS=ltmem1gt[ltmem2gt]Command Possible responsesAT+CPMS=Note Possible message storages+CPMS ((ldquoSMrdquordquoBMrdquordquoSRrdquo)(ldquoSMrdquo))OKNoteRead list delete SMS CBM or SMS Status ReportWrite send SMSAT+CPMSNote Read+CPMS ldquoSMrdquo3 10rdquoSMrdquo310OKNote Read writehellipSMS fromto SIM3 SMS are stored in SIM 10 is the total memory available inSIMAT+CPMS=rdquoAMrdquoNote Select false message storage+CMS ERROR 302AT+CPMS=rdquoBMrdquoNote Select CBM message storage+CPMS 220310OKNote Read list delete CBM from RAM 2 CBM are stored inRAMAT+CPMSNote Read+CPMS ldquoBMrdquo220rdquoSMrdquo310OKNoteRead list delete CBM from RAMWrite SMS to SIMChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 54

Preferred Message Format +CMGFDescriptionThe message formats supported are text mode and PDU mode In PDU mode a complete SMS Messageincluding all header information is given as a binary string (in hexadecimal format) Therefore only thefollowing set of characters is allowed lsquo0rsquorsquo1rsquorsquo2rsquorsquo3rsquorsquo4rsquorsquo5rsquorsquo6rsquorsquo7rsquorsquo8rsquorsquo9rsquo lsquoArsquo lsquoBrsquorsquoCrsquorsquoDrsquorsquoErsquorsquoFrsquo Each pair of

characters are converted to a byte (eg lsquo41rsquo is converted to the ASCII character lsquoArsquo whose ASCII code is0x41 or 65) In Text mode all commands and responses are in ASCII characters The format selected isstored in EEPROM by the +CSAS commandValuesThe ltpdugt message is composed of the SC address (laquo 00 means no SC address given use default SCaddress read with +CSCA command) and the TPDU message In this example the length of bytes of theTPDU buffer is 14 coded according to GSM Technical Specification 0340 In this case the TPDU is 0x010x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34 0x0B which is GSM 0340ltfogt 0x01 (SMS-SUBMIT no validity period)ltmrgt (TP-MR) 0x03 (Message Reference)ltdagt (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)ltpidgt (TP-PID) 0x00 (Protocol Identifier)ltdcsgt (TP-DCS) 0x00 (Data Coding Scheme 7 bits alphabet)ltlengthgt (TP-UDL) 0x04 (User Data Length 4 characters of text)TP-UD 0xC9 0xE9 0x34 0x0B (User Data ISSY)TPDU in hexadecimal format must be converted into two ASCII characters eg an byte with hexadecimalvalue 0x2A is presented to the ME as two characters lsquo2rsquo (ASCII 50) and lsquoArsquo (ASCII 65)Syntax AT+CMGFCommand Possible responsesAT+CMGF Note Current message format+CMGF 1OKNote Text modeAT+CMGF=Note Possible message format+CMGF (0-1)OKNote Text or PDU modes are availableExample Sending an SMS Message in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode validAT+CMGS=14ltCRgt0001030691214365000004C9E9340BNote Send complete MSG in PDU mode no SCaddress+CMGS 4OKNote MSG correctly sent ltmrgt is returned

Save Settings +CSASDescriptionAll settings specified by the +CSCA and +CSMP commands are stored in EEPROM if the SIM card is aPhase 1 card or in the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CSASCommand Possible responsesAT+CSASNote Store +CSCA and +CSMP parametersOKNote Parameters savedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 55

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 2: AT cmd

GENERAL BE HAVIORS SIM Card Insertion and Removal Procedures

SIM card Insertion and Removal procedures are supported There are software functions relying on positivereading of the hardware SIM detect pin This pin state (openclosed) is permanently monitoredWhen the SIM detect pin indicates that a card is present in the SIM connector the product tries to set up alogical SIM session The logical SIM session will be set up or not depending on whether the detected card is aSIM Card or not The AT+CPIN command delivers the following responsesbull If the SIM detect pin indicates ldquoabsentrdquo the response to AT+CPIN is ldquo+CME ERROR 10rdquo (SIM notinserted)bull If the SIM detect pin indicates ldquopresentrdquo and the inserted Card is a SIM Card the response toAT+CPIN is ldquo+CPIN xxxrdquo depending on SIM PIN statebull If the SIM detect pin indicates ldquopresentrdquo and the inserted Card is not a SIM Card the response toAT+CPIN is CME ERROR 10bull These last two states are not given immediately due to background initialization Between the hardwareSIM detect pin indicating ldquopresentrdquo and the previous results the AT+CPIN sends ldquo+CME ERROR 515rdquo(Please wait init in progress)When the SIM detect pin indicates card absence and if a SIM Card was previously inserted an IMSI detachprocedure is performed all user data is removed from the product (Phonebooks SMS etc) The product thenswitches to emergency mode

Background InitializationAfter entering the PIN (Personal Identification Number) some SIM user data files are

loaded into the product(Phonebooks SMS status etc) Please be aware that it might take some time to read a large phonebookThe AT+CPIN command response comes just after the PIN is checked After this response user data isloaded (in background) This means that some data may not be available just after PIN entry is confirmed byrsquoOKrsquo The reading of phonebooks will then be refused by ldquo+CME ERROR 515rdquo or ldquo+CMS ERROR 515rdquomeaning ldquoPlease wait service is not available init in progressrdquoThis type of answer may be sent by the product at several pointsbull When trying to execute another AT command before the previous one is completed (beforeresponse)bull When switching from ADN to FDN (or FDN to ADN) and trying to read the relevant phonebookimmediatelybull When asking for +CPIN status immediately after SIM insertion and before the product hasdetermined if the inserted card is a valid SIM Card

GENERAL AT COMMANDS Manufacturer Identification +CGMIDescription Displays the manufacturer identificationValues No parametersCommand syntax AT+CGMICommand Possible responsesAT+CGMINote Get manufacturer identificationWAVECOM MODEMOKNote Command valid Wavecom modem Request Model Identification +CGMMDescription Displays the supported frequency bands With multi-band products the response may be acombination of different bandsValues No parametersCommand syntax AT+CGMMCommand Possible responsesAT+CGMMNote Get hardware versionMULTIBAND 900 E 1800OKNote Multiband GSM 900 MHz extended band and DCS1800AT+CGMMNote Get hardware versionMULTIBAND G850 1900OKNote Multiband GSM 850 and PCS Request Revision Identification +CGMRDescription Displays the revised software versionValues No parametersSyntax AT+CGMRCommand Possible responsesAT+CGMRNote Get software version640b09ggQ2406A 1266500 0704031706OK

SHORT MESSAGES COMMANDSParameters Definitionltdagt Destination Address coded according to the GSM Technical Specification 0340 TP-DAltdcsgt Data Coding Scheme coded according to document [5]ltdtgt Discharge Time in string formatldquoyyMMddhhmmssplusmnzzrdquo(Year [00-99] Month [01-12]Day [01-31] Hour Minute Second and Time Zone [quarters of an hour] )ltfogt First Byte coded according to SMS-SUBMIT first byte in document [4] default value is 17 for SMSSUBMITltindexgt Place of storage in memory

ltlengthgt Text mode (+CMGF=1) number of characters PDU mode (+CMGF=0) length of the TP data unit inbytesltmem1gt Memory used to list read and delete messages (+CMGL +CMGR and +CMGD)ltmem2gt Memory used to write and send messages (+CMGW +CMSS)ltmidgt CBM Message Identifierltmrgt Message Referenceltoagt Originator Addressltpidgt Protocol Identifierltpdugt For SMS GSM 0411 SC address followed by GSM Technical Specification 0340 TPDU inhexadecimal format coded as specified in doc [4] For CBS GSM Technical Specification 0341TPDU in hexadecimal formatltragt Recipient Addressltscagt Service Center Addressltsctsgt Service Center Time Stamp in string format ldquoyyMMddhhmmssplusmnzzrdquo(YearMonthDayHourMinSecondsplusmnTimeZone)ltsngt CBM Serial Numberltstgt Status of a SMS-STATUS-REPORTltstatgt Status of message in memorylttooagt Type-of-Address of ltoagtlttoragt Type-of-Address of ltragtlttoscagt Type-of-Address of ltscagtlttotal1gt Number of message locations in ltmem1gtlttotal2gt Number of messages locations in ltmem2gtltused1gt Total number of messages locations in ltmem1gtltused2gt Total number of messages locations in ltmem2gtltvpgt Validity Period of the short message default value is 167Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 51

Select Message Service +CSMSDescriptionThe supported services include originated (SMS-MO) and terminated short messages (SMS-MT) as well asCell Broadcast Message (SMS-CB) servicesValuesltservicegt0 SMS AT commands are compatible with GSM 0705 Phase 2 version 4701 SMS AT commands are compatible with GSM 0705 Phase 2 + version Syntax AT+CSMS=ltservicegtCommand Possible responsesAT+CSMS=0Note SMS AT command Phase 2 version 470+CSMS 111OKNote SMS-MO SMS-MT and SMS-CB supportedAT+CSMS=1Note SMS AT command Phase 2 ++CSMS 111Note SMS-MO SMS-MT and SMS-CB supportedAT+CSMSNote Current values +CSMS 0111OKNote GSM 0340 and 0341 (SMS AT commandPhase 2 version 470AT+CSMS=Note Possible services+CSMS (01)OK

New Message Acknowledgement +CNMADescription

This command allows reception of a new message routed directly to the TE to be acknowledgedIn TEXT mode only positive acknowledgement to the network (RP-ACK) is possibleIn PDU mode either positive (RP-ACK) or negative (RP-ERROR) acknowledgement to the network ispossibleAcknowledgement with +CNMA is possible only if the +CSMS parameter is set to 1 (+CSMS=1) when a+CMT or +CDS indication is shown (see +CNMI command)If no acknowledgement occurs within the network timeout an RP-ERROR is sent to the network The ltmtgtand ltdsgt parameters of the +CNMI command are then reset to zero (do not show new message indication)Valuesltngt Type of acknowledgement in PDU mode0 send RP-ACK without PDU (same as TEXT mode)1 send RP-ACK with optional PDU message2 send RP-ERROR with optional PDU messageltlengthgt Length of the PDU messageSyntaxCommand syntax in text mode AT+CNMACommand syntax in PDU mode AT+CNMA [ = ltngt [ ltlengthgt [ ltCRgtNote PDU is entered using ltackpdugt format instead of ltpdugt format (eg SMSC address field is notpresent)PDU is entered ltctrl-Z ESCgt ] ] ]Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 52Example of new message acknowledgement in TEXT modeCommand Possible responsesAT+CMGF=1Note Set TEXT modeOKNote TEXT mode validAT+CNMI=22000Note ltmtgt=2OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtReceived messageNote message receivedAT+CNMANote acknowledge the message receivedOKNote send positive acknowledgement to the networkAT+CNMANote try to acknowledge again+CMS ERROR 340Note no +CNMA acknowledgment expectedExample of new message acknowledgement in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode valid+CMT 2907913366003000F1240B913366920547F30000003003419404800B506215D42ECFE7E17319Note message receivedAT+CNMA=2ltlengthgt ltCRgthellip Pdu message hellip ltCtrl-ZESCgtNote negative acknowledgement for themessageOKNote send a negative acknowledgement to the network(RP-ERROR) with PDU message (ltackpdugt format)

Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 53

Preferred Message Storage +CPMSDescriptionThis command allows the message storage area to be selected (for reading writing etc)Valuesltmem1gt Memory used to list read and delete messages It can beldquoSMrdquo SMS message storage in SIM (default)ldquoBMrdquo CBM message storage (in volatile memory)ldquoSRrdquo Status Report message storage (in SIM if the EF-SMR file exists otherwise in the ME non volatilememory)Note ldquoSRrdquo ME non-volatile memory is cleared when another SIM card is inserted It is kept even aftera reset while the same SIM card is usedltmem2gt Memory used to write and send messagesldquoSMrdquo SMS message storage in SIM (default)If the command is correct the following message indication is sent+CPMS ltused1gtlttotal1gtltused2gtlttotal2gtWhen ltmem1gt is selected all following +CMGL +CMGR and +CMGD commands are related to the type ofSMS stored in this memorySyntax AT+CPMS=ltmem1gt[ltmem2gt]Command Possible responsesAT+CPMS=Note Possible message storages+CPMS ((ldquoSMrdquordquoBMrdquordquoSRrdquo)(ldquoSMrdquo))OKNoteRead list delete SMS CBM or SMS Status ReportWrite send SMSAT+CPMSNote Read+CPMS ldquoSMrdquo3 10rdquoSMrdquo310OKNote Read writehellipSMS fromto SIM3 SMS are stored in SIM 10 is the total memory available inSIMAT+CPMS=rdquoAMrdquoNote Select false message storage+CMS ERROR 302AT+CPMS=rdquoBMrdquoNote Select CBM message storage+CPMS 220310OKNote Read list delete CBM from RAM 2 CBM are stored inRAMAT+CPMSNote Read+CPMS ldquoBMrdquo220rdquoSMrdquo310OKNoteRead list delete CBM from RAMWrite SMS to SIMChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 54

Preferred Message Format +CMGFDescriptionThe message formats supported are text mode and PDU mode In PDU mode a complete SMS Messageincluding all header information is given as a binary string (in hexadecimal format) Therefore only thefollowing set of characters is allowed lsquo0rsquorsquo1rsquorsquo2rsquorsquo3rsquorsquo4rsquorsquo5rsquorsquo6rsquorsquo7rsquorsquo8rsquorsquo9rsquo lsquoArsquo lsquoBrsquorsquoCrsquorsquoDrsquorsquoErsquorsquoFrsquo Each pair of

characters are converted to a byte (eg lsquo41rsquo is converted to the ASCII character lsquoArsquo whose ASCII code is0x41 or 65) In Text mode all commands and responses are in ASCII characters The format selected isstored in EEPROM by the +CSAS commandValuesThe ltpdugt message is composed of the SC address (laquo 00 means no SC address given use default SCaddress read with +CSCA command) and the TPDU message In this example the length of bytes of theTPDU buffer is 14 coded according to GSM Technical Specification 0340 In this case the TPDU is 0x010x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34 0x0B which is GSM 0340ltfogt 0x01 (SMS-SUBMIT no validity period)ltmrgt (TP-MR) 0x03 (Message Reference)ltdagt (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)ltpidgt (TP-PID) 0x00 (Protocol Identifier)ltdcsgt (TP-DCS) 0x00 (Data Coding Scheme 7 bits alphabet)ltlengthgt (TP-UDL) 0x04 (User Data Length 4 characters of text)TP-UD 0xC9 0xE9 0x34 0x0B (User Data ISSY)TPDU in hexadecimal format must be converted into two ASCII characters eg an byte with hexadecimalvalue 0x2A is presented to the ME as two characters lsquo2rsquo (ASCII 50) and lsquoArsquo (ASCII 65)Syntax AT+CMGFCommand Possible responsesAT+CMGF Note Current message format+CMGF 1OKNote Text modeAT+CMGF=Note Possible message format+CMGF (0-1)OKNote Text or PDU modes are availableExample Sending an SMS Message in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode validAT+CMGS=14ltCRgt0001030691214365000004C9E9340BNote Send complete MSG in PDU mode no SCaddress+CMGS 4OKNote MSG correctly sent ltmrgt is returned

Save Settings +CSASDescriptionAll settings specified by the +CSCA and +CSMP commands are stored in EEPROM if the SIM card is aPhase 1 card or in the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CSASCommand Possible responsesAT+CSASNote Store +CSCA and +CSMP parametersOKNote Parameters savedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 55

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 3: AT cmd

GENERAL AT COMMANDS Manufacturer Identification +CGMIDescription Displays the manufacturer identificationValues No parametersCommand syntax AT+CGMICommand Possible responsesAT+CGMINote Get manufacturer identificationWAVECOM MODEMOKNote Command valid Wavecom modem Request Model Identification +CGMMDescription Displays the supported frequency bands With multi-band products the response may be acombination of different bandsValues No parametersCommand syntax AT+CGMMCommand Possible responsesAT+CGMMNote Get hardware versionMULTIBAND 900 E 1800OKNote Multiband GSM 900 MHz extended band and DCS1800AT+CGMMNote Get hardware versionMULTIBAND G850 1900OKNote Multiband GSM 850 and PCS Request Revision Identification +CGMRDescription Displays the revised software versionValues No parametersSyntax AT+CGMRCommand Possible responsesAT+CGMRNote Get software version640b09ggQ2406A 1266500 0704031706OK

SHORT MESSAGES COMMANDSParameters Definitionltdagt Destination Address coded according to the GSM Technical Specification 0340 TP-DAltdcsgt Data Coding Scheme coded according to document [5]ltdtgt Discharge Time in string formatldquoyyMMddhhmmssplusmnzzrdquo(Year [00-99] Month [01-12]Day [01-31] Hour Minute Second and Time Zone [quarters of an hour] )ltfogt First Byte coded according to SMS-SUBMIT first byte in document [4] default value is 17 for SMSSUBMITltindexgt Place of storage in memory

ltlengthgt Text mode (+CMGF=1) number of characters PDU mode (+CMGF=0) length of the TP data unit inbytesltmem1gt Memory used to list read and delete messages (+CMGL +CMGR and +CMGD)ltmem2gt Memory used to write and send messages (+CMGW +CMSS)ltmidgt CBM Message Identifierltmrgt Message Referenceltoagt Originator Addressltpidgt Protocol Identifierltpdugt For SMS GSM 0411 SC address followed by GSM Technical Specification 0340 TPDU inhexadecimal format coded as specified in doc [4] For CBS GSM Technical Specification 0341TPDU in hexadecimal formatltragt Recipient Addressltscagt Service Center Addressltsctsgt Service Center Time Stamp in string format ldquoyyMMddhhmmssplusmnzzrdquo(YearMonthDayHourMinSecondsplusmnTimeZone)ltsngt CBM Serial Numberltstgt Status of a SMS-STATUS-REPORTltstatgt Status of message in memorylttooagt Type-of-Address of ltoagtlttoragt Type-of-Address of ltragtlttoscagt Type-of-Address of ltscagtlttotal1gt Number of message locations in ltmem1gtlttotal2gt Number of messages locations in ltmem2gtltused1gt Total number of messages locations in ltmem1gtltused2gt Total number of messages locations in ltmem2gtltvpgt Validity Period of the short message default value is 167Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 51

Select Message Service +CSMSDescriptionThe supported services include originated (SMS-MO) and terminated short messages (SMS-MT) as well asCell Broadcast Message (SMS-CB) servicesValuesltservicegt0 SMS AT commands are compatible with GSM 0705 Phase 2 version 4701 SMS AT commands are compatible with GSM 0705 Phase 2 + version Syntax AT+CSMS=ltservicegtCommand Possible responsesAT+CSMS=0Note SMS AT command Phase 2 version 470+CSMS 111OKNote SMS-MO SMS-MT and SMS-CB supportedAT+CSMS=1Note SMS AT command Phase 2 ++CSMS 111Note SMS-MO SMS-MT and SMS-CB supportedAT+CSMSNote Current values +CSMS 0111OKNote GSM 0340 and 0341 (SMS AT commandPhase 2 version 470AT+CSMS=Note Possible services+CSMS (01)OK

New Message Acknowledgement +CNMADescription

This command allows reception of a new message routed directly to the TE to be acknowledgedIn TEXT mode only positive acknowledgement to the network (RP-ACK) is possibleIn PDU mode either positive (RP-ACK) or negative (RP-ERROR) acknowledgement to the network ispossibleAcknowledgement with +CNMA is possible only if the +CSMS parameter is set to 1 (+CSMS=1) when a+CMT or +CDS indication is shown (see +CNMI command)If no acknowledgement occurs within the network timeout an RP-ERROR is sent to the network The ltmtgtand ltdsgt parameters of the +CNMI command are then reset to zero (do not show new message indication)Valuesltngt Type of acknowledgement in PDU mode0 send RP-ACK without PDU (same as TEXT mode)1 send RP-ACK with optional PDU message2 send RP-ERROR with optional PDU messageltlengthgt Length of the PDU messageSyntaxCommand syntax in text mode AT+CNMACommand syntax in PDU mode AT+CNMA [ = ltngt [ ltlengthgt [ ltCRgtNote PDU is entered using ltackpdugt format instead of ltpdugt format (eg SMSC address field is notpresent)PDU is entered ltctrl-Z ESCgt ] ] ]Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 52Example of new message acknowledgement in TEXT modeCommand Possible responsesAT+CMGF=1Note Set TEXT modeOKNote TEXT mode validAT+CNMI=22000Note ltmtgt=2OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtReceived messageNote message receivedAT+CNMANote acknowledge the message receivedOKNote send positive acknowledgement to the networkAT+CNMANote try to acknowledge again+CMS ERROR 340Note no +CNMA acknowledgment expectedExample of new message acknowledgement in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode valid+CMT 2907913366003000F1240B913366920547F30000003003419404800B506215D42ECFE7E17319Note message receivedAT+CNMA=2ltlengthgt ltCRgthellip Pdu message hellip ltCtrl-ZESCgtNote negative acknowledgement for themessageOKNote send a negative acknowledgement to the network(RP-ERROR) with PDU message (ltackpdugt format)

Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 53

Preferred Message Storage +CPMSDescriptionThis command allows the message storage area to be selected (for reading writing etc)Valuesltmem1gt Memory used to list read and delete messages It can beldquoSMrdquo SMS message storage in SIM (default)ldquoBMrdquo CBM message storage (in volatile memory)ldquoSRrdquo Status Report message storage (in SIM if the EF-SMR file exists otherwise in the ME non volatilememory)Note ldquoSRrdquo ME non-volatile memory is cleared when another SIM card is inserted It is kept even aftera reset while the same SIM card is usedltmem2gt Memory used to write and send messagesldquoSMrdquo SMS message storage in SIM (default)If the command is correct the following message indication is sent+CPMS ltused1gtlttotal1gtltused2gtlttotal2gtWhen ltmem1gt is selected all following +CMGL +CMGR and +CMGD commands are related to the type ofSMS stored in this memorySyntax AT+CPMS=ltmem1gt[ltmem2gt]Command Possible responsesAT+CPMS=Note Possible message storages+CPMS ((ldquoSMrdquordquoBMrdquordquoSRrdquo)(ldquoSMrdquo))OKNoteRead list delete SMS CBM or SMS Status ReportWrite send SMSAT+CPMSNote Read+CPMS ldquoSMrdquo3 10rdquoSMrdquo310OKNote Read writehellipSMS fromto SIM3 SMS are stored in SIM 10 is the total memory available inSIMAT+CPMS=rdquoAMrdquoNote Select false message storage+CMS ERROR 302AT+CPMS=rdquoBMrdquoNote Select CBM message storage+CPMS 220310OKNote Read list delete CBM from RAM 2 CBM are stored inRAMAT+CPMSNote Read+CPMS ldquoBMrdquo220rdquoSMrdquo310OKNoteRead list delete CBM from RAMWrite SMS to SIMChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 54

Preferred Message Format +CMGFDescriptionThe message formats supported are text mode and PDU mode In PDU mode a complete SMS Messageincluding all header information is given as a binary string (in hexadecimal format) Therefore only thefollowing set of characters is allowed lsquo0rsquorsquo1rsquorsquo2rsquorsquo3rsquorsquo4rsquorsquo5rsquorsquo6rsquorsquo7rsquorsquo8rsquorsquo9rsquo lsquoArsquo lsquoBrsquorsquoCrsquorsquoDrsquorsquoErsquorsquoFrsquo Each pair of

characters are converted to a byte (eg lsquo41rsquo is converted to the ASCII character lsquoArsquo whose ASCII code is0x41 or 65) In Text mode all commands and responses are in ASCII characters The format selected isstored in EEPROM by the +CSAS commandValuesThe ltpdugt message is composed of the SC address (laquo 00 means no SC address given use default SCaddress read with +CSCA command) and the TPDU message In this example the length of bytes of theTPDU buffer is 14 coded according to GSM Technical Specification 0340 In this case the TPDU is 0x010x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34 0x0B which is GSM 0340ltfogt 0x01 (SMS-SUBMIT no validity period)ltmrgt (TP-MR) 0x03 (Message Reference)ltdagt (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)ltpidgt (TP-PID) 0x00 (Protocol Identifier)ltdcsgt (TP-DCS) 0x00 (Data Coding Scheme 7 bits alphabet)ltlengthgt (TP-UDL) 0x04 (User Data Length 4 characters of text)TP-UD 0xC9 0xE9 0x34 0x0B (User Data ISSY)TPDU in hexadecimal format must be converted into two ASCII characters eg an byte with hexadecimalvalue 0x2A is presented to the ME as two characters lsquo2rsquo (ASCII 50) and lsquoArsquo (ASCII 65)Syntax AT+CMGFCommand Possible responsesAT+CMGF Note Current message format+CMGF 1OKNote Text modeAT+CMGF=Note Possible message format+CMGF (0-1)OKNote Text or PDU modes are availableExample Sending an SMS Message in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode validAT+CMGS=14ltCRgt0001030691214365000004C9E9340BNote Send complete MSG in PDU mode no SCaddress+CMGS 4OKNote MSG correctly sent ltmrgt is returned

Save Settings +CSASDescriptionAll settings specified by the +CSCA and +CSMP commands are stored in EEPROM if the SIM card is aPhase 1 card or in the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CSASCommand Possible responsesAT+CSASNote Store +CSCA and +CSMP parametersOKNote Parameters savedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 55

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 4: AT cmd

ltlengthgt Text mode (+CMGF=1) number of characters PDU mode (+CMGF=0) length of the TP data unit inbytesltmem1gt Memory used to list read and delete messages (+CMGL +CMGR and +CMGD)ltmem2gt Memory used to write and send messages (+CMGW +CMSS)ltmidgt CBM Message Identifierltmrgt Message Referenceltoagt Originator Addressltpidgt Protocol Identifierltpdugt For SMS GSM 0411 SC address followed by GSM Technical Specification 0340 TPDU inhexadecimal format coded as specified in doc [4] For CBS GSM Technical Specification 0341TPDU in hexadecimal formatltragt Recipient Addressltscagt Service Center Addressltsctsgt Service Center Time Stamp in string format ldquoyyMMddhhmmssplusmnzzrdquo(YearMonthDayHourMinSecondsplusmnTimeZone)ltsngt CBM Serial Numberltstgt Status of a SMS-STATUS-REPORTltstatgt Status of message in memorylttooagt Type-of-Address of ltoagtlttoragt Type-of-Address of ltragtlttoscagt Type-of-Address of ltscagtlttotal1gt Number of message locations in ltmem1gtlttotal2gt Number of messages locations in ltmem2gtltused1gt Total number of messages locations in ltmem1gtltused2gt Total number of messages locations in ltmem2gtltvpgt Validity Period of the short message default value is 167Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 51

Select Message Service +CSMSDescriptionThe supported services include originated (SMS-MO) and terminated short messages (SMS-MT) as well asCell Broadcast Message (SMS-CB) servicesValuesltservicegt0 SMS AT commands are compatible with GSM 0705 Phase 2 version 4701 SMS AT commands are compatible with GSM 0705 Phase 2 + version Syntax AT+CSMS=ltservicegtCommand Possible responsesAT+CSMS=0Note SMS AT command Phase 2 version 470+CSMS 111OKNote SMS-MO SMS-MT and SMS-CB supportedAT+CSMS=1Note SMS AT command Phase 2 ++CSMS 111Note SMS-MO SMS-MT and SMS-CB supportedAT+CSMSNote Current values +CSMS 0111OKNote GSM 0340 and 0341 (SMS AT commandPhase 2 version 470AT+CSMS=Note Possible services+CSMS (01)OK

New Message Acknowledgement +CNMADescription

This command allows reception of a new message routed directly to the TE to be acknowledgedIn TEXT mode only positive acknowledgement to the network (RP-ACK) is possibleIn PDU mode either positive (RP-ACK) or negative (RP-ERROR) acknowledgement to the network ispossibleAcknowledgement with +CNMA is possible only if the +CSMS parameter is set to 1 (+CSMS=1) when a+CMT or +CDS indication is shown (see +CNMI command)If no acknowledgement occurs within the network timeout an RP-ERROR is sent to the network The ltmtgtand ltdsgt parameters of the +CNMI command are then reset to zero (do not show new message indication)Valuesltngt Type of acknowledgement in PDU mode0 send RP-ACK without PDU (same as TEXT mode)1 send RP-ACK with optional PDU message2 send RP-ERROR with optional PDU messageltlengthgt Length of the PDU messageSyntaxCommand syntax in text mode AT+CNMACommand syntax in PDU mode AT+CNMA [ = ltngt [ ltlengthgt [ ltCRgtNote PDU is entered using ltackpdugt format instead of ltpdugt format (eg SMSC address field is notpresent)PDU is entered ltctrl-Z ESCgt ] ] ]Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 52Example of new message acknowledgement in TEXT modeCommand Possible responsesAT+CMGF=1Note Set TEXT modeOKNote TEXT mode validAT+CNMI=22000Note ltmtgt=2OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtReceived messageNote message receivedAT+CNMANote acknowledge the message receivedOKNote send positive acknowledgement to the networkAT+CNMANote try to acknowledge again+CMS ERROR 340Note no +CNMA acknowledgment expectedExample of new message acknowledgement in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode valid+CMT 2907913366003000F1240B913366920547F30000003003419404800B506215D42ECFE7E17319Note message receivedAT+CNMA=2ltlengthgt ltCRgthellip Pdu message hellip ltCtrl-ZESCgtNote negative acknowledgement for themessageOKNote send a negative acknowledgement to the network(RP-ERROR) with PDU message (ltackpdugt format)

Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 53

Preferred Message Storage +CPMSDescriptionThis command allows the message storage area to be selected (for reading writing etc)Valuesltmem1gt Memory used to list read and delete messages It can beldquoSMrdquo SMS message storage in SIM (default)ldquoBMrdquo CBM message storage (in volatile memory)ldquoSRrdquo Status Report message storage (in SIM if the EF-SMR file exists otherwise in the ME non volatilememory)Note ldquoSRrdquo ME non-volatile memory is cleared when another SIM card is inserted It is kept even aftera reset while the same SIM card is usedltmem2gt Memory used to write and send messagesldquoSMrdquo SMS message storage in SIM (default)If the command is correct the following message indication is sent+CPMS ltused1gtlttotal1gtltused2gtlttotal2gtWhen ltmem1gt is selected all following +CMGL +CMGR and +CMGD commands are related to the type ofSMS stored in this memorySyntax AT+CPMS=ltmem1gt[ltmem2gt]Command Possible responsesAT+CPMS=Note Possible message storages+CPMS ((ldquoSMrdquordquoBMrdquordquoSRrdquo)(ldquoSMrdquo))OKNoteRead list delete SMS CBM or SMS Status ReportWrite send SMSAT+CPMSNote Read+CPMS ldquoSMrdquo3 10rdquoSMrdquo310OKNote Read writehellipSMS fromto SIM3 SMS are stored in SIM 10 is the total memory available inSIMAT+CPMS=rdquoAMrdquoNote Select false message storage+CMS ERROR 302AT+CPMS=rdquoBMrdquoNote Select CBM message storage+CPMS 220310OKNote Read list delete CBM from RAM 2 CBM are stored inRAMAT+CPMSNote Read+CPMS ldquoBMrdquo220rdquoSMrdquo310OKNoteRead list delete CBM from RAMWrite SMS to SIMChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 54

Preferred Message Format +CMGFDescriptionThe message formats supported are text mode and PDU mode In PDU mode a complete SMS Messageincluding all header information is given as a binary string (in hexadecimal format) Therefore only thefollowing set of characters is allowed lsquo0rsquorsquo1rsquorsquo2rsquorsquo3rsquorsquo4rsquorsquo5rsquorsquo6rsquorsquo7rsquorsquo8rsquorsquo9rsquo lsquoArsquo lsquoBrsquorsquoCrsquorsquoDrsquorsquoErsquorsquoFrsquo Each pair of

characters are converted to a byte (eg lsquo41rsquo is converted to the ASCII character lsquoArsquo whose ASCII code is0x41 or 65) In Text mode all commands and responses are in ASCII characters The format selected isstored in EEPROM by the +CSAS commandValuesThe ltpdugt message is composed of the SC address (laquo 00 means no SC address given use default SCaddress read with +CSCA command) and the TPDU message In this example the length of bytes of theTPDU buffer is 14 coded according to GSM Technical Specification 0340 In this case the TPDU is 0x010x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34 0x0B which is GSM 0340ltfogt 0x01 (SMS-SUBMIT no validity period)ltmrgt (TP-MR) 0x03 (Message Reference)ltdagt (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)ltpidgt (TP-PID) 0x00 (Protocol Identifier)ltdcsgt (TP-DCS) 0x00 (Data Coding Scheme 7 bits alphabet)ltlengthgt (TP-UDL) 0x04 (User Data Length 4 characters of text)TP-UD 0xC9 0xE9 0x34 0x0B (User Data ISSY)TPDU in hexadecimal format must be converted into two ASCII characters eg an byte with hexadecimalvalue 0x2A is presented to the ME as two characters lsquo2rsquo (ASCII 50) and lsquoArsquo (ASCII 65)Syntax AT+CMGFCommand Possible responsesAT+CMGF Note Current message format+CMGF 1OKNote Text modeAT+CMGF=Note Possible message format+CMGF (0-1)OKNote Text or PDU modes are availableExample Sending an SMS Message in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode validAT+CMGS=14ltCRgt0001030691214365000004C9E9340BNote Send complete MSG in PDU mode no SCaddress+CMGS 4OKNote MSG correctly sent ltmrgt is returned

Save Settings +CSASDescriptionAll settings specified by the +CSCA and +CSMP commands are stored in EEPROM if the SIM card is aPhase 1 card or in the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CSASCommand Possible responsesAT+CSASNote Store +CSCA and +CSMP parametersOKNote Parameters savedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 55

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 5: AT cmd

This command allows reception of a new message routed directly to the TE to be acknowledgedIn TEXT mode only positive acknowledgement to the network (RP-ACK) is possibleIn PDU mode either positive (RP-ACK) or negative (RP-ERROR) acknowledgement to the network ispossibleAcknowledgement with +CNMA is possible only if the +CSMS parameter is set to 1 (+CSMS=1) when a+CMT or +CDS indication is shown (see +CNMI command)If no acknowledgement occurs within the network timeout an RP-ERROR is sent to the network The ltmtgtand ltdsgt parameters of the +CNMI command are then reset to zero (do not show new message indication)Valuesltngt Type of acknowledgement in PDU mode0 send RP-ACK without PDU (same as TEXT mode)1 send RP-ACK with optional PDU message2 send RP-ERROR with optional PDU messageltlengthgt Length of the PDU messageSyntaxCommand syntax in text mode AT+CNMACommand syntax in PDU mode AT+CNMA [ = ltngt [ ltlengthgt [ ltCRgtNote PDU is entered using ltackpdugt format instead of ltpdugt format (eg SMSC address field is notpresent)PDU is entered ltctrl-Z ESCgt ] ] ]Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 52Example of new message acknowledgement in TEXT modeCommand Possible responsesAT+CMGF=1Note Set TEXT modeOKNote TEXT mode validAT+CNMI=22000Note ltmtgt=2OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtReceived messageNote message receivedAT+CNMANote acknowledge the message receivedOKNote send positive acknowledgement to the networkAT+CNMANote try to acknowledge again+CMS ERROR 340Note no +CNMA acknowledgment expectedExample of new message acknowledgement in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode valid+CMT 2907913366003000F1240B913366920547F30000003003419404800B506215D42ECFE7E17319Note message receivedAT+CNMA=2ltlengthgt ltCRgthellip Pdu message hellip ltCtrl-ZESCgtNote negative acknowledgement for themessageOKNote send a negative acknowledgement to the network(RP-ERROR) with PDU message (ltackpdugt format)

Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 53

Preferred Message Storage +CPMSDescriptionThis command allows the message storage area to be selected (for reading writing etc)Valuesltmem1gt Memory used to list read and delete messages It can beldquoSMrdquo SMS message storage in SIM (default)ldquoBMrdquo CBM message storage (in volatile memory)ldquoSRrdquo Status Report message storage (in SIM if the EF-SMR file exists otherwise in the ME non volatilememory)Note ldquoSRrdquo ME non-volatile memory is cleared when another SIM card is inserted It is kept even aftera reset while the same SIM card is usedltmem2gt Memory used to write and send messagesldquoSMrdquo SMS message storage in SIM (default)If the command is correct the following message indication is sent+CPMS ltused1gtlttotal1gtltused2gtlttotal2gtWhen ltmem1gt is selected all following +CMGL +CMGR and +CMGD commands are related to the type ofSMS stored in this memorySyntax AT+CPMS=ltmem1gt[ltmem2gt]Command Possible responsesAT+CPMS=Note Possible message storages+CPMS ((ldquoSMrdquordquoBMrdquordquoSRrdquo)(ldquoSMrdquo))OKNoteRead list delete SMS CBM or SMS Status ReportWrite send SMSAT+CPMSNote Read+CPMS ldquoSMrdquo3 10rdquoSMrdquo310OKNote Read writehellipSMS fromto SIM3 SMS are stored in SIM 10 is the total memory available inSIMAT+CPMS=rdquoAMrdquoNote Select false message storage+CMS ERROR 302AT+CPMS=rdquoBMrdquoNote Select CBM message storage+CPMS 220310OKNote Read list delete CBM from RAM 2 CBM are stored inRAMAT+CPMSNote Read+CPMS ldquoBMrdquo220rdquoSMrdquo310OKNoteRead list delete CBM from RAMWrite SMS to SIMChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 54

Preferred Message Format +CMGFDescriptionThe message formats supported are text mode and PDU mode In PDU mode a complete SMS Messageincluding all header information is given as a binary string (in hexadecimal format) Therefore only thefollowing set of characters is allowed lsquo0rsquorsquo1rsquorsquo2rsquorsquo3rsquorsquo4rsquorsquo5rsquorsquo6rsquorsquo7rsquorsquo8rsquorsquo9rsquo lsquoArsquo lsquoBrsquorsquoCrsquorsquoDrsquorsquoErsquorsquoFrsquo Each pair of

characters are converted to a byte (eg lsquo41rsquo is converted to the ASCII character lsquoArsquo whose ASCII code is0x41 or 65) In Text mode all commands and responses are in ASCII characters The format selected isstored in EEPROM by the +CSAS commandValuesThe ltpdugt message is composed of the SC address (laquo 00 means no SC address given use default SCaddress read with +CSCA command) and the TPDU message In this example the length of bytes of theTPDU buffer is 14 coded according to GSM Technical Specification 0340 In this case the TPDU is 0x010x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34 0x0B which is GSM 0340ltfogt 0x01 (SMS-SUBMIT no validity period)ltmrgt (TP-MR) 0x03 (Message Reference)ltdagt (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)ltpidgt (TP-PID) 0x00 (Protocol Identifier)ltdcsgt (TP-DCS) 0x00 (Data Coding Scheme 7 bits alphabet)ltlengthgt (TP-UDL) 0x04 (User Data Length 4 characters of text)TP-UD 0xC9 0xE9 0x34 0x0B (User Data ISSY)TPDU in hexadecimal format must be converted into two ASCII characters eg an byte with hexadecimalvalue 0x2A is presented to the ME as two characters lsquo2rsquo (ASCII 50) and lsquoArsquo (ASCII 65)Syntax AT+CMGFCommand Possible responsesAT+CMGF Note Current message format+CMGF 1OKNote Text modeAT+CMGF=Note Possible message format+CMGF (0-1)OKNote Text or PDU modes are availableExample Sending an SMS Message in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode validAT+CMGS=14ltCRgt0001030691214365000004C9E9340BNote Send complete MSG in PDU mode no SCaddress+CMGS 4OKNote MSG correctly sent ltmrgt is returned

Save Settings +CSASDescriptionAll settings specified by the +CSCA and +CSMP commands are stored in EEPROM if the SIM card is aPhase 1 card or in the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CSASCommand Possible responsesAT+CSASNote Store +CSCA and +CSMP parametersOKNote Parameters savedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 55

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 6: AT cmd

Chapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 53

Preferred Message Storage +CPMSDescriptionThis command allows the message storage area to be selected (for reading writing etc)Valuesltmem1gt Memory used to list read and delete messages It can beldquoSMrdquo SMS message storage in SIM (default)ldquoBMrdquo CBM message storage (in volatile memory)ldquoSRrdquo Status Report message storage (in SIM if the EF-SMR file exists otherwise in the ME non volatilememory)Note ldquoSRrdquo ME non-volatile memory is cleared when another SIM card is inserted It is kept even aftera reset while the same SIM card is usedltmem2gt Memory used to write and send messagesldquoSMrdquo SMS message storage in SIM (default)If the command is correct the following message indication is sent+CPMS ltused1gtlttotal1gtltused2gtlttotal2gtWhen ltmem1gt is selected all following +CMGL +CMGR and +CMGD commands are related to the type ofSMS stored in this memorySyntax AT+CPMS=ltmem1gt[ltmem2gt]Command Possible responsesAT+CPMS=Note Possible message storages+CPMS ((ldquoSMrdquordquoBMrdquordquoSRrdquo)(ldquoSMrdquo))OKNoteRead list delete SMS CBM or SMS Status ReportWrite send SMSAT+CPMSNote Read+CPMS ldquoSMrdquo3 10rdquoSMrdquo310OKNote Read writehellipSMS fromto SIM3 SMS are stored in SIM 10 is the total memory available inSIMAT+CPMS=rdquoAMrdquoNote Select false message storage+CMS ERROR 302AT+CPMS=rdquoBMrdquoNote Select CBM message storage+CPMS 220310OKNote Read list delete CBM from RAM 2 CBM are stored inRAMAT+CPMSNote Read+CPMS ldquoBMrdquo220rdquoSMrdquo310OKNoteRead list delete CBM from RAMWrite SMS to SIMChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 54

Preferred Message Format +CMGFDescriptionThe message formats supported are text mode and PDU mode In PDU mode a complete SMS Messageincluding all header information is given as a binary string (in hexadecimal format) Therefore only thefollowing set of characters is allowed lsquo0rsquorsquo1rsquorsquo2rsquorsquo3rsquorsquo4rsquorsquo5rsquorsquo6rsquorsquo7rsquorsquo8rsquorsquo9rsquo lsquoArsquo lsquoBrsquorsquoCrsquorsquoDrsquorsquoErsquorsquoFrsquo Each pair of

characters are converted to a byte (eg lsquo41rsquo is converted to the ASCII character lsquoArsquo whose ASCII code is0x41 or 65) In Text mode all commands and responses are in ASCII characters The format selected isstored in EEPROM by the +CSAS commandValuesThe ltpdugt message is composed of the SC address (laquo 00 means no SC address given use default SCaddress read with +CSCA command) and the TPDU message In this example the length of bytes of theTPDU buffer is 14 coded according to GSM Technical Specification 0340 In this case the TPDU is 0x010x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34 0x0B which is GSM 0340ltfogt 0x01 (SMS-SUBMIT no validity period)ltmrgt (TP-MR) 0x03 (Message Reference)ltdagt (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)ltpidgt (TP-PID) 0x00 (Protocol Identifier)ltdcsgt (TP-DCS) 0x00 (Data Coding Scheme 7 bits alphabet)ltlengthgt (TP-UDL) 0x04 (User Data Length 4 characters of text)TP-UD 0xC9 0xE9 0x34 0x0B (User Data ISSY)TPDU in hexadecimal format must be converted into two ASCII characters eg an byte with hexadecimalvalue 0x2A is presented to the ME as two characters lsquo2rsquo (ASCII 50) and lsquoArsquo (ASCII 65)Syntax AT+CMGFCommand Possible responsesAT+CMGF Note Current message format+CMGF 1OKNote Text modeAT+CMGF=Note Possible message format+CMGF (0-1)OKNote Text or PDU modes are availableExample Sending an SMS Message in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode validAT+CMGS=14ltCRgt0001030691214365000004C9E9340BNote Send complete MSG in PDU mode no SCaddress+CMGS 4OKNote MSG correctly sent ltmrgt is returned

Save Settings +CSASDescriptionAll settings specified by the +CSCA and +CSMP commands are stored in EEPROM if the SIM card is aPhase 1 card or in the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CSASCommand Possible responsesAT+CSASNote Store +CSCA and +CSMP parametersOKNote Parameters savedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 55

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 7: AT cmd

characters are converted to a byte (eg lsquo41rsquo is converted to the ASCII character lsquoArsquo whose ASCII code is0x41 or 65) In Text mode all commands and responses are in ASCII characters The format selected isstored in EEPROM by the +CSAS commandValuesThe ltpdugt message is composed of the SC address (laquo 00 means no SC address given use default SCaddress read with +CSCA command) and the TPDU message In this example the length of bytes of theTPDU buffer is 14 coded according to GSM Technical Specification 0340 In this case the TPDU is 0x010x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34 0x0B which is GSM 0340ltfogt 0x01 (SMS-SUBMIT no validity period)ltmrgt (TP-MR) 0x03 (Message Reference)ltdagt (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)ltpidgt (TP-PID) 0x00 (Protocol Identifier)ltdcsgt (TP-DCS) 0x00 (Data Coding Scheme 7 bits alphabet)ltlengthgt (TP-UDL) 0x04 (User Data Length 4 characters of text)TP-UD 0xC9 0xE9 0x34 0x0B (User Data ISSY)TPDU in hexadecimal format must be converted into two ASCII characters eg an byte with hexadecimalvalue 0x2A is presented to the ME as two characters lsquo2rsquo (ASCII 50) and lsquoArsquo (ASCII 65)Syntax AT+CMGFCommand Possible responsesAT+CMGF Note Current message format+CMGF 1OKNote Text modeAT+CMGF=Note Possible message format+CMGF (0-1)OKNote Text or PDU modes are availableExample Sending an SMS Message in PDU modeCommand Possible responsesAT+CMGF=0Note Set PDU modeOKNote PDU mode validAT+CMGS=14ltCRgt0001030691214365000004C9E9340BNote Send complete MSG in PDU mode no SCaddress+CMGS 4OKNote MSG correctly sent ltmrgt is returned

Save Settings +CSASDescriptionAll settings specified by the +CSCA and +CSMP commands are stored in EEPROM if the SIM card is aPhase 1 card or in the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CSASCommand Possible responsesAT+CSASNote Store +CSCA and +CSMP parametersOKNote Parameters savedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 55

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 8: AT cmd

Restore Settings +CRESDescriptionAll settings specified in the +CSCA and +CSMP commands are restored from EEPROM if the SIM card isPhase 1 or from the SIM card if it is a Phase 2 SIM cardValues No parametersSyntax AT+CRESCommand Possible responsesAT+CRESNote Restore +CSCA and +CSMP parametersOKNote Parameters restored

Show Text Mode Parameters +CSDHDescriptionThis command gives additional information on text mode result codes This information is given in brackets inthe +CMTI +CMT +CDS +CMGR +CMGL commandsValues ltngt show indicator0 do not show header values1 show the values in result codesSyntax AT+CSDHCommand Possible responsesAT+CSDH=0Note Set value to ldquodo not howrdquoOKAT+CSDHNote Current value+CSDH 0OKNote Do not show header valuesChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 56

New Message Indication +CNMIDescriptionThis command selects the procedure for message reception from the networkValuesltmodegt controls the processing of unsolicited result codesNote Only ltmodegt=2 is supportedAny other value for ltmodegt (01 or 3) is accepted (return code will be OK) but the processing of unsolicitedresult codes will be the same as with ltmodegt=20 Buffer unsolicited result codes in the TA If TA result code buffer is full indications can be buffered insome other place or the oldest indications may be discarded and replaced with the new receivedindications1 Discard indication and reject new received message unsolicited result codes when TA-TE link is reservedOtherwise forward them directly to the TE2 Buffer unsolicited result codes in the TA when TA-TE link is reserved and flush them to the TE afterreservation Otherwise forward them directly to the TE3 Forward unsolicited result codes directly to the TE TA-TE link specific inband used to embed result codesand data when TA is in on-line data modeltmtgt sets the result code indication routing for SMS-DELIVERs Default is 00 No SMS-DELIVER indications are routed1 SMS-DELIVERs are routed using unsolicited code +CMTI ldquoSMrdquoltindexgt2 SMS-DELIVERs (except class 2 messages) are routed using unsolicited code +CMT [ltalphagt]ltlengthgt ltCRgt ltLFgt ltpdugt (PDU mode) or +CMT ltoagt[ltalphagt] ltsctsgt [lttooagt ltfogt ltpidgt ltdcsgtltscagt lttoscagt ltlengthgt] ltCRgtltLFgtltdatagt (text mode)

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 9: AT cmd

3 Class 3 SMS-DELIVERs are routed directly using code in ltmtgt=2 Message of other classes result inindication ltmtgt=1ltbmgt set the rules for storing received CBMs (Cell Broadcast Message) types depend on its coding schemethe setting of Select CBM Types (+CSCB command) and ltbmgt Default is 00 No CBM indications are routed to the TE The CBMs are stored1 The CBM is stored and an indication of the memory location is routed to the customer application usingunsolicited result code +CBMI ldquoBMrdquo ltindexgt2 New CBMs are routed directly to the TE using unsolicited result code +CBM ltlengthgtltCRgtltLFgtltpdugt(PDU mode) or +CBMltsngtltmidgtltdcsgtltpagegtltpagesgt(Text mode) ltCRgtltLFgt ltdatagt3 Class 3 CBMs as ltbmgt=2 Other classes CBMs as ltbmgt=1ltdsgt for SMS-STATUS-REPORTs Default is 00 No SMS-STATUS-REPORTs are routed1 SMS-STATUS-REPORTs are routed using unsolicited code +CDS ltlengthgt ltCRgt ltLFgt ltpdugt (PDUmode) or +CDS ltfogtltmrgt [ltragt] [lttoragt] ltsctsgtltdtgtltstgt (Text mode)2 SMS-STATUS-REPORTs are stored and routed using the unsolicited result code +CDSI ldquoSRrdquoltindexgtltbfrgt Default is 00 TA buffer of unsolicited result codes defined within this command is flushed to the TE when ltmodegt 1hellip3is entered (OK response shall be given before flushing the codes)1 TA buffer of unsolicited result codes defined within this command is cleared when ltmodegt 1hellip3 isenteredSyntax AT+CNMI=ltmodegtltmtgtltbmgtltdsgtltbfrgtCommand Possible responsesAT+CNMI=21000 Note ltmtgt=1 OKAT+CMTI ldquoSMrdquo1Note message receivedAT+CNMI=22000 Note ltmtgt=2 OK+CMT ldquo123456rdquordquo9810011230 00+00rdquo129432240 ldquo15379rdquo1295ltCRgtltLFgtNote message receivedAT+CNMI=20010 Note ltdsgt=1 OKAT+CMGS=rdquo+33146290800rdquoltCRgtMessage to send ltctrl-ZgtNote Send a message in text mode+CMGS 7OKNote Successful transmission+CDS 2 116 rdquo+33146290800rdquo 145 ldquo981001123007+04rdquo ldquo981001 123008+04rdquo 0Note message was correctly deliveredChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 57

Read Message +CMGRDescriptionThis command allows the application to read stored messages The messages are read from the memoryselected by the +CPMS commandCommand syntax AT+CMGR=ltindexgtResponse syntax for text mode+CMGRltstatgtltoagt[ltalphagt] ltsctsgt [lttooagtltfogtltpidgtltdcsgtltscagtlttoscagtltlengthgt] ltCRgtltLFgt ltdatagt (for SMSDELIVERonly)+CMGR ltstatgtltdagt[ltalphagt] [lttodagtltfogtltpidgtltdcsgt [ltvpgt] ltscagt lttoscagtltlengthgt]ltCRgtltLFgt ltdatagt (forSMS-SUBMIT only)+CMGR ltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only)Response syntax for PDU mode+CMGR ltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugtA message read with status ldquoREC UNREADrdquo will be updated in memory with the status ldquoREC READrdquo

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 10: AT cmd

Note The ltstatgt parameter for SMS Status Reports is always ldquoREADrdquoCommand Possible responsesAT+CMTI ldquoSMrdquo1Note New message receivedAT+CMGR=1Note Read the message+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKAT+CMGR=1Note Read the message again+CMGR ldquoREC UNREADrdquordquo0146290800rdquordquo981001182211+00rdquoltCRgtltLFgtABCdefGHIOKNote Message is read nowAT+CMGR=2Note Read at a wrong index+CMS ERROR 321Note Error invalid indexAT+CMGF=0 +CMGR=1Note In PDU mode+CMGR 2ltlengthgt ltCRgtltLFgtltpdugtOKNote Message is stored but unsent no ltalphagtfieldAT+CMGF=1+CPMS=rdquoSRrdquo+CNMI=2Reset to text mode set read memory to ldquoSRrdquo and allowstorage of further SMS Status Report into ldquoSRrdquo memoryOKAT+CMSS=3Send an SMS previously stored+CMSS 160OK+CDSI ldquoSRrdquo1New SMS Status Report stored in ldquoSRrdquo memory at index 1AT+CMGR=1Read the SMS Status Report+CMGR READ6160+33612345678129010531151509+00010531151509+000OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 58

List Message +CMGLDescriptionThis command allows the application to read stored messages by indicating the type of the message to readThe messages are read from the memory selected by the +CPMS commandValuesltstatgt possible values (status of messages in memory)Text modepossible valuesPDU modepossible valuesStatus of messages in memoryldquoREC UNREADrdquo 0 received unread messagesldquoREC READrdquo 1 received read messagesldquoSTO UNSENTrdquo 2 stored unsent messagesldquoSTO SENTrdquo 3 stored sent messagesldquoALLrdquo 4 all messagesNote For SMS Status Reports only ldquoALLrdquo 4 and ldquoREADrdquo 1 values of the ltstatgt parameter will listmessages other values will only return OKCommand syntax AT+CMGL=ltstatgtResponse syntax for text mode+CMGL ltindexgtltstatgtltdaoagt[ltalphagt] [ltsctsgt lttooatodagt ltlengthgt] ltCRgtltLFgtltdatagt (for SMSDELIVER

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 11: AT cmd

and SMS-SUBMIT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)+CMGL ltindexgtltstatgtltfogtltmrgt[ltragt][lttoragt]ltsctsgtltdtgtltstgt (for SMS-STATUS-REPORT only maybe followed by other ltCRgtltLFgt+CMGLltindexgthellip)Response syntax for PDU mode+CMGL ltindexgtltstatgt [ltalphagt] ltlengthgt ltCRgtltLFgt ltpdugt (for SMS-DELIVER SMS-SUBMIT andSMS-STATUS-REPORT may be followed by other ltCRgtltLFgt+CMGLltindexgthellip)Command Possible responsesAT+CMGL=ldquoREC UNREADrdquoNote List unread messages in text mode+CMGL 1rdquoREC UNREADrdquordquo0146290800rdquoltCRgtltLFgt Unread message +CMGL 3rdquoREC UNREADrdquo ldquo46290800rdquo ltCRgtltLFgtAnother message unreadOKNote 2 messages are unread these messages will then havetheir status changed to ldquoREC READrdquo (+CSDH0)AT+CMGL=rdquoREC READrdquoNote List read messages in text mode+CMGL 2rdquoREC READrdquordquo0146290800rdquoltCRgtltLFgtKeep coolOKAT+CMGL=rdquoSTO SENTrdquoNote List stored and sent messages in textmodeOKNote No message foundAT+CMGL=1Note List read messages in PDU mode+CMGL 1126ltCRgtltLFgt07913366003000F3040B913366920547F40013001190412530400741AA8E5A9C5201OKChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 59

Send Message +CMGSDescriptionThe ltaddressgt field is the address of the terminal to which the message is sent To send the messagesimply type ltctrl-Zgt character (ASCII 26) The text can contain all existing characters except ltctrl-Zgt andltESCgt (ASCII 27) This command can be aborted using the ltESCgt character when entering text In PDUmode only hexadecimal characters are used (lsquo0rsquohelliprsquo9rsquorsquoArsquohelliprsquoFrsquo)Values ltctrl-Z ESC gt type this to send the messageCommand syntax in text modeAT+CMGS= ltdagt [ lttodagt ] ltCRgttext is entered ltctrl-Z ESC gtCommand syntax in PDU modeAT+CMGS= ltlengthgt ltCRgtPDU is entered ltctrl-Z ESC gtCommand Possible responsesAT+CMGS=rdquo+33146290800rdquoltCRgtPlease call me soon Fred ltctrl-ZgtNote Send a message in text mode+CMGS ltmrgtOKNote Successful transmissionAT+CMGS=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Send a message in PDU mode+CMGS ltmrgt

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 12: AT cmd

OKNote Successful transmissionThe message reference ltmrgt is returned to the application and allocated by the product This number beginswith 0 is incremented by one for each outgoing message (successes and failures) and is cyclic on one byte(0 follows 255) Note This number is not a storage number Outgoing messages are not stored

Write Message to Memory +CMGWDescriptionThis command stores a message in memory (either SMS-SUBMIT or SMS-DELIVERs) The memory locationltindexgt is returned (no choice possible as with phonebooks +CPBW) Text or PDU is entered as describedfor the Send Message +CMGS commandValuesltoadagt Originating or Destination Address Value in string formatlttooatodagt Type of Originating Destination Addressltstatgt Integer type in PDU mode (default 2 for +CMGW) or string type in text mode (default ldquoSTOUNSENTrdquo for +CMGW) Indicates the status of message in memory If ltstatgt is omitted thestored message is considered as a message to sendltstatgt0 ldquoREC UNREADrdquo1 ldquoREC READrdquo2 ldquoSTO UNSENTrdquo3 ldquoSTO SENTrdquoltlengthgt Length of the actual data unit in bytesCommand syntax in text mode (ltindexgt is returned in both cases)AT+CMGW= ltoadagt [lttooatodagt [ltstatgt ] ] ltCRgtenter text ltctrl-Z ESCgtCommand syntax in PDU modeAT+CMGW= ltlengthgt [ltstatgt] ltCRgtgive PDU ltctrl-Z ESCgtResponse syntax+CMGW ltindexgt or +CMS ERROR lterrgt if writing failsCommand Possible responsesAT+CMGW=rdquo+33146290800rdquoltCRgtHello how are you ltctrl-ZgtNote Write a message in text mode+CMGW 4OKNote Message stored in index 4AT+CMGW=ltlengthgtltCRgtltpdugtltctrl-ZgtNote Write a message in PDU mode+CMGW ltindexgtOKNote Message stored in ltindexgtChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 60

Send Message from Storage +CMSSDescriptionThis command sends a message stored at location value ltindexgtValuesltindexgt location of stored messageltdagt desination addresslttodagt type of destination addressltmrgt message referenceCommand syntax AT+CMSS=ltindexgt[ltdagt [lttodagt] ]Response syntax +CMSS ltmrgt or +CMS ERROR lterrgt if sending failsIf a new recipient address ltdagt is given it will be used instead of the one stored with the messageCommand Possible responsesAT+CMGW=0660123456ltCRgt

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 13: AT cmd

Today is my birthdayNote+CMGW 5OKNoteMessage stored with index 5AT+CMSS=5 0680654321Note Send the message 5 to a different destination numberAT+CMSSltmrgtOKNote Successful transmissionAT+CMSS=5 0680654321Note Send the message 5 to a different destination number+CMSSltmrgtOKNote Successful transmission

Set Text Mode Parameters +CSMPDescriptionThis command selects a value for ltvpgt ltpidgt and ltdcsgtValuesThe ltfogt byte comprises 6 different fieldsB7 B6 B5 b4 b3 b2 b1 b0RP UDHI SRR VPF RD MTIRP Reply Path not used in text modeUDHI User Data Header Information b6=1 if the beginning of the User Data field contains a Header inaddition to the short message This option is not supported in +CSMP command but can be used inPDU mode (+CMGS)SRR Status Report Request b5=1 if a status report is requested This mode is supportedVPF Validity Period Formatb4=0 amp b3=0 -gt ltvpgt field is not presentb4=1 amp b3=0 -gt ltvpgt field is present in relative formatOthers formats (absolute amp enhanced) are not supportedRD Reject Duplicates b2=1 to instruct the SC to reject an SMS-SUBMIT for an SM still held in the SCwhich has the same ltmrgt and the same ltdagt as the previously submitted SM from the same ltoagtMTI Message Type Indicatorb1=0 amp b0=0 -gt SMS-DELIVER (in the direction SC to MS)b1=0 amp b0=1 -gt SMS-SUBMIT (in the direction MS to SC)In text mode ltvpgt is only coded in ldquorelativerdquo format The default value is 167 (24 hours) This means thatone byte can describe different valuesVP value Validity period value0 to 143 (VP + 1) x 5 minutes (up to 12 hours)144 to 167 12 hours + ( (VP ndash 143) x 30 minutes )168 to 196 (VP ndash 166) x 1 day197 to 255 (VP ndash 192) x 1 weekltpidgt is used to indicate the higher layer protocol being used or indicates interworking with a certain type oftelematic device For example 0x22 is for group 3 telefax 0x24 is for voice telephone 0x25 is for ERMESltdcsgt is used to determine the way the information is encoded Compressed text is not supported Only GSMdefault alphabet 8 bit data and UCS2 alphabet are supportedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 61Syntax AT+CSMP=ltfogt ltvpgt ltpidgtltdcsgtCommand Possible responsesAT+CSMPNote current values+CSMP 0000OKNote No validity periodltdcsgt= PCCP437 alphabet (8 bits 1048774 7 bits)

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 14: AT cmd

AT+CMPS=172364244Noteltvpgt = 23 (2 hours relative format)ltdcsgt = GSM 8 bits alphabetOKNote Command correct

Delete Message +CMGDDescriptionThis command deletes one or several messages from preferred message storage (ldquoBMrdquo SMS CB lsquoRAMstoragersquo ldquoSMrdquo SMSPP storage lsquoSIM storagersquo or ldquoSRrdquo SMS Status-Report storage)Valuesltindexgt(1-20) When the preferred message storage is ldquoBMrdquoInteger type values in the range of location numbers of SIM Message memory when thepreferred message storage is ldquoSMrdquo or ldquoSRrdquoltDelFlaggt0 Delete message at location ltindexgt1 Delete All READ messages2 Delete All READ and SENT messages3 Delete All READ SENT and UNSENT messages4 Delete All messagesNote When the preferred message storage is ldquoSRrdquo as SMS status reports are assumed to have a ldquoREADrdquostatus if ltDelFlaggt is greater than 0 all SMS status reports will be deletedSyntax AT+CMGD=ltIndexgt [ltDelFalggt]Command Possible responses+CMTIrdquoSMrdquo3Note New message receivedAT+CMGR=3Note Read it+CMGR ldquoREC UNREADrdquordquo0146290800rdquoldquo981001181920+00rdquo ltCRgtltLFgtMessage receivedNote Unread message received from 0146290800 on the 01101998 at 18H19m 20sAT+CMGD=3Note Delete itOKNote Message deletedAT+CMGD=10 OKNote The message from the preferred message storage at the location 1 is deletedAT+CMGD=11 OKNote All READ messages from the preferred message storage are deletedAT+CMGD=12 OKNote All READ messages and SENT mobile originated messages are deletedAT+CMGD=13 OKNote All READ SENT and UNSENT messages are deletedAT+CMGD=14 OKNote All messages are deletedChapter 9 ndash Short Messages CommandsMulti-Tech Systems Inc GSM Wireless AT Commands - PN S000293B 62

Service Center Address +CSCADescriptionThis command indicates the service center to which the message must be sent The product has no defaultvalue for this address If the application tries to send a message without having indicated the service centeraddress an error will be generated Therefore the application must indicate the SC address when initializingthe SMS This address is then permanently valid The application may change it if necessaryValuesltscagt service center addressSyntax AT+CSCA

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003

Page 15: AT cmd

Command Possible responsesAT+CMGS= ldquo+33146290800rdquoltCRgtHello how are youltctrl-ZgtNote Send a message+CMS ERROR 330Note service center unknownAT+CSCA=rdquo0696741234rdquoNote Service center initializationOKAT+CMGS=rdquo+33146290800rdquoltCRgtHappy Birthday ltctrl-ZgtNote+CMGS 1OKNote Successful transmission

Select Cell Broadcast Message Types +CSCBDescriptionThis command selects which types of CBMs are to be received by the ME This command is allowed in bothPDU and text modesValuesThe ltbmgt parameter of +CNMI command controls the message indicationThe activation of CBM reception (ltmodegt=0) can select only specific Message Indentifiers (list in ltmidsgt)for specific Languages (list in ltdcssgt) but the deactivation stops any reception of CBMs (only AT+CSCB=1 isallowed)Message Identifiers (ltmidsgt parameter) indicates the type of message identifiers for which the ME shouldlistenltdcssgt Supported languages0 for German 8 for Portuguese1 for English 9 for Finnish2 for Italian 10 for Norwegian3 for French 11 for Greek4 for Spanish 12 for Turkish5 for Dutch 13 for Hungarian6 for Swedish 14 for Polish7 for Danish 32 for CzechSyntax AT+CSCB= ltmodegt [ ltmidsgt [ ltdcssgt ] ]Important Note Test read command (AT+CSCB is not supported)Command Possible responsesAT+CSCB=0rdquo15-175086rdquordquo rdquoNote Accept SMS-CB types 15161750 and 86 inany languageOKNote CBMs can be received+CBM 10ltCRgtltLFgt00112233445566778899Note CBM length of a received CellBroadcast message (SMS-CB) CBM bytesin PDU modeAT+CSCB=1Note Deactivate the reception of CBMsOK

Note CBM reception is completely stoppedoftware release 640b generated on the4th of July 2003