I need cellular communication for a project, and have been researching it extensively.
Here are some learnings, I hope others find them useful.
- Arduino GSM Shield vs. GPRS shield version 1.4 and 2.0
The latter is about 1/2 the price of the GSM shield, is available from multiple suppliers, and has an AT interface which means minimum overhead if you are only using certain functions such as SMS (for example, in combination with Twilio). When using the GSM library to operate the GSM shield, half your precious 32k of memory are gone before you even write a single line of code! Also in case you need voice on the GSM shield, get out the soldering iron. In short: the cellular connectivity is exciting but the Arduino GSM shield IMHO is a resource hog. On the other hand, it comes with the Telefonica SIM which can be used worldwide for M2M (based on their claims). - Power
You must use a power supply; using the USB alone may result in the shield turning itself off. Even a 9V battery may not have enough juice for the peak power draw of the SIM900 when transmitting. - SIM card
I have an AT&T share plan and got an extra SIM card at the AT&T store. It worked "out of the box". An extra line costs $15/mo. Unlimited texts, 10GBs of (shared) data...lots of headroom. - Signal Strength
The 1.4 GPRS board definitely has a problem connecting when the reception isn't great (e.g. 2 circles on an iPhone).. I had to move it around to find a favorable location. No such problems with the 2.0 board. - SoftwareSerial problems are possibly hardware problems
The sketches on websites such as
GPRS Shield V2.0 | Seeed Studio Wiki
work on a known good V2.0 board.
If they don't work (for example, with the 1.4 board), you MAY have a hardware issue. Either a bad board from the factory or....I noticed that the breakout test points on the 1.4 version ports are right above the USB connector on the Arduino Uno board...a little pressure might short them out and fry either the level converter or the SIM900 signals outputs.. Be aware of this. Put some electrical tape on the USB connector for protection BEFORE YOU FIRST INSTALL THE GPRS BOARD. In any case, this is just speculation. - Lithmus test: scope
If you put a scope probe to the SIM900 break-out test points and you see characters on the Rx line but nothing (except a constant 2.8V on the Tx line) your board IS bad. - Timer2 Interrupts and Software Serial
I noticed that when I was using Timer2 interrupts, I basically was unable to read from the SIM900. All I got was garbage characters. Possibly Timer2 interrupts causes some interrupt handler in the SoftwareSerial library to screw up (with other words, SoftwareSerial interrupt handlers don't deal with being interrupted and/or are not re-entrant). I solved this problem by setting the interrupt mask TIMSK2 to zero whenever I am reading characters from the SIM900, effectively turning the Timer2 interrupts off. That's not a problem (at least not currently) in my application but definitely unsatisfactory. You cannot simply turn interrupts because SoftwareSerial uses them. Maybe somebody more proficient than myself figures out what's going on with SoftwareSerial reads if there is other hardware generating interrupts! - Hardware serial working but software serial not working
I didn't see this problem, and can't imagine what may be causing it, other than a side effect of other interrupts in the system. - SIM900 Network time
The network time feature provides real-time date and time information.
To enable network time, use the command:
AT+CLTS=1
to enable the feature to get the local timestamp.
After powering down and up again (i.e. re-connecting to the network), the command:
AT+CCLK?
then echoes the command, and returns the current network time, e.g.
AT+CCLK?
+CCLK: "14/04/04,11:29:08-28"
This power cycling is necessary only once, i.e. the CLTS setting is global and persistent.
Hope these comments save people some time and tearing out of hairs...
---Michael