Arduino + SIM900 não funciona

Saudações
Estou usando arduino + sim900 para enviar dados de um sensor a um banco de dados, mas estou tendo um erro no trecho do comando AT+HTTPPARA, que define o endereço de envio para o banco de dados.

#include <SoftwareSerial.h>
SoftwareSerial gprsSerial(10, 3);

#define pinLDR A0

String Luz;
String horario;

void setup()
{
  gprsSerial.begin(2400);
  Serial.begin(4800);

  Serial.println("Config SIM900...");
  delay(2000);
  Serial.println("Done!...");
  gprsSerial.flush();
  Serial.flush();

  // See if the SIM900 is ready
  gprsSerial.println("AT");
  delay(1000);
  toSerial();

  // SIM card inserted and unlocked?
  gprsSerial.println("AT+CPIN?");
  delay(1000);
  toSerial();

  // Is the SIM card registered?
  gprsSerial.println("AT+CREG?");
  delay(1000);
  toSerial();

  // attach or detach from GPRS service 
  gprsSerial.println("AT+CGATT?");
  delay(100);
  toSerial();

// Check signal strength
  gprsSerial.println("AT+CSQ ");
  delay(1000);
  toSerial();

  // bearer settings
  gprsSerial.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");
  delay(2000);
  toSerial();

  // bearer settings
  gprsSerial.println("AT+SAPBR=3,1,\"claro.com.br\",\"claro\"");
  delay(2000);
  toSerial();
  delay(2000);

  // bearer settings
  gprsSerial.println("AT+SAPBR=1,1");
  delay(2000);
  toSerial();

  // bearer settings
  gprsSerial.println("AT+SAPBR=2,1");
  delay(2000);
  toSerial();
}


void loop()
{
  float valorLDR = analogRead(A0);
  Serial.println(valorLDR);
  //String Luz = String(valorLDR);
  Luz = "";
  Luz.concat(valorLDR);
  horario = "";
  horario.concat("oi");
   
   // initialize http service
   gprsSerial.println("AT+HTTPINIT");
   delay(2000); 
   toSerial();
 
   // set http param value
   gprsSerial.println("AT+HTTPPARA=\"URL\",\"pabloteste3.000webhostapp.com/add.php?data1=" + Luz + "&data2=" + horario + "");
   //gprsSerial.println("AT+HTTPPARA=\"URL\",\"pabloteste3.000webhostapp.com/add.php?data1=oi&data2=ae""");
   delay(5000);
   toSerial();

   // set http action type 0 = GET, 1 = POST, 2 = HEAD
   gprsSerial.println("AT+HTTPACTION=0");
   delay(6000);
   toSerial();

   // read server response
   gprsSerial.println("AT+HTTPREAD"); 
   delay(1000);
   toSerial();
   delay(2000);

   gprsSerial.println("");
   gprsSerial.println("AT+HTTPTERM");
   toSerial();
   delay(300);

   gprsSerial.println("");
   delay(10000);
}

void toSerial()
{
  while(gprsSerial.available()!=0)
  {
    Serial.write(gprsSerial.read());
  }
}

Eis a resposta no monitor serial:

Config SIM900...
Done!...
AT

OK
AT+CPIN?

+CPIN: READY

OK
AT+CREG?

+CREG: 1,1

OK
AT+CGATT?
AT+CSQ 

+CGATT: 1

OK
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","claro.com.br"

OK
AT+SAPBR=1,1

ERROR
AT+SAPBR=2,1

+SAPBR: 1,1,"10.161.28.202"

OK
223.00
AT+HTTPINIT

ERROR
AT+HTTPPARA="URL","https://pabloteste3.000webhostapp.com/add.phAT+HTTPACTION=0

ERROR
AT+HTTPREAD

OK
220.00

AT+HTTPTERM


OK
AT+HTTPINIT

OK
AT+HTTPPARA="URL","https://pabloteste3.000webhostapp.com/add.phAT+HTTPACTION=0

ERROR
AT+HTTPREAD

OK
221.00

AT+HTTPTERM


OK

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.