=============================================================================== W A V E C O M =============================================================================== OPEN AT V1.10 Updated : April 23th, 2002 =============================================================================== (To print this file : use Notepad and remove all margins and default header.) --------------------------------- Content of this file --------------------------------- Sample application n°4 (SMS Automaton) description I. Changes II. Application description III. Application States I - Changes =========== * 01/11/06 - V1.00 Initial revision. * 02/04/23 - V1.10 New Wavecom sample library. The "AT+CNMI", "AT+CMGF" and "AT+CPMS" commands now return "+CME ERROR: 600". II - Application description =========================== This application provides unsolicited responses informing the external application that a formatted SMS has been received. The SMS text may be formatted as follows : #tag#value#/tag#text text#tag2#123456789#/tag2# The Tags are delimitted by the '#' character. The Tags' name are defined in the cTagTab[] const string table in the "appli.c" file, and are case sensitives. A Tag name may not include the '#' character. All the text between the "#tag#" and "#/tag#" expressions is considered as a value for this Tag. This text may not include the '#/' character sequence. All the text between an ending tag "#/tag#" and another starting tag "#tag2#" is ignored and lost. If a SMS format error occurs, the preceding well-formatted data are treated, but the following data are lost. For this example, the syntax of the unsolicited response is the following (Wavecom OpenAt SMS Tag) : +WOST: "tag","value" +WOST: "tag2","123456789" If at least one Tag is well formatted, the SMS is deleted from SIM, otherwise it remains in SIM memory. The provided "appli.c" file uses two example tags : "TEST" and "VALUE". III - Application States ======================== * SMS settings ******** +->* IDLE * | ******** | | | | first IDLE | | | V | ************ +--* SMS INIT * Send "AT+CNMI=2,1,0,0,0;+CMGF=1;+CPMS="SM"" command ************ * SMS received : processing ******** +-->* IDLE * | ******** | | | | "+CMTI" unsolicited response, new SMS received | | | V | ******** | * CMGR * Send the "AT+CMGR" command to read the SMS | ******** | | | | "+CMGR:" intermediate response | | | V | ************* | * CMGR TEXT * Wait for the SMS text | ************* | | | | SMS text received | | | V | *********** +---* CMGR OK * Process SMS text, send +WOST responses, and wait for | *********** the OK response | | | | "OK", SMS is well formatted, otherwise return to IDLE | | | V | ******** +---* CMGD * Send the "AT+CMGD" command to delete this SMS ********