Your very own SMS – Internet gateway with Arduino
There are plenty of SMS services on the web to link SMS and the Web together. However especially if you need a local SMS number in an unsupported country like Malawi or simply want to DIY, then this Arduino-based solution might be your right choice. For sure you could also go big-scale with your own full-blown SMS gateway like Kannel. But where is the tinkering fun?
Process incoming SMS
Depending on your requirements you might want to modify the code. E.g. one obvious case would be an SMS-to-Email forwarder, but for the typically free email service like gmail.com the Arduino lacks resources and power to process their TLS/SSL security. But other ways are possible. The code is already prepared to post an incoming text message right into a Google Spreadsheet with a way described on open-electronics. Or you could notify your own web app with a custom HTTP request. Or simply forward the incoming text message to another mobile number. Or what else can you think of?
As the SoftwareSerial library is used the code also inherits its default buffer size of 64 bytes. Not too much even in the context of SMS. Better patch the Arduino code (argh!) and increase it to something like 128 bytes as I’ve done. Still not the full size of a SMS, but enough for my purpose. Carefully check the documentation – it can save you days!
Process incoming HTTP requests
For the opposite way of sending text messages to mobile phones from the Internet you could use a provider specific solution. E.g. some (many?) providers offer email addresses like
As the sketch will run a little local HTTP server, you might need to change the current IP (192.168.1.177) to fit your needs. Once the system is available in the local network you can use a simple HTTP post to send out a text message, e.g. with curl:
curl --data "number=
Of course you should protect the access to it as otherwise you might invite hitchhikers to misuse your airtime.
Note that the code uses the SimpleTimer library so make sure this is installed locally first.