In the 'normal' situation the control point and renderer have the same IP address, then you would never have a problem.
in my situation, the control point and renderer have different ip addresses
and to make things more complicated, the control point is on the SAME pc as MC, which makes it hard to predict on what network interface the broadcast will be sent/received
control point+jrmc 192.168.1.34
renderer 192.168.1.254
the flow goes like this :
control point uses microsoft upnp api, which does NOT allow any selection of network interface or ip address :
this function call to the microsoft control point api (this is a COM DLL, see above for msdn link) :
local deviceFinder = luacom.CreateObject("UPNP.UPnPDeviceFinder");
local deviceObj = deviceFinder:FindByUDN("uuid:31406D27-9330-4999-A8AB-8D39B48D657C")
this call results in a UPNP broadcast, which MC, on the
SAME pc as where the broadcast packets originates, picks up and MC then figures out the ip address that it will use in the song URL.
later on in the process, the control point asks MC for information about a certain track.
MC returns an xml packet as in the first post with the IP address that it figured out when it received that UDL broadcast packet.
the control point connects to the renderer (
different IP address) in exactly the same way as to the server :
local deviceObj = deviceFinder:FindByUDN( "uuid:5F9EC1B3-ED59-79BB-4530-0005CD161DF5" )
and it then passes the xml packet (see first post) from MC on to the renderer unchanged :
local args = {0,URI,XML}
AVTransport:InvokeAction("SetAVTransportURI", args)
the renderer then receives this xml packet, parses it, and then tries to contact
http://127.0.0.1 or
http://169.254.whatever to start streaming the mp3 song and obviously can't connect.... the only way it can connect is if the URL contains
http://192.168.1.34I believe that my earlier suggestion, is the only way to reliably fix this particular problem : where the UPNP server is on the SAME pc as the application calling the upnp control point api functions.
Marcel