EMM patch for remote readers with multi cards/caids
I noticed that if a remote reader like a CAMD35 or CCCAM have more than a card, so a "multi caid", oscam may not send emm to it. (It happened to me just these days)
This happens because the function "emm_reader_match" in "oscam-emm.c" reason by matching the "caid" field of the "reader" with that of EMM packet. (row 198 of r11748)
So for example:
-
Oscam "skip" emm send to CS378X reader if the last ECM asked to it doesn't have the SAME caid of EMM packet. Because the field "caid" of "reader" struct is setted only when get ECM from CS378X reader and it's value is always the last caid of the last ECM. But a CS378X could be have than one caid.
-
Same problem with CCCAM reader, oscam set the field "caid" of structure "reader" with the LAST CAID that "receive" at "boot" of remote reader. (If the cards have a valid UA).
The value of "caid" in reader struct could change depending on the CAID of ECMs you require. (If get an ECM from an CAID with valid UA, oscam update the caid in the struct)
It doesn't seem wise to use the field CAID for matching reader that can have multiple card/caid, this field contains only one of "valid" CAID selectable for remote reader.
I wrote a little patch that change this "behavior".
For CAMD35 we cannot do better... I think
Instead for CCCAM, in this way the "caid matching" it's done in "module-cccam.c", and we can increase "EMM-SKIP" counter if CAID doens't match.(I did that in the patch, but we can also choose to not increase any counters)
I did a bit of testing and all is work good and I think that there isn't any problem to add patch to trunk. Now I'am able to send EMM of multiple CAIDs to remote readers.
forum thread => https://board.streamboard.tv/forum/thread/48359-emm-patch-for-remote-readers-with-multi-cards-caids