Installing OSCam

Installing OSCam with the Phoenix Smargo Smartreader.

OScam is an open source CAM Server-program that can access your subsription card (via a cardreader) and ‘serves’ the Keys to your TV-decryption program, for example TVHeadend.
In my case I use OSCAM with the Smargo Smartreader to watch Digitenne DVB-T signals.

The system I use:
- AMD Athlon 4800+
- Gentoo Linux kernel 3.2.0
- TVHeadend

* Working DVB-tuner ( in my case I use both the Pinnacle 72e single tuner, and the HDHomerun dual networktuner with Digitenne)
* You need “USB FTDI Single Port Serial Driver” selected in your kernel The cardreader should be visible in /dev, for example at /dev/ttyUSB0.

Get and install the code
You can get the code for OSCam using SVN from
svn co /opt/oscam/src/

There is an excelent ‘how-to’ on installing the code on .
Following those steps install OSCAM in /opt/OSCAM.
The instruction are general since there is no actual integration with a specific distro.

Configuring OSCAM for use with Digitenne/DVB-T
For using Oscam with another operator (in this example: Digitenne, CAID 0B00) we need to change the relevant parameters in the configuration files.
The Digitenne CAID is 0B00 ( but will be different for your operator)

The configuration files are located in in /opt/oscam/etc/
In my case there are three configurationfiles:


To start it is adviced to use ONLY those three;
Adding more config files adds extra complexity (but gives more configuration options).
This makes troubleshooting harder since the configuration files can contradict each other, and it will not immideately be clear which setting is used. So, best way is to first get it all running with only those three files.

Here are my configurationfiles for Digitenne ( Dutch DVB-T provider, CAID 0B00)

usrfile = /opt/oscam/oscamuser.log
logfile = /opt/oscam/oscam.log
cwlogdir = /opt/oscam/etc/cw
disablelog = 0
disableuserfile = 0
usrfileflag = 0
clienttimeout = 2000
fallbacktimeout = 1500
clientmaxidle = 120
failbantime = 0
bindwait = 120
netprio = 0
clientdyndns = 0
resolvedelay = 2
unlockparental = 0
nice = -1
serialreadertimeout = 1000
maxlogsize = 10
waitforcards = 1
preferlocalcards = 1
saveinithistory = 0
readerrestartseconds = 5
lb_mode = 0
lb_save = 0
lb_nbest_readers = 1
lb_nfb_readers = 1
lb_min_ecmcount = 5
lb_max_ecmcount = 500
lb_reopen_seconds = 900
resolvegethostbyname = 0

#port = 15050@0604:000000
port = 15050@0B00:000000

key = 0102030405060708091011121314
allowed =
keepalive = 1
mgclient = 0

httpport = 15080
httpuser = username
httppwd = password
httprefresh = 0
httpallowed =,
httphideidleclients = 0
httpreadonly = 0


# reader configuration

label =r eader1
protocol = mouse
detect = CD
device = /dev/ttyUSB0
group =
emmcache = 1,3,2
services = services1
caid = 0B00
mhz = 500
cardmhz = 500


user = tvheadend
pwd = tvheadend
uniq = 0
group = 1
ident = 0B00:0
caid = 0B00
au = Digitenne


Q: The cardreader changes node from /dev/USB0 to /dev/USB1
A: Unplugging and replugging the USB-cardreader might place the reader at another port, for example ttyUSB1, which will make OScam unable to find it.
However, after reboot the cardreader should be back at /dev/ttyUSB0, so for a ‘working’ system where the device is not unplugged there should be no such problems.

Q: The cardreader is not visible in /dev !
A: You have to select support for this device in the kernel. In my case for the Smargo Smart Reader the driver is “USB FTDI Single Port Serial Driver”

This entry was posted in HTPC, Linux. Bookmark the permalink.