minisatip icon indicating copy to clipboard operation
minisatip copied to clipboard

[Feature request] Icam support

Open localhosthack0r opened this issue 2 years ago • 19 comments

Hi, I just saw patched versions of tvheadend and libdvbcsa supporting Icam decryption. Would it be possible to implement this for minisatip as well?

This is the patch for libdvbcsa from https://github.com/glenvt18/libdvbcsa

index c7e9c59..b63fb7d 100644
--- a/src/dvbcsa/dvbcsa.h
+++ b/src/dvbcsa/dvbcsa.h
@@ -93,6 +93,8 @@ void dvbcsa_bs_key_free(struct dvbcsa_bs_key_s *key);
 
 void dvbcsa_bs_key_set(const dvbcsa_cw_t cw, struct dvbcsa_bs_key_s *key);
 
+void dvbcsa_bs_key_set_ecm(const unsigned char ecm, const dvbcsa_cw_t cw, struct dvbcsa_bs_key_s *key);
+
 /** get maximum number of packet per batch */
 
 unsigned int dvbcsa_bs_batch_size(void);
diff --git a/src/dvbcsa_bs_key.c b/src/dvbcsa_bs_key.c
index e2fcf55..d703325 100644
--- a/src/dvbcsa_bs_key.c
+++ b/src/dvbcsa_bs_key.c
@@ -63,3 +63,39 @@ dvbcsa_bs_key_set (const dvbcsa_cw_t cw, struct dvbcsa_bs_key_s *key)
     }
 }
 
+void
+dvbcsa_bs_key_set_ecm (const unsigned char ecm, const dvbcsa_cw_t cw, struct dvbcsa_bs_key_s *key)
+{
+  dvbcsa_keys_t kk;
+  int i;
+
+  /* precalculations for stream */
+
+  uint64_t ck = dvbcsa_load_le64(cw);
+
+  for (i = 0; i < DVBCSA_CWBITS_SIZE; i++)
+    key->stream[i] = (ck >> (i^4)) & 1 ? BS_VAL8(ff) : BS_VAL8(00);
+
+  /* precalculations for block */
+
+  dvbcsa_key_schedule_block_ecm(ecm, cw, kk);
+
+  for (i = 0; i < DVBCSA_KEYSBUFF_SIZE; i++)
+    {
+#if BS_BATCH_SIZE == 32
+      *(dvbcsa_u32_aliasing_t *)(key->block + i) = kk[i] * 0x01010101;
+
+#elif BS_BATCH_SIZE == 64
+      *(dvbcsa_u64_aliasing_t *)(key->block + i) = kk[i] * 0x0101010101010101ULL;
+
+#elif BS_BATCH_SIZE > 64 && BS_BATCH_SIZE % 64 == 0
+      uint64_t v = kk[i] * 0x0101010101010101ULL;
+      int j;
+
+      for (j = 0; j < BS_BATCH_BYTES / 8; j++)
+        *((dvbcsa_u64_aliasing_t *)(key->block + i) + j) = v;
+#else
+# error
+#endif
+    }
+}
diff --git a/src/dvbcsa_key.c b/src/dvbcsa_key.c
index 1ff17e0..bd2a2c1 100644
--- a/src/dvbcsa_key.c
+++ b/src/dvbcsa_key.c
@@ -585,3 +585,18 @@ dvbcsa_key_schedule_block(const dvbcsa_cw_t cw, uint8_t * kk)
       kk[i*8+j] = (k[i]>>(j*8)) ^ i;
 }
 
+void
+dvbcsa_key_schedule_block_ecm(const unsigned char ecm, const dvbcsa_cw_t cw, uint8_t * kk)
+{
+  uint64_t k[7];
+  int i, j;
+
+  k[6] = dvbcsa_load_le64_ecm(ecm, cw);
+  for (i = 6; i > 0; i--)
+    k[i - 1] = dvbcsa_key_permute_block(k[i]);
+
+  for (i = 0; i < 7; i++)
+    for (j = 0; j < 8; j++)
+      kk[i*8+j] = (k[i]>>(j*8)) ^ i;
+}
+
diff --git a/src/dvbcsa_pv.h b/src/dvbcsa_pv.h
index 83753b1..e59a70d 100644
--- a/src/dvbcsa_pv.h
+++ b/src/dvbcsa_pv.h
@@ -88,6 +88,26 @@ struct dvbcsa_key_s
 
 extern const uint8_t dvbcsa_block_sbox[256];
 
