Changeset 3077 for trunk/reader-videoguard2.c
- Timestamp:
- 09/16/10 23:21:30 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reader-videoguard2.c
r3073 r3077 9 9 int l; 10 10 11 static const unsigned char ins2a[5] = { 0xd0,0x2a,0x00,0x00,0x00 }; 12 if(cmd_exists(ins2a)) { //ins2a is not needed and causes an error on some cards eg Sky Italy 09CD 11 static unsigned char ins76[5] = { 0xd0,0x76,0x00,0x00,0x00 }; 12 13 /* test if ins2a needs to run 14 ins2a is not needed and causes an error on some cards eg Sky Italy 09CD 15 but when not run on others no tier information is returned eg 09AC 16 if we get tier info ins2a is not needed otherwise try running it 17 */ 18 l=do_cmd(reader, ins76,NULL,NULL,cta_res); 19 if(l<0 || !status_ok(cta_res+l)){ 20 cs_log ("[videoguard2-reader] cmd ins76 failed"); 21 return; 22 } 23 if(cta_res[2]==0 && cta_res[3]==0){ // no tier info try running ins2a 24 static const unsigned char ins2a[5] = { 0xd0,0x2a,0x00,0x00,0x00 }; 13 25 l=do_cmd(reader, ins2a,NULL,NULL,cta_res); 14 26 if(l<0 || !status_ok(cta_res+l)){ … … 18 30 } 19 31 20 static unsigned char ins76[5] = { 0xd0,0x76,0x00,0x00,0x00 }; 21 ins76[3]=0x7f; ins76[4]=2; 22 if(!write_cmd_vg(ins76,NULL) || !status_ok(cta_res+2)) return; 23 ins76[3]=0; ins76[4]=0; 32 static unsigned char ins76007f[5] = { 0xd0,0x76,0x00,0x7f,0x02 }; 33 if(!write_cmd_vg(ins76007f,NULL) || !status_ok(cta_res+2)){ 34 cs_log ("[videoguard2-reader] cmd ins76007f failed"); 35 return; 36 } 24 37 int num=cta_res[1]; 25 38 int i;
Note:
See TracChangeset
for help on using the changeset viewer.