Sending SMS messages via Elipse E3 with Elipse GSM driver.

Introduction

To send SMS messages via Elipse E3, you will need to use the Elipse GSM driver. In summary, this driver allows Elipse E3 to send and receive Modem commands via text messages, called AT commands.

You can find several sites online that will explain which AT commands are available. To send SMS messages, you will need to fire only a few commands.

Modem

The Modem we used for developing this test is the ZTE MF710. You will need to add a chip that can send SMS (please refer to the chip provider for costs of this service).

When you purchase the Modem, it may come with a CD that has the required drivers. Otherwise, when you plug the modem to the machine, the option for driver installation will pop up.

Soon after driver installation, you will be able to check the installed interfaces at the Windows device manager.

In this case, for example, the driver must be set up to connect to COM5.

For this Modem, we employed AT+CFUN command to enable its use. This command sets the level of functionality in the MT: “full functionality” is where the highest level of power is drawn, and “minimum functionality” is where minimum power is drawn. The possible values for this command are:

  • 0: minimum functionality
  • 1: full functionality
  • 2: disable phone transmit RF circuits only
  • 3: disable phone receive RF circuits only
  • 4: disable phone both transmit and receive RF circuits

In this case, we sent value 1 to this command to enable the Modem. Keep in mind that when you disconnect the Modem and then reconnect it to the machine, you will need to send the command again. A possible event to execute this command is the driver’s AfterStart event.

In addition to the AT+CFUN command, you will also need to enable Text Mode (AT+CMGF=1) in the driver; this will enable SMS sending. We recommend that you enable this mode soon after executing the command to enable the Modem.

SMS Sending

Right after the commands are executed, the SMS sending will take place. To do so, you will need to write two tags in the driver, to implement the following commands:

1 – AT+CMGS=”

2 – Text_Message

Notice that “phonenumber” must be a string; however, since the tag will contain only numbers, the driver may interpret this tag as numerical, and this can cause errors when writing the CMGS command. Therefore, we recommend always converting the value into string via scripts in the command.

Tips

  • The driver’s default timeout is 1 second. We recommend increasing this time (for example, up to 5 seconds), because it may take longer for the Modem to respond to the command.
  • We also recommend setting up the driver to write asynchronously, thus avoiding the application from hanging during writing.

Conclusion

The application attached to this article was developed with Elipse E3 version 4.8 b352; it shows you how to send an SMS message manually, and also how to check whether the alarm has been sent. It was set up according to all the recommendations previously made is this article. The Elipse GSM driver must be updated to its latest version to make sure the application works properly.

NOTE: Most USB Modems support two communication modes: Text Mode and PDU Mode. The Elipse GSM driver supports only Text Mode; therefore, any Modems that are compatible only with PDU mode will not be compatible with the Elipse driver.

For further information on SMS messages (such as AT commands, communication modes, among others), check
https://www.developershome.com/sms/. Suggested reading: sections 13, 14, 15, 17, 18, 19, and 20.

To send SMS messages without Elipse E3, try software that can open a serial terminal, such as  RealTerm or Putty.

 

Attachments:

Elipse_SendSMS.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Thoughts on “Sending SMS messages via Elipse E3 with Elipse GSM driver.

Leave a Reply

Your email address will not be published.Required fields are marked *