1. Diese Seite verwendet Cookies. Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies. Weitere Informationen

Infos KPCS Card Reader HowTo for CSP

Dieses Thema im Forum "CS KPCS" wurde erstellt von massendaten, 24. April 2012.

  1. massendaten
    Offline

    massendaten Spezialist

    Registriert:
    23. April 2009
    Beiträge:
    534
    Zustimmungen:
    82
    Punkte für Erfolge:
    28
    KPCS Card Reader HowTo for CSP

    '' You can copy and paste the commands in your putty console but do´nt forget to insert your username instead of

    mkdir /emu
    mkdir /emu/kpcs
    mkdir /emu/script
    mkdir /emu/log
    chmod 777 /emu
    chmod 777 /emu/*
    chown /emu
    chown /emu/*
    vim /emu/script/kpcs

    Now you must push “i” on your keyboard and insert the following

    #!/bin/sh
    CAMNAME=”KPCS Server”
    # end
    # This method starts KPCS
    start_cam ()
    {
    /emu/kpcs/kpcs &
    sleep 2
    }
    # This method stops KPCS
    stop_cam ()
    {
    pkill kpcs
    }
    case “$1″ in
    start)
    echo “[SCRIPT] $1: $CAMNAME”
    start_cam
    ;;
    stop)
    echo “[SCRIPT] $1: $CAMNAME”
    stop_cam
    ;;
    restart)
    echo “Restarting $CAMNAME”
    stop_cam
    start_cam
    ;;
    *)
    “$0″ stop
    exit 1
    ;;
    esac
    exit 0

    Save it by pushing “Esc” followed by “ZZ” on your Keyboard.

    Next commands are

    chmod 755 /emu/script/kpcs
    ln /emu/script/kpcs /bin/kpcs
    aptitude install proftpd

    During the install of proftpd comes a quest to select YES if you shure to install it, so you have to select YES.
    On the next question you should choose “stand-alone”.
    use your ftp programm (filezilla) to upload kpcs, ignore.list, kpcs.ac, kpcs.cert, kpcs.conf, kpcs.guess, kpcs.ird, kpcs.server, kpcs.services, kpcs.srvid and kpcs.user to /emu/kpcs.

    Next command is

    ln -s /emu/kpcs/ignore.list /usr/local/etc/ignore.list
    ln -s /emu/mpcs/kpcs.ac /usr/local/etc/kpcs.ac
    ln -s /emu/kpcs/kpcs.cert /usr/local/etc/kpcs.cert
    ln -s /emu/kpcs/kpcs.conf /usr/local/etc/kpcs.conf
    ln -s /emu/kpcs/kpcs.guess /usr/local/etc/kpcs.guess
    ln -s /emu/kpcs/kpcs.ird /usr/local/etc/kpcs.ird
    ln -s /emu/kpcs/kpcs.server /usr/local/etc/kpcs.server
    ln -s /emu/kpcs/kpcs.services /usr/local/etc/kpcs.services
    ln -s /emu/kpcs/kpcs.srvid /usr/local/etc/kpcs.srvid

    Use putty again to give kpcs execution rights

    chmod 755 /emu/kpcs/kpcs

    Now you can simply start, stop or restart newcs in telnet by typing

    kpcs start
    kpcs stop
    kpcs restart

    You should also use a config update script to update your kpcs.users file to a specified time in the night to prevent freezers in the primetime during updating your mpcs.users file

    vim /emu/script/configupdate_kpcs.sh

    Now you must push “i” on your keyboard and insert the following

    #!/bin/sh
    #Script to process new config and backup old one.
    SOURCE=/emu/kpcs
    TARGET=/usr/local/etc
    FILE=mpcs.user
    BACKUPDIR=/var/backup
    CONFIGOLD=kpcs.oldie
    if test -f $SOURCE/$FILE ; then
    echo “New Config Present”
    if test -d $BACKUPDIR ; then
    if test -f $BACKUPDIR/$CONFIGOLD ; then
    echo “Removing OLD config file from backup directory”
    rm $BACKUPDIR/$CONFIGOLD
    else
    echo “No OLD config to remove.”
    fi
    if test -f $BACKUPDIR/$FILE ; then
    echo “Renaming Backup to old config”
    cp $BACKUPDIR/$FILE $BACKUPDIR/$CONFIGOLD
    rm $BACKUPDIR/$FILE
    else
    echo “No Backupfile present yet”
    fi
    if test -f $TARGET/$FILE ; then
    echo “Copying Original config to Backup directory”
    cp $TARGET/$FILE $BACKUPDIR
    rm $TARGET/$FILE
    else
    echo “No Original Config File Present!?!?”
    fi
    else
    echo “Backup directory does not exist.”
    echo “making new directory”
    mkdir $BACKUPDIR
    if test -f $TARGET/$FILE ; then
    echo “Copying Original config to Backup directory”
    cp $TARGET/$FILE $BACKUPDIR
    else
    echo “No Original Config File Present!?!?”
    fi
    fi
    echo “Moving New config file to “$TARGET
    cp $SOURCE/$FILE $TARGET
    rm $SOURCE/$FILE
    else
    echo “No New Config present, Nothing to process”
    fi
    exit

    Save it by pushing “Esc” followed by “ZZ” on your Keyboard.

    Next commands are

    chmod 755 /emu/script/configupdate_kpcs.sh
    cd /etc
    vim crontab

    Now you must push “i” on your keyboard and insert the following at the bottom

    00 3 * * * root /emu/script/./configupdate_kpcs.sh >>/emu/log/configupdate_kpcs.log 2>&1

    Save it by pushing “Esc” followed by “ZZ” on your Keyboard.
    With the next settings kpcs will start on the next reboot.

    vim /etc/rc.local
    Now you must push “i” on your keyboard and insert the following line in the free line before “exit0″

    /bin/kpcs start &

    Save it by pushing “Esc” followed by “ZZ” on your Keyboard.
    To prepare your kpcs for the use with cccam, mbox, evocamd and mgcamd you must prepare your cardreader in kpcs.server, assign caids to ports in kpcs.conf and create your user entries in kpcs.users.
    I choose the newcs-protocol in my examples and the provider premie*e including the HD-Channels.
    Check also the file /emu/log/kpcs.log after your first start of kpcs.
    You have to edit your kpcs.server with this values.
    To do that enter the following

    vim /emu/kpcs/kpcs.server

    Now you must push “i” on your keyboard

    [reader]
    Label = N3HD
    Protocol = mouse
    Device = /dev/ttyUSB0
    EMMCache = 1,3,2
    Fallback = 0
    Detect = CD
    #CAID = 1702
    Group = 1

    Save it by pushing “Esc” followed by “ZZ” on your Keyboard.

    In the kpcs.conf you can activate and edit your prefered protocol like this

    vim /emu/kpcs/kpcs.conf

    Now you must push “i” on your keyboard

    [global]
    Nice = -1
    MaxLogsize = 100
    ClientTimeout = 5
    Level = 15
    ClientMaxIdle = 120
    CacheDelay = 20
    BindWait = 60
    ResolveDelay = 15
    LogFile = /emu/log/kpcs.log
    #LogFile = stdout
    Sleep = 0
    [monitor]
    Port = 0
    NoCrypt = 127.0.0.1
    NoCrypt = 10.0.0.0-10.255.255.255
    NoCrypt = 172.16.0.0-172.31.255.255
    NoCrypt = 192.168.0.0-192.168.255.255
    HideClient_TO = 1
    AULow = 120
    MonLevel = 1
    [anticasc]
    enabled =1
    numUsers =1
    sampleTime =3
    penalty =0
    acLogFile =/tmp/aclog.log
    fakeDelay =200
    samples =10
    denySamples =9
    [newcamd]
    Key = 0102030405060708091011121314
    #Port = 17000@1833:FFFFFF
    Port = 17000@1702:FFFFFF;17001@1833:FFFFFF;17002@1801:FFF FFF
    #[radegast]
    #Port = 60000
    #User = tuner
    #Allowed = 192.168.178.10-192.168.178.20
    #[cs378x]
    #Port = 11005
    #Port = 11005@1702:FFFFFF;11006@1722:FFFFFF;11007@1801:FFF FFF;11008@1833:FFFFFF
    #[cs357x]
    #Port = 11005
    #[gbox]
    #Password = 9ADFA417
    #MaxDist = 4
    #CardInfos = cards.info
    #IgnoreList = ignore.list
    #OnlineInfos = share.onl
    #Locals = 17220000,18010501,0D220400
    #[camd35]
    #Port = 11005

    Save it by pushing “Esc” followed by “ZZ” on your Keyboard.

    To activate some users you´ve also to edit the kpcs.users file in this way

    vim /emu/kpcs/kpcs.users

    Now you must push “i” on your keyboard

    [account]
    User = au
    Pwd = au
    Group = 1
    MonLevel = 0
    AU = N3HD
    CAID = 1702,1801,1833
    #Betatunnel = .:,.:
    Betatunnel = 1833.0081:1702,1833.0082:1702
    Save it by pushing “Esc” followed by “ZZ” on your Keyboard.

    Now jcreate profiles as local host on CSP & assign user name + port pre configured on KPCS

     
    Zuletzt von einem Moderator bearbeitet: 26. April 2012
    #1

Diese Seite empfehlen