0

I tried the code shown below (found here)

void setup()
{
  Serial.begin(9600);  //Baud rate of the GSM/GPRS Module 
  Serial.print("\r");
  delay(1000);                  
  Serial.print("AT+CMGF=1\r");    
  delay(1000);
  Serial.print("AT+CMGS=\"+919449835011\"\r");    //Number to which you want to send the sms
  delay(1000);
  Serial.print("Test SMS -Jay\r");   //The text of the message to be sent
  delay(1000);
  Serial.write(0x1A);
  delay(1000); 
}
void loop()
{
}

I interfaced my GSM SIM900A module to the Arduino UNO (connections - GSM Tx to Arduino Rx, GSM Rx to Arduino Tx, GSM provided with supply (12V) using external adapter, GSM gnd to Arduino gnd).

I dumped the code into Arduino and then opened the Arduino IDE serial terminal. In the serial terminal, I get AT+CMGF=1AT+CMGS="+919449835011"Test SMS -Jay\r being displayed and I am not receiving any sms to my phone. I am not sure if its a problem with the code or connections.

1 Answer 1

1

looks like you should be using Serial.begin(2400);

also, I'm assuming your sms phone number isn't actually 919449835011 and that that's not actually the number you used in your code

2
  • Yes that is the number i used in the code, +91 is country code and the rest is the number to which i want to send the sms. I will change the baud rate to 2400 and check.
    – PsychedGuy
    Commented Sep 15, 2014 at 7:09
  • 1
    Sorry for the delayed response. This problem was fixed long ago and like you said, I had to just change the baud rate. Thank you.
    – PsychedGuy
    Commented Feb 5, 2015 at 8:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.