-1

I would like to be able to scan my local network, using either an existing command line tool or writing my own, that will look for a certain type of embedded device and then print a list over all devices found.

The embedded device I'm looking for has the lwIP TCP/IP stack implemented, and we are free to add functionality to it that will help us locate it.

Using the MAC address of the device is not an option because the user is free to configure this and it may not have been properly set.

How can I make my devices "scanable" on the LAN and how can I perform the scan with my PC?

Q-bertsuit
  • 3,223
  • 6
  • 30
  • 55

1 Answers1

1

let me try to answer this: your device will be added on a LAN, so will get an IP address. That's really what's critical to locate it. The IP address can be:

  • fixed, like defined by your device (something like 192.168.0.1), but it's a risky option because it might collide. In that case, you can just tell the user to reach this IP
  • dynamic, defined by DHCP. So your device will get an IP on your LAN like 192.168.3.178.

In case on DHCP, the issue is finding your device. You will find detailed answers there How to get a list of all valid IP addresses in a local network?, but there is basically 2 options:

  • nmap, a real scanner. This may be long, but super powerful. This also could be viewed as agressive, so if you're in a controlled environment (like the LAN of a entreprise), please ask your sys admin before doing that
  • arp, which is not as exhaustive
Pixou
  • 1,719
  • 13
  • 23