+static const uint8_t            csa_block_perm_ecm[256] =
+  {
+    0x00,0x02,0x80,0x82,0x20,0x22,0xa0,0xa2, 0x04,0x06,0x84,0x86,0x24,0x26,0xa4,0xa6,
+    0x40,0x42,0xc0,0xc2,0x60,0x62,0xe0,0xe2, 0x44,0x46,0xc4,0xc6,0x64,0x66,0xe4,0xe6,
+    0x01,0x03,0x81,0x83,0x21,0x23,0xa1,0xa3, 0x05,0x07,0x85,0x87,0x25,0x27,0xa5,0xa7,
+    0x41,0x43,0xc1,0xc3,0x61,0x63,0xe1,0xe3, 0x45,0x47,0xc5,0xc7,0x65,0x67,0xe5,0xe7,
+    0x08,0x0a,0x88,0x8a,0x28,0x2a,0xa8,0xaa, 0x0c,0x0e,0x8c,0x8e,0x2c,0x2e,0xac,0xae,
+    0x48,0x4a,0xc8,0xca,0x68,0x6a,0xe8,0xea, 0x4c,0x4e,0xcc,0xce,0x6c,0x6e,0xec,0xee,
+    0x09,0x0b,0x89,0x8b,0x29,0x2b,0xa9,0xab, 0x0d,0x0f,0x8d,0x8f,0x2d,0x2f,0xad,0xaf,
+    0x49,0x4b,0xc9,0xcb,0x69,0x6b,0xe9,0xeb, 0x4d,0x4f,0xcd,0xcf,0x6d,0x6f,0xed,0xef,
+    0x10,0x12,0x90,0x92,0x30,0x32,0xb0,0xb2, 0x14,0x16,0x94,0x96,0x34,0x36,0xb4,0xb6,
+    0x50,0x52,0xd0,0xd2,0x70,0x72,0xf0,0xf2, 0x54,0x56,0xd4,0xd6,0x74,0x76,0xf4,0xf6,
+    0x11,0x13,0x91,0x93,0x31,0x33,0xb1,0xb3, 0x15,0x17,0x95,0x97,0x35,0x37,0xb5,0xb7,
+    0x51,0x53,0xd1,0xd3,0x71,0x73,0xf1,0xf3, 0x55,0x57,0xd5,0xd7,0x75,0x77,0xf5,0xf7,
+    0x18,0x1a,0x98,0x9a,0x38,0x3a,0xb8,0xba, 0x1c,0x1e,0x9c,0x9e,0x3c,0x3e,0xbc,0xbe,
+    0x58,0x5a,0xd8,0xda,0x78,0x7a,0xf8,0xfa, 0x5c,0x5e,0xdc,0xde,0x7c,0x7e,0xfc,0xfe,
+    0x19,0x1b,0x99,0x9b,0x39,0x3b,0xb9,0xbb, 0x1d,0x1f,0x9d,0x9f,0x3d,0x3f,0xbd,0xbf,
+    0x59,0x5b,0xd9,0xdb,0x79,0x7b,0xf9,0xfb, 0x5d,0x5f,0xdd,0xdf,0x7d,0x7f,0xfd,0xff
+};
+
 void dvbcsa_block_decrypt (const dvbcsa_keys_t key, const dvbcsa_block_t in, dvbcsa_block_t out);
 void dvbcsa_block_encrypt (const dvbcsa_keys_t key, const dvbcsa_block_t in, dvbcsa_block_t out);
 
@@ -95,6 +115,7 @@ void dvbcsa_stream_xor (const dvbcsa_cw_t cw, const dvbcsa_block_t iv,
                         uint8_t *stream, unsigned int len);
 
 void dvbcsa_key_schedule_block(const dvbcsa_cw_t cw, uint8_t * kk);
