Project

General

Profile

"No Descrambler" on channels with no CCI encryption.

Added by John Nevill about 12 years ago

I have an hdhomerun prime with a Comcast m-card and HD subscription. I have compiled tvheadend 3.2 from source on my Ubuntu 12.04 x64 machine and I am using xbmc on the same machine as a front end. I am able to use the hdhomerun_config_gui program to watch any channel that is in my subscription. Furthermore, I am able to watch any channel using the hdhomerun:// protocol.

tvheadend is able to grab the mux for each of Comcast's frequencies and I have added all of my services to the channel line up and mapped them over to a schedulesdirect EPG. After doing all of this I can only watch the tradition over-the-air channels through tvheadend. All other channels give the error "No Descrambler" (using xbmc as a front end).

I have queried the the hdhomerun prime box to see if there was any encryption on these channels, but they appear exactly similar to the local channels. Below is the information for AMC HD.

Tuner 0 Status
Virtual Channel    none
Frequency    559.778 MHz
Program Number    none
Authorization    none
CCI Protection    none
CGMS Protection    none
Modulation Lock    qam256
PCR Lock    locked
Signal Strength    67% (-20.3 dBmV)
Signal Quality    84% (32.8 dB)
Symbol Quality    100%
Streaming Rate    none
Resource Lock    none

Note there is no CCI Protection on this channel, but yet tvheadend thinks it needs to descramble it.

Any pointers here would be greatly appreciated.


Replies (80)

RE: "No Descrambler" on channels with no CCI encryption. - Added by great front7 about 12 years ago

I've been following this thread for a while because I have the same set-up: Comcast cable card w/ a Prime that I have never been able to get TVHeadend to work with, so really excited to see some progress happening! Any chance someone would be willing to share some pointers on how to apply Jim's patch for a non-developer?

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jim Ancona about 12 years ago

What it takes to build from source varies quite a bit depending what platform you're deploying on, and dvbhdhomerun/tvheadend seem to be the kinds of packages that people use on a variety of different distros and architectures. If you haven't built from source before, your best bet may be to wait for Villy to incorporate my code into a release. Otherwise, you can try following the build instructions on the wiki: https://sourceforge.net/apps/trac/dvbhdhomerun/wiki/Building, but those may not work for you if you're not using vanilla Debian/Ubuntu/Fedora (e.g. I had to tweak things a bit and do some research to get them to work on my Raspberry Pi).

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Hi Jim,

My patch now works reliably and tvheadend now can record and stream reliably from my HDHR Prime. I've attached the patch to the issue on the dvbhdhomerun tracker. If you can build dvbhdhomerun, please give it a try and let me know how it works.

Looks good, I'll play around with it a bit. I do have some PID<->Program cache going on here (for my attempt to parse the output from w_scan), I'll see if I can integrate that with your code. Probable C++-ify it a bit on the way too. ;-)

I'll make a branch in CVS on the sourceforge repository with your patch + my cache stuff so we can use that as a merging point, that will maybe happen tonight.

FYI, I will be travelling (to the US actually) next week, so will likely not be that much available.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jim Ancona about 12 years ago

Villy Thomsen wrote:

I'll make a branch in CVS on the sourceforge repository with your patch + my cache stuff so we can use that as a merging point, that will maybe happen tonight.

I'll check it out. Thanks!

FYI, I will be travelling (to the US actually) next week, so will likely not be that much available.

Have a good trip! Where are you going to be?

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

FYI, I will be travelling (to the US actually) next week, so will likely not be that much available.

Have a good trip! Where are you going to be?

New London, Connecticut - via Boston.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jeremy Keeney about 12 years ago

If you guys make a .12 by tonight with those patches, I will be the happiest person alive!!

RE: "No Descrambler" on channels with no CCI encryption. - Added by Adam Sutton about 12 years ago

Because I'm too lazy to read the entire thread ;) Can someone just confirm my basic understanding that this issue has been fixed via a mod to the dvbhomerun layer, rather than requiring any changes in TVH itself?

Ta
Adam

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

If you guys make a .12 by tonight with those patches, I will be the happiest person alive!!

Hehe, no, a release with this will be a couple of weeks away.

But, I have just committed Jims patch to a branch in CVS on sourceforge + a little additional caching of the result that I did. So it is there now for testing for those that don't mind building it themselves.

(Which is not that difficult if you are on debian/Ubuntu).

