Hi,
I'm using the wifi module 8266-01 and I'm trying to make a GET on an apache server on the local network, but every time I make the request it returns 'busy'.
Following sequence of execution on the serial monitor:
AT+CWMODE=1
OK
AT+CIPSTART="TCP","192.168.1.7",80
CONNECT
OK
TP/1.1
ERROR
Host: 192.168.1.7ERROR
ERROR
GET /climatempo/getData.php HTTP/1.1
Host: 192.168.1.7
busy
Code:
esp.print("AT+CIPSTART=\"TCP\",\"");
esp.print(CF(server));
esp.print("\",80");
esp.print("\r\n");
delay(1000);
Serial.println(esp.readString());
char getRequest[] = "GET /climatempo/getData.php HTTP/1.1\r\nHost: 192.168.1.7";
String cmd = "AT+CIPSEND="+sizeof(getRequest);
esp.println(cmd);
esp.print("\r\n");
Serial.println(esp.readString());
delay(500);
if(esp.readString().indexOf(">")) {
Serial.println(esp.readString());
esp.print(getRequest);
esp.print("\r\n");
delay(1000);
Serial.println(esp.readString());
delay(5000);
Serial.println(esp.readString());
} else {
Serial.println(F(""));
}
// encerra conexão
esp.print("AT+CIPCLOSE");
esp.print("\r\n");
After you run AT + CIPSEND it prints this:
TP/1.1
ERROR
Host: 192.168.1.7ERROR
ERROR
I do not know if AT + CIPSEND should return something or if it is in error.
Is it that the busy one that appears is because of that mistake?