RX problem. TCP/IP
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: RX problem. TCP/IP
by Eugeny ·
[quote=“oded”]When trying to read the data from the Wiznet, a small chunk at the end is missing when the socket indication says it is closed (Sn_SSR ).
Sn_SSR (SOCKETn Status Register) == S0_SSR_SOCK_CLOSED == “0”.[/quote]
Socket being closed shows that physical communication between PC and W5300 finished, but this does not mean there’s still some data in the buffer you need to read. Thus after you check for CLOSED state, you have to check if RX buffer is empty. If both are true, then you are finished. If socket is not CLOSED, you have to wait for more data, but if socket is CLOSED but there’s data in RX buffer, you should read this remaining data and finish.
RE: RX problem. TCP/IP
by oded ·
Hi Eugeny,
Yes you are right. as part of my procedure i am checking the buffer (Sn_RX_RSR, Sn_RX_RSR2)
even if the socket is close. if i didn’t get any data after the socket is close and 1 second as passed,
then i am closing the socket .
Thx, oded.
RE: RX problem. TCP/IP
by Eugeny ·
Is issue solved or not?
RE: RX problem. TCP/IP
by oded ·
hi
no,the issue is still happens.
i already did this at the first time.
oded
RE: RX problem. TCP/IP
by Eugeny ·
What you do should be correct from W5300 point of view, unless it really does what you think it does.
What you can do:
RE: RX problem. TCP/IP
by Coccoliso ·
Hi,
You are missing a handshake in case of variable length or if the amount of data is always the same you can close the socket on server side.