More info on the ticket here: https://sourceforge.net/apps/trac/dvbhdhomerun/ticket/12

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Because I'm too lazy to read the entire thread ;) Can someone just confirm my basic understanding that this issue has been fixed via a mod to the dvbhomerun layer, rather than requiring any changes in TVH itself?

Yes it is more or less fixed in dvbhdhomerun. That is the idea at least.

It needs some testing now though - and it will take a couple of weeks before it will be released.

One thing that did pop up - with the fix we are only able to tune to one program per tuner. But to my understanding tvheadend (and other dvb apps) will happily set a PID filter for more than one program per mux. Are you aware of hardware that has a similar restrictions, e.g. only tune one program per mux? (Cause we need to emulate that).

RE: "No Descrambler" on channels with no CCI encryption. - Added by Adam Sutton about 12 years ago

Hmmm,

this sounds like a problem with the way HDHR is working? We don't set PID filters for multiple services per mux etc... It is assumed that the DVR (dvr0) device will provide ALL program streams (PIDs) by default, so TVH is expecting to receive all program streams. This is how all (that I know of) DVB cards work.

Is the problem that HDHR is expecting something else?

Adam

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

this sounds like a problem with the way HDHR is working?

Apparently it has to do with how Cablecard tuners work. They can only decrypt one program per tuner - or at least that what the HDHR can do. (I do think it is a general restriction though)

We don't set PID filters for multiple services per mux etc... It is assumed that the DVR (dvr0) device will provide ALL program streams (PIDs) by default, so TVH is expecting to receive all program streams. This is how all (that I know of) DVB cards work.

Eh. That is not actually how tvheadend behaves from the point of view of a DVB driver when you record stuff. Example, for me recording say MTV will cause this list of PID's to hit the driver:

PidFilter: 0x0 0x1 0x10 0x11 0x12 0x65E 0x65F 0xA3 0x1770 0x1771 0x69 0x81 0x82 0x83 0xA6 0xD3 0xF1

0x1770 + 0x1771 is MTV. The rest is PAT/PMT etc. Recording another program on the same mux, will just cause the additional PID's for that program to be added:

PidFilter: 0x0 0x1 0x10 0x11 0x12 0x65E 0x65F 0xA3 0x1770 0x1771 0x69 0x81 0x82 0x83 0xA6 0xD3 0xF1 0x514 0x515 0x51D

0x514, 0x515, 0x51D is video/audio/teletext for another program.

So, I'm pretty sure that tvhheadend actually does set PID filters. ;-)

RE: "No Descrambler" on channels with no CCI encryption. - Added by Adam Sutton about 12 years ago

Indeed, sorry you're quite right, I had looked for the relevant bit of code and never found it (I don't think I searched that hard) and made an invalid assumption :)

Well I've learnt something new and some things start to make a lot more sense now ;) It had always seemed odd to me that it didn't need to do this :)

Still learning the DVB API as I go, mostly I've left that alone (except where I've specifically needed to fix a bug) as Andreas has done a great job with all that code (and the rest to be honest).

Adam

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jim Ancona about 12 years ago

To expand on what Villy said the HDHR Prime will handle decryption, but only when a particular virtual channel is selected. Since all we have inside dvbhdhomerun is the mux frequency and the PIDs selected, what my patch does is to look at all the virtual channels on the selected mux to find one that matches a PID in the filter. Since libhdhomerun doesn't directly provide the PID filter for the virtual channel, it selects each virtual channel in turn, then queries for the PID filter. Once it finds a match it stops, and ignores any additional PIDs added to the filter for that streaming session. So if an app expects to stream multiple programs from the same mux, it will fail. I haven't seen that happen yet, but I will set up some scenarios to try to break it.

It would probably be cleaner to have tvheadend call libhdhomerun directly. (I believe that's what MythTV does.) Any pointers on how one would get started on such a project (and whether you might be interested in adding the result to tvheadend)?

RE: "No Descrambler" on channels with no CCI encryption. - Added by Adam Sutton about 12 years ago

Jim,

There was an FR in for this, however I rejected it on the basis we didn't have anyone available that could work on it or was interested in working on it. However it was still in the back of my mind as something that would be nice to have.

For this reason and given reason increase in interest I have re-opened the FR (#1140). This may well need to wait until after the DVB re-structure that I intend to work on for 3.4 (#1394), this will hopefully make adding new DVB sources (i.e. libHDHR v linux DVB, etc..) easier.

I you are interested in doing this work let me know, maybe we can have a quick chat.

Adam

RE: "No Descrambler" on channels with no CCI encryption. - Added by Mikkle _ about 12 years ago

Looks like I'm experiencing the same problem using an HDHomerun Prime and Comcast M-card.

I was only able to look into it for a few minutes, so I'm glad to see we've got top men working on it right now :)

Thanks for all your efforts!

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jeremy Keeney about 12 years ago

So what's the good news guys, it's been kind of quiet as of late? :)

