Jump to content


Photo

How to create virtual CI device


  • Please log in to reply
18 replies to this topic

#1 ClipMaster

  • Member
  • 13 posts

0
Neutral

Posted 4 May 2015 - 18:18

How can I create a virtual CI device (like for example /dev/ci0)?

Is there any info/doc available?

I have found the dvb-ci source of enigma2 (/lib/dvb_ci/dvbci.cpp) but it is not really helpful.

 



Re: How to create virtual CI device #2 Erik Slagter

  • PLi® Core member
  • 46,957 posts

+541
Excellent

Posted 4 May 2015 - 18:19

I guess the first place to look is the linux kernel source ;) But I'm not sure if it defines a ci device.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: How to create virtual CI device #3 malakudi

  • Senior Member
  • 1,449 posts

+69
Good

Posted 5 May 2015 - 14:50

/dev/ciX is not a Linux standard. It is defined in BCM closed source drivers I am afraid.



Re: How to create virtual CI device #4 Erik Slagter

  • PLi® Core member
  • 46,957 posts

+541
Excellent

Posted 5 May 2015 - 15:37

Then the only thing left is look at the source at what is exchanged via the device.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: How to create virtual CI device #5 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 5 May 2015 - 17:38

Just keep in mind that no actual video data passes through this device, that's all done in hardware. So if you plan on "sharing" a CI module or something like that, it's not going to work, that only works for softcams.
Real musicians never die - they just decompose

Re: How to create virtual CI device #6 ClipMaster

  • Member
  • 13 posts

0
Neutral

Posted 5 May 2015 - 18:20

Thanks for your help guys!

 

Just keep in mind that no actual video data passes through this device, that's all done in hardware.

 

I understand, so a virtual ci device will not work.

 

My goal is to do the TS/CSA decryption in software, instead of hardware .

I already tried using dvbapi for that, but setting a pid filter to get the raw ts stream did not work for the current active channel shown by engima2.

 

Basically I need to get the raw ts stream of the current active enigma2 channel, decrypt it, and then send it back to engima2.

 

There is a plugin for vdr which does that (vdr allows to register a virtual ci device through all active streams will be passed), so I thought it would also work for enigma2.

 

Any ideas how to solve this problem?


Edited by ClipMaster, 5 May 2015 - 18:20.


Re: How to create virtual CI device #7 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 5 May 2015 - 18:54

Normal streaming gives you a ts stream. There is an option to include ecm's in this stream. Or isn't that enough?

Re: How to create virtual CI device #8 ClipMaster

  • Member
  • 13 posts

0
Neutral

Posted 5 May 2015 - 19:27

Should be good, but how do I send the stream back to enigma2 this way?



Re: How to create virtual CI device #9 ClipMaster

  • Member
  • 13 posts

0
Neutral

Posted 5 May 2015 - 19:37

(I want to add support for my custom encryption algo, which is used instead of CSA, so I need to decrypt it in software and then pass it back to the enigma2 player):



Re: How to create virtual CI device #10 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 5 May 2015 - 19:40

Try writing the output to a named pipe, and play that using the regular E2 movielist.
Real musicians never die - they just decompose

Re: How to create virtual CI device #11 ClipMaster

  • Member
  • 13 posts

0
Neutral

Posted 5 May 2015 - 21:18

That is not what I want. It must be completely invisible: You zap to a channel, and it gets decrypted.



Re: How to create virtual CI device #12 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 5 May 2015 - 21:25

That can only be accomplished by writing at least part of the solution as an enigma plugin.

Re: How to create virtual CI device #13 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 5 May 2015 - 21:29

Oh wait not true. You could create a bouquet consisting of streaming urls which point to your custom solution. Your streaming server would then open a stream on the requesting box and decrypt it.

Re: How to create virtual CI device #14 ClipMaster

  • Member
  • 13 posts

0
Neutral

Posted 5 May 2015 - 22:01

This is a good idea, but I really would prefer directly decrypting a channel for enigma2. Would this possible with an enigma2 plugin?



Re: How to create virtual CI device #15 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 6 May 2015 - 09:53

Of course it's possible. You can also just alter the E2 code to do as you wish. That's why it's open source. You can do anything you want with it!
So what's holding you back?

Edited by MiLo, 6 May 2015 - 09:54.

Real musicians never die - they just decompose

Re: How to create virtual CI device #16 ClipMaster

  • Member
  • 13 posts

0
Neutral

Posted 6 May 2015 - 10:29

Well, I do not want to mess with E2 code, because it should be compatible with all images (openpli/vti/..) without replacing critical binaries.

Just changing E2 code would be easy, of course.

 

But how can this be done in the form of a plugin?


Edited by ClipMaster, 6 May 2015 - 10:30.


Re: How to create virtual CI device #17 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 6 May 2015 - 10:39

you cannot do that in a plugin.

You'd have to either modify e2 internals, or provide drivers which allow descrambling to take place in userspace.



Re: How to create virtual CI device #18 malakudi

  • Senior Member
  • 1,449 posts

+69
Good

Posted 6 May 2015 - 10:39

I don't think the cpu of stbs is able to decrypt transport stream in software, unless it is something really basic like XOR. The CSA is done in hardware. Some boxes also have undocumented support for descambling DES encoded streams (like PowerVU).



Re: How to create virtual CI device #19 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 6 May 2015 - 14:12

Well, I do not want to mess with E2 code, because it should be compatible with all images (openpli/vti/..) without replacing critical binaries.
Just changing E2 code would be easy, of course.


All those images are open source, and all are based on the same code. So implementing it in E2 is not the problem.
 

But how can this be done in the form of a plugin?


Not.

But that's the least of your problems anyway. First you'd actually have to implement what you want to do, and demonstrate that it'll actually work. Only after that you should start worrying about the politics of getting it into the image for other people to use.

The concept of routing the streams through software would also allow things like sending the stream to a PC or another E2 box with a CI module for descrambling.
Real musicians never die - they just decompose


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users