Project

General

Profile

hdhomerun prime and "unencrypted" channels

Added by Reggie Burnett almost 7 years ago

So I have two HDHR primes and I've been using IPTV networks with m3u lists. Recently I tried Robert's patch to treat them as an ATSC-C network and I have that working well except there are 3 channels that fail. When I add them as muxes and they are scanned they come back as "unencrypted". Here is the output of hdhomerun_config so you can see:

reggie@vault:/home/hts$ hdhomerun_config 13173346 set /tuner0/vchannel 1734
reggie@vault:/home/hts$ hdhomerun_config 13173346 get /tuner0/streaminfo
1: 1435 CMDYD 1221 COME (encrypted)
2: 1606 MTVHD 1405 Musi (encrypted)
3: 1607 VH1HD 1406 Vide (encrypted)
4: 1466 E!HD 1340 E! En (encrypted)
5: 1463 BRVOD 1332 BRAV (encrypted)
7: 1029 QVCHD 1311 QVC (encrypted)
8: 1734 TOOND 1525 CART <----------- here is it marked as unencrypted
9: 1484 FOODD 1280 Food (encrypted)
10: 1450 TLCHD 1350 The (encrypted)

TVH 4.2.5 and 4.3 creates a service for mux but the service is marked as unencrypted and it is unplayable in both tvhclient and kodi.

Playing the channel in vlc works without issues.

What could be the issue? Is there an option I need to give to help tvh handle the data?


Replies (12)

RE: hdhomerun prime and "unencrypted" channels - Added by Robert Cameron almost 7 years ago

Reggie,

I've gone through a couple of notes, and when you tune a channel on the Prime, it unencrypts that particular program on the mux. So, by tuning with the vchannel, the Prime is essentially tuning the mux, selecting the proper program, unencrypting it with the CableCARD, and then passing that filtered stream through as if it were unencrypted.

To see whether any of your channels are truly unencrypted, run a scan through the hdhomerun_config app:

hdhomerun_config FFFFFFFF scan /tuner0 scan.log

Then browse through the resulting file to see if any of the muxes actually contain unencrypted programs.

EDIT:

I just ran a quick test on my end, and this is what I get:

$ hdhomerun_config FFFFFFFF set /tuner0/vchannel 702
$ hdhomerun_config FFFFFFFF get /tuner0/vstatus
vch=702 name=CBSHD auth=subscribed cci=none
$ hdhomerun_config FFFFFFFF get /tuner0/status
ch=qam:145750000 lock=qam256 ss=100 snq=100 seq=100 bps=9090176 pps=0
$ hdhomerun_config FFFFFFFF get /tuner0/streaminfo
411: 0 (encrypted)
412: 0
413: 0 (encrypted)
414: 0 (encrypted)
415: 0 (encrypted)
tsid=0x16FE
$ hdhomerun_config FFFFFFFF set /tuner0/vchannel none
$ hdhomerun_config FFFFFFFF set /tuner0/channel qam:145750000
$ hdhomerun_config FFFFFFFF get /tuner0/streaminfo
411: 0 (encrypted)
412: 0 (encrypted)
413: 0 (encrypted)
414: 0 (encrypted)
415: 0 (encrypted)
tsid=0x16FE
$ hdhomerun_config FFFFFFFF set /tuner0/program 412
$ hdhomerun_config FFFFFFFF get /tuner0/streaminfo
411: 0 (encrypted)
412: 0
413: 0 (encrypted)
414: 0 (encrypted)
415: 0 (encrypted)
tsid=0x16FE
$ hdhomerun_config FFFFFFFF get /tuner0/status
ch=qam:145750000 lock=qam256 ss=100 snq=100 seq=100 bps=8226880 pps=0
$ hdhomerun_config FFFFFFFF get /tuner0/vstatus
vch=0 name= auth=subscribed cci=none
$ hdhomerun_config FFFFFFFF set /tuner0/channel none

As you can see, when tuning by vchannel, the mux is tuned and a specific program pre-selected/filtered, and its encryption removed. However, when manually tuning by specifying a particular frequency/mux and then manually selecting the program to filter, it is still reported as unencrypted; the difference here is the vstatus does not display the program information on the channel as it does when tuning via vchannel.

In the past I asked over at the SD forums about receiving the full mux and selectively unencrypting multiple programs, and as told it was not possible. Because of the way that decryption with the CableCARD works, the tuner (and therefore full mux/frequency) will be filtered to only display one program.

In short, the channels you are having issues with are not truly unencrypted, but rather reported as such because the Prime is handling the decryption through the CableCARD and passing out an unencrypted stream.

RE: hdhomerun prime and "unencrypted" channels - Added by Reggie Burnett almost 7 years ago

Robert Cameron wrote:

Reggie,

I've gone through a couple of notes, and when you tune a channel on the Prime, it unencrypts that particular program on the mux. So, by tuning with the vchannel, the Prime is essentially tuning the mux, selecting the proper program, unencrypting it with the CableCARD, and then passing that filtered stream through as if it were unencrypted.

To see whether any of your channels are truly unencrypted, run a scan through the hdhomerun_config app:

hdhomerun_config FFFFFFFF scan /tuner0 scan.log

Then browse through the resulting file to see if any of the muxes actually contain unencrypted programs.

I think they are encrypted. I ran that and viewed the scan log for those 3 channels they are all listed as encrypted. hoever, I just tried to set one up again (just like I did all the others) and it set the service as unencrypted and will not work. TVH doesn't like it for some reason.

RE: hdhomerun prime and "unencrypted" channels - Added by Robert Cameron almost 7 years ago

Reggie Burnett wrote:

Robert Cameron wrote:

Reggie,

