OScam Cache-EX Tutorial

May 3rd, 2012 / No Comments » / by admin

This is tutorial made by user CapNCooK!

What is Cache-EX ?
The Cache-EX feature makes it possible to exchange Oscam’s caches from server to server.

Why is Cache useful in general ?
Quite simple. Even without Cache-EX enabled, Oscam builds a cache by default. Every requested ECM by a client is forwarded to an available card or proxy reader. This ECM will stay in Oscam’s memory (cache), until its validity expire. On a busy server, you can imagine that there are quite a lot of valid ECM’s in memory.

When a second client requests an ECM for the same channel, it will automatically forward the available ECM from local cache, without requesting a reader or proxy, resulting on less load on your cards. Obviously, when its not available from local cache, the request is forwarded to a proxy or card.

You can see answers from Oscam’s local cache in your logs.
The reader-name mentioned, is the reader where the ECM originally came from.

2012/03/12 1412EAF0 c USER_A (0100&00006A/5212/64:4A32): cache1 (4 ms) by READER1 (13 of 26) – RTL7 HD
2012/03/12 1412EAF0 c USER_B (0100&00006A/51BD/64:0C7D): cache2 (22 ms) by READER2 (14 of 26) – Sport1 Tennis
2012/03/12 140E5170 c USER_C (0100&00006A/17CC/64:6172): cache2 (133 ms) by READER3 (14 of 26) – EredivisieLive1 HD
2012/03/12 141226A0 c USER_D (0100&00006A/17CC/64:6172): cache2 (190 ms) by READER3 (14 of 26) – EredivisieLive1 HD

OK, so why use Cache-EX on top of the normal cache ?
Cache-EX can be enabled by adding a special user to the server, and a special reader to the client with corresponding Cache-EX parameters. This reader and user is only capable of transporting cached-ecm’s. When no valid cached-ecm is found on the server, the request is ‘rejected’. The benefit of this method, is that every ECM request on your server will be tried against the cache of your Cache-EX-enabled readers first. The answer on such requests is given very fast, since a server is able to check this in no-time. When no Cache-EX-enabled reader is able to answer the ECM request, the request is forwarded to- and answered by a ‘normal’ reader.

How-To setup CACHE-EX
Like stated above, Cache-EX can be configured with the ‘cacheex’ parameter on your user or reader. To use it, Oscam has to be compiled with CACHE-EX support set to ON.

The Cache-EX-user must have always the same mode configured as the connecting Cache-EX-reader.

——————————————————————

There are 4 modes you can setup:

1. cacheex = 1 – cachepull

OSCam A reader1 has cacheex = 1
OSCam B account1 has cacheex = 1

OSCam A gets a ECM request, reader1 send this request to OSCam B,
OSCam B checks his cache:

Not found in cache: return NOK (shows as ‘rejected’ in logs)
Found in cache: return OK+CW
Not found in cache, but found pending request: wait cacheexwaittime in oscam.conf [global] and check again.

OSCam B never requests new ECMs.
CW-flow = B —> A

2. cacheex = 2 – cachepush

OSCam A reader1 has cacheex = 2
OSCam B account1 hastcacheex = 2

If OSCam B gets a CW, its pushed to OSCam A, reader has normal functionality and can request ECMs.

Problem: OSCAM can only push CW’s if OSCam A is connected
Problem or feature?: OSCam A reader can request ECMs from OSCam B
CW-flow = B —> A

3. cacheex = 3 – reversecachepush

OSCam A reader 1 has cacheex = 3

If OSCam A gets a CW, its pushed to OSCam B. OSCam A never requests new ECMs.
CW-flow = A —> B

To make a long story short, i tested all modes extensively, and found out that mode 1 is working best.

Example of Mode1 Cache-EX(change) in two directions.
This example creates a bi-directional transport of cache between two servers, with mode 1.

oscam.reader on OSCAM-A:

[reader]
label = OSCAM-B-CACHE
protocol = cccam
device = oscamserverB.com,12000
user = OSCAM-A-CACHE
password = password
inactivitytimeout = 0
cacheex = 1
group = 1
dropbadcws = 1
cccversion = 2.3.0
ccckeepalive = 1
cccreshare = 3

