TVHeadend with OScam not working ! [SOLVED]

Added by Paul Rensel about 11 years ago

This is solved, see bottom of post.


I'm currently having trouble getting Oscam to work with TVHeadend.

I have this:

I: tvheadend -> oscam -> cccam -> smargo

but i want this:

II: tvheadend -> oscam -> smargo (

but ended up with this:

III: tvheadend -> cccam -> smargo

In I: and in III the cccam is working ok because i have a dreambox running fine on it as a client.
In I: having the dreambox talking to the cccam part of oscam is working also very well. I see the decrypting proces happening ;-)
But having tvheadend talking to the same oscam in I: is not working. It cant decrypt the packets it seems.
In III: however tvheadend is also working very well talking to the cccam directly.

In II its not working either.

So i'm guessing that the tvheadend talking to the oscam is not working is it should.
Anyone else having same problems.

(running tvheadend svn latest co, cccam 2.1.2 and oscam 1.00beta, smargo 1.4)


I finally got TVHeadend working with Oscam and a Smargo reader, decrypting Canal Digitaal Seca3 encrypted (HD) channels.

Here's my oscam.conf

nice          = -1
WaitForCards  = 1

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

port          = 988
aulow         = 120
monlevel      = 1

key           = 0102030405060708091011121314
port          = [email protected]:00006A

httpport = 81
httprefresh = 5
httpallowed =
httphideidleclients = 0
httpreadonly = 0

#port = 12000
#cccversion = 2.1.2
#cccbuild = 2892
#reshare = 2
#ignorereshare = 1
#updateinterval = 240
#minimizecards = 0

Here's oscam.server

label                         = canaldigitaal
enable                        = 1
protocol                      = mouse
device                        = /dev/ttyUSB0
caid                          = 0100
detect                        = cd
mhz                           = 500
cardmhz                       = 500
ident                         =
group                         = 1
emmcache                      = 1,3,2
auprovid                      =

And oscam.user

user                          = hts
pwd                           = hts
group                         = 1
caid                          =
au                            = canaldigitaal

In TVheadend you have to add under Configuration -> Code Word Client:
your Oscam hostname or IP number under Hostname
your Oscam newcamd Port number under Port (in this case its port 10000)
your newcamd key under [newcamd] in DES key (in this case 0102030405060708091011121314)
your username from oscam.user under Username
your password from oscam.user under Password

Now for CanalDigitaal Seca3 you have to add the caid (0100) in the [newcamd] part of oscam.conf after your necamd portnumber. Other providers/card need to modify this. Also use this caid (0100) in oscam.server. I'm using the Smargo in mouse mode and the CD card is able to be read on 5mhz so i did change the mhz and cardmhz from 357 to 500.

When I disable Update Card in TVHeadend it didnt work because it couldnt read the card, enabling Update Card did the trick and oscam was reading the cards serial number and such and started decoding ;-)

If you want your existing CCcam clients like Dreambox and such also to talk to Oscam just enable the lines in the cccam section and modify your cccam client to talk to the oscam server IP and port.

Good luck ;-)

Replies (4)

RE: TVHeadend with OScam not working - Added by Jouk Hettema - about 11 years ago

hi Paul,

I'am wondering what configuration you use in option 3 (for both CCcam and tvheadend). AFAIK cccam cannot serve newcamd (only as a client, not as as server) and tvheadend can only work with newcamd.

I have a tvheadend server, several dreambox's, 2 cccam cardservers (on dreambox) and 1 oscam which acts as a proxy in between tvheadend and cccam. It is working, but zaptime is very high (>4 seconds). Would be great if I could reduce that by optimizing the oscam configuration or talking directly to cccam.

kind regards


RE: TVHeadend with OScam not working - Added by Paul Rensel about 11 years ago


Tvheadend can only talk to cccam through sockets so ccam and tvheadend must be on the same machine to get this working.

In the meantime i just got option II working so tvheadend talks to oscam and oscam to smargo. It works great, a lot faster then having cccam talking to the smargo and answering to oscam.
And because oscam is talking 'cccam language' to my dreambox also i'm just a happy camper ;-)

(I'll post the working oscam conf files later today..)

RE: TVHeadend with OScam not working - Added by Jouk Hettema - about 11 years ago

hi Paul,

cool, thanks. That sounds better to me. Could you post your average "zap"time, because for the moment I have it running like option 1 (besides the smargo = internal reader of dreambox), and my zaptime is quiet high.

kind regards


RE: TVHeadend with OScam not working - Added by Paul Rensel about 11 years ago


I'm using xbmc-dharma-pvr as fontend on an Asrock ION330Pro running Archlinux.

Zaptime on the tvheadend (with TeVvi S464 DVB-S2 card) is almost instantly but it takes upto some seconds before the stream to my xbmc is coming through.
With cccam zapping on the tvheadend was a lot slower because it took cccam a while to get the right key from the CanalDigitaal card (and sometimes it didnt find a key at all) what slowed down the whole zapping thing. I didnt try zapping with any FTA channels yet, only seca3 coded.

With Oscam it just takes one read from the CD card and it starts descrambling but like i said, it takes a few seconds before xbmc show the stream.

I dont know if theres a way to speedup the xbmc part or maybe use another frontend which fully supports tvheadend and has better zaptimes then xbmc...

One thing: Zaptimes on the Dreambox talking to Oscam as a cccam client are the same as when using the internal (cccam) reader on the dreambox.