SlingshotSMS is a lightweight open source SMS gateway that can run run on a laptop or a USB drive and all the code is available on github. Using an GSM modem or cellphone, SlingshotSMS will send and receive text messages on behalf of your web application. It builds on the work of pygsm, an excellent Python library for dealing with AT-compatible modems. What this means is that SlingshotSMS is compatible with Mac, Windows, and Linux, and can interface with a wide range of GSM modems and cell phones — including many sub-$200 field-ready modems like the one we used for testing when we were field-testing last week as part of our participation in Camp Roberts experiments.
Here is a breakdown of the SlingshotSMS workflow. As you can see, the light software needs a USB drive, a computer with internet, and a GSM modem or cell phone. (I have a list of phones supported so far in the readme.txt.) With this setup, you can have a gateway up and running that is totally decentralized and pushing information up to a site or a series of sites. The decentralization is key. For example its users could all be ad hoc networks and all be using pre-paid SIM cards and passing data up to a series of sites. By staying light and by no means competing with in-country telcos providing bulk SMS, we think this has the potential to make systems more resilient.
What SlingshotSMS adds to the work of the pygsm authors is important but very small — it makes a webservice out of a device. With the CherryPy web framework, you start up the server with a double-click and go to
http://127.0.0.1:8080/ to see a list of capabilities. Via normal HTTP, you can send a text message, and when the modem receives a message it will post it to an ‘endpoint’ you specify. The neat thing about this approach is that with a system like Drupal you can have new messages within seconds without waiting for cron to run. Some custom code for Drupal is on its way, but in the meantime, it’s simple to build: receiving a new text message looks just like a user submitting a form.
We are excited to work with other developers on this project. As mentioned above, SlingshotSMS is completely open-source and available on github. If you’re interested in moving SMS tech forward, check out the basic tools that we used to make this happen — CherryPy, pygsm, py2app, and py2exe. To get a sense of how this works on the ground, read Robert’s post from Camp Roberts about sending and receiving SMS messages in near-realtime and how Drupal could respond immediately to emergency alerts.