Unable to Interface SIM900A with Arduino Uno

Hi Experts,
I am trying to interface SIM900A with Arduino UNO but unable to do it successfully. I am using external power supply to power up SIM900A module. I am connecting Arduino UNO 9 and 10 pins to for TX and RX of SIM900A module respectively.

Please find below the sample code that I am using to test…

#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 10);

void setup()
{
  mySerial.begin(9600);   // Setting the baud rate of GSM Module  
  Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)

  Serial.println("GSM SIM900A BEGIN");
  mySerial.println("ATD+919945XXXXXX;"); // ATDxxxxxxxxxx; -- watch out here for semicolon at the end!!
  Serial.println("Calling  "); // print response over serial port
  delay(10000);
  mySerial.println("ATH");
  Serial.println("Hangup Call");
  delay(1000);
}

void loop()
{

}

The baud rate to communicate with the SIM900A module that I have used is 9600 and I have checked same in Serial terminal as well.

I am able to successfully run the AT commands from Serial terminal.

In the Console I can see following messages.
image

But Nothing is happening, I am not getting any calls. I tried providing higher delay between ATD and ATH.

Seeking Experts help here. I am Stuck.

Make sure you give sufficient delay after power up before sending any AT commands.
GSM Modules take around 15 seconds to boot up and connect to network.
And For making a call it takes approximately 10 seconds to connect, By the time it connects, you are disconnecting it with ATH.
Why not just use ATD and once you get call successfully, use ATH.
You are calling ATH too soon.

@RaviPujar : Thank you for the reply. I modified the code to like this.

#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 10);

void setup()
{
  mySerial.begin(9600);   // Setting the baud rate of GSM Module  
  Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)

  Serial.println("GSM SIM900A BEGIN");
  mySerial.println("ATD+919945505968;"); // ATDxxxxxxxxxx; -- watch out here for semicolon at the end!!
  Serial.println("Calling  "); // print response over serial port
  delay(100000);

}

void loop()
{

}

This didn’t work too. If I run the commands from the serial terminal everything works fine.

I thought UNO is not working properly and tried interfacing it with SIM28ML GPS module and guess what… It worked perfectly. I was able to get the location properly.

I am really stuck here. Same SIM900A and UNO used to communicate properly before for making HTTP calls. Not sure why its not working now.

The only thing that changed for then and now is … I upgraded the firmware of SIM900A. :frowning:

Is your module in Autobaud mode now?
Check using AT+IPR?

No… Its not in auto baud rate… I have set the baud rate to 9600

You are leaving sufficient delay before sending ATD after power up?

Why dont you see UART capture between GSM and Arduino to see whats happening.

@RaviPujar: I am new to this, Please let me know how to do this.

Just connect RX line of USB to UART connector to TX line of GSM module. There you can see the data flow.
But make sure you use some kind of level translator for 2.8V to 5V UART level conversion.

Did as you suggested…

LOOKS VERY STRANGE!!!

@RaviPujar : I think its really fishy… Example sketches for SIM900A using some 3rd party libraries also started working now… But only thing is I have to connect UART to my SIM900A or else nothing works.

Here is what I did:

  1. Made necessary wiring between Arduino and SIM900A
  2. Uploaded an example HTTP Client sketch to Arduino UNO
  3. Opened Serial Monitor, and waited for sometime to check if SIM900A module responds. Unfortunately no response from SIM900A.
  4. I connected UART to SIM900A and powered it up using Arduino +5v and GND.
  5. Opened the serial monitor and to my shock it started working.

It looks really strange to me. Just need your help to know how to make the example sketch work without connecting the UART.