This library is to help interface a GSM device with an Arduino using the Software Serial library included in the 1.0 version of the IDE. It was developed on a Motorola C168i but should work in theory on any other GSM protocol device (at least with minimal adjustments). This SMS Tutorial at Developer’s Home was very helpful in teaching me what I needed to know about AT Commands and the already existent SSerial2Mobile library inspired my cell phone selection.
There is no doubt more room for improvement (particularly in optimizing the delays), but for now, the library can send & read text messages, can check if the phone is charging, and check the battery and signal levels. Included is an example sketch to help you get started. Wiring up a C168i to your cell phone isn’t too much hassle: all you need is a 3/32 mini-jack, three lengths of wire, and something to shift logic down from the Arduino’s 5V to the cell phone’s 3.3V. I started out with a voltage divider (the following tutorial will demonstrate that way) but I recommend switching to a logic shifter if you need a more reliable connection like I did.
I used a SN74AHC125N which is pretty simple: connect the Arduino’s 3.3V to Vcc, connect Arduino’s GND to GND and to the OE of whatever gates you use, the TX of the Arduino on the A and the RX of the cell phone the Y.
You can easily find a C168i on Ebay for less than 10 dollars. The simplest way to get service for it is to buy a pay-as-you-go SIM card, at Radio Shack for example. While you’re there you can also pick up the 3/32 plug; unfortunately, they don’t have any information on the packaging but I’ve included a figure here for your reference (see left).
Here’s a step-by-step on how to make your “breakout wire” and plug it into your Arduino.
Tools: soldering iron, wire clippers, wire strippers, a soldering stand is helpful
Bill of Materials: