SOCKERR_TIMEOUT after calling connect()
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: SOCKERR_TIMEOUT after calling connect()
by acpie360 ·
I need to call setSn_PORT() to set my source port. Otherwise I think W5500 will use the same destination port number as the source port.
RE: RE: SOCKERR_TIMEOUT after calling connect()
by Eugeny ·
Correct. By default it is 0. You set it to 80. Web server does not want to respond to port 80. Set the source port in range of 0xc000-0xfffe, and make the port number dynamic - so that for every new connection to this web server’s port 80 you use previous port number + 1.
RE: SOCKERR_TIMEOUT after calling connect()
by acpie360 ·
Thanks for the comment.
What is still a bit of puzzling is that I made this mistake a few months ago by passing in port number 80, instead of 0, when calling socket() API for a HTTP client socket. This bug wasn’t discovered sooner because everything seemed to be working just fine in the office. However, when I took the device home and plugged it into my Google WiFi router, I couldn’t connect, as if either the SYN never reached the server or the SYN ACK was lost. Any theory why it was mistakenly working?