Problem connecting Arduino Uno R3 to SIM900 GPRS/GSM shield and sending an SMS

Hello everyone,
I am a newbie trying to get my hands on working with Arduino Uno R3 and Arduino GPRS/GSM SIM900 Shield. I have connected the two devices based on the recommendations I got from results from google search. I have also implemented some of the steps I saw on this forum but none has worked form me. I have not worked with electronics before.
The devices are using are Arduino Uno R3 and Arduino GPRS/GSM Shield .
Including SIM card and jumper wires

  1. I am using a Windows 10 OS on a HP laptop.
  2. I configured my Arduino Uno R3 COM port to use 19200 baud rate from Device Manager.
  3. I also made sure my Arduino Uno R3 IDE is using the same COM port.
  4. I have connected my devices and I have also included the images of my connection as attachment.
  5. I am using a 9v 2a power adapter to power the SIM900 and usb for Arduino Uno R3.

Please I will like to know if my connection is correct?

I tried send a message using a piece of code I copied from a pdf I got while search for materials and I have the code here

#include <SoftwareSerial.h>

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

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++]=GPRS.read();     // 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(Serial.read());       // write it to the GPRS shield
  if(i == 0){
    GPRS.print("AT+CMGF=1\r"); //sending SMS in text mode
    Serial.println("AT+CMGF=1\r"); 
    delay(1000);
    GPRS.print("AT+CMGS=\"+2347xxxxxxxx\"\r"); // phone number
    Serial.println("AT+CMGS=\"+2347xxxxxxxx\"\r"); 
    delay(1000);
    GPRS.print("Test\r"); // message
    Serial.println("Test\r"); 
    delay(1000);
    GPRS.write(0x1A); //send a Ctrl+Z(end of the message)
    delay(1000);
    Serial.println("SMS sent successfully");
    i++;
  }   
}

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
  }
}

When I upload the sketch the my Arduino Uno R3 I get
I'm readyHello?

I have attached my connection for inspection.
Please I need help with this problem.
Thanks.

Arduino and SIM900 Shield.jpg

I can't see much in your photo, to small, washed out and out of focus I'm afraid.

Take a look at the link in my signature which covers connecting a similar shield.

Thanks dannable for your swift response. I have seen that page before and I have read through it again I tried the serial test communication on that page, but I didn't an Ok. This is the link to the connection I am using.

Even the photo on SE isn't good enough to read the printing on the pcb.

Please this is my connection I will like you to have a look at and advice me.

Before getting your SMS to run - load up a simple local echo program to send your typing to the modem and vice versa. That will let you know you have communication tot he modem.

You can check the modem connection status, etc

After that - you can start faffing around with a functional sketch code, but always keep that echo code nearby so you can see what is expected & returning.

I've found a similar board to yours and the first thing I note is where you have your Rx/Tx connections. Try connecting to D7 & D8 on the SIM900 board (assuming that you have the two jumpers near the aerial set to use D7 & D8, and that is how it appears.).

lastchancename:
Before getting your SMS to run - load up a simple local echo program to send your typing to the modem and vice versa. That will let you know you have communication tot he modem.

You can check the modem connection status, etc

After that - you can start faffing around with a functional sketch code, but always keep that echo code nearby so you can see what is expected & returning.

Thanks for your response. Please I don't know how to load a simple echo program I am pretty new to using Arduino and SIM900 GSM Shield. Is there any example sketch I can use to do that and how can I check modem status please?

Serial Relay sketch

// Serial Relay - Arduino will patch a 
// serial link between the computer and the GPRS Shield
// at 19200 bps 8-N-1

#define RxPin 7
#define TxPin 8

#include <SoftwareSerial.h>

SoftwareSerial GPRS(RxPin, TxPin); // RX, TX

void setup()
{
  pinMode(13, OUTPUT); // Turn off pin 13
  digitalWrite(13,LOW);  
  GPRS.begin(19200);
  Serial.begin(19200);
}

