http://www.wavecom.com/forum

Open AT ®  Release version:
4.10

Sample - SMS Automaton

Changes

Dependencies

This sample depends on the following libraries :

Application Description

This application provides unsolicited indications to inform the external application that a formatted SMS has been received.

As this application uses the MultiApp library, the following start/stop command has to be used to control the application execution.

 

  AT+AUTOSTART (Secured Control start/stop command)
CommandAnswers
AT+AUTOSTART?+AUTOSTART: <state>
OK
AT+AUTOSTART=?+AUTOSTART: (0-1)
OK
AT+AUTOSTART= <state> +CME ERROR: 3
or
OK
 
ParameterValues rangeDescriptionDefault value
state0-1The current application running state. This parameter is stored in non-volatile memory.0

The init entry point sent to the MultiApp library is the smsauto_init() function. The start/stop entry points linked to the +AUTOSTART command are the smsauto_run() and smsauto_stop() functions.

This application provides unsolicited responses informing the external application that a formatted SMS has been received. The SMS text may be formatted as follows (for example) :

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) :

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".


Updated: Tue Sep 19 17:16:02 CEST 2006;