OpenHome Forum
IP of device - Printable Version

+- OpenHome Forum (http://forum.openhome.org)
+-- Forum: OpenHome (/forumdisplay.php?fid=1)
+--- Forum: Net (/forumdisplay.php?fid=5)
+--- Thread: IP of device (/showthread.php?tid=1422)



IP of device - SiMet - 12-10-2015 09:38 AM

Hello,

Is there any posibility to get IP of device or some other resource (for example DeviceDescription link)?


RE: IP of device - simonc - 12-10-2015 09:50 AM

(12-10-2015 09:38 AM)SiMet Wrote:  Hello,

Is there any posibility to get IP of device or some other resource (for example DeviceDescription link)?

Using a CpDevice discovered by one of the UPnP device lists, calling GetAttribute for key "Upnp.DeviceXml" will return the device description. You can parse any details from it then.

If all you want is an IP address, you could read the "Upnp.Location" attribute. This returns a url so will be much easier to parse than the entire device description.


RE: IP of device - SiMet - 12-10-2015 09:56 AM

In DeviceXml there is no IP of device.
However, I found this in Upnp.Location

thank you so much Smile