oscam.user on OSCAM-B:

[account]
user = OSCAM-A-CACHE
pwd = password
group = 1
cacheex = 1
cccmaxhops = 10
cccreshare = 1

oscam.reader on OSCAM-B:

[reader]
label = OSCAM-A-CACHE
protocol = cccam
device = oscamserverA.com,12000
user = OSCAM-B-CACHE
password = password
inactivitytimeout = 0
cacheex = 1
group = 1
dropbadcws = 1
cccversion = 2.3.0
ccckeepalive = 1
cccreshare = 3

oscam.user on OSCAM-A:

[account]
user = OSCAM-B-CACHE
pwd = password
group = 1
cacheex = 1
cccmaxhops = 10
cccreshare = 1

Logging and monitoring
You can see traffic flowing from Oscam’s log. For example:

When a cache-ex-request is NOT found in cache, or an invalid SID is requested:
2012/03/12 13:51:13 1412EAF0 c OSCAM-A-CACHE (0100&00006A/51E0/64:C1C8): rejected peer (55 ms) (13 of 25) – Sport1 HD

When a cache-ex-request IS found in cache:
2012/03/12 13:51:07 144716B0 c OSCAM-A-CACHE (0100&00006A/17CC/64:B81C): found (32 ms) by OSCAM-B-CACHE (7 of 16) – EredivisieLive1 HD

Also, you can check an overview of the cache thru the WEB GUI -> http://<oscamserverURL>/cacheex.html

The efficiency of your cache can be measured with the totals displayed on the bottom of Oscam’s Users page in the GUI.

My server currently reports:

Total Disabled Expired Active Connected Online OK NOK IGN TOUT CACHE TUN Action
50 1 0 46 36 11 29513 0 186905 3741 24140 0

Meaning.. almost almost 50% of all my request are flowing from cache.

Tags: , ,

OScam files location

May 3rd, 2012 / No Comments » / by admin

OScam files location

OScam configuration files are usually located in /var/etc/tuxbox/config directory!

Tags: , ,

OScam Setup

May 3rd, 2012 / No Comments » / by admin

OScam Setup

Yes, you have come to the right place. This site contains many many good guides for OScam. OScam Setup isnt easy, because it is way more complicated than CCcam. But with the help of my two sites: oscamtips and oscamconfigs, you can embrace OScam pretty quickly. Enjoy using OScam, the best cardserver in the world!

Tags: ,

OScam Smargo

May 3rd, 2012 / No Comments » / by admin

OScam Smargo cardreader

1. If you are using Smargo cardreader on PC (Linux server), then use this config in oscam.server:

[reader]
label                         = xx
protocol                      = smartreader
Device             = Serial:Reader xx
caid                          = xx
ident                         = xx
smargopatch                 = 1
rsakey                        = xx
boxkey                        = xx
detect                        = cd
mhz                           = 357
cardmhz                       = 357
group                         = x
emmcache                      = 1,3,2

How to find out device info?

Type these lines in telnet:  lsusb -v | grep iSerial
You should get something like this (this is an example!):

iSerial 3 Reader 129

Now you can add this in oscam.server:

Device = Serial:Reader 129

Smargo cardreader will now work in OScam without any issues, even after rebooting your PC. Number 129 doesnt change. What you need is make sure your smartreader is updated to v. 1.4!

2. If you are Smargo cardreader in Dreambox, VU+ or Xtrend/CT, please use this config in oscam.server:

[reader]
label                         = xx
protocol             = smargo #you can also try mouse instead of smargo
device              = /dev/ttyUSB0 #if you have more smargos, just use /dev/ttyUSB1, /dev/ttyUSB2, etc.
caid                          = xx
ident                         = xx
smargopatch                 = 1
rsakey                        = xx
boxkey                        = xx
detect                        = cd
mhz                           = 357
cardmhz                       = 357
group                         = x
emmcache                      = 1,3,2

Tags: , , , ,

