minisatip icon indicating copy to clipboard operation
minisatip copied to clipboard

Services pinning to specific CAM or do-not-descramble option

Open Delitants opened this issue 3 years ago • 27 comments

I think this feature was requested earlier, but I can't find a related ticket. This is essential, please make possible pinning services to a specific CAM and do-not-descramble option per service (similar to existing flag -E but I want to set manually what service to pass though).

Situation is next. Tuner TBS 6590 with dual CI slot, TP has 3 services, one SHOULD be descrambled by CAM-1, second with CAM-2 and not otherwise, and third must be passed AS IS without even trying to process it, because it will be descrambled by softcam in different software.

Note: flag -E does not work in this scenario, because it still tries to send channel to an already busy CAM, it passes through only if cam refuses to descramble, but this is not the case.

Delitants avatar Mar 25 '23 04:03 Delitants

Pinning services to a specific CAM is supported, but "ignoring" a service is not.

Jalle19 avatar Mar 25 '23 04:03 Jalle19

Pinning services to a specific CAM is supported, but "ignoring" a service is not.

How do you pin them without physically using secondary tuner of the card?

Delitants avatar Mar 25 '23 05:03 Delitants

I'm not sure how the TBS 6590 works, it could be that the CAM assignment cannot be controlled if the card doesn't work as "standalone" CI cards, like the Digital Devices models.

Jalle19 avatar Mar 25 '23 06:03 Jalle19

CAM assignment works at the moment just for standalone CI cards (tbs 6900)

catalinii avatar Mar 25 '23 15:03 catalinii

Pinning services to a specific CAM is supported, but "ignoring" a service is not.

How do you pin them without physically using secondary tuner of the card?

No way. In the tbs6590 CI are physically connected to the tuner and accordingly if you wish to use second CI you must use a second tuner.

Yuri666 avatar Mar 25 '23 18:03 Yuri666

Pinning services to a specific CAM is supported, but "ignoring" a service is not.

How do you pin them without physically using secondary tuner of the card?

No way. In the tbs6590 CI are physically connected to the tuner and accordingly if you wish to use second CI you must use a second tuner.

Okay, I'm more interested in skipping services for descrambling in external software, second part of this ticket.

Delitants avatar Mar 25 '23 18:03 Delitants

Theoretically it can be done - just do not send CA_PMT when switching to this channel. I don't know how difficult it is to implement. It's easier to use a dvb card without CI for these purposes.

Yuri666 avatar Mar 25 '23 18:03 Yuri666

I think "service skipping" could be reasonably implemented for standalone cards (using the same ddci.conf file), but for "bonded" CI slots it's a bit clumsy like Yuri explained.

Jalle19 avatar Mar 25 '23 19:03 Jalle19

for standalone cards it's already implemented in ddci.conf

Yuri666 avatar Mar 25 '23 19:03 Yuri666

I think "service skipping" could be reasonably implemented for standalone cards (using the same ddci.conf file), but for "bonded" CI slots it's a bit clumsy like Yuri explained.

Why is it clumsy? -E switch does pass undecrypted service through when CAM refuses to decode it due to lack of entitlements. Coming from that, it should be possibly to just send raw stream without bothering CAM. Basically I just want to tap the same transponder and save on physical tuners.

Delitants avatar Mar 25 '23 19:03 Delitants

ituation is next. Tuner TBS 6590 with dual CI slot, TP has 3 services, one SHOULD be descrambled by CAM-1, second with CAM-2 and not otherwise, and third must be passed AS IS without even trying to process it, because it will be descrambled by softcam in different software

In this hardware CAM1 is connected to Adapter1 on the device. In your example, if the TP is tuned on adapter 1, CAM-1 can be set to decrypt only service 1. Service cannot be descrambled with CAM2 because the stream from adapter 1 does not pass thru CAM2. If you use -c X:1 third stream wont attempt to use CAM1 X here is the number of the first adapter from the board (0 if no other cards are present)

catalinii avatar Mar 25 '23 20:03 catalinii

In this hardware CAM1 is connected to Adapter1 on the device. In your example, if the TP is tuned on adapter 1, CAM-1 can be set to decrypt only service 1. Service cannot be descrambled with CAM2 because the stream from adapter 1 does not pass thru CAM2. If you use -c X:1 third stream wont attempt to use CAM1 X here is the number of the first adapter from the board (0 if no other cards are present)

I've tried that already, -c 1:1 -E, it does not pass through, it gets stuck in loop attempting to use CAM but throwing an error that no free PID slots available.

Delitants avatar Mar 25 '23 20:03 Delitants

Can u upload logs?

./minisatip -f -l http

catalinii avatar Mar 25 '23 22:03 catalinii

Can u upload logs?

./minisatip -f -l http

Here you go. When I've started a second encrypted stream, which needs to be passed through, it loops with these messages and receiver does not get a stream. ExecStart=/root/minisatip-1.2.102/minisatip -I minisatipsecondary -O -x 8082 -y 555 -D 2 -e 2 -c 2:1 -j 2:15-1470 -M *:5.0-5.0 -t -l ca,http -Z *:0 -F /var/log/minisatip2.log

