// if more than 10000 milliseconds since the last packet if(connectLoop > 10000) { // then close the connection from this end. Serial.println(); Serial.println("Timeout"); client.stop(); } // this is a delay for the connectLoop timing delay(1); }

// Use the same character array here to send stuff to the file. // pageAdd array is global sprintf(pageAdd,"Field1=%u,Field2=%u,Field3=%u",temp0,temp1,temp2); fh.println(pageAdd); fh.close(); return 1;}

at first: pass open fail log fail! at the second time in the log : pass log ok.