Pages: [1]   Go Down
Author Topic: EthernetLib: query for MAC addresses in subnet to get IP of other device(s)  (Read 157 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Full Member
***
Karma: 11
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thx for your detailed reply!
Logged

Pages: [1]   Go Up
Jump to: