OScam


Revision [4604]

This is an old revision of OScam made by arjan_vs on 2012-06-10 15:55:04.

 

OScam, Open Source softcam


OScam is a softcam, software to be used to decrypt digital television channels on a settopbox (receiver), as an alternative for a conditional access module (CAM). OScam is, compared with other softcams (CCcam, mgcamd, etc.), open source. Hence, the name Open Source Conditional Access Module (OScam). OScam is based on the not so well known softcam MpCS. The main features of OSCam are next to its softcam capabilities, that it is able to function as a cardserver.

OScam information on the web


Their is a official website of the developers of OScam:
Their is also a user support website:
Cutting edge binaries for the following brands are (available at OScam Download Center):

OScam howto


OScam is a highly configurable softcam. So a howto can be getting huge if everything is explained.

OScam has different configuration files. It's not possible to say, everybody needs to configure it the same way (like CCcam).
This because we have different hardware, different sat tv providers, and different home networks. So maybe we can give examples.

OpenPLi has six different OScam Plugins available for enigma2 boxes:
These can be installed on your enigma2 OpenPLi box by pressing Menu on remote control and navigate to: Plugins > DownloadPlugins > softcams > oscam-experimental
for installing the oscam-experimental plugin. The other OScam plugins can be installed on a similar way.

The configuration files are stored in either of one of these directories on the box:
Update: OScam-experimental is updated with the help of serveral OpenPli forum users. Since say version OSCAM 1.20 build #6458, OScam runs out of the box with Canal Digitaal smartcards. Yeah awesome!

The following four files need to be installed in configuration directories to let OScam function normally:
In the next paragraphs the minimal content of the configuration files are given. With this config you can decrypt channels on your settopbox, if a smartcard is locally available. Further, an example is given to share your local card to another settopbox in your LAN. The cardsharing protocol used is the same as that of CCcam.

This explanation assumes you know how to edit files on your settopbox.

Further it is assumed, that your settopbox is behind a firewall!

The OScam wiki gives a detailed description of all parameters.

oscam.conf


[global]
logfile = /tmp/.oscam/oscam.log
This is where the log file is written, in case it is enabled.
disablelog = 1
Log file is disabled, just to make sure your box is not wasting flash space.
nice = -1
Make sure the program gets enough priority by the processor.
dropdups = 1
A user is only allowed to login 1 time.

[monitor]
port = 16500
nocrypt = 127.0.0.1,10.0.0.0-10.255.255.255,172.16.0.0–172.31.255.255,192.168.0.0-192.168.255.255
You are allowed to monitor from localhost, and all LAN with home ip.
hideclient_to = 15
Hide clients from monitor or webinterface after 15 seconds idleness.
monlevel = 4
appendchaninfo = 1
Change hexadecimal channel number into a channel name.

[cccam]
port = 12000
reshare = 1
Only your other local boxes are allowed to access your cards.
version = 2.3.0
As far as this wiki knows, latest CCcam version is 2.3.0.

[dvbapi]
enabled = 1
au = 1
Makes sure your card is updated with emm's.
boxtype = dreambox
user = dvbapiau

[webif]
httpport = 16200
httprefresh = 30
Every 30 seconds a refresh.
httpallowed = 127.0.0.1,10.0.0.0-10.255.255.255,172.16.0.0–172.31.255.255,192.168.0.0-192.168.255.255
You are allowed to access the webinterface from localhost, and all LAN with home ip.
httphideidleclients = 1
Do not show clients/users, who are not requesting ecm's.

oscam.server


[reader]
label = first_internal_reader
description = For dreambox lower smartcard slot, for VU+ DUO ... slot
protocol = internal
device = /dev/sci0
detect = cd
group = 1
emmcache = 1,1,0
Makes sure that emm's are cached and written. The emm's are not logged.
dropbadcws = 1
Do not answer bad cw's.
ratelimitecm = 4
Only for M7 SECA3 cards (Canal Digitaal, TV Vlaanderen and Telesat), maximum allowable channels to watch are 4 in a certain time period.
ratelimitseconds = 11
This time period after you can change the 4 requests into 4 different requests. For M7 SECA3 cards, this should vary between 9 and 11 seconds, with 11 seconds as safest choice.

[reader]
label = second_internal_reader
description = For dreambox upper smartcard slot, for VU+ DUO ... slot
protocol = internal
device = /dev/sci1
detect = cd
group = 2
emmcache = 1,1,0
dropbadcws = 1
ratelimitecm = 4
ratelimitseconds = 11

[reader]
label = external_reader
description = External reader connected to serial or USB port of box, such as smargo's or mouse
protocol = mouse
device = /dev/ttyUSB0
Example for a smargo or mouse connected to USB port with ftdi_sio kernel driver.
detect = cd
group = 3
emmcache = 1,1,0
dropbadcws = 1
ratelimitecm = 4
ratelimitseconds = 11

[reader]
label = lan_cccam
description = CCcam LAN connection
protocol = cccam
The corresponding user definition is given in oscam.user paragraph.
device = 192.168.0.x,12000
Connect to server 192.168.0.x (or your local server box) at port number 12000.
user = username
Change into the right user name.
password = password
Change into the right password.
group = 4
cccversion = 2.3.0
Latest known version of CCcam.
ccckeepalive = 1
Makes sure the server is not disconnected, due to idleness.

oscam.user


[account]
user = dvbapiau
Same username as in oscam.conf in the [dvbapi] section.
pwd =
Line with pwd is needed, but should be set blank.
group = 1,2,3,4
The user is only allowed to access the readers 1 until 4./
uniq = 3
Only the last and one instance is allowed of this user.
monlevel = 0
Monitoring is not allowed with this account.
au = 1
The settopbox is allowed to send EMM towards the readers, to update the entitlements of the cards.

[account]
user = usermonitor
Account name of the monitor
pwd = passwordmonitor
Password for the user monitor account.
group = 1,2,3,4
Allowed groups to monitor/access.
uniq = 1
Only the one instance is allowed of this user.

[account]
user = username
Change into the right user name.
pwd = password
Change into the right password.
group = 1,2,3,4
uniq = 3
monlevel = 0
au = 1
allowedprotocols = cccam
It is only allowed to logon with the CCcam protocol.
cccmaxhops = 1
The user is only allowed to get ecm from local readers and readers connected to boxes in your lan (1 hop away).

Configuration examples of OScam users:




Here my CanalDigitaal example of OScam on a DM8000 with two card readers and CanalDigitaal smart card .

Update: OScam-experimental is updated with help of serveral OpenPli forum users. Since say version OSCAM 1.20-unstable_svn build #6458, OScam runs out of the box with Canal Digitaal smartcards. Yeah awesome!
You only need to edit the oscam.server file if it doesn't work after install/restart. So the 4 files that are offered here are only nessesary with older OScams.

Download these 4 files when not using oscam-experimental(right click save link as): oscam.conf + oscam.dvbapi + oscam.server + oscam.user. Remove the numbers/names in front of downloaded file names, so that filenames are exactly the same as written here.


Open oscam.conf with simple text editor (kate/vim/notepad plusplus) and edit the line:

[monitor]
nocrypt = 127.0.0.1,192.168.1.0-192.168.1.255
Be sure it's the ip range of your home network(or network where your enigma2 tuner is in).
[webif]
httpport = 16002
This is the used port, to login go with browser after configuration to http://boxipaddress:16002
httpuser = yourusernamehere
httppwd = yourpasswordhere
Be sure you give your user name and password that you want to use for web browser access to configure and check OScam.
httpallowed = 127.0.0.1,192.168.1.0-192.168.1.255
Be sure it's the ip range of your home network(or network where your enigma2 tuner is in).


Open oscam.dvbapi with simple text editor (kate/vim/notepad plusplus) and edit:

This example is ready for Dutch smart card of Canal Digitaal (not nessesary with oscam-experimental).

If you use OScam-experimental, then use this oscam.dvbapi and change these settings to let this list work because of oscam bug: OScam webif(webbrowser) > Configuration > DVB-api > Request mode: try all caids simultaneously > save (thanks to users Fretsat, Erik Slagter, theparasol, zeeteefje)

To find out what you need to fill in for your sat tv operator smart card info check here.


Open oscam.server with simple text editor (kate/vim/notepad plusplus) and edit:

This example is ready for the two smart card readers of the DM8000. If your device has only one smart card reader, then remove the reader config of device /dev/sci1
I also added some examples of card servers. You see in this file 2 examples of free card server for CCcam and MGcamd clients. OScam can use card servers of non OScam too (yeah awesome!). Here a link to know how to added more readers (or cardservers) to oscam.server.


oscam.user :

I changed the oscam.user file. The username is now localhost same as in oscam.conf [dvbapi] .


Now if you edited oscam.conf + oscam.dvbapi + oscam.server correctly, it's time to upload them with the oscam.user file to your enigma2 tuner with a ftp client in the directory:

/etc/tuxbox/config/oscam-stable/ (or if using experimental: /etc/tuxbox/config/oscam-experimental/ )



Then press Menu on remote control and navigate to: Setup > SoftCam/CI > Softcam setup... > Select softcam > (press left or right to select) oscam-stable (or oscam-experimental) > press green button(ok).


Now for sure, reboot the Enigma2 tuner, and you got your OScam working. have fun with it, and please post examples like this here, for other tuners or satellite operators.

Now it is possible to access the configuration of your OsCam server by web interface:
http://ip_box:16002 (port 16002 refers to the configured port in oscam.conf under httpport = )

