w5500 timeout
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 timeout
by GYUR22 ·
I found only partial answer, but how to get mac address of remote node…
SEND_MAC 0x21
Valid only in UDP mode.
The basic operation is sa
me as SEND. Normally SEND transmits data
after destination hardware address is acquired by the automatic ARP
-process(Address Resolution Protocol). But SEND_MAC transmits data
without the automatic ARP-process. In this case, the destination
hardware address
is acquired from Sn_DHAR configured by host,
instead of APR -process.
RE: RE: w5500 timeout
by becky ·
Hello,
ARP Request is a message for getting a MAC address. In UDP communication, arp is transmitted only once before sending the first data. This is because you don’t need to send more arp after knowing MAC address. Afterwards, it is sent only when you change the Destination IP Address. You can set retry time and retry count to 2ms and 2try. But if you set it to 2ms and 8try, it’s not a 1.6s delay. If the arp response isn’t received in 1.6 seconds, a timeout occurs, not a delay of 1.6 seconds. Upon receipt of the arp response, the next action is taken without delay.
RE: w5500 timeout
by GYUR22 ·
Thank you, but what do you mean -“But if you set it to 2ms and 8try, it’s not a 1.6s delay”?
Is it any way to get incoming mac adress in udp ?
Or get acces to arp cache ?
Or issue an arp request and get the mac out of it?
And when we have unseccesful send to offline node does the arp cache cleare?
RE: RE: w5500 timeout
by Eugeny ·
First of all, you did not state which protocol you use. TCP and UDP work slightly differently.
@becky answered the question - W5500 sends ARP request only once, before first communication. And it will update MAC address with another ARP request if you change destination IP address of the socket.
Please refer to the datasheet, it has nice complex formula. Each attempt (try) timeout value doubles up to 65535.
W5500 does not have ARP cache. It has storage for current IP address.
I do not think so. You normally do not need MAC address, but if you choose to send to specific MAC address, you use SEND_MAC command (as you already noticed).
Can you please explain your actual problem? I am afraid it is going to become XY problem if you will not do it.
RE: w5500 timeout
by GYUR22 ·
Thank you for reply!
My particular problem - I’m using Steeve Karg BACnet stack (UDP protocol) and until I was trying to implement P2P every thing were ok. But I got a very long function blocking time when sendto() trying to send to offline node -controller is the initiator of message. And I’m sendind to many nodes via one socket.
If can get a mac I can avoid arp which block function and send directly.
But where I can get incoming mac or create my own arp?
In conclusion - I need to send recive to/from different ip’s from one socket by UDP protocol.