tschak909 Posted December 8, 2020 Share Posted December 8, 2020 Yes, some of you have noticed that some BBSes cause the FujiNet to hang. There is a ticket on github that explains this, here: This is caused by an unusual set of circumstances where the ESP32 isn't responding fast enough to received TCP packets. To improve performance, most hosts turn off Nagle While @mozzwald and I have been able to decrease the frequency of the hangs, we haven't been able to get rid of them completely, and have now reached out to the ESP32.COM forums to see if we can get some help, What I posted, follows: Quote Hello everybody, I am one of the firmware developers on the #FujiNet project, which brings a network adapter to the #Atari8bit computers. The firmware is here, and is free software: https://github.com/FujiNetWIFI/fujinet-platformio We are currently having issues with the Wi-Fi MODEM emulation that is part of the firmware (currently implemented here: https://github.com/FujiNetWIFI/fujinet-platformio/blob/master/lib/sio/modem.cpp), where if a host sends too many one-byte packets (due to Nagle algorithm being disabled by the host to improve interactive performance), then the ESP32 does not respond fast enough to them, and the host re-sends the packet, ultimately resulting in a duplicate acknowledgement (DUP ACK) because the ESP32 ultimately acknowledges all the packets, if a bit late, and ultimately resulting in the host refusing to send more data because it thinks that there is too much packet congestion. My question is, if the primary thread of the program runs too quickly, does this ultimately starve lwIP of being able to do basic TCP house-keeping, like acknowledging receipt of packets? If so, what's the correct solution? We've already tried * vPortYield() all over the parts of the code where received packets are processed. * Adjusting SDK parameters to adjust the size of static and dynamic buffers * Adjusting the process affinity of the lwIP process * explicitly putting delays in where received packets are to be processed (as a test) and we're really scratching our heads here, any help would be appreciated. -Thom Cherryhomes 2 1 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted December 15, 2020 Author Share Posted December 15, 2020 This bug has now been resolved, and is now in the current build. -Thom 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 7, 2021 Share Posted January 7, 2021 and the resolution was? Quote Link to comment Share on other sites More sharing options...
mozzwald Posted January 8, 2021 Share Posted January 8, 2021 1 hour ago, _The Doctor__ said: and the resolution was? https://github.com/FujiNetWIFI/fujinet-platformio/commit/a7951184a1955571d344a3ab02d44d299b3f5ee9 1 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted January 8, 2021 Author Share Posted January 8, 2021 yup, it really was that simple, but finding that was a needle in one huge haystack. Thanks to @JohnPolka for doing the digging! -Thom Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.