URGENT, Error with ESP8266 when sending data to Mysql

I have to read 4 sensors, when reading them I have to send them to a database with the Esp8266 module for this I use a local server with Xampp and a database in mysql, I implement it with arduino due and with AT code, the php files the I have in the folder htdocs / arduino / control.
I already solved connecting the module with the server, but when sending the data with the GET code in the serial communication, it marks me an Error, any solution?
Note the error I see when doing it directly in the serial Monitor since when doing it with code, the error is not displayed, it simply does not send the GET
Note in the default code I define the data to optimize code here, the code used is the following:

#define softSerial Serial1
String SSDI = "Digital net 057";
String password = "29425136";
int pre = 100, oxi = 80, rit = 70;
double temp = 50.5;

void setup(){
  Serial.begin(9600);
  softSerial.begin(9600);
  softSerial.setTimeout(2000);
  softSerial.println("AT");
  if(softSerial.find("OK")){
    Serial.println("Respuesta AT correcto");
  }else{
    Serial.println("Error en ESP8266");
    }
  softSerial.println("AT+CWJAP=\""+SSDI+"\",\""+password+"\"");
  Serial.println("AT+CWJAP=\""+SSDI+"\",\""+password+"\"");
  Serial.println("Conectandose a la red ...");
  softSerial.setTimeout(5000);
  if(softSerial.find("OK")){
    Serial.println("WIFI conectado");
  }else{
    Serial.println("Error al conectarse en la red");
    }
  softSerial.setTimeout(2000);
  softSerial.println("AT+CIPMUX=0");
    if(softSerial.find("OK"))
      Serial.println("Multiconexiones deshabilitadas");
  delay(1000);
  }

void loop(){
   softSerial.println("AT+CIPSTART=\"TCP\",\"192.168.0.107\",80");
   Serial.println("AT+CIPSTART=\"TCP\",\"192.168.0.107\",80");
   delay(5000);
   if(softSerial.find("OK")){
      Serial.println("Conectado con el servidor...");
      softSerial.print("GET /arduino/control/conexion_arduino.php?pre_php=");
      softSerial.print(pre);
      softSerial.print("&temp_php=");
      softSerial.print(temp);
      softSerial.print("&oxi_php=");
      softSerial.print(oxi);
      softSerial.print("&rit_php=");
      softSerial.print(rit);
      softSerial.println(" HTTP/1.1");
      softSerial.println("Host: 192.168.0.107");
      softSerial.println("Connection: close");
     
      softSerial.println("");
      Serial.println("Enviado....");
   }
}

Good luck.
I have never seen anyone use an ESP8266 as a WiFi “shield” that was happy with the performance.

If you need WiFi, why not just use a board that has WiFi?

I do not use the wifi board since in the complete code I use 3 sensors with serial communication and only the arduino due or Mega has several serial ports.

You haven’t been very clear about the error message but, anyway, How far do you get ?
What happens if you type this into a web browser on something in the same network as your Xampp server ? Does the data get into the database?

192.168.0.107/arduino/control/conexion_arduino.php?pre_php=8&temp_php=7&oxi_php=6&rit_php=5

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