SSerial2Mobile – SMS library for Arduino

Arduino Computers & Mobile Technology

sserial2mobile_20090130.jpg

This looks like a handy library for mobile-enabling your next Arduino project:

This library implements the Software serial Arduino library to establish a serial connection to a Mobile phone. The methods methods hides the AT+ commands from the user allowing messages to be sent by passing the method on a phone number or email and the message.

The specific AT commands were made to work with the Motorolla C168i, but you can tweak a header file to adjust things for the specific device you are using. It makes sending an email or SMS almost as easy as a single function call:

Example code:

#define rxPin 2
#define txPin 3

// set up a new serial port
SSerial2Mobile phone = SSerial2Mobile(rxPin, txPin);

//send a text message
phone.sendTxt("+15555550125","Lib SMS Test1");

//send an email
phone.sendEmail("sserial2mobile@example.com", "Lib email test1");

The reason the author chose to use the C168i is that you can get the phone on the cheap, without contract, and prepay for SMS service. It’s also simple to make a serial cable which connects to a 3/32″ stereo plug on the phone. In all, it looks like a pretty simple and cheap task to get this all working.

Note that it’s the last day to use code 2009OX during checkout in the Maker Shed for a 10% discount. If you need an Arduino for this, go get one now!

SSerial2Mobile
Attaching a Motorola C168i to an Arduino

4 thoughts on “SSerial2Mobile – SMS library for Arduino

  1. Anonymous says:

    This is great, I’ve thought of at least a dozen projects where serial->SMS would be perfect (e.g. monitoring/alerting of a ships bilge while in harbor).

    I’ve daydreamed about a few ways to get formatted, digital data into a SMS (e.g. laptop->BlueTooth->Cell). But for me the real hitch was finding the perfect cellphone/provider for this.

    At $30/mo for a simple plan, this becomes an ‘expensive’ solution for monitoring of limited quantity events (hopefully few on my boat!). And it seems most of the PayAsYouGo cell phone providers (Tracphone/Net10) lock out their phones to serial access of any kind.

    Anybody have an experienc of a cellphone make/model/provider that worked great for serial and SMS access, at a super cheap rate or PayAsYouGo? I’m interested to hear…

  2. Cathal says:

    More interesting for me would be a library that can detect a new SMS on a phone, retrieve it, and act on the content via preprogrammed scripts.

    That way, you could use a plan that allows free txts to your network (very common here in Ireland at least) and you wouldn’t pay anything after initial setup; you don’t need to top up the target phone at all as it is only receiving messages and never spends a cent.

    Applications: your own twitter/flickr update service from your phone, a cheaper way to email on the go (than bill-pay), remote home automation, relaying through internet txt services (or even internet phone services if you could relay the phone audio through the arduino), etc.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK