Cling compatibility

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

Cling compatibility

lluki
Hi there!

I'm trying to implement an AV Media Server using cling. I could get it working, so that i can see it in the cling workbench (and can browse some directories). Now i tried some (in fact all linux compatible i could find ;) ) clients to check against them. Well, djmount (http://djmount.sourceforge.net/) is the only one working.
I tested with:
Rhythmbox (which shows the server, but due to a bug in the rhythmbox plugin can't browse. It stumbles over clings requirement for correct content-types [see other post here ;)]....)
XBMC (xbox media center, doesnt show the my server at all).

I tried some other media servers (mediatomb and ps3mediaserver), they work fine.

Well, i tried the upnp developer tools (http://opentools.homeip.net/dev-tools-for-upnp). My client doesnt show up in their "device spy". I thought i had an error in my code. So i took the light example from the documentation copied it to the windows box: it doesnt show up neither! (also tried it over the network let the light run on my linux box). They include a similar example, which works with their "device spy" but not with the cling workbench.

I tried to track down the differences using their "device sniffer" (basically displays all ssdp traffic) and wireshark, but can hardly see any difference (that would matter) [http://img207.imageshack.us/img207/7650/screenshotfk.png].... Also the description XML looks almost the same.

Any thoughts?

Greets
Luki
Reply | Threaded
Open this post in threaded view
|

Re: Cling compatibility

Christian Bauer
Administrator
(If you are using Cling beta4, there was a bug in the Workbench ContentDirectory browser that is fixed in the beta5 snapshot. The http://svn.teleal.org/repos/cling/trunk/support/src/main/java/org/teleal/cling/support/contentdirectory/ui/ContentBrowseActionCallback.java was expecting a 'childCount' attribute in the DIDL XML, but this is actually optional.)

I'd need your MediaServer to reproduce your problems with XBMC. You should be able to figure out more with more extensive logging.

About the UPnP Dev Tools - they are no longer supported by Intel and I do not consider them to be a reference at all: When I recently tested them I found quite a few problems and I send bugreports to the developer. Especially the "Network Light" was broken. I can see there is a new version (0.0.41) out now and I'd have to test it again. Please let me know what version you use in future posts.
Reply | Threaded
Open this post in threaded view
|

Re: Cling compatibility

lluki
In reply to this post by lluki
Just noticed: The cling workbench displays something about the Intel Light:

WARNING - 16:30:15:586 - Thread 26 (Active: 4) : cling.protocol.RetrieveRemoteDescriptors.describe : Could not hydrate device or its services from descriptor: (RemoteDevice) Identity: (RemoteDeviceIdentity, UDN: uuid:c34cbaf7-65a5-4ed1-a022-8f0bb00c2a15), Root: true

WARNING - 16:30:15:587 - Thread 26 (Active: 4) : cling.protocol.RetrieveRemoteDescriptors.describe : Cause was: org.teleal.cling.binding.xml.DescriptorBindingException: Could not parse device descriptor: org.teleal.cling.binding.xml.DescriptorBindingException: Could not parse device DOM: java.lang.RuntimeException: Can't parse Service ID string (namespace/id): urn:upnp-org:serviceId:DimmingService.0001

well ok, the string looks crippled...


Sorry about the versions, you're right, i use the Beta4. But i included the childcount in the didl xml, so this shouldnt cause the problem. I use the newest developer tools v0.0.41.


I took another look at XBMC, and leave the device sniffer running. It never issues a M-Search ssdp request..... Ps3Mediaserver notifys itself every 10 secs! Maybe that's the cause... Well i guess i have to look into cling how to send more notifys... If it doesn't help i'll send you my code :)

Thx!
Reply | Threaded
Open this post in threaded view
|

Re: Cling compatibility

Christian Bauer
Administrator
This service identifier is indeed valid, I've relaxed the parsing rules in beta5 trunk.

If you are seriously developing with Cling you might want to stay current with a build from SVN source trunk until 1.0 final is done. I'll release new beta versions about once a month only.

If XBMC doesn't send an M-SEARCH multicast it won't find anything immediately. I'm surprised this works at all with other media servers? Well, if you set the maximum age of your LocalDevice in Cling to 10 seconds, you get the same effect and buggy control points are probably the reason why it's such a short timeout in PS3MediaServer. It's not a problem though, your LAN should be able to deal with that traffic :)
Reply | Threaded
Open this post in threaded view
|

Re: Cling compatibility

Christian Bauer
Administrator
The workbench demo binary light had a wrong service descriptor, this patch fixes it (committed to trunk as well):

Index: core/src/main/java/org/teleal/cling/binding/xml/UDA10ServiceDescriptorBinderImpl.java
===================================================================
--- core/src/main/java/org/teleal/cling/binding/xml/UDA10ServiceDescriptorBinderImpl.java	(revision 173)
+++ core/src/main/java/org/teleal/cling/binding/xml/UDA10ServiceDescriptorBinderImpl.java	(revision )
@@ -26,6 +26,7 @@
 import org.teleal.cling.model.XMLUtil;
 import org.teleal.cling.model.meta.Action;
 import org.teleal.cling.model.meta.ActionArgument;
+import org.teleal.cling.model.meta.QueryStateVariableAction;
 import org.teleal.cling.model.meta.RemoteService;
 import org.teleal.cling.model.meta.Service;
 import org.teleal.cling.model.meta.StateVariable;
@@ -383,7 +384,8 @@
         Element actionListElement = appendNewElement(descriptor, scpdElement, ELEMENT.actionList);
 
         for (Action action : serviceModel.getActions()) {
+            if (!action.getName().equals(QueryStateVariableAction.ACTION_NAME))
-            generateAction(action, descriptor, actionListElement);
+                generateAction(action, descriptor, actionListElement);
         }
     }
 

I can now see/control the light in the Device Spy. These tools also have debug/log panels and I could see the parsing error of the descriptor in there. Maybe that will help you debug future problems with your MediaServer.
Reply | Threaded
Open this post in threaded view
|

Re: Cling compatibility

lluki
Thanks a lot :)

I switched to the trunk version and set the max-age to 10 seconds. Now it works in both, device spy and xbmc!