Changeset 2854


Ignore:
Timestamp:
07/26/10 16:31:12 (11 years ago)
Author:
lattjo
Message:

Added support for AD-Teknik multiprogrammer 3.5 and 3.6.
No need to set it into phoenix mode anymore and also support for clocking cards to 6MHz through oscam config.

Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/csctapi/icc_async.c

    r2330 r2854  
    3434#include "io_serial.h"
    3535#include "ifd_cool.h"
     36#include "ifd_mp35.h"
    3637#include "ifd_phoenix.h"
    3738#include "ifd_sc8in1.h"
     
    8788            reader->slot=(int)reader->device[pos+1] - 0x30;//FIXME test boundaries
    8889            reader->device[pos]= 0; //slot 1 reader now gets correct physicalname
     90        case R_MP35:
    8991        case R_MOUSE:
    9092            reader->handle = open (reader->device,  O_RDWR | O_NOCTTY| O_NONBLOCK);
     
    142144    }
    143145   
    144     if (reader->typ <= R_MOUSE)
     146    if (reader->typ == R_MP35)
     147    {
     148        MP35_Init(reader);
     149    }
     150    else if (reader->typ <= R_MOUSE)
    145151        if (Phoenix_Init(reader)) {
    146152                cs_log("ERROR: Phoenix_Init returns error");
     
    182188            call (Sc8in1_GetStatus(reader, &in));
    183189            break;
     190        case R_MP35:
     191//          call (MP35_GetStatus(reader, &in));
     192//          break;
    184193        case R_MOUSE:
    185194            call (Phoenix_GetStatus(reader, &in));
     
    224233    else {
    225234        switch(reader->typ) {
     235            case R_MP35:
    226236            case R_DB2COM1:
    227237            case R_DB2COM2:
     
    330340
    331341    switch(reader->typ) {
     342        case R_MP35:
    332343        case R_DB2COM1:
    333344        case R_DB2COM2:
     
    362373{
    363374    switch(reader->typ) {
     375        case R_MP35:
    364376        case R_DB2COM1:
    365377        case R_DB2COM2:
     
    397409
    398410    switch(reader->typ) {
     411        case R_MP35:
     412            call (MP35_Close(reader));
     413            break;
    399414        case R_DB2COM1:
    400415        case R_DB2COM2:
     
    645660{
    646661    switch(reader->typ) {
     662        case R_MP35:
    647663        case R_DB2COM1:
    648664        case R_DB2COM2:
  • trunk/csctapi/ifd_phoenix.c

    r2561 r2854  
    44*/
    55#include <stdio.h>
    6 //#include <time.h>
    7 //#include <string.h>
    8 //#include "ioctls.h"
    96#include "../globals.h"
    107#include "atr.h"
     
    244241int Phoenix_Close (struct s_reader * reader)
    245242{
     243    cs_debug_mask (D_IFD, "IFD: Closing phoenix device %s", reader->device);
    246244#ifdef USE_GPIO //felix: close dev if card detected
    247245    if(gpio_detect)
     
    253251#endif
    254252    IO_Serial_Close(reader);
    255     cs_debug_mask (D_IFD, "IFD: Closing phoenix device %s", reader->device);
    256253    return OK;
    257254}
  • trunk/csctapi/io_serial.c

    r2172 r2854  
    377377}
    378378
     379void IO_Serial_Sendbreak(struct s_reader * reader, int duration)
     380{
     381    tcsendbreak (reader->handle, duration);
     382}
    379383
    380384bool IO_Serial_Read (struct s_reader * reader, unsigned timeout, unsigned size, BYTE * data)
     
    441445}
    442446
    443 bool IO_Serial_Write (struct s_reader * reader, unsigned delay, unsigned size, BYTE * data)
     447bool IO_Serial_Write (struct s_reader * reader, unsigned delay, unsigned size, const BYTE * data)
    444448{
    445449    unsigned count, to_send, i_w;
     
    492496{
    493497   
    494     cs_debug ("IO: Clossing serial port %s\n", reader->device);
     498    cs_debug ("IO: Closing serial port %s\n", reader->device);
    495499   
    496500#if defined(TUXBOX) && defined(PPC)
     
    698702        return OK;
    699703}
    700  
  • trunk/csctapi/io_serial.h

    r2687 r2854  
    8282/* Input and output */
    8383bool IO_Serial_Read (struct s_reader * reader, unsigned timeout, unsigned size, BYTE * data);
    84 bool IO_Serial_Write (struct s_reader * reader, unsigned delay, unsigned size, BYTE * data);
     84bool IO_Serial_Write (struct s_reader * reader, unsigned delay, unsigned size, const BYTE * data);
     85void IO_Serial_Sendbreak (struct s_reader * reader, int duration);
    8586
    8687#endif /* IO_SERIAL */
  • trunk/globals.h

    r2851 r2854  
    135135#define D_ALL_DUMP  255 // dumps all
    136136
    137 #define R_DB2COM1       0x1 // Reader Dbox2 @ com1
    138 #define R_DB2COM2       0x2 // Reader Dbox2 @ com1
     137#define R_DB2COM1   0x1 // Reader Dbox2 @ com1
     138#define R_DB2COM2   0x2 // Reader Dbox2 @ com1
    139139#define R_SC8in1    0x3 // Reader smartcard mouse
    140 #define R_MOUSE     0x4 // Reader smartcard mouse
     140#define R_MP35      0x4 // AD-Teknik Multiprogrammer 3.5 and 3.6 (only usb tested)
     141#define R_MOUSE     0x5 // Reader smartcard mouse
    141142/////////////////// phoenix readers which need baudrate setting and timings need to be guarded by OSCam: BEFORE R_MOUSE
    142 #define R_INTERNAL  0x5 // Reader smartcard intern
     143#define R_INTERNAL  0x10 // Reader smartcard intern
    143144/////////////////// internal readers (Dreambox, Coolstream, IPBox) are all R_INTERNAL, they are determined compile-time
    144145/////////////////// readers that do not reed baudrate setting and timings are guarded by reader itself (large buffer built in): AFTER R_SMART
    145 #define R_SMART     0x6 // Smartreader+
    146 #define R_PCSC          0x7 // PCSC
     146#define R_SMART     0x11 // Smartreader+
     147#define R_PCSC      0x12 // PCSC
    147148/////////////////// proxy readers after R_CS378X
    148 #define R_CAMD35    0x10  // Reader cascading camd 3.5x
    149 #define R_CAMD33    0x11  // Reader cascading camd 3.3x
    150 #define R_NEWCAMD   0x12  // Reader cascading newcamd
    151 #define R_RADEGAST  0x13  // Reader cascading radegast
    152 #define R_CS378X    0x14  // Reader cascading camd 3.5x TCP
    153 #define R_CONSTCW   0x15  // Reader for Constant CW
     149#define R_CAMD35    0x20  // Reader cascading camd 3.5x
     150#define R_CAMD33    0x21  // Reader cascading camd 3.3x
     151#define R_NEWCAMD   0x22  // Reader cascading newcamd
     152#define R_RADEGAST  0x23  // Reader cascading radegast
     153#define R_CS378X    0x24  // Reader cascading camd 3.5x TCP
     154#define R_CONSTCW   0x25  // Reader for Constant CW
    154155/////////////////// peer to peer proxy readers after R_CCCAM
    155156#ifdef CS_WITH_GBOX
    156 #define R_GBOX      0x20  // Reader cascading gbox
    157 #endif
    158 #define R_CCCAM     0x25  // Reader cascading cccam
     157#define R_GBOX      0x30  // Reader cascading gbox
     158#endif
     159#define R_CCCAM     0x35  // Reader cascading cccam
    159160#define R_SERIAL    0x80  // Reader serial
    160161#define R_IS_NETWORK    0x70
    161 #define R_IS_CASCADING  0xF0
     162#define R_IS_CASCADING  0xE0
    162163
    163164
  • trunk/oscam-config.c

    r2826 r2854  
    21642164            char *ctyp ="";
    21652165            switch(reader[i].typ) { /* TODO like ph*/
     2166                case R_MP35 :
     2167                    ctyp = "mp35";
     2168                    isphysical = 1;
     2169                    break;
    21662170                case R_MOUSE    :
    21672171                    ctyp = "mouse";
     
    30873091    if (!strcmp(token, "protocol")) {
    30883092
     3093        if (!strcmp(value, "mp35")) {
     3094            rdr->typ = R_MP35;
     3095            return;
     3096        }
     3097
    30893098        if (!strcmp(value, "mouse")) {
    30903099            rdr->typ = R_MOUSE;
  • trunk/oscam-http.c

    r2847 r2854  
    678678
    679679            switch(reader[readeridx].typ) {
     680            case R_MP35 :
     681                ctyp = "mp35";
     682                isphysical = 1;
     683                break;
    680684            case R_MOUSE :
    681685                ctyp = "mouse";
     
    10411045        case R_DB2COM1:
    10421046        case R_DB2COM2:
     1047        case R_MP35:
    10431048        case R_MOUSE :
    10441049            tpl_addVar(vars, 0, "PROTOCOL", "mouse");
Note: See TracChangeset for help on using the changeset viewer.