home       inleiding       sysadmin       services       links       bash       werk       nothing      

oscam op vu+ (zero) (blackhole)

ik heb alleen lokale toegang (op de vu+ zelf) nodig tot de kaartlezer. De vu+ annex blackhole komt zonder software voor de kaartlezer.

  1. installeer blackhole (in juni 2016: BlackHole-3.0.2-vuzero_usb_release_20160516_e6f1d77)
    unzip de file naar USB-stick en start de vu+ op vanaf de USB-stick
    konfigureer vervolgens blackhole

  2. download (of compileer) oscam voor de vu+ -- (mipsel-unknown-linux-gnu)
    (in juni 2016: oscam-svn11245-mips-tuxbox-oe2.0-webif-Distribution)

  3. kopieer de ge-untar.gz of geunzippedte versie naar /sbin met scp

  4. chmod +x /sbin/oscam

  5. plaats een opstartscript in /etc/init.d voor oscam
    NAME=oscam
    DAEMON=/sbin/$NAME
    CONFIG_DIR=/etc/oscam
    PIDFILE=/var/run/$NAME.pid
    LOG=/var/log/oscam/oscam.log
    LOGUSR=/var/log/oscam/oscamuser.log
    LOGCW=/var/log/oscam/cw.log
    STARTAS="$DAEMON -- -b -c $CONFIG_DIR"
     
    [ -x $DAEMON ] || exit 0
    [ -d $CONFIG_DIR ] || exit 0
     
    echo $NAME
    clear_file() {
    if [ -e $PIDFILE ]
    then
    rm -f $PIDFILE
    fi
    }
     
    case "$1" in
    start)
    clear_file
    echo "Starting oscam daemon" "oscam"
    start-stop-daemon --start --quiet --background --pidfile $PIDFILE --make-pidfile --exe $DAEMON --startas $STARTAS
    ;;
    stop)
    echo "Stopping oscam daemon" "oscam"
    start-stop-daemon --stop --quiet --exe $DAEMON
    ;;
    restart)
    echo "Restarting oscam daemon" "oscam"
    start-stop-daemon --stop --retry 5 --quiet --exe $DAEMON
    clear_file
    start-stop-daemon --start --quiet --background --pidfile $PIDFILE --make-pidfile --exe $DAEMON --startas $STARTAS
    ;;
    status)
    status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
    ;;
    *)
    echo "Usage: /etc/init.d/oscam {start|stop|restart|status}"
    exit 2
    ;;
    esac
    exit 0
  6. maak symbolic links naar /etc/rc3.d (en rc5.d )
    # ln -s /etc/init.d/oscam /etc/rc3.d/S50oscam
    # ln -s /etc/init.d/oscam /etc/rc5.d/S40oscam

  7. maak een directory /etc/oscam

  8. plaats in /etc/oscam de volgende files:
    -rw-r--r--    1 root     root           511 Jun 22 09:42 oscam.conf
    -rw-r--r--    1 root     root           243 Jun 22 09:41 oscam.server

    oscam.conf

    [global]
    logfile = /tmp/.oscam/oscam.log
    disablelog = 1
    nice = -1
    saveinithistory = 1
    dropdups = 1
    lb_mode = 1
    lb_save = 120
    lb_savepath =
    lb_stat_cleanup = 12
     
    [monitor]
    port = 16500
    nocrypt = 127.0.0.1,192.168.0.0-192.168.255.255
    hideclient_to = 15
    monlevel = 4
    appendchaninfo = 1
     
    [cccam]
    port = 12000
    reshare = 1
    version = 2.3.0
     
    [dvbapi]
    enabled = 1
    au = 1
    boxtype = dreambox
    user = root
     
    [webif]
    httpport = 8081
    httprefresh = 30
    httpallowed = 127.0.0.1,192.168.0.0-192.168.255.255
    httphideidleclients = 1

    oscam.server

    [reader]
    label = first_internal_reader
    description = For dreambox lower smartcard slot, for VU+ DUO upper slot
    protocol = internal
    device = /dev/sci0
    detect = cd
    group = 1
    emmcache = 1,1,0
    dropbadcws = 1
    ratelimitecm = 4
    ratelimitseconds = 11
  9. start de oscam service
    # /etc/init.d/oscam start
     
  10. oscam leest nu de kaart voor de lokale machine
    oscam creëert ook nog 2 files in de /etc/oscam directory
    -rw-r--r--    1 root     root          2552 Sep  9 15:47 oscam.ccache
    -rw-r--r--    1 root     root           183 Jun 22 09:36 oscam.srvid2
  11. that's all folx