Getting Double Text Messages from GPRS Shield???

Post Reply
Tom_G_2010
Posts: 3
Joined: Thu Sep 11, 2014 5:23 am

Getting Double Text Messages from GPRS Shield???

Post by Tom_G_2010 » Sun Oct 19, 2014 12:52 am

I am testing a Geeetech SIM900 GPRS Shield for use in one of my projects where I want to send periodic text messages with sensor readings. I have the shield up and running and sending the messages but I have run into a problem. Each message shows up twice on the receiving end.

Here's my code for sending the text message. I got the code sample from the wiki:

Code: Select all

void SEND_SENSOR_READ(String SnsrVal) {
    CellSerial.print("AT+CMGF=1\r");  //Send an SMS in text mode
    delay(100);
    CellSerial.println("AT + CMGS = \"+1nnnnnnnnnn\""); // phone number to send to
    delay(100);
    CellSerial.println(SnsrVal); // Sensor value to send
    delay(100);
    CellSerial.println((char)26); //the ASCII code of the ctrl+z is 26
    delay(100);
    CellSerial.println();
}
Any thoughts on what would cause this to happen? What might I do to debug this?

Thanks!
Tom G.

Post Reply