I'm trying to send data from my DIY weather station to a website using AT Commands. My Hardware is an Arduino Nano using Software Serial to send data to ESP8266-01. Whenever the GET statement's length exceeds about 270 characters the AT+CIPSEND fails. I'm wondering if anyone else has experienced this and could offer some advice. Thanks
Here is the function that is in question.
void sendStringWUnderground(float windSpeedMPH, float gustWindSpeedMPH){
String cmd1 = "AT+CIPSTART=\"TCP\",\"";
cmd1 += "rtupdate.wunderground.com"; // wunderground
cmd1 += "\",80";
Serial.println(cmd1);
esp8266Module.println(cmd1);
if (esp8266Module.find("Error")) {
Serial.println("AT+CIPSTART error");
return;
}
String cmd = "GET /weatherstation/updateweatherstation.php?;
cmd += ID;
cmd += "&PASSWORD=";
cmd += PASSWORD;
cmd += "&dateutc=now";
cmd += "&winddir=";
cmd += getCalulatedDirection();
cmd += "&windspeedmph=";
cmd += windSpeedMPH;
cmd += "&windgustmph=";
cmd += gustWindSpeedMPH;
cmd += "&tempf=";
cmd += getTemperatureValue();
cmd += "&dewptf=";
cmd += getDewPointValue();
cmd += "&humidity=";
cmd += getHumidityValue();
cmd += "&softwaretype=Arduino-ESP8266&action=updateraw&realtime=1&rtfreq=30"; // &softwaretype=Arduino%20UNO%20version1
cmd += "/ HTTP/1.1\r\nHost: rtupdate.wunderground.com:80\r\nConnection: close\r\n\r\n";
cmd1 = "AT+CIPSEND=";
cmd1 += String(cmd.length());
Serial.println(cmd1);
esp8266Module.println(cmd1);
if (esp8266Module.find(">")) {
Serial.println(cmd);
esp8266Module.print(cmd);
Serial.println("Data send OK");
}
else {
esp8266Module.println("AT+CIPCLOSE");
Serial.println("Connection closed");
Serial.println(" ");
}
}
AT+CIPSEND fails to send complete string
Re: AT+CIPSEND fails to send complete string
Postby Her Mary » Thu Aug 19, 2021 3:55 pm
The latest official AT supports HTTP, maybe you can have a try with it. https://docs.espressif.com/projects/esp ... mands.html
Who is online
Users browsing this forum: No registered users and 4 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.