Home

Script Oscam+Mbox

jaroprofe

Usuario
Fan de OpenSPA
1 Abr 2010
249
19
0
Como ya sabeis todos mbox funciona en enigma2 y se puede arrancar automáticamente desde un script como este y que a mi además me funciona perfectamente:
Script Mbox Solo:
Código:
#!/bin/sh
CAMD_ID=7096
CAMNAME="Mbox4 23r3"
remove_tmp () {
rm -rf /tmp/*.info* /tmp/*.tmp* /tmp/*mbox* /tmp/*share* /tmp/*.pid* /tmp/*sbox* /tmp/*oscam*
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
remove_tmp
sed -i '/A: { 1 }/d' /usr/keys/mbox.cfg
if ! grep '^P:.*' /usr/keys/mbox.cfg > /dev/null
then
echo "P: { 2/tmp/camd.socket }" >> /usr/keys/mbox.cfg
fi
/usr/bin/mbox
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
touch /tmp/mbox.kill
sleep 5
killall -9 mbox 2>/dev/null
sleep 2
remove_tmp
;;
*)
$0 stop
exit 1
;;
esac
exit 0

Pero resulta que NO puede arrancarlo como camd sencundaria junto a Oscam, para ello utilizo este script que me descargé de las descargas de Spaze 2.0 en mi Azbox Premium HD+:

Script Oscam+Mbox:
Código:
#!/bin/sh
CAMD_ID=7394
CAMNAME="OSCam 1.20/Mbox4 23r3"
remove_tmp () {
rm -rf /tmp/*.info* /tmp/*.tmp* /tmp/*mbox* /tmp/*share* /tmp/*.pid* /tmp/*sbox*
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
remove_tmp
killall -9 socat 2>/dev/null
sleep 1
/usr/bin/oscam &
sleep 15
sed -i '/A: { 1 }/d' /usr/keys/mbox.cfg
if ! grep '^P:.*' /usr/keys/mbox.cfg > /dev/null
then
echo "P: { 2/tmp/camd.socket }" >> /usr/keys/mbox.cfg
fi
/usr/bin/mbox > /dev/null &
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
touch /tmp/mbox.kill
sleep 7
killall -9 oscam mbox 2>/dev/null
sleep 2
remove_tmp
;;
*)
$0 stop
exit 0
;;
esac
exit 0

Adjunto además mi mbox.cfg, por si el problema estubiese ahí:

Mbox.cfg
Código:
########################################
# Mbox 23 R3 - Mbox.cfg configuracion  #
########################################

//mbox.cfg EXPLANATION and EXAMPLES


A: { 0 } // for QBoxHD receivers or for any receivers if needed it
//A: { x }
//Choose adapter path
//x=0 -> /dev/dvb/adapter0/
//x=1 -> /dev/dvb/adapter1/
//x=2 -> /dev/dvb/adapter2/
//x=.. -> .......
//default x=0



D: { 0 }

//D: { x }
//x=0 -> disable
//x=1 -> enable dbox2 cw writing
//x=2 -> enable STAPI for IPBOX
//x=3 -> enable STAPI for Kathrein
//x=4 -> enable Linux DVB API for Kathrein
//x=5 -> enable triple dragon
//x=6 -> enable Qbox HD
//default disabled

B: { 0 }

//B: { x }
//x=0 -> disable local UDP ports 8004-80xx ,this ports are used with DVB cards and gbox plugin (Windows and Linux)
//x=1 -> enable
//default disabled


Z: { 12 } { 127.0.0.1 8000 }

//  Z option -> control sending/writing current informations
//  Z: { xy } { IP port }
//   x=0 -> don't print time stamp (in console screen and in debug file)
//   x=1 -> print time stamp ( .... )
//   y=0 -> no writing/sending informations to debug file/destination IP
//   y=1 -> send informations to destination IP but not in debug file
//   y=2 -> write informations to debug file but don't send to destination IP
//   y=3 -> write/send informations to debug file/destination IP
//   IP port -> destination IP and UDP port where to send informations
//  no default



#C: { 127.0.0.1 7999 }

// C option -> control receiving some command messages localy or from another IP
// C: { IP port }
// IP-> your local IP or you DNS
// port -> on what port you will be waiting command messages
// no default


U: { 1 }

// U options -> Update peer(s) IP if it changes while peer still resending ecm's/cw etc.. information
// default only on hello message peer(s) IP are updated !!!
// U: { x }
// x=0 -> disabled
// x=1 -> enabled
// default disabled



L: { 1 }

// L option -> how mbox to menage virtual card(s) with level 0
// ( only for peer(s) who have and can reshare virtual cards but don't want to use LEVEL 0 card(s) for them self)
// L: { x }
// x=0 -> don't load any virtual cards with LEVEL 0, you can't use them for your self
// x=1 -> load all virtual cards with LEVEL 0 ,you will be using them for your self
// default 1


#G: { /hdd/ }

//G option -> redirect writing ONLY debug.txt file to internal or external HDD in receivers or for any other reason.
//Remove #, ONLY if you want to use this option !!!!!!!


T: { /tmp/ }

// T option -> where to store temp files ... (share.info,debug.txt ,etc.)
// T: { folder_path_to_files, example: T: { /tmp/ } }



K: { /usr/keys/ }

// K option -> where is cwshare.cfg,mbox.prio file
// K: { folder_path_to_files, example: K: { /usr/keys/ } }


M: { 1 }

// M option -> Mode option
// M: { x }
// x=0 -> local mode no NET
// x=1 -> NET mode
// default 0


P: { 2/tmp/camd.socket }

// P option -> PMT location (Dont used with linux and windows)
// you must be tuned to channel so image can generate this file
// { /tmp/pmt.tmp } for receivers and images that create this file <- use this if you can
// { /tmp/pmtX.tmp } X-> number -> pmt1.tmp ......
// { 1/tmp/camd.socket } for enigma 1
// { 2/tmp/camd.socket } for enigma 2

W: { 0 }

// W option -> write raw ECM to ecm.raw file
// W: { x }
// x=0 -> disabled
// x=1 -> enabled
// default disabled



Q: { 300 }

//Q option -> newcamd connect retry in sec.
//Q: { x }
// default 300 sec.


F: { 500 }

//F option -> reset writing debug.txt from begining if file size is higher then (x)(KB)
//F { x } -> decimal in KBytes
//default 500 KB



///DO NOT USE THIS ,NOT TESTED !!!!!!!!//
//V: { card_type  device clock inverse_Reset}
#V: { 3 1 3571200 0 }
#V: { 3 2 3571200 1 }
// card_type:
// Seca 3 , Irdeto 4, Conax 5, Cryptoworks 6, Viaccess 7, NDS 8, Nagravision 9

// device:
// COM1/ttyS0 1
// COM2/ttyS1 2
// /dev/sci0  3
// /dev/sci1  4
// /dev/usb/tts/0  5
// /dev/usb/tts/1  6
// /dev/tts/0  7
// /dev/tts/1  8
// /dev/ttyUSB0 9
// /dev/ttyUSB1 10


//clocks for COM ports in Hz
//for SCI slots use this values
// 1 - 3.33 Mhz
// 2 - 3.63 Mhz
// 3 - 4 Mhz
// 4 - 4.44 Mhz
// 5 - 5Mhz
// 6 - 5.71 Mhz
// 7 - 6.66 Mhz
// 8 - 8 Mhz

//Inverse Reset
// 1 -yes
// 0 -no
///DO NOT USE THIS ,NOT TESTED !!!!!!!!//


J: { 1 }
// J option -> enable adding betacrypt header to N3 ECM for Premier
// J { x }
// x = 0 -> disabled
// x = 1 -> enabled


R: { 3600 }
// R option -> resend hello to all Leete las normas after X seconds, ony for gboxx Leete las normas,not mbox Leete las normas
//default in code 3600 seconds



H: { 1 1 1 1 1 1 }
// H option -> mapping provid (0-disabled, 1-enabled)
//H: { a b c d e f }
//a-> mapping all 0BXX to 0B00
//b-> mapping 1810 to 1801
//c-> mapping 1803 to 1801
//d-> mapping 1802 to 1801
//e-> mapping 1815 to 1801
//f-> mapping 1822 to 1801




# S: { COM1 }
//S option -> enable sssp protocol
//S: { x }
//x=COM1
//x=COM2
//x=/dev/ttyS0
//x=/dev/ttyS1

A través de telnet tambien puedo arrancarlo sin problemas junto con oscam, pero mediante script de manera automática no lo consigo de momento.

¿Alguien ha conseguido arrancar Oscam+Mbox?
 

jaroprofe

Usuario
Fan de OpenSPA
1 Abr 2010
249
19
0
Hola,

Intenta:

Donde tienes "sleep 15" pone "sleep 30" a ver se rula....

Probado con 30 y con 45 y nada, dejandole tiempo para que arranque hasta 24 horas, no creo que necesite más :malabares:
Además cuando lo arranco a través de telnet, se queda mbox como camd principal.
Supongo que el problema puede estar en el mbox.cfg, pero no lo se, si alguíen que tenga Oscam+Mbox pusiese su mbox.cfg, seria de gran ayuda.
Gracias.
 

rcm1379

Usuario
Fan de OpenSPA
Hola,
intenta:

Código:
#!/bin/sh
CAMD_ID=7394
CAMNAME="OSCam 1.20/Mbox4 23r3"
remove_tmp () {
rm -rf /tmp/*.info* /tmp/*.tmp* /tmp/*mbox* /tmp/*share* /tmp/*.pid* /tmp/*sbox*
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
remove_tmp
killall -9 socat 2>/dev/null
sleep 1
/usr/bin/oscam &
sleep 15
sed -i '/A: { 1 }/d' /usr/keys/mbox.cfg
if ! grep '^P:.*' /usr/keys/mbox.cfg >/dev/null
then
echo "P: { 2/tmp/camd.socket }" >>/usr/keys/mbox.cfg
fi
/usr/bin/mbox &
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
touch /tmp/mbox.kill
sleep 7
killall -9 oscam mbox 2>/dev/null
sleep 2
remove_tmp
;;
*)
$0 stop
exit 0
;;
esac
exit 0
 
  • Me gusta
Reactions: 1 person

evox

OpenSpa Team
Miembro del equipo
Moderador OpenSPA
2 Mar 2009
5.976
4.390
0
Probado con 30 y con 45 y nada, dejandole tiempo para que arranque hasta 24 horas, no creo que necesite más :malabares:
Además cuando lo arranco a través de telnet, se queda mbox como camd principal.
Supongo que el problema puede estar en el mbox.cfg, pero no lo se, si alguíen que tenga Oscam+Mbox pusiese su mbox.cfg, seria de gran ayuda.
Gracias.

Explica mejor como estas usando Oscam, solo como reader o tambien para visionar, de todas formas los config ke hay en el server de la SPZ 2.0 para mbox estan provados para usar junto con Oscam, pero Oscam solo usado como reader, el visionado con Mbox.

En tu Mbox.cfg veo mal esto:

-Mbox.cfg en este teneis ke resumir con # delante la linea A o borrarla y tambien dejar 2 lineas en blanco al final del script.

Si esto no esta asi el script no chuta, por otro lado el sleep a 15 es suficiente pero dependiendo de la card ke uses en Oscam es mejor subirlo sino el Mbox tardara en pillarla el valor adecuado estaria entre 20 y 30 si con 15 no la coge a la primera.

Tambien necesito saber ke imagen usas porke no se si el camdmanager de las RTi esta corregido o no, en la Spaze si funciona.

Salu2.
 

jaroprofe

Usuario
Fan de OpenSPA
1 Abr 2010
249
19
0
Uso Spaze 2.0 en Premium + como dije más arriba, y uso Oscam con cccam integrado como camd principal para abrir canales y de servidor y cliente y por otro lado, mbox como camd secundaria solo para compartir.
 

veudevaes

Usuario Activo
Fan de OpenSPA
22 Mar 2007
173
11
0
buenas compañeros.. feliz año nuevo..
pues no lo consigo.. hay alguna manera de hacer funcionar mbox+oscam en el elite con space ?? o no son compatibles??
gracias..
 

norhap

Usuario Destacado
Vip OpenSPA
5 Ene 2010
4.354
994
0
vale, y yo que me alegro, pero otros se alegraran mas si les pone la configuración para hacerlas funcionar.
 

veudevaes

Usuario Activo
Fan de OpenSPA
22 Mar 2007
173
11
0
vale, y yo que me alegro, pero otros se alegraran mas si les pone la configuración para hacerlas funcionar.
ok.. le pregunto al autor del scrip si tiene algun inconveniente, y lo pongo.. cambia poco a los que hay aqui, pero este si rula.. por lo menos a mi..