Thursday, June 23, 2011

Guide: Howto setup Oscam as a CCcam proxy

Oscam is perhaps one of the best sharing emulators when it comes to connection to other protocols. So here's a small howto on how to setup Oscam as a CCcam proxy while you connect through newcamd to Oscam.

Why? Some receivers still seem to lack CCcam client possabilities and several emu's are running more stable when using a newcamd type line (for instance:acamd, vdr-sc and sasc-ng seem to work somewhat more stable using newcamd connections). For this to work you need a working CCcam configuration, Oscam binary and the files oscam.conf, oscam.server and oscam.user.

In my case I used a NSLU2 and put the Oscam binary in /var/bin and the oscam.* files in /var/etc. Now for the contents of the files:

oscam.conf

Code:
[global]
nice       = -1
WaitForCards  = 1

pidfile       = /var/run/oscam.pid
logfile       = /var/log/oscam/oscam.log
usrfile       = /var/log/oscam/oscamuser.log
cwlogdir      = /var/log/oscam/cw

[monitor]
port       = 988
aulow       = 120
monlevel      = 1

[newcamd]
key           = 000102030405060708090A0B0C0D
port          = 10000@0100:00006A,004106;10001@1722:000000
At the key you can setup your DES-key, which the client requires to connect using the information from oscam.user. But the most important part, is the port information.

You need to add an additional newcamd port for every CAID you want to proxy. For example, CAID 0100 (SECA) has 2 idents in the name Canal+ NL (00006A) and Digital+ (004106) and it's set to port 10000. Port 10001 has the CAID 1722 (NAGRA) set to the ident of KD. It's important to remember you need to specify seperate idents per CAID. Don't use FFFFFF, since that won't give you everything on the specified CAID.

oscam.server
Code:
[reader]
reconnecttimeout = 5
label      = remote
protocol   = cccam
device     = 127.0.0.1,12000
account    = oscam_user,oscam_password
group      = 1
caid       = 
cccversion = 2.1.4
cccbuild   = 3191
This is straight forward. Just a simple connection to your CCcam configuration. In this case it connects to localhost (127.0.0.1) running on the default port (12000) with the specified username and password which I created in CCcam.cfg (F: oscam_user oscam_password 5 0 1 { 0:0:1 } { } { } 127.0.0.1). In this case it connects as a CCcam 2.1.4 client.

oscam.user
Code:
[account]
user       = username
pwd        = password
uniq       = 0
group      = 1
caid       = 
au         = remote
With the oscam.user you can specify the username and password combination you want to use with the newcamd line. With the above examples you should use the following information (in this case oscam is running on the example IP of 192.168.1.200):

cardclient.conf (vdr-sc, sasc-ng, acamd):
Code:
newcamd:192.168.1.200:10000:1/0100/ffff:username:password:000102030405060708090A0B0C0D
newcamd.list (mgcamd):
Code:
CWS_KEEPALIVE = 300
CWS_INCOMING_PORT = 12000
CWS = 192.168.1.200 10000 username password 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D lan newcs
Well, you get the drift. This way you can even connect your obscure receiver, which only does newcamd, to CCcam using Oscam. Offcourse, please check first with your peer if he's ok with this. But for internal connection it should be fine and stable.

No comments:

Post a Comment