I've gone through a couple of notes, and when you tune a channel on the Prime, it unencrypts that particular program on the mux. So, by tuning with the vchannel, the Prime is essentially tuning the mux, selecting the proper program, unencrypting it with the CableCARD, and then passing that filtered stream through as if it were unencrypted.

To see whether any of your channels are truly unencrypted, run a scan through the hdhomerun_config app:

hdhomerun_config FFFFFFFF scan /tuner0 scan.log

Then browse through the resulting file to see if any of the muxes actually contain unencrypted programs.

I think they are encrypted. I ran that and viewed the scan log for those 3 channels they are all listed as encrypted. hoever, I just tried to set one up again (just like I did all the others) and it set the service as unencrypted and will not work. TVH doesn't like it for some reason.

I expanded my post above with more details.

RE: hdhomerun prime and "unencrypted" channels - Added by Reggie Burnett almost 7 years ago

Here's a snippet of the output including channel 1734 (one of the ones that doesn't work)

SCANNING: 333000000 (us-irc:42, us-cable:42)
LOCK: qam256 (ss=100 snq=100 seq=100)
PROGRAM 1: 1435 CMDYD 1221 COME (encrypted)
PROGRAM 2: 1606 MTVHD 1405 Musi (encrypted)
PROGRAM 3: 1607 VH1HD 1406 Vide (encrypted)
PROGRAM 4: 1466 E!HD 1340 E! En (encrypted)
PROGRAM 5: 1463 BRVOD 1332 BRAV (encrypted)
PROGRAM 7: 1029 QVCHD 1311 QVC (encrypted)
PROGRAM 8: 1734 TOOND 1525 CART (encrypted) <---- this one comes in as unencrypted.
PROGRAM 9: 1484 FOODD 1280 Food (encrypted)
PROGRAM 10: 1450 TLCHD 1350 The (encrypted)

RE: hdhomerun prime and "unencrypted" channels - Added by Robert Cameron almost 7 years ago

I find it odd that Tvheadend is reading the service as unencrypted. On my setup, all of my services show up as encrypted.

RE: hdhomerun prime and "unencrypted" channels - Added by Reggie Burnett almost 7 years ago

Robert Cameron wrote:

I find it odd that Tvheadend is reading the service as unencrypted. On my setup, all of my services show up as encrypted.

I keep thinking maybe I can tell it not to scan at all. Just let me give you all the details you need. But so far I haven't found the right knobs to turn.

RE: hdhomerun prime and "unencrypted" channels - Added by Reggie Burnett almost 7 years ago

Just to let you guys know that it apparently depends on the signal. When I first setup my channels about 12 didn't work like above. A couple of days later about 8-9 started working and 3 didn't work. This morning I tried those 3 channels and 1 of them started working. Now down to 2 not working. Have no idea what could be different but ...

RE: hdhomerun prime and "unencrypted" channels - Added by Reggie Burnett almost 7 years ago

deleted and recreated the muxes for the two bad ones this morning and one of them started working. So now I'm down to 1 that will not work. It's service id is 2611.

I guess one by one I'll get them all done. :)

RE: hdhomerun prime and "unencrypted" channels - Added by Ted Romer over 6 years ago

Perhaps related: I'm using HDHR Prime + automatic IPTV network, running at head without Robert's patch. For about 5% of the channels on the Prime scanning the mux doesn't result in in a corresponding service in the service list. Unlike Reggie's issue, encrypted status doesn't appear relevant.

I found a clue but not an answer: if I fetch the list of services with hidemode=none, e.g. 'http://ip:9981/api/mpegts/service/grid?limit=9999&hidemode=none', the "missing" services are listed. From the api source code I take it that means the service isn't verified.

I haven't dug further to understand why verification fails, other than to see that the s_verified bit is set in dvb_psi.c:psi_parse_pmt.

I enabled debug and trace for mpegts but didn't spot any differences in the logs when scanning muxes that led to a verified service vs. not.

Any tips would be welcome. I'll dig in more next weekend, perhaps.

RE: hdhomerun prime and "unencrypted" channels - Added by Ted Romer over 6 years ago

Filed http://tvheadend.org/issues/4987 for my issue. Has to do with DigiCipher format used by Motorola CableCards IIUC.

RE: hdhomerun prime and "unencrypted" channels - Added by Reggie Burnett over 6 years ago

Robert Cameron wrote:

I find it odd that Tvheadend is reading the service as unencrypted. On my setup, all of my services show up as encrypted.

Robert

Do you see the error "no adapter available"? I've been seeing that over the last couple of days even though none of my tuners are in use. Do you know what causes this?

RE: hdhomerun prime and "unencrypted" channels - Added by Robert Cameron over 6 years ago

Reggie Burnett wrote:

Robert Cameron wrote:

I find it odd that Tvheadend is reading the service as unencrypted. On my setup, all of my services show up as encrypted.

Robert

Do you see the error "no adapter available"? I've been seeing that over the last couple of days even though none of my tuners are in use. Do you know what causes this?

I've seen this when I've had some odd hardware issue and Tvheadend was restarted before it could release the lockkey to a tuner. In those situations, I usually: 1, stop Tvheadend; 2, force release all tuners by wiping the lockkeys; 3, rebooting the tuners; and finally 4, restarting Tvheadend.

You may also want to ensure that the tuner has no channel set.

sudo systemctl stop tvheadend
for _D in ${DEVICEID1} ${DEVICEID2} ${DEVICEID3}
do
  for _T in 0 1 2
  do
    hdhomerun_config ${_D} set /tuner${_T}/lockkey force
    hdhomerun_config ${_D} set /tuner${_T}/vchannel none
  done
  hdhomerun_config ${_D} set /sys/restart self
done
sudo systemctl start tvheadend
    (1-12/12)