Development Seed Blog
Setting Up a Two-Way SMS Gateway with Gnokii and Drupal
Gnokii Sends and Receives SMS Text Messages Using USB or Bluetooth
Gnokii Sends and Receives SMS Text Messages Using USB or Bluetooth
In addition to all of the work being done on the SMS Framework, we have also started researching how to quickly create our own two-way SMS gateway for sending and receiving SMS messages. It is a proof of concept based on needs we are hearing from development agencies. Our solution is based around gnokii, an open source project that can be used to control the various functions of any mobile phone it supports. gnokii sends and receives SMS text messages over a USB or Bluetooth connection with the phone.
In our setup we’re using a Nokia 6102i mobile phone, gnokii 0.6.8 (installed using Macports) and a MacBook Pro with Bluetooth.
A daemon, written in Python, manages the process of sending and receiving messages and a Drupal module acts as the end point on the Drupal side. The daemon periodically checks the phone for incoming messages and the server for outgoing messages. If a message is found it is processed and passed to the other side.
An outgoing message that originated from a Drupal module will be stored in a queue temporarily. The daemon checks the queue using an HTTP request. When it finds the queued message it connects the phone, sends the message, and clears the item from the queue. Incoming messages are handled in a similar fashion. When a message is first received it is queued on the mobile phone temporarily. When daemon finds the message waiting on the phone, it passes it to the server using an HTTP request and deletes the entry from the phone.
We are making the daemon open source so check out the code in the Drupal CVS repository and let me know if you want to talk about this.

Comments
FrontlineSMS
Hi Kevin
Exciting post which I was only just pointed to!
I've been in touch with Eric (a colleague of yours) in the past, and spoken to him about my FrontlineSMS platform (http://www.frontlinesms.com) which I've been working on since 2005. We've just released the second version, and a number of people have asked me about developing it to from a USB stick.
Seems like you're making great progress there. If you're interested in talking more - we're about to release the source code for FrontlineSMS - then let me know. Happy to talk.
All the best.
Ken
www.kiwanja.net
Moar SMS hacking, plz!
Really exciting stuff! I've been working on similar SMS projects at the handset level using Mike Edward's Sydewynder framework (Python on s60). It would be great to have a common way of describing these SMS actions so that people could write modules regardless of their gateway...
Pocket SMS Gateway
Hey Kevin,
A common way of handling different gateways? Have you seen the SMS Framework for Drupal? The potential of having a gateway in your pocket on a s60 or another smartphone is amazing. Very exciting stuff.
Amazing stuff
This is incredibly powerful.
I'm still wrapping my mind around the almost countless uses for this.
Thanks for sharing this out.
Love to see it tested and tried
Very nice work. This has so much potential... I'd love to see it tested and tried, and use it myself in the near future :P Please, keep us posted on how it goes. And the open source availability just makes this push and the ensuing conversations much more relevant.
Cheers,
Daniel
Post new comment