Changeset 1072 for branches/smartreader
- Timestamp:
- 01/05/10 17:12:05 (14 years ago)
- Location:
- branches/smartreader
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/Distribution/doc/man/oscam.user.5
r1062 r1072 40 40 \fB2\fP = set user to fake if source ip is different 41 41 (e.g. for newcamd clients with different CAIDs and ports) 42 \fB3\fP = only one connection per user, but only the last login 43 will survive (old mpcs behavior) 42 44 .RE 43 45 .PP -
branches/smartreader/Distribution/doc/txt/oscam.user.txt
r1062 r1072 35 35 2 = set user to fake if source ip is different 36 36 (e.g. for newcamd clients with different CAIDs and ports) 37 3 = only one connection per user, but only the last login 38 will survive (old mpcs behavior) 37 39 38 40 sleep = minutes -
branches/smartreader/csctapi/atr.c
r924 r1072 25 25 #include "defines.h" 26 26 #include "atr.h" 27 #include "../globals.h" 27 28 #include <stdlib.h> 28 29 #include <string.h> … … 32 33 */ 33 34 34 staticunsigned long atr_fs_table[16] = {0, 5000000L, 6000000L, 8000000L, 12000000L, 16000000L, 20000000L, 0, 0, 5000000L, 7500000L, 10000000L, 15000000L, 20000000L, 0, 0};35 unsigned long atr_fs_table[16] = {0, 5000000L, 6000000L, 8000000L, 12000000L, 16000000L, 20000000L, 0, 0, 5000000L, 7500000L, 10000000L, 15000000L, 20000000L, 0, 0}; 35 36 36 37 static unsigned atr_num_ib_table[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; -
branches/smartreader/csctapi/atr.h
r842 r1072 99 99 */ 100 100 101 extern unsigned long atr_fs_table[16]; 101 102 extern unsigned atr_f_table[16]; 102 103 extern double atr_d_table[16]; -
branches/smartreader/csctapi/icc_async.c
r924 r1072 179 179 return ICC_ASYNC_IFD_ERROR; 180 180 181 cs_debug("Set Timings: T=%d FI=%d ETU=%d WWT=%d CWT=%d BWT=%d EGT=%d clock=%d check=%d P=%d I=%d U=%d", (int)params.T,(int)params.FI, (int)params.ETU, (int)params.WWT, (int)params.CWT, (int)params.BWT, (int)params.EGT, (int)params.clock_stop_polarity, (int)params.check, (int)params.P, (int)params.I, (int)params.U);181 cs_debug("Set Timings: T=%d fs=%lu ETU=%d WWT=%d CWT=%d BWT=%d EGT=%d clock=%d check=%d P=%d I=%d U=%d", (int)params.T, params.fs, (int)params.ETU, (int)params.WWT, (int)params.CWT, (int)params.BWT, (int)params.EGT, (int)params.clock_stop_polarity, (int)params.check, (int)params.P, (int)params.I, (int)params.U); 182 182 } 183 183 #endif -
branches/smartreader/csctapi/ifd_towitoko.c
r842 r1072 562 562 if(ioctl(ifd->io->fd, IOCTL_SET_RESET)<0) 563 563 return IFD_TOWITOKO_IO_ERROR; 564 565 if(ioctl(ifd->io->fd, IOCTL_SET_ATR_READY)<0) 566 return IFD_TOWITOKO_IO_ERROR; 567 564 568 565 #ifdef SH4 569 566 gettimeofday(&tv,0); -
branches/smartreader/csctapi/pps.c
r1062 r1072 218 218 if (!PPS_success) {//last PPS not succesfull 219 219 BYTE TA1; 220 if (ATR_GetInterfaceByte (atr, 1 , ATR_INTERFACE_BYTE_TA, &TA1) == ATR_OK && pps->parameters.t != 14) {220 if (ATR_GetInterfaceByte (atr, 1 , ATR_INTERFACE_BYTE_TA, &TA1) == ATR_OK) { 221 221 pps->parameters.FI = TA1 >> 4; 222 222 ATR_GetParameter (atr, ATR_PARAMETER_D, &(pps->parameters.d)); 223 223 } 224 else { //do not obey TA1 if T14224 else { //do not obey TA1 225 225 pps->parameters.FI = ATR_DEFAULT_FI; 226 226 pps->parameters.d = ATR_DEFAULT_D; 227 227 } 228 // Get protocol offered by interface bytes T*2 if TD1 available,229 // FIXME or would it be wiser to not switch anything and stick to 9600?230 228 ATR_GetProtocolType (atr, 1, &(pps->parameters.t)); 231 229 protocol_selected = 1; … … 392 390 int n; 393 391 SCI_PARAMETERS params; 394 int m;395 392 //memset(¶ms,0,sizeof(SCI_PARAMETERS)); 396 393 if (ioctl(pps->icc->ifd->io->fd, IOCTL_GET_PARAMETERS, ¶ms) < 0 ) … … 401 398 params.T = pps->parameters.t; 402 399 403 BYTE oldFI = params.FI; 404 // params.FI = pps->parameters.FI; //somehow setting this gets "card unsupported" 405 /* if (pps->icc->ifd->io->mhz > 368) { 406 int number_of_overclock_steps = ((pps->icc->ifd->io->mhz)/200) - 2; //600 is 1 overclock, 800 2 overclocks etc. 407 do 408 { 409 if (params.FI != 1 && params.FI != 9) 410 params.FI --; 411 number_of_overclock_steps --; 412 } while (number_of_overclock_steps > 0); 413 }*/ 400 params.fs = atr_fs_table[pps->parameters.FI] / 1000000; 401 ulong oldfs = params.fs; 414 402 if (pps->icc->ifd->io->mhz == 600) 415 params. FI = 5; //routine above should be tested so hardcoding can get removed416 417 if (old FI != params.FI)418 cs_log("Forcing params. FI from %i to %i", oldFI, params.FI);403 params.fs = 5; 404 405 if (oldfs != params.fs) 406 cs_log("Forcing params.fs from %lu mhz to %lu mhz", oldfs, params.fs); 419 407 420 408 double F = (double) atr_f_table[pps->parameters.FI]; … … 431 419 params.I=(unsigned char)a; 432 420 421 cs_debug("Setting T=%d fs=%lu mhz ETU=%d WWT=%d CWT=%d BWT=%d EGT=%d clock=%d check=%d P=%d I=%d U=%d", (int)params.T, params.fs, (int)params.ETU, (int)params.WWT, (int)params.CWT, (int)params.BWT, (int)params.EGT, (int)params.clock_stop_polarity, (int)params.check, (int)params.P, (int)params.I, (int)params.U); 422 433 423 if (ioctl(pps->icc->ifd->io->fd, IOCTL_SET_PARAMETERS, ¶ms)!=0) 434 424 return PPS_ICC_ERROR; 435 436 ioctl(pps->icc->ifd->io->fd, IOCTL_GET_PARAMETERS, ¶ms); 437 438 cs_debug("T=%d f=%d ETU=%d WWT=%d CWT=%d BWT=%d EGT=%d clock=%d check=%d P=%d I=%d U=%d", (int)params.T,(int)atr_f_table[pps->parameters.FI], (int)params.ETU, (int)params.WWT, (int)params.CWT, (int)params.BWT, (int)params.EGT, (int)params.clock_stop_polarity, (int)params.check, (int)params.P, (int)params.I, (int)params.U); 425 426 if (ioctl(pps->icc->ifd->io->fd, IOCTL_SET_ATR_READY)<0) 427 return IFD_TOWITOKO_IO_ERROR; 439 428 } 440 429 #endif -
branches/smartreader/csctapi/sci_global.h
r842 r1072 83 83 { 84 84 UCHAR T; 85 ULONG FI;85 ULONG fs; 86 86 ULONG ETU; 87 87 ULONG WWT; -
branches/smartreader/oscam.c
r1016 r1072 120 120 { 121 121 fprintf(stderr, "%s\n\n", logo); 122 fprintf(stderr, "OSCam cardserver v%s, build #%s (%s) - (w) 2009 streamboard SVN\n", CS_VERSION_X, CS_SVN_VERSION, CS_OSTYPE);122 fprintf(stderr, "OSCam cardserver v%s, build #%s (%s) - (w) 2009-2010 streamboard SVN\n", CS_VERSION_X, CS_SVN_VERSION, CS_OSTYPE); 123 123 fprintf(stderr, "\tsee http://streamboard.gmc.to:8001/ for more details\n"); 124 124 fprintf(stderr, "\tbased on streamboard mp-cardserver v0.9d - (w) 2004-2007 by dukat\n\n"); … … 1043 1043 static void cs_fake_client(char *usr, int uniq, in_addr_t ip) 1044 1044 { 1045 /* - Uniq = 1: only one connection per user 1046 * - Uniq = 2: set user only to fake if source ip is different (e.g. for 1047 * newcamd clients with different CAID's -> Ports) 1048 */ 1045 /* Uniq = 1: only one connection per user 1046 * 1047 * Uniq = 2: set (new connected) user only to fake if source 1048 * ip is different (e.g. for newcamd clients with 1049 * different CAID's -> Ports) 1050 * 1051 * Uniq = 3: only one connection per user, but only the last 1052 * login will survive (old mpcs behavior) 1053 */ 1049 1054 1050 1055 int i; … … 1052 1057 for (i=cdiff+1; i<CS_MAXPID; i++) { 1053 1058 if (client[i].pid 1054 && (client[i].typ == 'c') 1055 && !client[i].dup 1056 && !strcmp(client[i].usr, usr) 1057 && ((uniq == 1) || (client[i].ip != ip))) 1058 { 1059 client[cs_idx].dup = 1; 1060 client[cs_idx].au = -1; 1061 cs_log("client(%d) duplicate user '%s' from %s set to fake (uniq=%d)", cs_idx-cdiff, usr, cs_inet_ntoa(ip), uniq); 1062 break; 1063 } 1059 && (client[i].typ == 'c') 1060 && !client[i].dup 1061 && !strcmp(client[i].usr, usr) 1062 && ((uniq != 2) || (client[i].ip != ip))) 1063 { 1064 if (uniq == 3) 1065 { 1066 client[i].dup = 1; 1067 client[i].au = -1; 1068 cs_log("client(%d) duplicate user '%s' from %s set to fake (uniq=%d)", i-cdiff, usr, cs_inet_ntoa(ip), uniq); 1069 } 1070 else 1071 { 1072 client[cs_idx].dup = 1; 1073 client[cs_idx].au = -1; 1074 cs_log("client(%d) duplicate user '%s' from %s set to fake (uniq=%d)", cs_idx-cdiff, usr, cs_inet_ntoa(ip), uniq); 1075 break; 1076 } 1077 } 1064 1078 } 1065 1079 } -
branches/smartreader/reader-videoguard2.c
r842 r1072 594 594 unsigned char atr_viasat_scandinavia[] = { 0x3F, 0x7F, 0x11, 0x25, 0x03, 0x33, 0xB0, 0x09, 0x69, 0xFF, 0x4A, 0x50, 0x70, 0x00, 0x00, 0x56, 0x54, 0x01, 0x00, 0x00 }; 595 595 unsigned char atr_premiere[] = { 0x3F, 0xFF, 0x11, 0x25, 0x03, 0x10, 0x80, 0x41, 0xB0, 0x07, 0x69, 0xFF, 0x4A, 0x50, 0x70, 0x00, 0x00, 0x50, 0x31, 0x01, 0x00, 0x11 }; 596 unsigned char atr_kbw[] = { 0x3F, 0xFF, 0x14, 0x25, 0x03, 0x10, 0x80, 0x54, 0xB0, 0x01, 0x69, 0xFF, 0x4A, 0x50, 0x70, 0x00, 0x00, 0x4B, 0x57, 0x01, 0x00, 0x00}; 596 597 597 598 if ((atrsize == sizeof (atr_bskyb)) && (memcmp (atr, atr_bskyb, atrsize) == 0)) … … 632 633 { 633 634 cs_log("Type: Videoguard Sky Germany"); 635 } 636 else if ((atrsize == sizeof (atr_kbw)) && (memcmp (atr, atr_kbw, atrsize) == 0)) 637 { 638 cs_log("Type: Videoguard Kabel BW"); 634 639 } 635 640 /* else
Note:
See TracChangeset
for help on using the changeset viewer.