Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By xtal
#38158 Verdict is out on using reserve, But I've encountered another problem while trying to implement serial handling...
My <textarea> buffer</textarea> is not being fully displayed..and no errors being displayed ........
I'm assuming data > 1469 , but why no error ?
void loop code is:
1> get pay load
2> if NO CLICK button build Wpage ; client.print(Wpage); client.stop(); return;
else
3> if CLICK button client.flush(); build Wpage ; client.print(Wpage); client.stop()
end void loop

I changed to : build part1 Wpage; client.print(Wpage); build part2 Wpage ; client.print(Wpage); client.stop()
It iappears to be working, but is this a proper fix?
I also was wondering about using only 1 client.flush() , should I be using 2 client.flush() ?
Do I need to add any delays?
User avatar
By martinayotte
#38169 You've mentioned the magic number. 1460 is the limit of the packet size.
So, are you sending your buffer with a single client.write() while buffer is bigger than 1460 ?
If yes, there is the problem, you need to divide it into multiple chunks with client.write() for each, a bit like the ESP8266WebServer is doing with its different sendContent() functions.