Go Down

Topic: Ethernet shield: what happens when receive buffer is full (Read 1 time) previous topic - next topic


I'm working on a web-based file manager that allows you to read/write/edit files on the SD card, create & delete folders, upload files, etc
Everything is working fine, except for one thing:

uploading files > 2Kb causes large delays.  Apparently this is caused by the 2K receive buffer in the w5100.  After reading (using client.read) ~2K of data, there is no data available for a couple of seconds, and then it continues reading again.

At what point does the W5100 realize it's buffer has been read and it should be ready to accept a new packet?     Is this a bug (or opportunity for improvement) in the Ethernet library or is it something fundamental? 

I'd like to share this code with the world, but not until I've fixed this annoying issue.


May be it's in your code there is a trouble...

So from, if you don't want to publish it now, how can we help you ?


I don't think the problem is with my code; I've checked client.available() while reading the data from the ethernet shield.
client.available() is ~2000 bytes at the start, eventually drops down to 0 while the data is read using client.read().  It stays 0 for a couple of seconds, and then suddenly new data appears and is read.   So the code sits idle, waiting for data to show up in the W5100.   The problem is either in the W5100 code or it could be a TCP/IP thing that I'm unfamiliar with.

The code is quite extensive; a combination of javascript / ajax html files served by the SD card and C++ on the arduino.   Posting it right now would raise more questions.


Posting it right now would raise more questions.

On the other hand, not posting it doesn't raise any answers. Your call.
The art of getting good answers lies in asking good questions.

Go Up