W5500 UDP sending timeout (Sn_IR always is 0x08)
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: W5500 UDP sending timeout (Sn_IR always is 0x08)
by AJ1999 ·
Further information:
Despite setting the Destination Target to 192.168.18.100 the ARP requests on the network dont seem to be asking for this, but 0.0.0.0 instead:
Furthermore, if I load Sn_DHAR with the MAC address of the destination and use SENDMAC instead of SEND there are no corresponding ARP requests but the NTP packet is spotted with the destination still set to 0.0.0.0.
RE: W5500 UDP sending timeout (Sn_IR always is 0x08)
by Mxyxixptlick ·
I see in your code where you set your server IP address and where you set the server and destination ports but I don’t see any code that sets the destination IP address.
RE: RE: W5500 UDP sending timeout (Sn_IR always is 0x08)
by AJ1999 ·
I set the target (NTP server) as below:
ServerIP[0] = (unsigned char)NetSettings.NTSAddress[0];
ServerIP[1] = (unsigned char)NetSettings.NTSAddress[1];
ServerIP[2] = (unsigned char)NetSettings.NTSAddress[2];
ServerIP[3] = (unsigned char)NetSettings.NTSAddress[3];
WriteArrayToWiznet5500( SOCKET_DIPR0,
BSB_SOCKET_3_TX,
ServerIP,
4 );
Incidentally, I have set SIPR0 to 192.168.18.69 too (although I realize this isnt shown above) as well as the MAC, Mask, and Gateway to SHAR, SUBR, and GAR.
RE: W5500 UDP sending timeout (Sn_IR always is 0x08)
by Mxyxixptlick ·
Try reading the server IP from the W5500 SIPR register after you set it, and see if it has the value you expect.
RE: RE: W5500 UDP sending timeout (Sn_IR always is 0x08)
by AJ1999 ·
Curiously, I did try adding a line reading DIPR0 just before the SEND is issued and it had reverted back to 0.0.0.0 which is unexpected although explains the ARP requests (no other code is known to be writing over it). I also tried re-ordered when the DIPR0, PORT0/1 and the OPEN_CMD is written to Sn_CR but didn’t really to come to any conclusion why the DIPR would change.
As a useful workaround I now re-write the destination IP into DIPR0 each time just before a SEND is written to the Sn_CR as a precaution… The targeted IP address then responds via UDP port 123 as expected.