Page 1 of 1

UPNP/DLNA protocol analysis tool?

Posted: Mon Feb 03, 2014 3:28 am
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

Re: UPNP/DLNA protocol analysis tool?

Posted: Thu Feb 06, 2014 4:21 am
by DeFlanko
Yes, click the link in my signature -- it should take you to the HowTo.

Re: UPNP/DLNA protocol analysis tool?

Posted: Thu Feb 06, 2014 5:29 am
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.

Re: UPNP/DLNA protocol analysis tool?

Posted: Wed Feb 12, 2014 6:07 am
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

Re: UPNP/DLNA protocol analysis tool?

Posted: Thu Feb 13, 2014 4:16 am
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

Re: UPNP/DLNA protocol analysis tool?

Posted: Thu Feb 13, 2014 5:38 am
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)

Re: UPNP/DLNA protocol analysis tool?

Posted: Thu Feb 13, 2014 10:36 am
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.

Re: UPNP/DLNA protocol analysis tool?

Posted: Fri Feb 14, 2014 1:04 am
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!

Re: UPNP/DLNA protocol analysis tool?

Posted: Sun Feb 16, 2014 9:37 am
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