Go Down

Topic: EthernetLib: query for MAC addresses in subnet to get IP of other device(s) (Read 179 times) previous topic - next topic

neapolitaner

hi,

i'd like to query for some/all MAC addresses in my subnet to find out the IP address of my own devices.

means:
- all my devices have a specific MAC with the prefix of #AB:CD:xxxx
- after startup every device wants to know which devices are alive and get the given IP-address (given by DHCP)

is this possible with W5100 and what could be the best way to query for a IP/MAC? (ARP table)

br,
neapolitaner

ntruchsess

While the W5100 does send out ARP-requests to query the ethernet-address of remote peer, it doesn't provide a user-accessible ARP-table. So you can read the ethernet-addess of the remote peer from a connected socket, but not ethernet-addesses of other hosts on the net. Handling the ARP-protocoll to build an ARP-table would have to be done by the MCU using the 'MAC Raw Mode' the W5100 supports for socket 0 (See W5100 Datasheet section 5.2.4 'MAC Raw'). There's no support for that in the Arduino Ethernet-lib though, so you'd have to roll your own code. You might want to make use of the arp-code in Adam Dunkels µIP-stack that is capable of handing ARP. You'd need to write a small driver that translates in between µIP and W5100 for that.

- Norbert


Go Up