For those who don't know what UPnP is :
Some tilme ago someone in the help forum was asking if it was possible to use UPnP and AU3 ....Short for Universal Plug and Play, a networking architecture that provides compatibility among networking equipment,
software and peripherals of the 400+ vendors that are part of the Universal Plug and Play Forum.
UPnP works with wired or wireless networks and can be supported on any operating system. UPnP boasts device-driver
independence and zero-configuration networking.
UPnP uses the SSDP protocol :
SSDP uses UDP unicast and multicast packets to advertise their services. The multicast address is 239.255.255.250.
SSDP uses port 1900
Well UPnP can access all UPnP compatible devices and retrieve information from it.
And the beauty of this all is, it can not on retrieve info from it, it can also control it remotely !!
Like you can add port forwarding in your router, remotely. Or block ports etc.
So in theory you can access the sound volume button on your UPnP Media player and turn it up or down, as well.
Like this : UPnP-based media player devices
Here is a little sample of how you get started :
; http://msdn2.microsoft.com/en-us/library/aa382297.aspx Dim $deviceFinder Dim $DeviceType Dim $Devices Dim $Device Dim $strDescDocURL $DeviceFinder = ObjCreate( "UPnP.UPnPDeviceFinder" ) $DeviceServices = ObjCreate( "UPnP.UPnPServices" ) $DeviceService = ObjCreate( "UPnP.UPnPService" ) $Device = ObjCreate( "UPnP.UPnPDevice" ) $DeviceType = "upnp:rootdevice" $Devices = $DeviceFinder.FindByType($DeviceType,0) ;$strDescDocURL = $DescriptionDoc.GetDocumentURL ConsoleWrite( $strDescDocURL & @LF) ConsoleWrite( "Found # :" & $Devices.Count & " Devices" & @LF & @LF) ;ConsoleWrite( "Services # :" & $DeviceService.Count & " Devices" & @LF & @LF) For $DeviceObj in $Devices ConsoleWrite("Children " & $DeviceObj.Children & @CRLF) ConsoleWrite("Description " & $deviceObj.Description& @CRLF) ConsoleWrite("FriendlyName " & $deviceObj.FriendlyName & @CRLF) ConsoleWrite("HasChildren " & $deviceObj.HasChildren & @CRLF) ConsoleWrite("IsRootDevice " & $deviceObj.IsRootDevice & @CRLF) ConsoleWrite("ManufacturerName " & $deviceObj.ManufacturerName & @CRLF) ConsoleWrite("ManufacturerURL " & $deviceObj.ManufacturerURL & @CRLF) ConsoleWrite("ModelName " & $deviceObj.ModelName & @CRLF) ConsoleWrite("ModelNumber " & $deviceObj.ModelNumber & @CRLF) ConsoleWrite("ModelURL " & $deviceObj.ModelURL & @CRLF) ConsoleWrite("ParentDevice " & $deviceObj.ParentDevice & @CRLF) ConsoleWrite("PresentationURL " & $deviceObj.PresentationURL & @CRLF) ConsoleWrite("RootDevice " & $deviceObj.RootDevice & @CRLF) ConsoleWrite("SerialNumber " & $deviceObj.SerialNumber & @CRLF) ConsoleWrite("Services " & $deviceObj.Services & @CRLF) ConsoleWrite("Device URN Type " & $deviceObj.Type & @CRLF) ConsoleWrite("UniqueDeviceName " & $deviceObj.UniqueDeviceName & @CRLF) ConsoleWrite("Product Code - UPC " & $deviceObj.UPC & @CRLF) ConsoleWrite(@LF) next
IMOPORTANT :
- Make sure that you UPnP device has the UPnP feature enabled, by default it might not be so.
- Make sure that you firewall (in XP) is off or has the UPnP Framework trafic allowed.
Enjoy!!
ptrex
Edited by ptrex, 14 September 2012 - 08:59 AM.





