ESP8266/ESP32 error in internal receive
gilmaimon opened this issue ยท 9 comments
First described in this issue #2.
When continusly sending and receiving messages (with no/very-short delays) on esp8266 a message with bad values is read (opcode and fin makes no sense).
Does the issue occurs on ESP32?
ESP8266 networking was fixed in this release b7c00e3
Now communication is sync. ESP32's networking is still problematic when sending many messages without any (or very little) delay.
This issue might help: espressif/arduino-esp32#2576
Both platforms (Esp8266 and 32) adressed in release b1164a6
Current solution is the usage of setNoDelay(true)
Seems to be a good compromise Gil. There is still the rare possibility of corruption and a disconnection, which is now handled fine anyway. I feel with the flush/nosync the communications became far too slow. The noDelay which also stops the nagle algorithm is ok ๐ Cheers.
@gilmaimon no, I have left my project run for hours and hours, no disconnects. It is sending and receiving a 20char message about 5 per second when 'idle'. I will add some debug code tomorrow to count up any reconnects, and keep a message count,, and display on the oled1306 ๐
some initial results of just over 1 hour run time
sent message string from esp8266 : rx_smeter:0,0;
received message string into esp8266 : rx_smeter:0,0,-123;
connection attempts : 1
successful connections : 1
send message count : 82453
received message count : 82453
which works out to be around 23 out bound messages per second, 23 inbound/s
I would say it is working fine !!! ๐ x ๐ฏ
ok, 12hrs...
connection attempts : 1
successful connections : 1
send message count : 907613
received message count : 907613
averaged about 21 msgs per second ๐ฅ