GSM SIM300 MODULE INTERFACING

Hi friends,

I have been trying to interface a SIM300 GSM module to my Arduino UNO R3.
I'm using AT commands to interface the SIM300 to make a call to a specified number. But I have been unsuccessful in making the call.

The connections I have made are Rx of the GSM to Tx of Arduino and Tx of the GSM to the Rx of arduino and GND of GSM to the ground of Arduino. I even tried swapping the Rx and Tx pin connections

The code which I'm using is posted below

char phone[]="8892665366";

void setup() 
{
  Serial.begin(9600);
  delay(2000);
  Serial.println("AT");
  delay(2000);
  Serial.print("ATD");
  Serial.print(phone);
  Serial.println(";");
  delay(10000);
  Serial.println("ATH");
}

void loop() {
  
}

The flow of the code is to call the number specified [Using ATDphone;] and then to hang up the call after 10seconds using ATH command. I have used the println after ATD to carriage return.

But I haven't been able to make the call.

I tried using a Hyperterminal to establish a serial connection to the SIM300 GSM board and giving the same command i.e.,
AT
ATD8892665366;
ATH

and astonishingly I'm successful in doing so, I get a call on my number and then i use ATH to hang the call.

MY SUSPECT : [If I'm not wrong]

Actually when the arduino program is run the output in the serial monitor is kind of doubtful
I get the output as

AT
ATD8892665366;
ATH

I get a space before the AT command which is undesirable. I think if the space before the AT doesn't come then the code should work fine.

Someone please help me out in this.

shriramstrong,

I'm not sure if this is the answer or not but I noticed you used Serial.println("AT"); and on the other lines you ues Serial.print(); would it make any differance if you used Serial.print("AT"); or maybe Serial.println("\nAT");

Just an idea.

Thanks for the reply friend.

Let me try that i reply u immediately

Shriram

Nope that doesn't work either...

The actual expected output on the serial monitor is

AT
ATD8892665366;
ATH

But what i get is somewhat like this

AT
ATD8892665366;
ATH

One more thought. what if you tried something like this:

Serial.begin(9600);
delay(2000);
Serial.println();
Serial.print("AT");
delay(2000);
Serial.print("ATD");
Serial.print(phone);
Serial.println(";");
delay(10000);
Serial.println("ATH");

maybe if you get it to print the AT on the second line it would remove the space. ??

Thanks a lot friend,

That actually removed the space. But i think that didn't solve the problem either, the call wasn't made...Really sad about that. I've been finding solutions the whole day but none worked.

Do you have any other idea???

I found this link you might look at.


I'm not sure but it looks like the tx pin should hook to tx and rx to rx. I really don't have any experience with the GSM board. I'll keep looking and post back if I find anything else useful. in the mean time good luck. and let me know if you figure it out.

is there any way to verify that the message is getting sent to or received by the GSM?

Thanks a lot friend for the help...

I have shuffled both the Rx and Tx pins and tried it out but no luck...

No i don't know any method to verify the message is received by the GSM except the serial monitor.

But when i tried the exact same method using a hyperterminal window it worked like a treat. That's why I'm bugged up here.

Anyways thanks friend,will let u know if it works.

I think I might have found something.

Try taking out the delay after the AT command.

So I think it might need to be like this.

Serial.begin(9600);
delay(2000);
Serial.println();
Serial.println("AT");
Serial.print("ATD");
Serial.print(phone);
Serial.println(";");
delay(10000);
Serial.println("ATH");