I connect ESP with UNO and everything works fine. I connect it to my local network etc. But i can not send data to remote server. What am i doing wrong?
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);
void setup(){
mySerial.begin(9600);
Serial.begin(9600);
reset();
}
void reset(){
mySerial.println("AT+RST");
delay(5000);
mySerial.println("AT+CWMODE=1");
mySerial.println("AT+CIFSR");
mySerial.println("AT+CIPMUX=1");
mySerial.println("AT+CIPSERVER=1,80");
delay(5000);
}
void loop() {
mySerial.println("AT+CIPSTART=4,\"TCP\",\"www.somesite.org\",80");
delay(1000);
mySerial.println("AT+CIPSEND=4,40");
delay(1000);
mySerial.println("GET /test/index.php?lm35=10 HTTP/1.1");
mySerial.println("Host: www.somesite.org");
mySerial.println();
mySerial.println();
delay(1000);
mySerial.println("AT+CIPCLOSE=4");
delay(1000);
}
I set connection with my network previously.