Geetech SIM900 & Uno R3 not playing well together for SMS receive


I am attempting to retrieve text messages and then perform actions based on the content of the message.

I am new to Arduino IDE & syntax (why aren't there line numbers?!?!) but have a bit of Java experience, so thinking I can figure it out if I had a working example.

While I have gotten the Uno & Geetech shield to successfully send SMS and make phone calls (using code found on this and other forums), receiving anything more than garbled characters remains elusive.

I have tried every example I have been able to find - 12 or so - and none of them work, so I'm feeling fussy about it after five or so days.

Does anyone have any tips or sample code they can share or point me to?

Thank you! :blush:


This code:

#include <SoftwareSerial.h>
#include <string.h>

char incoming_char = 0;
SoftwareSerial cell(7, 8);

void setup()



void loop()
if(cell.available() > 0)
if((incoming_char >= ’ ') && (incoming_char <= ‘z’))


if(Serial.available() > 0)
incoming_char =;



… Does in fact output something close to what is expected when sending AT+CMGR=1

The problem now is - writing each char to a string where comparisons can be made. Not wrapping my head around how to do this…

I had an issue with this. With receiving text, you have problems with the buffers. I had to mod the arduino serial buffer size to allow a larger buffer and write my own library for a larger software serial buffer. Here is the way I increased the serial buffer. . For the software serial I just duplicated the library, renamed the instance and keywords, and changed the max buffer size to 256. Both buffers are 64 originally. It is a pain, but you can do it non destructively. This way you can receive the whole text.

It seems I have stumbled on the same issues. I tried every trick and code snippet example on the web.

  1. I also could not read the entire message. Until I read the little paragraph on GEEETECHs wiki about upping the buffer size. Then I was able to read the message.
  2. BUT now for some OBSCURE reason, I can not seem to receive all the SMSs that I send my SIM900?? It takes about ten minutes for the message to appear. And sometime the message just never appears. Even if I send the AT+CMGL="ALL" message, etc. It may appear immediately, or it may not, Then all of a sudden it pops up.

If I reboot the system it seems to reappear faster but also not too reliably.
3. At the end of the day all I want to do is parse some SMS message for some text and make some pins go high.......damittalll. Ive been struggling here for two days!!!

What am I doing wrong???