[27/03 00:00:02.099 AD2]: No free slots to add PMT 3 to CA 2 [27/03 00:00:02.140 AD2]: Sending PMT 3 to all CAs: ad_ca_mask 1, pmt_ca_mask 0, disabled_ca_mask 0 [27/03 00:00:02.140 AD2]: CAID 1856 and mask FFFF matched PMT 3 [27/03 00:00:02.140 AD2]: CA 2 all channels used 1, multiple allowed 0

minisatip2.log

Delitants avatar Mar 26 '23 21:03 Delitants

This just means that the second encrypted stream will not be using CA2 (because one is already used). So at that point using -E should allow the stream to pass to the client

catalinii avatar Mar 27 '23 00:03 catalinii

This just means that the second encrypted stream will not be using CA2 (because one is already used). So at that point using -E should allow the stream to pass to the client

Well, it should but it does not send anything but some ~80 kbps on the output.

Delitants avatar Mar 27 '23 00:03 Delitants

Do you have rights to decrypt the second channel with the CAM?

catalinii avatar Mar 27 '23 00:03 catalinii

Do you have rights to decrypt the second channel with the CAM?

yes

Delitants avatar Mar 27 '23 01:03 Delitants

Can you add -l pmt and upload the (entire) log for the same repro?

catalinii avatar Mar 27 '23 04:03 catalinii

Can you add -l pmt and upload the (entire) log for the same repro?

minisatip2.log

Delitants avatar Mar 27 '23 04:03 Delitants

Here, I switched the channels around by tuning them in opposite order. minisatip2.log

-O -x 8082 -y 555 -D 2 -e 2 -c 2:1 -j 2:15-1470 -M *:5.0-5.0 -t -E -l ca,http,pmt -Z *:0 -F /var/log/minisatip2.log

Output of a skipped channel is 21Kb, only data and no content: Screenshot 2023-03-26 at 7 03 17 PM

Delitants avatar Mar 27 '23 04:03 Delitants

If you use -c X:1 third stream wont attempt to use CAM1 X here is the number of the first adapter from the board (0 if no other cards are present)

For me, it just side effect. If third stream starts first it will be decoded by CAM. I suggest add ca.conf Then to read ca.conf and add to dvbca_process_pmt() if (sid==(sid from ca.conf)) return TABLES_RESULT_ERROR_NORETRY; So, this SID will not be decoded by any CAM. By other side one more conf file...

Yuri666 avatar Mar 28 '23 07:03 Yuri666

If you use -c X:1 third stream wont attempt to use CAM1 X here is the number of the first adapter from the board (0 if no other cards are present)

For me, it just side effect. If third stream starts first it will be decoded by CAM. I suggest add ca.conf Then to read ca.conf and add to dvbca_process_pmt() if (sid==(sid from ca.conf)) return TABLES_RESULT_ERROR_NORETRY; So, this SID will not be decoded by any CAM. By other side one more conf file...

Some sort of config with list of services to be passed untouched would be great. But I can’t code that myself.

Delitants avatar Mar 28 '23 08:03 Delitants

my bad, can you use "-v pmt" instrd of "-l pmt". I am looking for this message: https://github.com/catalinii/minisatip/blob/master/src/pmt.c#L1158

catalinii avatar Mar 28 '23 23:03 catalinii

my bad, can you use "-v pmt" instrd of "-l pmt". I am looking for this message: https://github.com/catalinii/minisatip/blob/master/src/pmt.c#L1158

Enabled first channel - it went decoding fine, then enabled second channel to get passed through (which does not). minisatip2.log

Delitants avatar Mar 29 '23 20:03 Delitants

Bump

Delitants avatar Apr 12 '23 18:04 Delitants

@Delitants assuming the SID you want to omit from all your CAMs is 7000, can you add this to your ddci.conf and test https://github.com/Jalle19/minisatip/commit/6a525e13941e22048d278c630854d00ebb93c7cf ?

7000: # not assigned anywhere

You should see something like find_ddci_for_pmt: no suitable DDCI found for PMT 4 (sid 7000): not mapped to any DDCI device in ddci.conf in your log when you try to play that service.

Note that this only works for standalone CI adapters right now, not e.g. Enigma.

Jalle19 avatar May 17 '23 11:05 Jalle19

@catalinii https://github.com/catalinii/minisatip/blob/b2c865a6b283176b61a14bd82ca25c1144f1d976/src/ddci.c#L1419 could this be why -E doesn't seem to work properly with standalone CI adapters?

Jalle19 avatar Jun 24 '24 07:06 Jalle19

@Delitants assuming the SID you want to omit from all your CAMs is 7000, can you add this to your ddci.conf and test Jalle19@6a525e1 ?

7000: # not assigned anywhere

You should see something like find_ddci_for_pmt: no suitable DDCI found for PMT 4 (sid 7000): not mapped to any DDCI device in ddci.conf in your log when you try to play that service.

Note that this only works for standalone CI adapters right now, not e.g. Enigma.

It's a bonded CI slot, TBS 6590. None of those ddci.conf manipulations give desired effect of simply skipping one channel passing it through.

Delitants avatar Jun 24 '24 07:06 Delitants

Right, my PR will not help your situation then.

Jalle19 avatar Jun 24 '24 09:06 Jalle19