Ftp client with w5500: trouble
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Ftp client with w5500: trouble
by Mxyxixptlick ·
You may already be doing some of the things I suggest below, but I can’t tell for sure based on the information you’ve provided. In particular, it’s not clear whether your transmissions are fixed-size or variable. So, sorry if I’m telling you things you already know, I just can’t tell from your question.
If messages are fixed-size and smaller than the W5500 Rx buffer, you can check the Socket n Received Size Register, Sn_RX_RSR0, to see how many bytes are available and wait until the entire message is in the Rx buffer before reading.
If your messages are NOT fixed-length, you need a unique termination string at the end of the message to tell you when you’re done. Read repeatedly until you see that string. Alternately, you can put the length of the message at the beginning of the first packet of each transmission, as is done in HTTP. Read in a loop until all bytes have been received.
Each socket has a 2KB receive buffer (by default; you can allocate the 16KB between the 8 sockets differently if you choose). If your messages are larger than 2KB, you’ll need to do multiple reads to get the entire message.
RE: RE: Ftp client with w5500: trouble
by voroshilov ·
Hi! Thank you for reply.
I read the reference manual and I know what you wrote.
The problem is as follows:
Size of file - about 200-350 kb and not known beforehand.
My W5500 driver receive all of data, except last packet. Last packet may have size from 1 to 2048 bytes, depend of file size.
And if i receive(only reading, not saving) data immediate, without confirmation from controller-board, i receive all file.
RE: Ftp client with w5500: trouble
by voroshilov ·
Upd.
I solved problem:
I need to move Sn_RXPTR after confirmation by controller board, not before.
RE: Ftp client with w5500: trouble
by jameskim ·
Sound great!