+void dvbcsa_key_schedule_block_ecm(const unsigned char ecm, const dvbcsa_cw_t cw, uint8_t * kk);
 
 DVBCSA_INLINE static inline void
 dvbcsa_xor_64 (uint8_t *b, const uint8_t *a)
@@ -141,6 +162,33 @@ dvbcsa_load_le64(const uint8_t *p)
 #endif
 }
 
+DVBCSA_INLINE static inline uint64_t
+dvbcsa_load_le64_ecm(const unsigned char ecm, const uint8_t *p)
+{
+  dvbcsa_block_t W;
+  memcpy(W, p, sizeof(W));
+  if (ecm == 4)
+  {
+    W[0] = csa_block_perm_ecm[p[0]];
+    W[4] = csa_block_perm_ecm[p[4]];
+  }
+#if defined(DVBCSA_ENDIAN_LITTLE)
+  uint64_t i;
+  memcpy(&i, W, 8);
+  return i;
+#else
+  return (uint64_t)( ((uint64_t)W[7] << 56) |
+                     ((uint64_t)W[6] << 48) |
+                     ((uint64_t)W[5] << 40) |
+                     ((uint64_t)W[4] << 32) |
+                     ((uint64_t)W[3] << 24) |
+                     ((uint64_t)W[2] << 16) |
+                     ((uint64_t)W[1] << 8 ) |
+                      (uint64_t)W[0]
+                     );
+#endif
+}
+
 DVBCSA_INLINE static inline void
 dvbcsa_store_le64(uint8_t *p, const uint64_t w)
 {

And this one for tvheadend 4.3:

index 71cc9ebd6..b5c46e329 100644
--- a/src/descrambler/descrambler.c
+++ b/src/descrambler/descrambler.c
@@ -966,12 +966,12 @@ key_flush( th_descrambler_runtime_t *dr, th_descrambler_key_t *tk, uint8_t chang
   /* update the keys */
   if (changed & 1) {
     debug2("%p: even key[%d] set for decoder", dr, tk->key_pid);
-    tvhcsa_set_key_even(&tk->key_csa, tk->key_data[0]);
+    tvhcsa_set_key_even(&tk->key_csa, tk->key_data[0], dr->dr_ecm);
     tk->key_valid |= 0x40;
   }
   if (changed & 2) {
     debug2("%p: odd key[%d] set for decoder", dr, tk->key_pid);
-    tvhcsa_set_key_odd(&tk->key_csa, tk->key_data[1]);
+    tvhcsa_set_key_odd(&tk->key_csa, tk->key_data[1], dr->dr_ecm);
     tk->key_valid |= 0x80;
   }
 }
@@ -1371,6 +1371,7 @@ descrambler_table_callback
                 }
               }
             }
+            dr->dr_ecm = (ptr[2] - ptr[4]) == 4 ? ptr[0x15] : 0;
             tvhtrace(LS_DESCRAMBLER, "ECM message %02x:%02x (section %d, len %d, pid %d) for service \"%s\"",
                      ptr[0], ptr[1], des->number, len, mt->mt_pid, t->s_dvb_svcname);
           }
diff --git a/src/descrambler/descrambler.h b/src/descrambler/descrambler.h
index ac5ff312c..697adfe04 100644
--- a/src/descrambler/descrambler.h
+++ b/src/descrambler/descrambler.h
@@ -103,6 +103,7 @@ typedef struct th_descrambler_runtime {
   int64_t  dr_ecm_start[2];
   int64_t  dr_ecm_last_key_time;
   int64_t  dr_ecm_key_margin;
+  uint8_t  dr_ecm;
   int64_t  dr_last_err;
   int64_t  dr_force_skip;
   th_descrambler_key_t dr_keys[DESCRAMBLER_MAX_KEYS];
diff --git a/src/descrambler/tvhcsa.c b/src/descrambler/tvhcsa.c
index 942ce92b5..664523665 100644
--- a/src/descrambler/tvhcsa.c
+++ b/src/descrambler/tvhcsa.c
@@ -220,12 +220,12 @@ tvhcsa_set_type( tvhcsa_t *csa, struct mpegts_service *s, int type )
 }
 
 
