Opened 11 years ago

Closed 11 years ago

#2689 closed enhancement (fixed)

patch to show rom version in reader-entitlement section for vg2 card

Reported by: lintendo Owned by: alno
Priority: minor Component: Webinterface
Severity: low Keywords: ins02 rom version
Cc: gf@… Sensitive: no


Reason for enhancement

Esthetic, this can help for the identification of new vg2 cards. The feature is already supported for n4gra cards

Possible impacts on other features

none, ins02 is supported by all vg2 cards

Attachments (2)

vg2-ins02.patch (900 bytes ) - added by lintendo 11 years ago.
correct version please test and report
reader-videoguard2.c.rom.patch (971 bytes ) - added by gf 11 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by angelofsky1980, 11 years ago

Tested on rev7255 and Sky Ita card (093b) and the result in reader (internal slot of Vu+Ultimo box) is: ITTVLJ

comment:2 by gf, 11 years ago

The patch looks simple enough, although it is missing checks for returned length, it should be at lease 16 before the data is copied to reader->rom and also I'm not sure if this command returns error the whole function should return error. What if some cards do not answer to this command, this patch would break the support for them.

Anybody familiar with VG, should this be applied (after fixes of course)?

comment:3 by lintendo, 11 years ago

first of all thanks for testing and comments
I have corrected the patch for non ascii characters.
The ins 02 is standard in all logs from different vg2 cards that i seen, they use the same structure.
reader->rom is 16 byte only for nagr@ systems. For ndz we need only 8 byte (9 with space between card type and rom version). I have initialized reader->rom with 16x0 but it don't need.
I removed return error in order to avoid supporting problems to "exotic" cards.
Please test it and report if it works.. because now i'm on holiday, far away from a card :)

by lintendo, 11 years ago

Attachment: vg2-ins02.patch added

correct version please test and report

comment:4 by lintendo, 11 years ago

back from holidays :(

new patch is ok

tested with:

ITTV-30LJ 93b
ITTV-40T4 9cd

(I removed return error if ins02 is not supported)

comment:5 by gf, 11 years ago

Ok, I think I'll apply this (after fixing the funky whitespace).

comment:6 by gf, 11 years ago

How about the attached patch. I have cleaned up your patch a little bit, added more checks and made the copying logic easier to read IMO. I hope I didn't break something.

comment:7 by lintendo, 11 years ago

359 } else {
360 cta_res[i] = '*';

is wrong bcs in this way oscam displays only numbers and no letters. For example:

D0 02 00 00 08
49 54 54 56 02 00 4c 45
90 00

49 54 54 56 =>card type (ITTV) 4 bytes in ascii
02 00 4c 45 =>rom version (20LE) first 2 byte not ascii + 2 bytes ascii
90 00

with cta_res[i] = '*';
reader->rom is [* * * * - 2 0 * * 0 0 0 0 0 0 0]

comment:8 by gf, 11 years ago

Ah, I wasn't sure what is there besides numbers, change the check to:

diff --git a/reader-videoguard2.c b/reader-videoguard2.c
index ab1f5a7..4310ef5 100644
--- a/reader-videoguard2.c
+++ b/reader-videoguard2.c
@@ -356,7 +356,7 @@ static int32_t videoguard2_card_init(struct s_reader * reader, ATR *newatr)
     for (i = 0; i < 8; i++) {
       if (cta_res[i] <= 0x09) {
         cta_res[i] = cta_res[i] + 0x30;
-      } else {
+      } else if (!isalnum(cta_res[i])) {
         cta_res[i] = '*';

That would do trick the trick and be safe.

comment:9 by lintendo, 11 years ago

ok re-tested!
All right :)

comment:10 by gf, 11 years ago

Cc: gf@… added
Resolution: fixed
Status: newclosed

Patch commited in r7278. Thanks.

Note: See TracTickets for help on using tickets.