-->
Page 3 of 4

Re: ESP reliability and firmware update

PostPosted: Thu May 26, 2016 12:26 pm
by martinayotte
Do you mean the "timeout" loop ?
Although the 1000ms is quite short for an HTTP request, I don't see any reason why it hangs the ESP other than simply skipping the response if it didn't came within the 1000ms. Your should try with something like 5000ms instead.

Re: ESP reliability and firmware update

PostPosted: Thu May 26, 2016 12:57 pm
by mixxx2005
I think it is more with data.sparkfun than with codes function itself, because even in browser it hangs when refreshed, so I believe that same thing somehow hang ESP.

Maybe by sparkfun.com hanging -- response message size greater than ESP's RAM what cause it to crash?

As I do not need serial monitor to tell "1 success" , I can perfectly live without this part off code.

Re: ESP reliability and firmware update

PostPosted: Thu May 26, 2016 1:19 pm
by martinayotte
Yes, the data.sparkfun is maybe slow responding, but that doesn't explain the reason that you've said that ESP becomes hang.
Removing this timeout loop will lead to other problems in the cases where responses are not instantaneous, because the next loop for printing the response will be skipped since nothing is already received.

Re: ESP reliability and firmware update

PostPosted: Thu May 26, 2016 1:57 pm
by mixxx2005
Ok, tomorrow I try code with timeout, bet without client.read - because this is the part that I mean in previous comment, that cause issues with oversized string.


Code: Select all  while(client.available()){
    String line = client.readStringUntil('\r'); - See more at: http://www.esp8266.com/viewtopic.php?f=6&t=10127&start=4#sthash.wKrbdTnj.dpuf