ReceiveSMS: Receive SMS

Introduction

The ReceiveSMS function block is used to wait for SMS received by a GSM Modem. For example, the controller can handle a command received in SMS from a specified cell phone.

NOTE:  

Be sure to have your GSM modem properly configured as follows:

oMake sure the SIM card in the modem is unlocked.

oMake sure the telephone number of the SMS center is valid.

You can use the ConfigSim function block to properly set these parameters from your application program.

Graphical Representation

G-SE-0002256.1.gif-high.gif

 

 

I/O Variables Description

Output

Type

Description

smsText

STRING(255)

The smsText output contains the body of the text message.

phoneNb

STRING

The phoneNb output contains the number of the phone that sent the SMS.

smsDate

DATE_AND_TIME

The smsDate output contains the date of the communication.

The input and output parameters that are common to all modem library function blocks are described elsewhere.

Example

This figure shows the declaration and use of the ReceiveSMS function

G-SE-0002506.1.jpg