Go Down

Topic: Sending SMS with GSM Shield (AT Commands) (Read 2015 times) previous topic - next topic


Hi..I'm new in arduino and I am trying to send sms but it does not work.

Here is the codes.

Code: [Select]
void setup()
  Serial.begin(9600);  //Default serial port setting for the GPRS modem is 19200bps 8-N-1-----------19200
  delay(1000);                    //Wait for a second while the modem sends an "OK"
  Serial.println("AT+CMGF=1\r");    //Because we want to send the SMS in text mode

  Serial.println("AT+CSCA=\"+639180000101\"\r");  //Setting for the SMS Message center number, 
  delay(1000);                                  //uncomment only if required and replace with
                                                  //the message center number obtained from
                                                  //your GSM service provider.
                                                  //Note that when specifying a tring of characters
                                                  // " is entered as \"

  Serial.println("AT+CMGS=\"+639486808432\"\r");    //Start accepting the text for the message
                                                  //to be sent to the number specified.
                                                  //Replace this number with the target mobile number.
  Serial.println("SIM900 and Arduino say Hi!\r");   //The text for the message
  //Serial.print(26,BYTE);  //Equivalent to sending Ctrl+Z

void loop()
      //We just want to send the SMS only once, so there is nothing in this loop.
      //If we put the code for SMS here, it will be sent again and again and cost us a lot.

I can't receive any messages..

Go Up