Go Down

Topic: how to solve gprs module if get +PDP: DEACT error send data (Read 286 times) previous topic - next topic

fadilbedil123

all works well sending data to the server, but after 30 minutes, i get writing like + PDP: DEACT and can't send data, error to send data.


Code: [Select]
void setting_kartusim()
    {
      sim900.println(F("AT+CREG=1"));
      delay(100);
      Serial.println(sim900.readString());
      sim900.println(F("AT+CGATT=1"));
      delay(100);
      Serial.println(sim900.readString());
      sim900.println(F("AT+CIPSHUT"));
      delay(100);
      Serial.println(sim900.readString());
      sim900.println(F("AT+CIPMUX=0"));
      delay(100);
      Serial.println(sim900.readString());
      sim900.println(F("AT+CSTT=\"internet""\""));
      delay(100);
      sim900.println(F("AT+CSTT?"));
      delay(1000);
      Serial.println(sim900.readString());
      sim900.println(F("AT+CIICR"));
      delay(5000);
      Serial.println(sim900.readString());
      sim900.println(F("AT+CIFSR"));
      delay(1000);
      Serial.println(sim900.readString());
    }


this code to send data

Code: [Select]
void koneksi()
{
 sim900.println(F("AT+CIPSTART=\"TCP\",\"testtest.com""\",80"));
  delay(1000);
  Serial.println(sim900.readString());

String link = "GET /test.php?test="+String(test)+"&testt="+String(testt)+"&testtt="+String(testtt)+" HTTP/1.1\r\nHost: testtest.com\r\n\r\n";

  sim900.print(F("AT+CIPSEND="));
  sim900.println(link.length());
  delay(500);
  if(sim900.find(">"))
  {
    sim900.print(link);
    if(sim900.find("SEND OK"))
    {
      delay(100);
      while (sim900.available())
      {
        Serial.println(sim900.readString());
      }
      sim900.println(F("AT+CIPCLOSE"));

    }
    else
    {
    }
  }
}


here is the error

Code: [Select]
+PDP: DEACT
AT+CIPSTART="TCP","teste
5191
AT+CIPSTART="TCP","testes.com",80

ERROR

5234
AT+CIPSTART="TCP","testes.com",80

ERROR

5464
AT+CIPSTART="TCP","testes.com",80

ERROR

5597
AT+CIPSTART="TCP","testes.com",80

ERROR

5734
AT+CIPSTART="TCP","testes.com",80

ERROR


what I want is the code so that when + PDP: DEACT or when an error when sending data it will run the program setting_kartusim (); to work again, or if there is, how do I make + PDP: DEACT not appear so that the GPRS module is always on?

Go Up