RE: "No Descrambler" on channels with no CCI encryption. - Added by Travis Busen almost 12 years ago

This is now on version 0.13, is this patch integrated? If it is are there any special ins.tructions to setting it up w/ a prime and tvheadend?

Thanks

RE: "No Descrambler" on channels with no CCI encryption. - Added by Ryan Dougher almost 12 years ago

Jim Ancona wrote:

To expand on what Villy said the HDHR Prime will handle decryption, but only when a particular virtual channel is selected. Since all we have inside dvbhdhomerun is the mux frequency and the PIDs selected, what my patch does is to look at all the virtual channels on the selected mux to find one that matches a PID in the filter. Since libhdhomerun doesn't directly provide the PID filter for the virtual channel, it selects each virtual channel in turn, then queries for the PID filter. Once it finds a match it stops, and ignores any additional PIDs added to the filter for that streaming session. So if an app expects to stream multiple programs from the same mux, it will fail. I haven't seen that happen yet, but I will set up some scenarios to try to break it.

It would probably be cleaner to have tvheadend call libhdhomerun directly. (I believe that's what MythTV does.) Any pointers on how one would get started on such a project (and whether you might be interested in adding the result to tvheadend)?

Does this press release from SiliconDust about their upcoming Prime firmware update change the game?: http://www.missingremote.com/news/2012-12-04/silicondust-certifies-hdhomerun-dlna-livetv-digital-media-server-dms

I am quite ignorant of all terminology and concepts, but it appears that this update should make it easier to harness the Prime within TVH?

I would be really excited to test this out if it could be implemented. I have a Prime and would love to run the light-weight TVH backend on OpenELEC.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Travis Busen almost 12 years ago

I've installed the latest version of dvbhdhomerun as of Jan 2013 and I am only able to pull in the standard network channels off my hdhomerun prime (abc, nbc, etc...) Wasn't this patch supposed to allow for the encrypted cable channels to be picked up during the scan? I'm running Tvheadend 3.2.34 on Linux Mint 13

Any feedback would be appreciated

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jim Ancona almost 12 years ago

As far as I know, Villy has not yet released a version with the patch to support the Prime with CableCard. Here is the issue in the dvbhdhomerun tracker. The patch is integrated in the CVS HEAD, so if you can build from source you can get it that way.

Sorry I can't tell you more than that.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Travis Busen almost 12 years ago

Thanks, I just stumbled upon that page and was reading up how to build from source. Thanks

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill almost 12 years ago

Travis,

While building the latest dvbhdhomerun from source will solve some issues we were facing with the hdhomerun prime and tvheadend, it will not allow tvheadend to find the channels that you are missing.

There are two things to do in order to get your other channels to show up.

1. Check to see that your hdhomerun prime unit is getting unique transport stream ID's for each frequency/mux (also known as TSID's and, in tvheadend, muxid's). To do this, head to the command line and type in "hdhomerun_config ffffffff scan 0 ~/scan0.txt" (assuming linux). Your hdhomerun will now scan all of the frequencies on which cable providers send data. As you watch the scrolling text look for the lines that say "TSID: 0xyyyy" where yyyy will be a hexadecimal number. Example below.

SCANNING: 853750000 (us-hrc:134)
LOCK: qam256 (ss=80 snq=77 seq=100)
TSID: 0xA23B
PROGRAM 1: 449 TEAM 10 (encrypted)
PROGRAM 3: 440 TEAM 01 (encrypted)
PROGRAM 5: 441 TEAM 02 (encrypted)
PROGRAM 7: 442 TEAM 03 (encrypted)
PROGRAM 9: 443 TEAM 04 (encrypted)
PROGRAM 11: 444 TEAM 05 (encrypted)
PROGRAM 13: 445 TEAM 06 (encrypted)
PROGRAM 15: 446 TEAM 07 (encrypted)
PROGRAM 17: 447 TEAM 08 (encrypted)
PROGRAM 19: 448 TEAM 09 (encrypted)

If you are lucky you will have a TSID other than 0x0000. If, however your TSID's are all 0x0000, tvheadend will not work for you. That being said, there is a possibility that Adam Sutton might glue something together for us folks that are stuck without unique TSID. Work is being tracked as a feature request here

2. If you have unique TSID's then head over here to see how to build a custom "DVB by Locations" file for tvheadend to feed off of.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Travis Busen almost 12 years ago

John this was extremely helpful. Thanks for taking the time to explain this to me. I will be trying this tonight. Thanks

RE: "No Descrambler" on channels with no CCI encryption. - Added by Travis Busen almost 12 years ago

John Nevill wrote:

Travis,

While building the latest dvbhdhomerun from source will solve some issues we were facing with the hdhomerun prime and tvheadend, it will not allow tvheadend to find the channels that you are missing.

There are two things to do in order to get your other channels to show up.

1. Check to see that your hdhomerun prime unit is getting unique transport stream ID's for each frequency/mux (also known as TSID's and, in tvheadend, muxid's). To do this, head to the command line and type in "hdhomerun_config ffffffff scan 0 ~/scan0.txt" (assuming linux). Your hdhomerun will now scan all of the frequencies on which cable providers send data. As you watch the scrolling text look for the lines that say "TSID: 0xyyyy" where yyyy will be a hexadecimal number. Example below.

[...]

If you are lucky you will have a TSID other than 0x0000. If, however your TSID's are all 0x0000, tvheadend will not work for you. That being said, there is a possibility that Adam Sutton might glue something together for us folks that are stuck without unique TSID. Work is being tracked as a feature request here

2. If you have unique TSID's then head over here to see how to build a custom "DVB by Locations" file for tvheadend to feed off of.

John,

I did the scan and I do seem to be getting unique TSID's, see my scan0.txt. I then proceeded to make my custom DVB by location file per your link. See us-IL-Peoria. When I add this file, TVHE sees 82 muxes, and zero services :( This is actually worse than what I had before. I'm not sure what's going on.

my log basically show's this for all the Mux's

Jan 12 23:07:30 dvb: "/dev/dvb/adapter2" tuning to "285,000 kHz" (Initial autoscan)
Jan 12 23:07:32 dvb: "285,000 kHz" on adapter "HDHomeRun ATSC", status changed to OK
Jan 12 23:07:35 dvb: "/dev/dvb/adapter0" tuning to "615,000 kHz" (Autoscan)
Jan 12 23:07:48 dvb: "/dev/dvb/adapter1" tuning to "297,000 kHz" (Initial autoscan)
Jan 12 23:07:50 dvb: "297,000 kHz" on adapter "HDHomeRun ATSC", status changed to OK
Jan 12 23:07:50 dvb: "/dev/dvb/adapter2" tuning to "291,000 kHz" (Initial autoscan)
Jan 12 23:07:51 dvb: "291,000 kHz" on adapter "HDHomeRun ATSC", status changed to OK

So it is finding everything okay.

Is there something in the dvb config that maybe I missed? Per the sourceforge page FAQ's I did not edit my config file in /etc/dvbhdhomerun. I also did not rebuild my kernel
sudo dpkg-reconfigure dvbhdhomerun-dkms

since TVHE was able to see my tuners. Are these steps I need to do?

FYI I am running this on Lubuntu 12.10. Thanks again

scan0.txt (33 KB) scan0.txt output from scan
us-IL-Peoria (1.52 KB) us-IL-Peoria output from creating custom dvb fiel

RE: "No Descrambler" on channels with no CCI encryption. - Added by Travis Busen almost 12 years ago

So I uninstalled TVH and installed unstable 3.3 so that I could disable write full mux. I then created by DVB by location file from scratch - noting that I do have unique TSID's. I also edited the dvbhdhomerun config file to force it to find the tuners. I verified my signal strength and that I can watch an encrypted channel via the HDHomerun GUI. All is good so far. In TVH all three tuners are found, I do my scan with my us-IL-Peoria DVB file. 84 muxes found and 0 services again! I'm going to pull my hair out!

Next, I shutdown TVH so nothing was tuning my Prime and I did a w_scan. I get nothing but errors. It says nothing to scan. Ugh... I'm not sure where to go from here.

(51-75/80)