-void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even )
+void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even, const uint8_t ecm)
 {
   switch (csa->csa_type) {
   case DESCRAMBLER_CSA_CBC:
 #if ENABLE_DVBCSA
-    dvbcsa_bs_key_set(even, csa->csa_key_even);
+    dvbcsa_bs_key_set_ecm(ecm, even, csa->csa_key_even);
 #endif
     break;
   case DESCRAMBLER_DES_NCB:
@@ -241,13 +241,13 @@ void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even )
   }
 }
 
-void tvhcsa_set_key_odd( tvhcsa_t *csa, const uint8_t *odd )
+void tvhcsa_set_key_odd( tvhcsa_t *csa, const uint8_t *odd, const uint8_t ecm )
 {
   assert(csa->csa_type);
   switch (csa->csa_type) {
   case DESCRAMBLER_CSA_CBC:
 #if ENABLE_DVBCSA
-    dvbcsa_bs_key_set(odd, csa->csa_key_odd);
+    dvbcsa_bs_key_set_ecm(ecm, odd, csa->csa_key_odd);
 #endif
     break;
   case DESCRAMBLER_DES_NCB:
diff --git a/src/descrambler/tvhcsa.h b/src/descrambler/tvhcsa.h
index 855de5acc..24eb729cb 100644
--- a/src/descrambler/tvhcsa.h
+++ b/src/descrambler/tvhcsa.h
@@ -66,8 +66,8 @@ typedef struct tvhcsa
 
 int  tvhcsa_set_type( tvhcsa_t *csa, struct mpegts_service *s, int type );
 
-void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even );
-void tvhcsa_set_key_odd ( tvhcsa_t *csa, const uint8_t *odd );
+void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even, const uint8_t ecm );
+void tvhcsa_set_key_odd ( tvhcsa_t *csa, const uint8_t *odd, const uint8_t ecm );
 
 void tvhcsa_init    ( tvhcsa_t *csa );
 void tvhcsa_destroy ( tvhcsa_t *csa );
@@ -76,8 +76,8 @@ void tvhcsa_destroy ( tvhcsa_t *csa );
 
 static inline int tvhcsa_set_type( tvhcsa_t *csa, struct mpegts_service *s, int type ) { return -1; }
 
-static inline void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even ) { };
-static inline void tvhcsa_set_key_odd ( tvhcsa_t *csa, const uint8_t *odd ) { };
+static inline void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even, const uint8_t ecm ) { };
+static inline void tvhcsa_set_key_odd ( tvhcsa_t *csa, const uint8_t *odd, const uint8_t ecm ) { };
 
 static inline void tvhcsa_init ( tvhcsa_t *csa ) { };
 static inline void tvhcsa_destroy ( tvhcsa_t *csa ) { };

So I think from minisatip perspective it is just required to use the patched libdvbcsa and to call the dvbcsa_bs_key_set() function from csa.c with a additional parameter for the Icam decryption. They just throw in a '4' for this parameter from tvheadend. In tvheadend it seems to be derived from something when selecting the right descrambler, if it is Icam:

                 }
               }
             }
+            dr->dr_ecm = (ptr[2] - ptr[4]) == 4 ? ptr[0x15] : 0;
             tvhtrace(LS_DESCRAMBLER, "ECM message %02x:%02x (section %d, len %d, pid %d) for service \"%s\"",
                      ptr[0], ptr[1], des->number, len, mt->mt_pid, t->s_dvb_svcname);
           }

But there I have no clue what the equivalent in minisatip would be. Help would be very appreciated! :) Thank you!

localhosthack0r avatar Oct 12 '22 15:10 localhosthack0r

What is this for? Any context?

Jalle19 avatar Oct 13 '22 19:10 Jalle19

Some providers with NDS Videoguard decryption are using this Icam. Seems to be a non-standard descrambling algorithm. Sky Italia and Sky UK are using this since years, Sky Germany introduced it this summer. And this patch is working according to some SAT forums at least for Sky Germany, for the others I don't know,...

