Question

I'm trying to find out the IP address of an UPnP device connected to my network. On Windows I'm able to get this information by referring to the following question on StackOverflow:

UPnP Multicast: missing answers from M-SEARCH (Discovery)

However, how can I do on Linux?

Was it helpful?

Solution

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
$ 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top