SMS Connections

To implement an SMS service, you need to connect your computer system to mobile networks (or to an aggregator) so that it can send or receive SMS messages. In this section I discuss some of the most common options and protocols that you can use to set up such connections.

Mobile phones and GSM Modems

The most obvious way to have your computer application send and receive SMS messages is to connect it to a mobile phone and use the mobile phone to handle the communications.

This is more or less difficult depending on the type of mobile phone. Most mobile phones can act as modems and can be controlled using traditional modem AT commands over a serial or Bluetooth interface. A special GSM set of extended AT commands can be used to send or receive SMS messages this way; these commands (or a subset) are implemented by most GSM phones. The full set of GSM AT commands is quite extensive and allows complete control over the SMS operations of the phone; the basic ones are listed in Table 3.

To try out the GSM AT commands, you need to connect your mobile phone to your computer using Bluetooth or a serial cable, and interact with the phone using a terminal program such as minicom on GNU/Linux or HyperTerminal on Microsoft Windows. See Figure 5.

A simple way to use a mobile phone to send or receive SMS messages

Figure 5. A simple way to use a mobile phone to send or receive SMS messages

Table 3. Basic GSM extended AT commands to send and receive SMS ...

Get SMS Messaging Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.