CCcam Tutorial Collection

April 20th, 2012 / 1 Comment » / by admin

CCcam Tutorial

I have many CCcam tutorials on my site and i would like to collect all CCcam guides into one post. In this way you will find useful information easier than before. Lets start with a few general CCcam tutorials. I recommend How to CCcam tutorial and Quick C-line tutorial. Here you can find all info that you need if you are CCcam beginner.

If you want quick totorial about connecting two receivers using CCcam, please check this CCcam to CCcam tutorial. This is intended for those who are cardsharing at home (homesharing).

CCcam.cfg file is important component of CCcam. If you want to get example file i recommend that you visit article CCcam.cfg Example. This is very simple version, and in many cases you dont need anything else!

Are you using OScam as cardreader and you would like connect OScam with CCcam? Here are a few useful articles about this. You can connect OScam with CCcam using Camd35 connection. OR you can connect OScam with CCcam using Newcamd connection. Any here you can find another tutorial about connecting OScam with CCcam with example (Sky UK).

I think i covered all expect of beginners cardsharing. Enjoy!

Tags: , , , , ,

Which OScam forums are there?

April 18th, 2012 / No Comments » / by admin

OScam forums

There are two big oscam forums. I would suggest both, links are here:

http://www.oscam.to/wbb3/index.php?page=Portal

and

http://streamboard.gmc.to/wbb2/index.php (you need to be registred)

Tags: , ,

OpenPLi Dreambox

April 13th, 2012 / No Comments » / by admin

OpenPLi Dreambox

OpenPLi is one of the rare images which still have softcams on their server. You can easly download OScam, CCcam, MGcamd and other softcams. I am using it on my all receivers. It is pretty basic but it has some powerful features that you wont find elsewhere. Its no wonder that other teams are using OpenPLi sources as basis for their images (OpenAAF, VIX, OpenPole).

Tags: ,

Cyfra+ and Satsklep

April 13th, 2012 / No Comments » / by admin

Cyfra+ and Satsklep

You can easly buy different Cyfra+ prepaid cards on Satsklep.pl web-store. I already ordered TWO Cyfra cards from them and i have had no problems at all. I highly recommend their service and i am not alone. Use google if you dont believe me. Cyfra+ card comes preactivated and works just fine with OScam. Satsklep is using UPS for delivering cards to buyers. This means that delivery is reliable and fast (3-4 days to deliver the package all over EU).

Tags: , ,

Oscam to CCcam (Camd35)

February 18th, 2012 / 2 Comments » / by admin

In oscam.conf put this:
[cs357x]
port = 15991 (choose whatever number you want)
serverip = 192.168.1.xxx (this is your server ip,)

Then open oscam.user file and put this in:
[account]
User = xxx (username that you will use in L line in cccam)
Pwd = xxx (password that you will use in L line in cccam)
Group = x (this depends on your settings in oscam.server file)
AU = xxx (this depends on your settings in oscam.server file)

Now open CCcam.cfg and put this line in:
L: 192.168.1.10 port username password 0500 031000 256

First number is IP address of your server, then there is port number and username/password. At the end there is CAID number of your package and you can also optionally add 256 at the end. This means that your card will show as local in cccam :) Same trick as in newcamd (N line).

Thats it.

Tags: , ,

Oscam to Oscam (Camd35)

February 18th, 2012 / No Comments » / by admin

Thanks to shatanar from cccamforum.com

You can share between two Oscam servers using camd35 protocol on UDP. This is my preferred protocol. Why? Its the fastest and most reliable. Activate camd35 protocol in oscam.conf on your server and use camd35 reader on your client.

On the server (Box1)

oscam.conf
[cs357x]
port = 25550

oscam.user
[account]
user = user1
pwd = pass1
group = 1
au = 1

Client machine (Box2)

Oscam.server
[reader]
label = label of reader
protocol = camd35
device = ipservert,25550
user = user1
password = pass1
services =
caid =
group = 1
emmcache = 1,3,2

I hope you understand this. If not, do not hesitate to comment and i will try to help you.

Tags: , , ,