Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#10696 closed Bug Report - General (fixed)

UPnP does not work with 2012 Samsung Smart PVRs

Reported by: c@… Owned by: stuartm
Priority: minor Milestone: 0.27
Component: MythTV - UPnP Version: 0.25
Severity: low Keywords: Samsung UPnP
Cc: Ticket locked: no

Description

I recently bought a Samsung BD-E8500, and it does not work with the MythTV UPnP server. It returns an error, and it is not possible to browse. I am running MythTV 0.25.

I ran Wireshark to listen to the packets being sent by the Samsung PVR, and it looks like that it is adding an extra / to the beginning of the requests. e.g. :

POST //CDS_Control HTTP/1.1

MythTV returns a 404 Not Found to this request, which causes the PVR to give up.

I don't know if this is the correct fix, but I added some code to method

HTTPRequest::ProcessRequestLine( const QString &sLine )

at line 1124 (just after m_sBaseUrl is assigned and before line 'm_sResourceUrl = m_sBaseUrl;') :

    // Samsung Smart PVR puts 2 / at the start of the request
    if(m_sBaseUrl.startsWith(QString("//"))) {
        m_sBaseUrl.remove(0,1);
    }

This seemed to work and I am now able to use my Samsung PVR with MythTV UPnP.

Attachments (1)

SamsungTV.patch (747 bytes) - added by kamikaze@… 12 years ago.
Patch for MythTV uPnP to support Samsung SmartTV E series

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by kamikaze@…

Attachment: SamsungTV.patch added

Patch for MythTV uPnP to support Samsung SmartTV E series

comment:1 Changed 12 years ago by kamikaze@…

I have Samsung 40ES6100 SmartTV and using Mythtv fixes/0.25 from Mytbuntu repository. Out of the Box TV didn't recognize Mythbackend as uPnP device, but I could access videos shared by PC with Windows 7 on TV. I could also open videos and recorded tv shows with WMP on Windows machine using uPnP. I've changed httprequest.cpp file as c@... advised. I've created also diff file for this change. After compiling MythTV TV recognizes Mythbackend as uPnP device and I can watch recordings. Unfortunately I can't see my videos library although it's visible from Windows 7 PC. Could someone of developers take a look at this issue?

If you need any logs let me know.

comment:2 Changed 12 years ago by dj@…

This patch also works for me with a Saumsung TV (ES8000 series) and MythTV 0.26-fixes.

comment:3 in reply to:  2 Changed 12 years ago by moravecp@…

The patch also works for ES6030 & MythTV 0.25.

I suspect that all Samsung E-series TVs are affected. Would it be possible to include the patch to the official distribution?

comment:4 Changed 11 years ago by stuartm

Milestone: unknown0.27
Owner: changed from dblain to stuartm
Status: newaccepted

comment:5 Changed 11 years ago by Rune Petersen <rune@…>

I am 90% certain that the Samsung TV is not handling the <UrlBase?> tag in the Mythtv device description properly.

The funny thing is the <UrlBase?> tag:

  • Is redundant.
  • Adds complexity when parsing the device description.
  • Is not recommended for UPnP 1.0 devices
  • Is deprecated for UPnP 1.1 devices.

In short there is no good reason for the tag.

If you remove the <UrkBase?> tag from mythtv/libs/libmythupnp/upnpdevice.cpp, it should fix the issue

comment:6 Changed 11 years ago by Stuart Morgan <smorgan@…>

Resolution: fixed
Status: acceptedclosed

In 3b2717eead0d130adb869f847e3dffeea95c365a/mythtv:

UPNP: Remove use of <URLBase> from Device Description xml.

As noted by Rune Petersen in #10696 the use of a URLBase element in
the device description is not recommend in the UPnP 1.0 spec. (UPnP
1.0 Device Architecture document, page 27). Additionally it's use is
forbidden by DLNA, although DLNA devices MUST be able to work with
servers using it.

This potentially fixes issues with Samsung Smart TVs, although their
behaviour is definitely a bug in their firmware and is it not UPnP or
DLNA compliant.

Fixes #10696

comment:7 Changed 11 years ago by Stuart Morgan <smorgan@…>

In 636ca1ba972d3c13d1fbf33ef5a2ae872e9c6cbb/mythtv:

UPNP: Remove use of <URLBase> from Device Description xml.

As noted by Rune Petersen in #10696 the use of a URLBase element in
the device description is not recommend in the UPnP 1.0 spec. (UPnP
1.0 Device Architecture document, page 27). Additionally it's use is
forbidden by DLNA, although DLNA devices MUST be able to work with
servers using it.

This potentially fixes issues with Samsung Smart TVs, although their
behaviour is definitely a bug in their firmware and is it not UPnP or
DLNA compliant.

Fixes #10696
(cherry picked from commit 3b2717eead0d130adb869f847e3dffeea95c365a)

comment:8 Changed 11 years ago by c@…

I have tested this fix. It seems Samsung have fixed this issue with a firmware update. I raised the original ticket. I rolled back to mythtv 0.26 to try and reproduce the original issue first, but found I couldn't. Samsung released upgraded firmware in July so maybe that fixed it.

I added the commit above which removes the URLBase tag to check that the changes scheduled for 0.27 work, and that also worked and the Samsung device was able to play all my recordings.

Note: See TracTickets for help on using tickets.