W5100 send SOCKERR_SOCKSTATUS after few success writes
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: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Eugeny ·
When error occurs please read Sn_SR register to identify which status socket is in.
RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Sachin Gole ·
Hi Eugeny,
Thanks for reply.
After write failure I tried to read Sn_SR register it gave following value.
socket number = 0 & numBytesToWrite = 6
retValue = send(socketNumber, (uint8_t *)pBuffer, numBytesToWrite);
send retValue = -7
Sn_SR(socket) retValue = 1027
Best regards,
Sachin
RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Sachin Gole ·
Sorry for inconvenience.
Previously, I just gave you #define for Sn_SR(socket) As it is 0x403
Now I just checked
retValue = getSn_SR(socket);
retValue = 0
RE: RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Eugeny ·
So for some reason socket is being closed when you try to send more data.
I can only guess what is going on; for example, if you use HTTP protocol, you may be sending wrong data during your step 4, and remote host closes the connection.
I propose you looking at what is going on the network using Wireshark to see what is actually being sent, and check the sequence of packets.
If you wish you can capture network activity log using Wireshark, and share it here so that we can have a look.
RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Sachin Gole ·
Thank you Eugeny for reply.
Finally I tried with local server on machine and send request from board and found that my processing take time so server timeout and close socket.
I have increased server read timeout and it worked. I need to process my data ASAP so server will not give timeout.
By the way I have not found blocking flag for 5100 while creating socket.
How to implement blocking send or connect request.
RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Eugeny ·
Please explain. What you want to achieve?
RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Sachin Gole ·
Currently I don’t have any blocker, as my application has lot of transaction with multiple socket on server so I was thinking to have each transaction in blocking mode which can confirm each operation done synchronously.
I can see that other chips like 5500 has flag SF_IPv6_BLOCK so thought if needed to 5100 then how I can implement same.
RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Eugeny ·
What is “blocking mode” in your understanding? Please explain what you want to achieve (not how you think you can achieve something).
RE: W5100 send SOCKERR_SOCKSTATUS after few success writes
by Sachin Gole ·
synchronous write/read for large data in range of 20KB.