TwonkyServer Mobile

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

TwonkyServer Mobile

bebopfreak
I tried to stream music from my phone via TwonkyServer und UPnPlay to other Renderers.
Failed as resource values (<res></res>) were created with local IPs (127.0.0.1).

Didn't work either with Cyberlink, but does work with Andromote.

I don't know, if this should be considered a bug in TwonkyServer, or if there is a way
for Cling to fix it.

I could do a replace all by myself, but I would prefer a cleaner solution.
Reply | Threaded
Open this post in threaded view
|

Re: TwonkyServer Mobile

Christian Bauer
Administrator
I am not sure I understand the problem... the Twonky server creates localhost URLs in the DIDL and you want to access these resources from another host? How is Cling involved and what do you want it to do?
Reply | Threaded
Open this post in threaded view
|

Re: TwonkyServer Mobile

bebopfreak
Well, Twonky server is a 'Remote'Device of a Cling controlpoint.

The following is very hypothetical, as I haven't looked into
it thoroughly:

It looks like Twonky server is answering search requests with
two different ip addresses, one local

09-07 15:38:39.301 V/CyberCtrlPoint( 7815): search Response uuid: uuid:7076436f-6e65-1063-8074-7e260eeb2fec::upnp:rootdevice target: upnp:rootdevice location: http://127.0.0.1:9000/DeviceDescription.xml lease: 1810

and one more regular

09-07 15:38:39.401 V/CyberCtrlPoint( 7815): search Response uuid: uuid:7076436f-6e65-1063-8074-7e260eeb2fec::upnp:rootdevice target: upnp:rootdevice location: http://192.168.0.239:9000/DeviceDescription.xml lease: 1810

So the question concerning Cling: what should be the correct behaviour?
I assume, if one takes the regular address, Twonly server might produce other DIDLs.

Reply | Threaded
Open this post in threaded view
|

Re: TwonkyServer Mobile

Christian Bauer
Administrator
You can see on startup as INFO log messages which interfaces Cling binds to. There shouldn't be any loopback interface, Cling only binds to regular LAN interfaces by default. So I can't understand how Cling receives a multicast datagram with a 127.0.0.1 callback, unless the Twonky server sends these messages out on a regular LAN interface. This should then be changed in Twonky, obviously. No LAN control point can do anything meaningful with a 127.0.0.1 callback.

You could write a subclass of http://teleal.org/projects/cling/core/xref/org/teleal/cling/protocol/ProtocolFactoryImpl.html in which you discard these datagrams by filtering the Location header. Then override UpnpServiceImpl.createProtocolFactory() and return an instance of your custom class.
Reply | Threaded
Open this post in threaded view
|

Re: TwonkyServer Mobile

bebopfreak
I added a filter line to Cyberlink, now it works flawlessly.

So it probably should also work with Cling.