Ssdp and Interface Ip Address

Discovering an embedded device's IP address

If you can make up any custom protocol, a simple UDP beacon periodically sent to the broadcast address (255.255.255.255 or your preferred interface's broadcast address) is simple and reliable.

Synopsis of comments:

For listing in mainstream platforms' (Windows, Linux, OS X) network views, the best option would likely be to implement the full stack required for Windows' Network Discovery.

If hostname lookup is enough, Netbios or mDNS could be enough.

The search term you are likely looking for is zero-configuration networking and should give you all the available options

Get IP address of an UPnP device

Depending on how you identify the correct device you could take a look at gssdp-discover in gupnp-tools package (which is part of the GUPnP project). If that is not what you want but you are prepared to code a bit, take a look at the source: gssdp-discover is only ~100 lines of C so you should be a able to do what you want in a few dozen lines of python...

Example:

$ gssdp-discover -t uuid:c013f58f-3072-4c3b-9df8-4f869c03edf2 -n 3
Using network interface wlan0
Scanning for resources matching uuid:c013f58f-3072-4c3b-9df8-4f869c03edf2
resource available
USN: uuid:c013f58f-3072-4c3b-9df8-4f869c03edf2
Location: http://10.10.15.61:49152/description.xml
$


Related Topics



Leave a reply



Submit