localhosthack0r avatar Oct 13 '22 19:10 localhosthack0r

Tvheadend can decrypt icam with "stream relay" oscam feature. Minisatip can't use this feature by definition.

Yuri666 avatar Oct 13 '22 20:10 Yuri666

Here is something about the ECM structure: https://trac.streamboard.tv/oscam/ticket/4389

@Yuri666 Yes, right, the first implementations were using stream relay, but with the modified libdvbcsa it seems to work without stream relay!

localhosthack0r avatar Oct 13 '22 20:10 localhosthack0r

I seen last patch to oscam. There only stream relay. Maybe I'm wrong, but not seen any other for now.

Yuri666 avatar Oct 13 '22 20:10 Yuri666

Patches are from here: https://www.linuxsat-support.com/thread/153679-oscam-icam-tvheadend/?pageNo=1

localhosthack0r avatar Oct 13 '22 20:10 localhosthack0r

There is patches for tvheadend and for libdvbcsa. Also needs patch for oscam.

Yuri666 avatar Oct 13 '22 21:10 Yuri666

Does not seem complex but without access to a system that has this is very hard to implement.

catalinii avatar Oct 15 '22 23:10 catalinii

Hi, for testing purposes I now setup a LXC container where I tried out the tvheadend solution, with one tuner from minisatip as DVB input source. It is working just with the two patches from above, no need to patch oscam, no need for streamrelay!

@catalinii I can maybe setup another container with a test minisatip instance, which runs as client to my productive minisatip server and provide you ssh access to that.

Or, maybe also an option: I might be able to implement it myself, if you guide me to where I can access the ECM data to find out if it is Icam or normal CSA. Then I would provide a PR.

localhosthack0r avatar Oct 16 '22 13:10 localhosthack0r

So,... I did another experiment. As a quick & dirty hack, I just hardcoded the calls to the modified libdvbcsa with the '4' for Icam:

