Cccam & OsCam on routers with TOMATO firmware
-LITE version-
~ Take an usb flash stick (or microSD with usb adapter) and make 2 partition on it : first - Linux swap (~128mb), second – linux ext 3 (rest of usb flash);
~ Mount usb flash stick on free usb port of router.
1. Asus gP & N 16 version
• Kernel 2.6
In ssh terminal :
root@unknown:/tmp/home/root# wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh
root@unknown:/tmp/home/root# sh /tmp/home/root/optware-install.sh
root@unknown:/tmp/home/root# wget http://www.oscam.ump2002.net/board/attachment.php?attachmentid=6646
root@unknown:/tmp/home/root# tar -xvf attachment.php?attachmentid=6646
root@unknown:/tmp/home/root# ipkg install oscam-1.00-unstable_svn4853-STATIC-oleg-thE29.ipk
root@unknown:/tmp/home/root# mkdir /opt/cs
root@unknown:/tmp/home/root# mkdir /opt/cs/oscam
root@unknown:/tmp/home/root# mkdir /opt/cs/oscam/bin
root@unknown:/tmp/home/root# mkdir /opt/cs/oscam/conf
root@unknown:/tmp/home/root# mkdir /opt/cs/scripts
~ copy oscam config files in /opt/cs/oscam/conf
~ copy oscam, oscam_start.sh, cccam & cccam_start.sh in /opt/cs/scripts
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/cccam
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/cccam_start.sh
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/oscam
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/oscam_start.sh
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/bin
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/etc
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/keys
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/lib
~ copy ld.so.1 in /opt, cccam in /opt/cs/cccam/bin, CCcam.cfg in /opt/cs/cccam/etc, lib content in /opt/cs/cccam/lib
root@unknown:/tmp/home/root# chmod –R +x /opt/ld.so.1
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/cccam/bin/cccam
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/cccam/lib/*
root@unknown:/tmp/home/root# mkdir /opt/cs/card
~ copy usbserial.ko, ftdi_sio.ko & pl2303.ko in /opt/cs/card
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/card/*
root@unknown:/tmp/home/root# mv /opt/bin/oscam /opt/cs/oscam/bin
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/oscam/bin/oscam
In tomato web interface :
• USB and NAS:
USB support:
~ check all : Core USB Support, USB 2.0 Support, USB 1.1 Support, OHCI/UHCI …
~ Run after mounting :
swapon /dev/sda1
mount -t ext3 /dev/sda2 /opt
insmod /opt/cs/card/usbserial.ko
insmod /opt/cs/card/ftdi_sio.ko
insmod /opt/cs/card/pl2303.ko
sleep 60
/opt/cs/scripts/oscam_start.sh
/opt/cs/scripts/cccam_start.sh
• Administration:
Scheduler:
Custom 1:
~ check all : Enable, Time: every minute (or when you wish to check), Days : Everyday
~ command :
CHECKNAME="CCcamR.log"
IP="127.0.0.1"
PORT="13004"
echo info|nc $IP $PORT >>/tmp/$CHECKNAME
set $(ls -s /tmp/$CHECKNAME)
if [ "$1" = "0" ];
then
echo "cccam is not running, Restarting..."
/opt/cs/scripts/cccam_start.sh restart
else
echo "cccam is running"
fi
rm /tmp/$CHECKNAME
exit
Scripts:
Firewall:
iptables -A INPUT -p tcp --dport [port] -d [routers ip] -j ACCEPT
2. Asus gP, N 16 & Deluxe version
• Kernel 2.4
In ssh terminal :
root@unknown:/tmp/home/root# wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh
root@unknown:/tmp/home/root# sh /tmp/home/root/optware-install.sh
root@unknown:/tmp/home/root# wget http://www.oscam.ump2002.net/board/attachment.php?attachmentid=6646
root@unknown:/tmp/home/root# tar -xvf attachment.php?attachmentid=6646
root@unknown:/tmp/home/root# ipkg install oscam-1.00-unstable_svn4853-STATIC-oleg-thE29.ipk
root@unknown:/tmp/home/root# mkdir /opt/cs
root@unknown:/tmp/home/root# mkdir /opt/cs/oscam
root@unknown:/tmp/home/root# mkdir /opt/cs/oscam/bin
root@unknown:/tmp/home/root# mkdir /opt/cs/oscam/conf
root@unknown:/tmp/home/root# mkdir /opt/cs/scripts
~ copy oscam config files in /opt/cs/oscam/conf
~ copy oscam, oscam_start.sh, cccam & cccam_start.sh in /opt/cs/scripts
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/cccam
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/cccam_start.sh
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/oscam
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/scripts/oscam_start.sh
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/bin
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/etc
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/keys
root@unknown:/tmp/home/root# mkdir /opt/cs/cccam/lib
~ copy ld.so.1 in /opt, cccam in /opt/cs/cccam/bin, CCcam.cfg in /opt/cs/cccam/etc, lib content in /opt/cs/cccam/lib
root@unknown:/tmp/home/root# chmod –R +x /opt/ld.so.1
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/cccam/bin/cccam
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/cccam/lib/*
root@unknown:/tmp/home/root# mkdir /opt/cs/card
~ copy usbserial.o, ftdi_sio.o & pl2303.o in /opt/cs/card
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/card/*
root@unknown:/tmp/home/root# mv /opt/bin/oscam /opt/cs/oscam/bin
root@unknown:/tmp/home/root# chmod -R +x /opt/cs/oscam/bin/oscam
In tomato web interface :
• USB and NAS:
USB support:
~ check all : Core USB Support, USB 2.0 Support, USB 1.1 Support, OHCI/UHCI …
~ Run after mounting :
swapon /dev/discs/disc0/part1
mount -t ext3 /dev/scsi/host0/bus0/target0/lun0/part2 /opt
insmod /opt/cs/card/usbserial. o
insmod /opt/cs/card/ftdi_sio. o
insmod /opt/cs/card/pl2303. o
sleep 60
/opt/cs/scripts/oscam_start.sh
/opt/cs/scripts/cccam_start.sh
• Administration:
Scheduler:
Custom 1:
~ check all : Enable, Time: every minute (or when you wish to check), Days : Everyday
~ command :
CHECKNAME="CCcamR.log"
IP="127.0.0.1"
PORT="13004"
echo info|nc $IP $PORT >>/tmp/$CHECKNAME
set $(ls -s /tmp/$CHECKNAME)
if [ "$1" = "0" ];
then
echo "cccam is not running, Restarting..."
/opt/cs/scripts/cccam_start.sh restart
else
echo "cccam is running"
fi
rm /tmp/$CHECKNAME
exit
Scripts:
Firewall:
iptables -A INPUT -p tcp --dport [port] -d [routers ip] -j ACCEPT
All files can be found here :
https://topex.zapto.org
user: user
pass: ovidiumarius
P.S.: in my example OsCam is set for local card TVRHD on 5 Crystal Phoenix/Smartmouse Card Reader.
Cardsharing with routers
Forum
» Firmware Development / Tutorial Club
» Cardsharing with routers
Summary:
Cccam & OsCam on routers with TOMATO firmware
Cardsharing with routers
my newcs and oscam compilation (and many others packages):
I know the Toastman firmware already has all 3 modules. To activate them simply run
modprobe usbserial
modprobe ftdi_sio
modprobe pl2303.
Then type lsmod to see them loaded, if your particular firmware you're using has them.
Hi, I was wondering if anyone of you have tried Shibby's oscam compiled package on a Asus RT-N66U together with a Smargo USB cardreader (using the smartreader protocol)? Does/would it work?
Hi,
I am trying to download the "attachmentid=6646" mentioned by the OP, but the site seems down. I would appreciate if someone could upload a mirror of the attachment. Thanks in advance.
/forum/t-343283/cardsharing-with-routers#post-