TCP connection only possible with a 2-4 sec delay between init and socket programming
IO Modules
No replies yet. Be the first to reply.
Join the discussion.
IO Modules
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: TCP connection only possible with a 2-4 sec delay between init and socket programming
by becky ·
I think you have to fix it such as below:
while(!(getPHYCFGR() & PHYCFGR_LNK_ON));
RE: RE: TCP connection only possible with a 2-4 sec delay between init and socket programming
by Caspar ·
Hi Becky,
Yes you are right, that’s a mistake in my code. Thank you for noticing, i changed it in my code. Unfortunately this is not the solution to my problem. The module still fails to connect with the server without that 3-4 second delay. So i’m curious if there is another factor which plays a part in the initialization of the module.
Caspar
RE: TCP connection only possible with a 2-4 sec delay between init and socket programming
by becky ·
In the first packet, the W5500 sent an arp request. But belkin did not give an arp response. If the w5500 does not receive an arp response, it retransmits every 200ms. However, no retransmission is seen in the first packet.
I think there are two cases.
The first is that there was more arp transmission before, but it was not visible because it was sent before link up.
The second is that the phy link is unstable.
It is recommended to check the phy twice by modifying as follows to ensure the stability of phy
while (1) {
check1 = getPHYCFGR () & PHYCFGR_LNK_ON
check2 = getPHYCFGR () & PHYCFGR_LNK_ON
if (check == 0x01 && check2 == 0x01) break;
}
RE: TCP connection only possible with a 2-4 sec delay between init and socket programming
by Caspar ·
The suggestion of polling the phy link twice worked. Thank you