Jump to content
IGNORED

GITHUB Ticket #371 - Some BBSes hang


Recommended Posts

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

 

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...