void loop()
{
  if (GPRS.available())
  {
    while(GPRS.available())
    {
      Serial.write(GPRS.read());
    }
  }
  if (Serial.available())
  {
    while(Serial.available())
    {
      GPRS.write(Serial.read());
    }
  }
}

Open serial monitor and make sure the baud rate is set to 19200. Type AT (return) and it sound echo in the main screen AT OK.

dannable:
I've found a similar board to yours and the first thing I note is where you have your Rx/Tx connections. Try connecting to D7 & D8 on the SIM900 board (assuming that you have the two jumpers near the aerial set to use D7 & D8, and that is how it appears.).

Thanks dannable once more. I have tried several connections on the SIM900 board. I have tried using RX2 TX3 on the Arduino Board and RX7 TX8 on the software serial of SIM900.

When I run the GSM_GPRSLibrary_AT example sketch I get DB:NO RESP Trying to force the baud-rate to 9600. ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp status=IDLE.

I am using a USB to power Arduino Uno and a Power adaptor(12.0v 2.0A) for SIM900 GSM Shield.
I have downloaded the SIM900 library and added it to my IDE library.

Please do you have any suggestion

One wire from Uno D7 to SIM900 D7. Another wire Uno D8 to SIM900 D8. Ground to ground. This assumes that the jumper block adjacent to the aerial allows you to select between D0,D1 and D7,D8. I cannot read your board markings.

Load the serial relay sketch as above and try it.

I have loaded the serial relay sketch as you instructed using the connection as you have specified but it is still not working. Do you think the SIM900 board is in good condition?

Ridiculous question first - you are turning it on?

What happens when you apply power? Does the net light blink rapidly for several seconds, then change to a slower blink?

dannable:
Ridiculous question first - you are turning it on?

What happens when you apply power? Does the net light blink rapidly for several seconds, then change to a slower blink?

Yes it does, but I have been trying to get both device to work for over a month now and it has been so frustrating.

Right, similar module to yours. D7 - D7, D8 - D8, Gnd - Gnd, 9v 1A psu for testing module, USB supply to Uno:

Connect using serial monitor:

ScreenCap.jpg

I dialed my cell (mobile) phone and it connected.

ScreenCap.jpg

Thanks dannable for all your support and lucid explanations and illustrations. I have tried to use the connection based on the image you posted, but it did not work for me. I did not get any response when I typed in AT into my Serial Monitor.

The IDE I am using is ARDUINO 1.8.4 from https://www.arduino.cc/en/Main/Software, and I got word from the shop where I bought the hardware at https://www.hub360.com.ng, here in Nigeria to use ARDUINO 1.6.5, and I uninstalled the 1.8.4 and installed 1.6.5, and when I tried I got an OK from my Serial Monitor.

I have resolved the problem I am having and I say "thank you so much dannable and lastchancename, you guys are a blessing to this forum and because of your speedy response I will like to stick around this community much longer than I thought, I love you guys".

Thanks for the 'thanks'... Dannable did the hard work, i just pushed in one possible direction!
Your learning experience is very standard, so don't despair.
Break every project into its separate parts, otherwise you can rarely find issues hidden by other issues !
Keep us up to date on your progress.

You guys are the best. I have edited the title line so other can know that it has been solved. I read through how to use this forum before I attempted making a post.

I am from Nigeria and now I believe in the true power of the open source community. You all are a blessing to our generation.

Thanks

In turn all I did was prove that it should work, meaning that the problem area had been narrowed down. Faulty connections, or in this case version of the IDE, all things that aren't immediately obvious.

Thanks for making your shoulder available for me to sit on so that I can see further into the Automation Land of Arduino.

In the diagram below, can I use female - female jumper wires to connect the 'SWserial' position on the SIM900 board in place of those connectors you have there? Because I have removed one of them and I cannot find it now. I have two SIM900 shields for now so I am using one of them and will like to use the other when I am through with the project I have in mind.

Jumpers.JPG