root@tvheadend:~/minisatip# git diff
diff --git a/src/csa.c b/src/csa.c
index d0d5f7c..fb318b1 100644
--- a/src/csa.c
+++ b/src/csa.c
@@ -52,7 +52,7 @@ void dvbcsa_create_key(SCW *cw) { cw->key = dvbcsa_bs_key_alloc(); }
 void dvbcsa_delete_key(SCW *cw) { dvbcsa_key_free(cw->key); }
 
 void dvbcsa_set_cw(SCW *cw, SPMT *pmt) {
-    dvbcsa_bs_key_set((unsigned char *)cw->cw, cw->key);
+    dvbcsa_bs_key_set_ecm(4, (unsigned char *)cw->cw, cw->key);^M
 }
 
 void copy_batch(struct dvbcsa_bs_batch_s *d, SPMT_batch *s, int len) {

Then I'm running this version as a SAT>IP client to my unmodified productive setup. ./minisatip -N -o 192.168.178.75:2000,10 -s 192.168.178.75 -R ./html/

With that the Sky Germany channels are working and other channels are also working as they get decrypted from the unmodified server. :D

Not nice, as both client and server always try to decrypt, but as a quick workaround usable,...

localhosthack0r avatar Oct 16 '22 15:10 localhosthack0r

Do you know if the channels using lcam working on a CI+ cam using minisatip?

catalinii avatar Oct 16 '22 23:10 catalinii

Hi catalinii, no sorry, I don't know.

localhosthack0r avatar Oct 18 '22 10:10 localhosthack0r

So,... I did another experiment. As a quick & dirty hack, I just hardcoded the calls to the modified libdvbcsa with the '4' for Icam:

root@tvheadend:~/minisatip# git diff
diff --git a/src/csa.c b/src/csa.c
index d0d5f7c..fb318b1 100644
--- a/src/csa.c
+++ b/src/csa.c
@@ -52,7 +52,7 @@ void dvbcsa_create_key(SCW *cw) { cw->key = dvbcsa_bs_key_alloc(); }
 void dvbcsa_delete_key(SCW *cw) { dvbcsa_key_free(cw->key); }
 
 void dvbcsa_set_cw(SCW *cw, SPMT *pmt) {
-    dvbcsa_bs_key_set((unsigned char *)cw->cw, cw->key);
+    dvbcsa_bs_key_set_ecm(4, (unsigned char *)cw->cw, cw->key);^M
 }
 
 void copy_batch(struct dvbcsa_bs_batch_s *d, SPMT_batch *s, int len) {

Then I'm running this version as a SAT>IP client to my unmodified productive setup. ./minisatip -N -o 192.168.178.75:2000,10 -s 192.168.178.75 -R ./html/

With that the Sky Germany channels are working and other channels are also working as they get decrypted from the unmodified server. :D

Not nice, as both client and server always try to decrypt, but as a quick workaround usable,...

i tried this change - i have the modified libdvbcsa in place as soon as i change the csa.c and re-compile my normal channel (like orf) are not working anymore - i use kodi to watch through tvh and minisatip as my tuners having the oscam dvbapi. i can see that my oscam server is sending the key but no picture in minisatip - once i change the line back in csa.c - orf channels are working again (key + picture) any idea?

thanks holli

holli73 avatar Oct 20 '22 22:10 holli73

Hi holli, yes, this behavior is expected. The missing part in minisatip is to distinguish between normal CSA and Icam.

My dirty workaround, making both decryption types working is to run two instances of minisatip, both connected to OSCam via dvbapi, where one (unchanged, productive setup) uses the normal libdvbcsa and the other instance working as SAT>IP client (-s) to the productive setup is using the modified minisatip and patched libdvbcsa, for the Icam channels. Please note that in the client the dvbapi connection to OScam is using an offset (-o 192.168.178.75:2000 ,10).

In your setup with tvh, I would recommend to use tvh for the decryption (not minisatip), with the patch from the first post, then both normal CSA and Icam is working, because there Icam- detection is already implemnted.

localhosthack0r avatar Oct 21 '22 06:10 localhosthack0r

Hi all, I have meanwhile implemented a version, where I try to identify Sky Germany / Austria channels via its CAIDs. This is working for me, so that this channels but also channels of other providers not using Icam are getting decrypted.

If you are interested, here is my playground: https://github.com/localhosthack0r/minisatip

localhosthack0r avatar Oct 25 '22 20:10 localhosthack0r

@localhosthack0r can u provode remote access?

catalinii avatar Oct 26 '22 00:10 catalinii

The caid approach is not the best, because not all channels on sly de are icam encrypted.

so, why not check the ecm like they do it in oscam?

if(er->ecm[5] == 0xB0 && er->ecm[6] == 0x01 )

dni1337 avatar Oct 27 '22 15:10 dni1337

Is there official documentation about this ECM format somewhere?

Jalle19 avatar Oct 27 '22 17:10 Jalle19

I guess its not... not public

dni1337 avatar Oct 27 '22 17:10 dni1337

Can someone test this with a patched dvbcsa?

catalinii avatar Jan 04 '23 01:01 catalinii

@catalinii i tried following: got the patched libdvbcsa in place - make clean / git pull / make LIBDVBCSA=yes

i can watch now orf (this was not working before with the patched lib) but my other channel still will not show - from oscam it looks ok 2023/01/04 16:43:44 30117810 c (dvbapi) Demuxer 0 stopped descrambling for program 132F (ORF1 HD) 2023/01/04 16:43:44 30117810 c (dvbapi) Demuxer 0 ecmpid 0 CAID: 09C4 ECM_PID: 1B93 PROVID: 000000 2023/01/04 16:43:44 30117810 c (dvbapi) Demuxer 0 ecmpid 1 CAID: 098C ECM_PID: 1A93 PROVID: 000000 2023/01/04 16:43:44 30117810 c (dvbapi) Demuxer 0 ecmpid 2 CAID: 098D ECM_PID: 1C93 PROVID: 000000 2023/01/04 16:43:44 30117810 c (dvbapi) Demuxer 0 found 3 ECM pids and 3 STREAM pids in CA PMT 2023/01/04 16:43:44 30117810 c (dvbapi) Demuxer 0 trying to descramble PID 2 CAID 098D PROVID 000000 ECMPID 1C93 ANY CHID PMTPID 0062 VPID 02FF 2023/01/04 16:43:46 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:1C0B6E29CC0DFFD8B9496E6F43013E81): found (2139 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:43:46 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:F8973E59A3D30CF1C37D683DF0749F35): found (1634 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:43:52 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:61106DA739E12719A9F4EFE9B8DFF39A): found (648 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:43:59 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:7FF840DA51038D824BEBA2E657B020C2): found (391 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:07 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:7F7374463E5364D2B9AF22CF8CCFDE3D): found (1246 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:13 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:4D15087C7618BE21DC48EADC40C43E45): found (323 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:20 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:523C9C06E8E627BFF09638FFDFFC72B8): found (674 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:27 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:FA2FA5345743EC5EF9B883430C802B8B): found (291 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:35 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:E4D5713206DC309CE3C573317C601338): found (749 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:41 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:AB4037E6DE25C58ABA17321FAD4D577B): found (336 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:48 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:B7A6BB69025ED17C517992511E0D7ED1): found (464 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:44:56 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:F873585A14AA551C74734557282F22B9): found (870 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:45:02 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:AD311A93CB97DDB2958CAB4534E45981): found (307 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:45:09 30117810 c (ecm) dvbapi (098D@000000/1270/0074/B7:63528C575F0456E626F8C3F01D545768): found (665 ms) by oscam-vu - Sky Cinema Action HD 2023/01/04 16:45:14 30117810 c (dvbapi) Demuxer 0 stopped descrambling for program 0074 (Sky Cinema Action HD) 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 0 CAID: 0648 ECM_PID: 0078 PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 1 CAID: 0650 ECM_PID: 007A PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 2 CAID: 0D95 ECM_PID: 010E PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 3 CAID: 0D98 ECM_PID: 0110 PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 4 CAID: 06E2 ECM_PID: 0140 PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 5 CAID: 0500 ECM_PID: 01CD PROVID: 051900 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 6 CAID: 098D ECM_PID: 01D6 PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 7 CAID: 09C4 ECM_PID: 01E0 PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 ecmpid 8 CAID: 098C ECM_PID: 01EA PROVID: 000000 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 found 9 ECM pids and 6 STREAM pids in CA PMT 2023/01/04 16:45:15 30117810 c (dvbapi) Demuxer 0 trying to descramble PID 3 CAID 0D98 PROVID 000000 ECMPID 0110 ANY CHID PMTPID 006B VPID 0780 2023/01/04 16:45:15 30117810 c (ecm) dvbapi (0D98@000004/0000/132F/80:CF1130931E3DC8F18B8511E607AE8CC1): found (87 ms) by orficecard-2 (L/2/2/2) - ORF1 HD 2023/01/04 16:45:21 30117810 c (ecm) dvbapi (0D98@000004/0000/132F/80:1A8F17E7767705F3FB3758EE0198688B): found (88 ms) by orficecard (L/2/2/2) - ORF1 HD 2023/01/04 16:45:31 30117810 c (ecm) dvbapi (0D98@000004/0000/132F/80:E6BBFD62ECE2997A2D0E17A162215189): found (88 ms) by orficecard (L/2/2/2) - ORF1 HD 2023/01/04 16:45:41 30117810 c (ecm) dvbapi (0D98@000004/0000/132F/80:6CDB9C28FA8E0CD6026D2AF89F8B822C): found (88 ms) by orficecard (L/2/2/2) - ORF1 HD so i get the key's but screen is still black - i use -o ip:port,10 as mentioned in the post's above but even without 10 it makes not difference.

thanks holli

holli73 avatar Jan 04 '23 15:01 holli73

Can you provide minisatip log?

catalinii avatar Jan 04 '23 16:01 catalinii

@catalinii sure - any special trace i should enable?

holli73 avatar Jan 04 '23 16:01 holli73

-l http -f

catalinii avatar Jan 04 '23 19:01 catalinii

Hi @catalinii thanks a lot for implementing the Icam support. I did a quick test and for me it is working! I tested both, Icam channels and normal CSA. Both is working.

So I cannot confirm @holli73 findings. @holli73 which version of the libdvbcsa patch do you use? I have seen that there are more then one version, meanwhile,.. I have still the initial patch from the first post in this thread running.

localhosthack0r avatar Jan 05 '23 16:01 localhosthack0r

@localhosthack0r i did use the files from the first post - but i did still use the normal tvh and not the modified maybe this was the issue? is there somewhere a quick guide what needs to be done that minisatip uses dvbapi and tvh as client can watch both types of channels.

thanks holli

holli73 avatar Jan 06 '23 22:01 holli73

All clients using minisatip should work...please upload the log

catalinii avatar Jan 06 '23 22:01 catalinii

@catalinii

i did 2 tests -

  1. direct dvbapi connect to oscam with icam on (vuzero4k) and tvh as client minisatip.dbg.txt

  2. direct dvbapi connect to main oscam and this oscam is connect to icam oscam through cs378x minisatip2.dbg.txt

on both tries i had vlc running against the same channel through the vuzero4k and it worked fine

thanks holli

holli73 avatar Jan 06 '23 23:01 holli73

None of the logs show the latest minisatip version running.

Try to do git pull && make clean

catalinii avatar Jan 06 '23 23:01 catalinii

@catalinii sorry - i have a script to make this automated but no error handling in it ... i did modify the csa in the past and that was the reason the script did not pull because of stashed file...

i did a hard/reset/force and clean/build - now it is on the latest commit but still not working in my env. i just traced a try with setup 2 - from oscam log on vuzero it looks ok and the same on my main oscam:

2023/01/07 01:33:51 5CD2A92A p  (newcamd) CAID: 098D - UA: 0000000000000000 - Provider # 1
2023/01/07 01:33:51 5CD2A92A p  (newcamd) Provider ID: 000000 - SA: 00000000
2023/01/07 01:33:51 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:2F551C0CCF0609262233868A6646BBAC:3CDC994E2353805E0000000000000000): found (372 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:33:53 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:310E1EAD12A07513D08BFE945D930F67:000000000000000029674C35C6DE2B29): found (274 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:34:00 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:7FE115BA35416AA092B8ED1E5D6F78D0:52C2293A5D0779740000000000000000): found (268 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:34:07 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:468CD33B5B96F9279E30F2C815C37E40:000000000000000068F7525F83109B26): found (266 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:34:14 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:B758283A9222DC32AC10EDABC01D71CB:94AAD64518AF515C0000000000000000): found (290 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:34:21 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:98E1463263E35D04BE28EC5C2BAFB0B9:000000000000000042D396772E67B35B): found (276 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:34:28 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:29E23AC12CB7CACA33F9CD1B82051623:0A44C622AD92366C0000000000000000): found (292 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:34:35 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:BA214DAB5969C8B7B6BCB32E9821C2EC:000000000000000038952551073FF503): found (295 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:37:10 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:1EC69D581C37A077D935EDB7EFB0839A:00000000000000000D36D74DB836D001): found (55 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:37:16 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:6FFDD2DA56DBE081E5B7F1843AE8DDC5:A763D036062A710C0000000000000000): found (314 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:37:23 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:8F3A130D1BE81399368538A28D71AFBC:0000000000000000A4D5F42CBBCD917D): found (264 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:37:30 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:0EB75728E1BB7FFE352E09B18085C5F7:D9F78A778E2CBA640000000000000000): found (295 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:37:37 6EDC9330 c      (ecm) satip (098D&000000/1270/0074/B7:D5CFDB26F9CFBBFC04D014EBF9EB85A7:000000000000000081974B52423E050A): found (296 ms) by skyde2_main - Sky Cinema Action HD
2023/01/07 01:43:28 5CD2A92A p   (reader) skyde2_main [newcamd] disconnected: reason inactivity

here is the new minisatip capture: minisatip.dbg.txt

holli73 avatar Jan 07 '23 00:01 holli73