Oscam startup problem with mgcamd

  • Hi,i have oscam as cardserver and mgcamd as softcam,but problem is that mgcamd starts ok,but oscam sometimes start sometimes i need to start it manually. I have conax local for oscam that needs to get updated also. Using OpenPli 4 image.


    here is my config:


    oscam.config


    [global]
    logfile = /tmp/.oscam/oscam.log
    disablelog = 1
    nice = -1
    dropdups = 1
    lb_mode = 1
    lb_save = 120
    lb_savepath =
    lb_stat_cleanup = 12


    [newcamd]
    port = 10001@0B00:000000
    key = 0102030405060708091011121314
    allowed = 127.0.0.1,192.168.0.10-192.168.0.20
    keepalive = 1
    mgclient = 1


    [dvbapi]
    enabled = 0
    au = 1
    user = linuxsat
    boxtype = dreambox


    [monitor]
    port = 16000
    nocrypt = 127.0.0.1,192.168.0.0-192.168.0.255
    #You are allowed to monitor from localhost, and all LAN with home ip.
    hideclient_to = 15
    #Hide clients from monitor or webinterface after 15 seconds idleness.
    monlevel = 4



    [webif]
    httpport = 16005
    httpuser = root
    httppwd = dreambox
    httprefresh = 10
    httpallowed = 127.0.0.1,192.168.0.0-192.168.0.255


    -----------------------------------------------------------------------


    oscam.reader



    [reader]
    label = lower_card
    enable = 1
    protocol = internal
    device = /dev/sci0
    detect = cd
    group = 1
    emmcache = 1,3,15
    audisabled = 0
    mhz = 357
    cardmhz = 2700
    ratelimitecm = 4
    ratelimittime = 9000
    srvidholdtime = 2000
    ecmunique = 1




    [reader]
    label = upper_card
    enable = 0
    protocol = internal
    device = /dev/sci1
    detect = cd
    group = 1
    emmcache = 1,3,15
    audisabled = 0
    mhz = 357
    cardmhz = 2700
    ratelimitecm = 4
    ratelimittime = 9000
    srvidholdtime = 2000
    ecmunique = 1


    -----------------------------------------------------------------------


    oscam.user


    [account]
    user = linuxsat
    pwd = support
    group = 1
    au = 1


    -----------------------------------------------------------------------


    mgcamd config


    mg_cfg


    # EMM messages
    # 00 don't show any EMMs (default)
    # 01 show only valid EMMs
    # 02 show valid and bad EMMs with complete data display
    M: { 02 }


    # ECM messages
    # 00 don't show anything about ecm
    # 01 normal mode, show pids processed, decoded ecm and cw
    # 02 verbose mode, show valid and bad ECMs with data
    C: { 02 }


    # AU
    # 00 disable, no emm pids processed
    # 01 enable, emm pids always processed for soft-au and shared cards
    # 02 auto, emm started only if channel cant be decoded
    # 03 process emm pids for network cards update only
    A: { 00 }


    # key update (sum 01 or 02 with 04)
    # 01 update only new keys, default setting
    # 02 update all keys (used for valid PMK checking)
    # 04 enable TPS au
    # + tps SID, which pmt pid contains au pid
    U: { 02 }


    # config files folder (softcam, autoroll, ignore/priority)
    # 00 files in /var/keys
    # 01 files in /tmp
    T: { 00 }


    # network mode, use summ for several clients
    # 00 no network (default)
    # 01 newcamd netclient
    # 02 radegast netclient
    # 04 camd3 netclient
    # 08 gbox netclient
    G: { 33 }


    # network retry, use summ for several options
    # 00 disable
    # 01 retry every new ecm
    # 02 try to connect to offline shares every Q: seconds
    # 04 try to detect and fast reconnect to lost (and not used atm) server
    # + XX messages number and YY seconds to reconnect
    # mg will reconnect to server, if no answer to last XX ecm/keepalive or
    # if no answer for last ecm or keepalive sent for YY seconds
    # set to 0 to disable
    N: { 07 } 5 30


    # network ecm timeout in seconds
    K: { 07 }


    # newcamd dead routes connect retry, sec
    Q: { 600 }


    # network shares priority
    # 00 gbox, newcamd, radegast, camd3 (default)
    # 01 camd3, radegast, newcamd, gbox
    # 02 newcamd, camd3, gbox, radegast
    P: { 00 }


    # on screen display type
    # 00 No OSD (default)
    # 01 neutrino
    # 02 enigma
    # 03 relook
    # + user password for http auth
    O: { 00 } username password


    # on screen display Options, summ of:
    # 01 show emu ecm
    # 02 show network shares messages
    # 04 show decoding failed / fta
    # 08 show emm keys update
    # + web port to use for osd
    S: { 03 } 80


    # Log option, summ of:
    # 00 off
    # 01 network udp log
    # 02 log to console
    # 04 file, appended ! delete it by yourself, before it eat all your hdd
    # + IP udp-port log-file-name
    L: { 02 }


    # keep ecm cache, seconds
    # every cache entry takes 28 bytes, so 24h cache will take *only* 240-400kb of memory,
    # for openbox/elanvision users with remote shares make sense to set it higher than default value,
    # to not hammer cards while timeshifting or playing crypted recordings.
    E: { 15 }


    # cache option, summ of:
    # 00 Off (default)
    # 01 Ecm pids cache, store pids used to decode in /tmp/ca_cache.list at exit, load at startup, same syntax as restore.list
    # 02 Ecm data cache, remember CW for (E:) time
    # 04 Emm cache for network cards, do not resend the same emm twice, cache not cleared until restart
    H: { 07 }


    # reread files, summ of:
    # 00 No (default)
    # 01 reread config file on channel change (including priority and ignore, but not replace/cache)
    # 02 reread SoftCam.Key on channel change
    # 04 reread SoftCam.Key if file changed
    R: { 04 }


    # debug, summ of
    # 00 off (default)
    # 01 debug ecm
    # 02 debug emm
    # 04 debug network ecm
    # 08 debug network emm
    # 16 debug network login
    # 32 show mem/cpu stats every 1 min
    # 64 add timestamp to log messages
    D: { 01 }


    # box type
    # 00 autodetect, change only if you think wrong type detected.
    # 01 dbox2
    # 02 dreambox
    # 03 triple-dragon
    # 04 relook
    # 05 openbox
    B: { 06 }


    -----------------------------------------------------------------------


    newcamd.list


    CWS_KEEPALIVE = 300
    CWS = 127.0.0.1 10001 linuxsat support 01 02 03 04 05 06 07 08 09 10 11 12 13 14 lan newcs


    -----------------------------------------------------------------------


    and startup scripts on /etc/init.d


    cardserver.oscam


    #!/bin/sh
    case "$1" in
    start)
    ulimit -s 1024
    /usr/bin/oscam --config-dir /etc/tuxbox/config/oscam --daemon --pidfile /tmp/oscam.pid --restart 2 --utf8
    ;;
    stop)
    kill `cat /tmp/oscam.pid` 2> /dev/null
    ;;
    restart|reload)
    $0 stop
    sleep 1
    $0 start
    ;;
    version)
    echo "svn10656"
    ;;
    info)
    echo "oscam svn10656"
    ;;
    *)
    echo "Usage: $0 start|stop|restart"
    exit 1
    ;;
    esac
    exit 0


    -----------------------------------------------------------------------


    softcam.mgcamd


    #!/bin/sh
    case "$1" in
    start)
    sleep 15 ; start-stop-daemon -S -b -x /usr/bin/mgcamd
    ;;
    stop)
    exec start-stop-daemon -K -R 2 -x /usr/bin/mgcamd
    ;;
    restart|reload)
    $0 stop
    sleep 15
    $0 start
    ;;
    version)
    echo "1.38c"
    ;;
    info)
    echo "mgcamd 1.38c"
    ;;
    *)
    echo "Usage: $0 start|stop|restart"
    exit 1
    ;;
    esac
    exit 0

OSCam Support Forum

Configs, discussion, downloads and guides for OSCam Softcam.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!