Exploiting the Short Message Service as a Control Channel in Challenged Network Environments

The Short Message Service (SMS) is one of the most ubiquitous wireless technologies on Earth. Each year hundreds of billions of messages are sent, demand continues to grow, and competition between cellular providers is driving prices down. These trends create practical opportunities for SMS in today’s mobile systems.

This page details the SMS-TP, a robust SMS-based data channel that runs on a variety of mobile platforms. The SMS-TP has little operational overhead and provides efficient, reliable transport for large messages sent over the cellular network.

The SMS-TP is implemented in within Java's CLDC and runs on a wide variety of Java enabled cell phones, smartphones, and standard Java environments. Platform specific functionality such as logging, compressing data, visual feedback, and sending and receiving SMS messages are abstracted from the core of SMS-TP though a series of abstract classes. This abstraction allows SMS-TP to be ported to new Java platforms by simply writing 'plugins' specific to the new platform. The current release provides plug-ins for both BlackBerry (CLDC) and Linux (Gammu).

Download

The source code for SMS-TP can be downloaded from here. If you experience problems or bugs using SMS-TP, please contact me. Update notifications will be posted to the Tetherless Interest mailing list.

Javadoc for SMS-TP is available here.

Last updated June 22, 2009

Using SMS-TP

Create an SMS Logger for logging events that occur inside of SMS-TP.

The provide code contains two sample loggers. The STDLogger writes to STDOUT and STDERR. The NullLogger (default) ignores all logging input. These classes are used as follows:

SMSLogger pLogger = new STDLogger();

or

SMSLogger pLogger = new NullLogger();

Create a model for collecting information about SMS-TP.

The provided code contains a model for both BlackBerry and Linux. Each class is used as follows:

SMSView pModel = new SMSStatModel(pLogger); // BlackBerry

or

SMSView pModel = new LinuxSMSView(pLogger); // Linux

Create an SMS Handler to send/receive SMS messages on the local platform.

The current release of SMS-TP has support for CLDC and Linux (using Gammu). SMS Handlers are created as follows:

SMSHandler pHandler = new BlackBerrySMSHandler(); // BlackBerry

or

SMSHandler pHandler = new LinuxSMSHandler(5000, pLogger, "sms",
"postgres", ""); // Linux

Please see the Javadoc for the LinuxSMSHandler for an explanation of the parameters.

Create the configuration object.

The SMSConfig class contains configuration settings for SMS-TP.

SMSConfig pConfig = new SMSConfig();

Under Linux, I found that some phones will not accept non-readable characters. It was therefore necessary to base 64 encode data within SMS-TP. To base 64 data within SMS-TP, create the SMSConfig object as follows:

SMSConfig pConfig = new SMSConfig(true);

Create and run SMS-TP.

Instantiate SMS-TP as follows:

SMSDataChannel pController = new SMSDataChannel(pHandler, pLogger, null,
pView, pConfig);

Start and stop SMS-TP as follows:

pController.start();

pController.shutdown();

Sample Code

A test driver for BlackBerry is available in the test/BlackBerry/ directory of the provided code.

A test driver for Linux is available in the test/Linux/ directory of the provided code.

Publications

This work has been published in the following papers:

Earl Oliver. Characterizing the Transport Behaviour of the Short Message Service. The 2010 International Conference on Mobile Systems, Applications, and Services (MobiSys 2010). San Francisco, United States. June 2010. bibtex talk

Earl Oliver. Exploiting the Short Message Service as a Control Channel in Challenged Network Environments. MobiCom 2008 Workshop on Challenged Networks (CHANTS). San Francisco, United States. September 2008. bibtex