WIZnet Developer Forum

UDP server multiple clients

Hello,

I am using W5500 socket in UDP mode to act as a server and communicate with smartphone app. It works great when I have one client “connected”[sending packets] to device, but when I try to make multiple clients connections, I have problems with long response time. It sometimes gets up to 600 ms to execute sendto() function and as i figured out most of this time is spend waiting for Sn_IR_SENDOK flag. I am using ioLibrary socket API version 1.0.2.

Are there any issues with W5500 that I should be aware when I try to deal with multiple clients connections?

I will really appreciate any advice.

It turns out that this problem is connected with sending ARP requests before packets, when destination IP is changing, just like if W5500 holds only one ARP record for socket[FORCE_ARP option is disabled]. Is it how this chip works?

I’ve been thinking about workaround this issue by creating ARP table on microcontroller side. Thus I have a question: if I read a Sn_DHAR register right after sending UDP packet, will that be a destination MAC address, retrieved through ARP request?

FYI: Solution that I’ve mentioned above is working correctly.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.