Update of user theparasol: If (so when it works ok, then don't change) your seca3 v10 smartcard don't update properly, then check this PDF file.




For using OScam with TV Vlaanderen , TNTsat . TeleSat

Open oscam.server with simple text editor (kate/vim/notepad plusplus) and edit:

You can use the files of CanalDigitaal config example.
Only the oscam.server file is different. No CanalDigitaal related reader configured but a reader you choose below.(be sure you configure the device -sci0/sci1/sci2/sci3- properly!, 4 example If you have the card in the second cardreader, then change /dev/sci0 to /dev/sci1 )
Added the provider reader you need in oscam.server file:


[reader]
label = cardreader-tvvlaanderen
protocol = internal
device = /dev/sci0
services = tvv
caid = 0100
detect = cd
mhz = 357
cardmhz = 500
group = 1
emmcache = 1,3,2
lb_weight = 1000
auprovid = 00006C


[reader]
label = cardreader-tntsat
protocol = internal
device = /dev/sci0
services = tntsat
caid = 0500
aeskeys = <your aes keys here>
detect = cd
mhz = 357
cardmhz = 500
group = 1
lb_weight= 1000
auprovid = 030B00


[reader]
label = cardreader-telesat
protocol = internal
device = /dev/sci0
services = telesat
caid = 0100
detect = cd
mhz = 357
cardmhz = 500
group = 1
emmcache = 1,3,2
lb_weight = 1000
auprovid = 00006D


Save the file and store it in when using oscam-experimental :

/etc/tuxbox/config/oscam-stable/ (or if using experimental: /etc/tuxbox/config/oscam-experimental/ )

Reboot and you can enjoy your working smartcard/choosen signal provider (tntsat example is made by user Fretsat, others by user daniel2005)



Examples from user daniel2005: (many thanks for this info)

oscam.conf

[global]
# first create the needed directory's and see if there is usb stick ,cf or hdd
usrfile = /media/hdd/oscam/oscamuser.log
logfile = /media/hdd/oscam/oscam.log
cwlogdir = /media/hdd/oscam
loghistorysize = 9999
unlockparental = 1
nice = -1
maxlogsize = 50
saveinithistory = 1
lb_mode = 1
lb_save = 100
lb_savepath = /media/hdd/oscam/stat

[monitor]
hideclient_to = 15
appendchaninfo = 0

[dvbapi]
enabled = 1
au = 1
boxtype = dreambox
user = localuser
request_mode = 1

[webif]
httpport = 5000
httphelplang = en
httpuser = user
httppwd = password
httpcss = /etc/tuxbox/config/proflinux_ddcstyle.css
httprefresh = 20
httpallowed = 127.0.0.1,192.168.1.1-192.168.1.254

You can replace these lines
usrfile = /media/hdd/oscam/oscamuser.log
logfile = /media/hdd/oscam/oscam.log

by

usrfile = stdout
logfile = stdout

the ccsfile must be in the config directory.


oscam.server

[reader]
label = cardreader-tvvlaanderen
protocol = internal
device = /dev/sci1
services = tvv
caid = 0100
detect = cd
mhz = 357
cardmhz = 500
group = 1
emmcache = 1,3,2
lb_weight = 1000
auprovid = 00006C

[reader]
label = cardreader-telesat
protocol = internal
device = /dev/sci1
services = telesat
caid = 0100
detect = cd
mhz = 357
cardmhz = 500
group = 1
emmcache = 1,3,2
lb_weight = 1000
auprovid = 00006D

the caid can be changed, but don't forget to change auprovider and the services.


oscam.user

[account]
user = localuser
group = 1
au = 1

that is the user for the dvapi, the au = 1 is for the update


oscam.services

[tvv]
caid = 0100
provid = 00006C,000000
srvid =

[ned]
caid = 0100
provid = 00006A,000000
srvid =

[telesat]
caid = 0100
provid = 00006D,,000000
srvid =

you can add srvid , but it's not nessesary when you've full account.


oscam.dvbapi

P: 0100:00006C # TVVlaanderen
P: 0100:00006A # Ned
P: 0100:00006D # T�l�sat

Sequence doesn't matter. If you ignore some caid or svrid, put them on top.
This file is added by daniel2005 : proflinux_ddcstyle.css



New mapping method working for BE and NL seca cards
Make sure you are using dvbapi request mode 1 / try all CAID simulataneously
Be sure to use a oscam unstable 1.20 rev 5941 or newer

oscam.dvbapi

I: 0100 #Oud seca NL+Vlaanderen
I: 0500 #Viaccess op vlaamse zenders
I: 0622 #Bleh... irdeto codering

M: 1817:00006A 0100:00006A #NL Pakket
M: 1818:00006C 0100:00006C #Vlaams Pakket

P: 1817:00006A #NL Pakket
P: 1818:00006C #Vlaams Pakket



Other examples here



Howto for the extreme poweruser OScam diehard (only for experienced users)

To customize your OScam version:
Download the latest experimental from OScam Download Center
For enigma2 device with recent openpli you choose mips-tuxbox version to download.
Unpack the tar gz and give the bin file exactly the same name of the oscam-... bin file found in openpli at the usr/bin directory. ( /usr/bin/oscam-... )
In openpli, disable the oscam softcam(Setup > SoftCam/CI > Softcam setup... > Select softcam > (press left or right to select)
Then use a ftp client to transfer (overwrite) the installed bin file with the new customized bin file that has exactly the same name.
In openpli, enable the oscam softcam(Setup > SoftCam/CI > Softcam setup... > Select softcam > (press left or right to select)
Done.

Or by telnet:
Download the latest experimental from OScam Download Center
For enigma2 device with recent openpli you choose mips-tuxbox version to download.
Then use a ftp client to transfer the bin file to /usr/bin . (example /usr/bin/oscam-svn5944-mips-tuxbox-webif )
Then connct by ssh / telnet session to your enigma2 tuner and do:

cd /usr/bin

killall oscam

mv oscam-svn5944-mips-tuxbox-webif oscam

chmod 776 oscam

oscam -b

exit

(mv nameofbinfile oscam)
And you're done. This diehard extreme poweruser howto is made with help of users: daniel2005 & theparasol (thanks again folks)




Back to the PLi® Wiki : SoftCam Wiki : DM500 : DM500+ : DM56xx : DM600 : DM7000 : DM7020 : DM7025 : DM800 : DM8000 : VU+
There is one comment on this page. [Display comment]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki