UPNP/DLNA protocol analysis tool?

Developers forum for Univeral Media Server-related development (only for programmers)
Post Reply
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

UPNP/DLNA protocol analysis tool?

Post by Wolfgan »

Hi, I have a DLNA client that is behaving with UMS. I inspected the traffic with wireshark to check who was really behaving badly, and it works but it's a lot of effort to detect the proper msg exchange.
Do you guys use any other tool (ie fiddler, that I tried but didnt capture UMS traffic) or plugin for wireshark?
Thx, Wolf
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
User avatar
DeFlanko
Posts: 724
Joined: Thu Jun 21, 2012 3:43 am
Location: San Pedro, CA
Contact:

Re: UPNP/DLNA protocol analysis tool?

Post by DeFlanko »

Yes, click the link in my signature -- it should take you to the HowTo.
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

Re: UPNP/DLNA protocol analysis tool?

Post by Wolfgan »

DeFlanko wrote:Yes, click the link in my signature -- it should take you to the HowTo.
Thx DeFlanko. I used UPNPTools before and they are pretty useful, but I wanted to check the traffic between renderer and UMS to make sure which side was processing bad data to troubleshoot an issue (kind of http://tricksandtrucks.blogspot.com.ar/ ... shark.html).
But I found that even if not impossible, wireshark is too low level for this task (and fiddler doesnt capture UMS traffic directly, plus PMS/UMS doesnt seem to support a proxy server config to force traffic routing thru the analysis tool).

That's why I asked about it :-)
Thx! Wolf.
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

Re: UPNP/DLNA protocol analysis tool?

Post by Wolfgan »

Follow up question: is there any way to force UMS to use an http proxy to allow better analysis of client/server traffic? (lurked around the forums and config files but it seems not)
Thanks! Wolf
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
ExSport
Posts: 595
Joined: Wed Oct 10, 2012 1:57 am

Re: UPNP/DLNA protocol analysis tool?

Post by ExSport »

No. UMS binds to network interface directly so it can send and receive multicast packets.
Only solution is some virtual network driver which acts like PROXY so UMS can communicate with it but other program can access data flowing through via some proxy IP.
Not sure if anything similar exists 8-)
EDIT:
Two another useful tools:
http://coherence.beebits.net/wiki/UPnP-Inspector
http://opentools.homeip.net/dev-tools-for-upnp
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

Re: UPNP/DLNA protocol analysis tool?

Post by Wolfgan »

ExSport wrote:No. UMS binds to network interface directly so it can send and receive multicast packets.
Only solution is some virtual network driver which acts like PROXY so UMS can communicate with it but other program can access data flowing through via some proxy IP.
Not sure if anything similar exists 8-)
EDIT:
Two another useful tools:
http://coherence.beebits.net/wiki/UPnP-Inspector
http://opentools.homeip.net/dev-tools-for-upnp
Understood, thx ExSport. But if I understand the protocol correctly, only the discovery stage over UDP needs direct multicast access, right? (After the server and renderer found each other, then all requests are handled via TCP with HTTP protocol)
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
ExSport
Posts: 595
Joined: Wed Oct 10, 2012 1:57 am

Re: UPNP/DLNA protocol analysis tool?

Post by ExSport »

True.
In this case it is easy to see SOAP communication sent via HTTP protocol directly in debug.log (trace level) or when filtered in Wireshark/Network Monitor or by using UPnP-Inspector.
But only solution to see all packets flowing around is using packet sniffing but as you said it is not so friendly.
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

Re: UPNP/DLNA protocol analysis tool?

Post by Wolfgan »

ExSport wrote:True.
In this case it is easy to see SOAP communication sent via HTTP protocol directly in debug.log (trace level) or when filtered in Wireshark/Network Monitor or by using UPnP-Inspector.
But only solution to see all packets flowing around is using packet sniffing but as you said it is not so friendly.
Good tips. Thanks!
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

Re: UPNP/DLNA protocol analysis tool?

Post by Wolfgan »

So, looking at some traffic captures, I detected some issues with traffic encoding, particularly in server replies:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<Result><DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"><container id="0$1" childCount="1" parentID="0" restricted="true"><dc:title>Recently Played</dc:title><upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="PNG_TN">http://192.168.1.84:5001/get/0$1/thumbnail0000Recently+Played</upnp:albumArtURI><upnp:class>object.container.storageFolder</upnp:class></container><container id="0$2" childCount="1" parentID="0" restricted="true"><dc:title>New Media</dc:title><upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="PNG_TN">http://192.168.1.84:5001/get/0$2/thumbnail0000New+Media</upnp:albumArtURI><upnp:class>object.container.storageFolder</upnp:class></container><container id="0$3" childCount="37" parentID="0" restricted="true"><dc:title>!(0TV) Various</dc:title><upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">http://192.168.1.84:5001/get/0$3/thumbnail0000%21%280TV%29+Various</upnp:albumArtURI><dc:date>2014-02-14T10:43:31</dc:date><upnp:class>object.container.storageFolder</upnp:class></container><container id="0$4" childCount="1" parentID="0" restricted="true"><dc:title>!(0) Movies</dc:title><upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">http://192.168.1.84:5001/get/0$4/thumbnail0000%21%280%29+Movies</upnp:albumArtURI><dc:date>2014-02-10T08:57:37</dc:date><upnp:class>object.container.storageFolder</upnp:class></container><container id="0$5" childCount="13" parentID="0" restricted="true"><dc:title>DLNAtest</dc:title><upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">http://192.168.1.84:5001/get/0$5/thumbnail0000DLNAtest</upnp:albumArtURI><dc:date>2014-01-31T07:54:33</dc:date><upnp:class>object.container.storageFolder</upnp:class></container><container id="0$6" childCount="7" parentID="0" restricted="true"><dc:title>Web</dc:title><upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">http://192.168.1.84:5001/get/0$6/thumbnail0000Web</upnp:albumArtURI><upnp:class>object.container.storageFolder</upnp:class></container><container id="0$7" childCount="3" parentID="0" restricted="true"><dc:title>#- Cache -#</dc:title><upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">http://192.168.1.84:5001/get/0$7/thumbnail0000%23-+Cache+-%23</upnp:albumArtURI><upnp:class>object.container.storageFolder</upnp:class></container></DIDL-Lite></Result>
<NumberReturned>7</NumberReturned>
<TotalMatches>7</TotalMatches>
<UpdateID>1</UpdateID>
</u:BrowseResponse>
</s:Body>
</s:Envelope>
It seems the dynamic (ie folders/mediafiles) info encoding of XML delimiters is using a different encoding/codepage than the main response page (>< for > < chars).
Would be that an issue to worry? Wolf
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
Post Reply