Project

General

Profile

Support Digital Devices CI Interfaces

Added by Jasmin Jessich about 3 years ago

Hello TVH and DD CI users!

I have implemented the support for the Digital Devices CI interfaces (see also https://tvheadend.org/issues/4477). Currently only one service can use the dedicated CI at a time. There is no MCD (Multi Channel Decoding) or MTD (Multi Tuner Decoding) implemented.

It is 95% working, but sometimes the CAM doesn't decrypt. This is no problem of the new code, but of the PID selection for CAMs in TVH general, I guess. I tried to find the reason, but TVH is too complicated in this area and I am not willing to spend hours and hours to analyse this part of TVH. The DD CI code is 100% finished and works, if the PIDs are set properly by TVH. This has been already tested by me and another TVH user.

I also asked Jaroslav for support, but he has currently no time, so I stopped the project at this stage. As long as I don't get more support, I am not willing to continue working on this! I am not using TVH at all and did this only, because a friend asked me to do this. Without proper support form any TVH developer the last 5% can't be implemented.

You can find the code at GitHub on the ddci branch:

https://github.com/jasmin-j/tvheadend/tree/ddci

I will not submit a pull request, because it is not 100% working. Once the last 5% are done, it can be integrated to TVH.

Have fun and BR,
Jasmin


Replies (63)

RE: Support Digital Devices CI Interfaces - Added by Robin Brouwer 16 days ago

_ mpajer wrote:

so no news for MTD (Multi Tuner Decoding) on Digital Devices CI?
Any developer that could make this happen?
Even if we support him/her directly via kickstarter or some similar way?

I've been looking way to deep into this as I am also trying to see of TVHeadend is able to fully use my Digital Devices Max A8i TV Card with Octopus Twin CI and just 2 smartcards.

Therefore I did end up at https://github.com/tvheadend/tvheadend/pull/1090/commits/d6b84d41db942679a0b46010b9ae2fa056404eaf#diff-83ed672342d9db2ada6e8d05449b074f6399e46984cd20d72a70946da3e2b6faR889 , which is 1 line of one commit of a pull request. This pr was merged into master, but not part of any release branches. Using PPA Unstable you will be able to get a release with that included! Hopefully that actually works out for me. It does contain MCD, but not MTD. So you can descamble multiple channels from 1 mux, but not multiple channels from different muxes.

I somehow also cannot get it to work. The CAM is ready, automatically a CA is created and an attempt is made to descamble a stream. My cam somehow complains that I do not have subscriptions for a channel I can descamble with both NextPVR (next release) and TVMosaic (r.i.p. :( ) . I guess something minor must be off for me! I'm willing the supply logs and anything needed to figure it this out. I am hoping someone is willing to look and actually knows what to look for/at!

RE: Support Digital Devices CI Interfaces - Added by saen acro 16 days ago

Only Jasmin Jessich is commit source code for DD is i know
https://github.com/jasmin-j/tvheadend/commits/ddci_mcd_III

RE: Support Digital Devices CI Interfaces - Added by Robin Brouwer 15 days ago

Well, I believe I'm close to having Tvheadend use my dd cam... I even saw MTD work in cases, but something disagrees.

Sadly I keep running into:
2021-01-04 10:00:49.972 [ INFO]:en50221: dvbca0-0: ops menu: {"selectable":true,"title":"AlphaCrypt","subtitle":" ","bottom":"Press OK","choices":["You are not entitled","to receive this programme !"]}

tvh.log (256 KB) tvh.log

RE: Support Digital Devices CI Interfaces - Added by Jasmin Jessich 14 days ago

saen acro wrote:

Only Jasmin Jessich is commit source code for DD is i know
https://github.com/jasmin-j/tvheadend/commits/ddci_mcd_III

Please don't post old branches which are already merged to master.

MCD is working, MTD is not and I will not implement this in a reasonable time frame to tvheadend.
I even stopped working on VDR, which I am using, due to lack of time.

Robin Brouwerwrote:

Sadly I keep running into:
2021-01-04 10:00:49.972 [ INFO]:en50221: dvbca0-0: ops menu: {"selectable":true,"title":"AlphaCrypt","subtitle":"
","bottom":"Press OK","choices":["You are not entitled","to receive this programme !"]}

It is really long long time ago when I worked with TVH.
I am not sure, but I guess TVH has no CAM Menu support. For that you need another tool.
Walk to this thread, possibly it is somewhere described which tool you can use to configure the CAM.
I am pretty sure you didn't configure the Alphacrypt CAM correctly.

BR,
Jasmin

RE: Support Digital Devices CI Interfaces - Added by saen acro 14 days ago

Do you enter in cam menu?
You can use gnutv

*You are not entitled, to receive this programme !*

mean that there is not possible to open program.
Is there a pin correct?

RE: Support Digital Devices CI Interfaces - Added by Robin Brouwer 14 days ago

I can enter the CAM menu using:
gnutv -cammenu

and gives me:

▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Mainmenu
0. Quit menu
1. Information
2. Smartcard
3. Email Messages
4. Parental Control
5. Module Options
6. Quit
Select item and press OK
Enter option: 5
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Options
0. Quit menu
1. Language/Sprache: ENGLISH
2. Smartcard Messages: ON
3. AlphaCrypt Applications/Updates
4. Expert Menu
5. Factory Settings
6. Quit
Change with OK
Enter option: 4
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Warning
0. Quit menu
1. Please change the expert options only
2. if you really know the consequences.
3. Please read the user manual first
4. -Go to expert menu-
5. -Back-
Confirm with OK
Enter option: 4
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Expert menu
0. Quit menu
1. CA systems: SINGLE (from smartcard only)
2. CA registration: DYNAMIC (refresh always)
3. Force reading original PMT: AUTO
4. CA-PMT delete time: 0 s
5. CI-Watchdog: 1500 ms
6. dbox compatibility: ON
7. IC smartcard priority: I-Code
8. Debug Menu
9. Quit
Change with OK
Enter option: 8
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Debug menu
0. Quit menu
1. EMM/ECM info
2. PID information
3. Quit
Select item and press OK
Enter option: 1
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
EMM/ECM information
0. Quit menu
1. ECM counter: 0
2. Decrypted ECM counter: 0
3. EMM-U counter: 0
4. EMM-S counter: 0
5. EMM-G counter: 0
6. Refresh
7. Back
Press OK to clear counter
Enter option: 2
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
EMM/ECM information
0. Quit menu
1. ECM counter: 0
2. Decrypted ECM counter: 0
3. EMM-U counter: 0
4. EMM-S counter: 0
5. EMM-G counter: 0
6. Refresh
7. Back
Press OK to clear counter
Enter option: 7
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Debug menu
0. Quit menu
1. EMM/ECM info
2. PID information
3. Quit
Select item and press OK
Enter option: 2
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
PID information
0. Quit menu
1. ECM/ES PID Status:
2. No service !
3. ### EMM PID information ###
4. No EMM_PID
Press OK
Enter option: 0
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Debug menu
0. Quit menu
1. EMM/ECM info
2. PID information
3. Quit
Select item and press OK
Enter option: 3
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Expert menu
0. Quit menu
1. CA systems: SINGLE (from smartcard only)
2. CA registration: DYNAMIC (refresh always)
3. Force reading original PMT: AUTO
4. CA-PMT delete time: 0 s
5. CI-Watchdog: 1500 ms
6. dbox compatibility: ON
7. IC smartcard priority: I-Code
8. Debug Menu
9. Quit
Change with OK
Enter option: 0
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Options
0. Quit menu
1. Language/Sprache: ENGLISH
2. Smartcard Messages: ON
3. AlphaCrypt Applications/Updates
4. Expert Menu
5. Factory Settings
6. Quit
Change with OK
Enter option: 0
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Mainmenu
0. Quit menu
1. Information
2. Smartcard
3. Email Messages
4. Parental Control
5. Module Options
6. Quit
Select item and press OK
Enter option: 0
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Mainmenu
0. Quit menu
1. Information
2. Smartcard
3. Email Messages
4. Parental Control
5. Module Options
6. Quit
Select item and press OK
Enter option: 1
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Information    (CPU: 70%)
0. Quit menu
1. Loader version: ACBoot V2.35P3 (c) 2012 Mascom GmbH
2. Application version: 3.28
3. Supports satellite update: yes
4. Compiled at: Dec  3 2014 16:58:03
Press OK
Enter option:
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Mainmenu
0. Quit menu
1. Information
2. Smartcard
3. Email Messages
4. Parental Control
5. Module Options
6. Quit
Select item and press OK
Enter option: 2
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Smartcard:  105#######   NLD
0. Quit menu
1. Refresh
2. Entitlements
3. Back
Select item and press OK
Enter option: 2
------------------------------
▒
Please wait...
0. Quit menu

Enter option: ------------------------------
▒AlphaCrypt
Smartcard entitlements:
0. Quit menu
1. CA-System: 0x0606
2. Product / Date / Token
3. 0: 0384 / x1DFB / xC800
4. 1: FFE0 / x1DFA / x1F00
5. 2: 000B / x1DFA / xC900
6. 3: 7FFD / x1DFB / x0A00
7. 4: FFD8 / x1DFB / xC800
8. 5: 0385 / x1DFA / xC900
Continue with OK
Enter option: 0
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Smartcard:  105#######   NLD
0. Quit menu
1. Refresh
2. Entitlements
3. Back
Select item and press OK
Enter option: 0
------------------------------
▒AlphaCrypt 3.28 (c) Mascom GmbH
Module Mainmenu
0. Quit menu
1. Information
2. Smartcard
3. Email Messages
4. Parental Control
5. Module Options
6. Quit
Select item and press OK
Enter option: 6

As you can see I walked thru most menu's to show the current config of the module. I am not asked for any pin unless I enter the Parental control menu. The pin for that is 0000, which is something I tried setting up in "TV Adapter" -> "CA0-0: AlphaCrypt (Module ready)" -> "Pin" just to be sure. These settings work fine for TvMosaic and NextPVR on windows, but I cannot get it to work for TvHeadend.
I just do not know what setting I need to change in this case! I did play with them in attempt to make it work based on certain other responses I saw.

RE: Support Digital Devices CI Interfaces - Added by saen acro 14 days ago

Disable messages

Smartcard Messages: ON

is tuner and ci are on same TAB?

RE: Support Digital Devices CI Interfaces - Added by Robin Brouwer 14 days ago

saen acro wrote:

Disable messages
[...]

is tuner and ci are on same TAB?

The tuner and ci are different adapters; Digital Devices Max A8i TV Card + Octopus Twin CI. I believe there's no bridging is available for that hardware combination (if it is, I will post dmesg so we can see that) and I believe with dd ci that is not needed, right?

Turning "Smartcard Messages: OFF" will remove those nasty "ops menu: {"selectable":true,"title":"AlphaCrypt","subtitle":" ","bottom":"Press OK","choices":["You are not entitled","to receive this programme !"]}" lines, but it will not descamble with that OFF either.

RE: Support Digital Devices CI Interfaces - Added by saen acro 13 days ago

Robin Brouwer wrote:

saen acro wrote:

Disable messages
[...]

is tuner and ci are on same TAB?

The tuner and ci are different adapters; Digital Devices Max A8i TV Card + Octopus Twin CI. I believe there's no bridging is available for that hardware combination (if it is, I will post dmesg so we can see that) and I believe with dd ci that is not needed, right?

Turning "Smartcard Messages: OFF" will remove those nasty "ops menu: {"selectable":true,"title":"AlphaCrypt","subtitle":" ","bottom":"Press OK","choices":["You are not entitled","to receive this programme !"]}" lines, but it will not descamble with that OFF either.

https://www.digital-devices.eu/shop/en/accessoires/cables/156/ribbon-cable-12-cm-data-cable-for-connection-of-expansion-modules?c=175

do you have such cable? from tuner to CI?

RE: Support Digital Devices CI Interfaces - Added by Robin Brouwer 13 days ago

I do not have such cable installed.

Would I need such a cable? Before I would spend money buying such a cable, can you explain what makes you think that cable is needed?

I did believe this section in the log tells us packets are being sent to the CAM for descambling, however they are returned descambled. I might be completely wrong of course! Just wanting to learn about it...

2021-01-04 10:00:08.910 [  TRACE]:ddci: CAM ci0 recv rd(CAM ->):5376, wr:5376
2021-01-04 10:00:08.910 [  TRACE]:ddci: CAM ci0 got 5225 scrambled packets from CAM
2021-01-04 10:00:08.910 [  TRACE]:ddci: CAM ci0 send buff rd(-> CAM):5694, wr:5694

RE: Support Digital Devices CI Interfaces - Added by Robin Brouwer 8 days ago

Just for those that are interested in my solution:
I setup minisatip to handle the heavy lifting with tuners and ci modules. minisatip does have MTD support and within TvHeadend it does not matter much if you use the tuners using minisatip or directly.

RE: Support Digital Devices CI Interfaces - Added by _ mpajer 8 days ago

My CI is working with TVHeadend and able to descramble multiple channels from 1 mux (MCD),
but after while (few days or weeks) it always stops working and begin logging same message as noted above (You are not entitled, to receive this programme !)

When I pull the module from Octopus and insert it to the TV, it "reactivates" and I am able to use it with TVHeadend for a while.
Then I must reactivate it again..

Robin Brouwer wrote:

Just for those that are interested in my solution:
I setup minisatip to handle the heavy lifting with tuners and ci modules. minisatip does have MTD support and within TvHeadend it does not matter much if you use the tuners using minisatip or directly.

Thanks for info, can you share how exactly you made it?

RE: Support Digital Devices CI Interfaces - Added by Robin Brouwer 7 days ago

I guess this will be a bit offtopic, but I doubt anyone will care...

It depends on how you setup linux. I'm using Ubuntu 20.04, which comes with kernel drivers for my tuner. (I only had to recompile the kernel for setting CONFIG_DVB_MAX_ADAPTERS to something higher than 8!)

After that I did:

git clone https://github.com/catalinii/minisatip
./configure
nano src/Makefile
make
In the src/Makefile file 1 line should be changed (hence the nano command). DDCI=0 should be changed into DDCI=1, which made the section at the top end up looking like:
CC=gcc
EMBEDDED=0
DVBCSA=1
DVBAES=1
DVBCA=1
SATIPCLIENT=1
NETCVCLIENT=0
STATIC=0
DVBAPI=1
LINUXDVB=1
AXE=0
ENIGMA=0
DDCI=1
T2MI=0

If for you things like DVBCSA or DVBAES or DVBCA are set to 0, it's time to apt install some extra libs and start again with ./configure! There's also a possible DDCI_TEST=1, which you could add below DDCI. Then minisatip should work in case you use DD's drivers.

After compiling is completed, follow the steps in tools/autostart.readme for installing it into Ubuntu.

And then finally you will of course disable all tuners in Tvheadend and enable those coming from minisatip!

(51-63/63)