I have connection, i am sending the request and get the "ok send" . everything works great, expect that i dont get any respond .
I would like to get an html respond from any website to check the module ,but no respond from anyone .
This is the arduino code :
//TCP
#define DST_IP "www.bbc.com"
String cmd = "AT+CIPSTART=4,\"TCP\",\"";
cmd += DST_IP;
cmd += "\",80";
Serial.println(cmd);
if(Serial.find("Error"))
return;
// delay(5000);
// if(!Serial.find("OK"))
// return;
//WORD LENGH
cmd="GET /www.bbc.com";
String cipsendcmd = "AT+CIPSEND=4,";
cipsendcmd += (cmd.length());
cipsendcmd += "\r\n";
Serial.print(cipsendcmd);
//WAIT FOR LINE
delay(3000);
if(!Serial.find(">"))
{
Serial.println("AT+CIPCLOSE");
Serial.println("connect timeout");
delay(1000);
return;
}
//SEND REQUEST
Serial.print(cmd);
delay(2000);
//SEND OK
if(!Serial.find("SEND OK"))
{
Serial.println("havnt sent");
delay(1000);
return;
}
//READ RESPOND
String content="";
char character;
while(Serial.available())
{
character = Serial.read();
content.concat(character);
delay(10);
}
Serial.println(content);
Serial.println("======");
delay(1000);
This is the monitor respond :
AT+CIPSTART=4,"TCP","www.bbc.com",80
AT+CIPSEND=4,16
GET /www.bbc.com
======
Which means that i dont get any respond after the request, but a blank one (you can see spaces here )
Why is that , and how can i get any respond from any website ?