Arduino uno + gsm shield sim 900 problem

Hi everyone! I have a problem with my arduino uno board and my gsm shield,the messages aren’t send from my gsm to my phone, i link my gsm with my arduino like this

and use this code

#include <SoftwareSerial.h>

SoftwareSerial GPRS(7, 8);         //7 = TX, 8 = RX
unsigned char buffer[64]; port
int count=0;     
int i = 1;                         //if i = 0, send SMS.
void setup(){
  GPRS.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);             // the Serial port of Arduino baud rate.
  Serial.print("I'm ready");

void loop(){
  if (GPRS.available()){         // if date is comming from softwareserial port ==> data is comming from gprs shield

    while(GPRS.available()){          // reading data into char array 
      buffer[count++];     // writing data into array
      if(count == 64)break;
  Serial.write(buffer,count);            // if no data transmission ends, write buffer to hardware serial port
  clearBufferArray();              // call clearBufferArray function to clear the storaged data from the array
  count = 0;                       // set counter of while loop to zero

if (Serial.available())            // if data is available on hardwareserial port ==> data is comming from PC or notebook
  GPRS.write(;       // write it to the GPRS shield

  if(i == 0){
    GPRS.print("AT+CMGF=1\r"); //mandando SMS em modo texto
    Serial.println("AT+CMGF=1\r"); //mandando SMS em modo texto
    GPRS.print("AT+CMGS=\"+5549****3979\"\r"); // numero que vamos mandar o SMS
    Serial.println("AT+CMGS=\"+5549****3979\"\r"); // numero que vamos mandar o SMS
    GPRS.print("Test\r"); // corpo da msg
    Serial.println("Test\r"); // corpo da msg
    GPRS.write(0x1A); //equivalente a mandar Ctrl+Z(finaliza corpo do SMS)
    Serial.println("SMS sent successfully");

void clearBufferArray(){              // function to clear buffer array
  for (int i=0; i<count;i++){
    buffer[i]=NULL;                  // clear all index of array with command NULL

but doesn’t work, my gsm shield is sim 900 s2-1040s-z1k0c. I’d like to know how i link my 2 board and the code to make it work, thank you all

Hello, you could solve the problem? I've been 5 days and still can not get it to work, do not know if I have the correct library or sketch is not appropriate

SoftwareSerial GPRS(7, 8); //7 = TX, 8 = RX

Is'nt it vice versa, 7=RX and 8=TX?
Check it in some of the examples available in the GSM software.


Hi all,

We have a problem here in Australia in that the main carrier Telstra is going to stop GSM 2G usage in Dec 2016 and other carriers will most likely follow shortly after that. This of course means that GSM 2G shields such as the one used above will no longer be usable and we will have to swap to the much more expensive 3G shields.

Not sure whats happening in other countries but it will seriously inconvenience many users. I'm looking forward to some Instructables that utilize the 3G version but it may be almost a direct substitution?

I also have the same problem. Any solution?

i would suggest you use pin 3 for TX and pin 2 for RX. and ensure the GSM antennae is fixed when powering the GSM to avoid damaging the shield

did you fix the problem?? if so could you share your code and connection of the arduino to the gsm shield please and thank you.


Got the same problem dude.

Have a check on my research : SIM800C_V2 GSM trouble with serial communication. - Networking, Protocols, and Devices - Arduino Forum

Maybe one of my solution will work , who knows..

I have some problem like that. Any solution so far ?