6 years, 5 months ago.

Get List of Client with ARP (Address Resolution Protocol) using W5500

Hi all,

I have tested TCP communication with this library and it works ok.

Now, I want to be able to get list of client (their IP address and MAC) in the network, while my mbed device is also a client. After browsing for some times, I think the ARP (Address Resolution Protocol) is what we needed. Or do you have other suggestion?

Please provide me with example of sending ARP packets with this library to get info of client connected to the network.

I have tried to compile the official mbed EthernetInterface library (as it has ARP part in it), but as it doesn't support STM32F1 (which I use). So, I think it is a dead end.

Thanks for your time and willingness to answer my question

Cheers

Question relating to:

This is the Interface library for WIZnet W5500 chip which forked of EthernetInterfaceW5500, WIZnetInterface and WIZ550ioInterface. This library has simple name as "W5500Interface". and can be used for Wiz550io users … W5500, WIZ550IO, Wiznet

1 Answer

6 years, 5 months ago.

To Tigor,

W5500 send ARP packets in internal as below cases, - TCP Connect command: ARP request is send before SYN packet in TCP. - UDP Send command: ARP request is send before sending of UDP data.

W5500 is generated ARP Time-out When W5500 couldn't receive the ARP respone.

So, you should be check Sn_IR_TIMEOUT after TCP Connect and UPD send command.

if (getSn_IR(sn) & Sn_IR_TIMEOUT) { setSn_IR(sn, Sn_IR_TIMEOUT); return SOCKERR_TIMEOUT; }

If W5500 was established in TCP mode, you can know the destination MAC address by reading of the Socket destination Hardware address register (Sn_DHAR).

Thanks

Dear Soohwan,

Thanks for the answer. As for now, I've created a workaround for our project (not related to ARP). I'll follow your suggestion by checking the source code, if I hit another dead end. :-)

Thanks again Soohwan

posted by Tigor Christian 27 Apr 2015