When you drop to HTTP/1.0 you can skip the "Connection: close" part; persistent connections are not part of the HTTP/1.0 spec so you don't have to tell it to close. You can also skip the "Host: 192.168.1.3" part too since you're using what is assuredly the default hostname configured on your web server. The "Host:" header is still usually required with public web sites or with web servers using name-based virtualhosting so keep that in mind.
When you drop to HTTP/1.0 you can skip the "Connection: close" part; persistent connections are not part of the HTTP/1.0 spec so you don't have to tell it to close. You can also skip the "Host: 192.168.1.3" part too since you're using what is assuredly the default hostname configured on your web server. The "Host:" header is still usually required with public web sites or with web servers using name-based virtualhosting so keep that in mind.
Two days ago same code it recovered after two minuites, when i posted the code it remained hung for hours.
I try now with ur changes
That is partly my client code. If it doesn't receive a packet for 10 seconds, it should timeout and continue. Where in the code is it freezing? What is the last message on the serial monitor when it freezes?
You should have posted this in the networking section. I would have seen this thread sooner.
SurferTim:
That is partly my client code. If it doesn't receive a packet for 10 seconds, it should timeout and continue. Where in the code is it freezing? What is the last message on the serial monitor when it freezes?
You should have posted this in the networking section. I would have seen this thread sooner.
Just froze and the last printed message was DEBUG 1.... I am in despair guys.... I try to fix this one week now !
if(client.connect(ipBuf,thisPort))
{
Serial.println(F("connected"));
client.print("GET /write3.php?value0="); //GET to php file which handle data (value0 and value1) into a database
//Temperature
client.print(value0);
//Humidity
client.print("&value1=");
client.print(dht_humidity);
//bmp085 values
client.print("&value2=");
client.print(temperature);