Here is my guide for OSCAM with MediaPortal:
Warning 1 - Using a Sky card in this way is against Sky terms and conditions and I neither use this personally, or condone it. I only provide this guidance for research purposes for use with providers who permit this usage.
Warning 2 - MediaPortal do not support ACamd and any threads on their forums will be closed immediately (see Warning 1).
Warning 3 - Use this guide at your own risk.
Thanks to Jameson_UK and Jobyrne30 for their posts/PM which were used to create this guide.
1.Plug the Omnikey Card Reader (or Smartgo reader) USB plug in to one of the USB ports on the back of your HTPC. If you are running Windows 7, then it is best to install these drivers over the top of the windows drivers
HID Global (just download the unattended setup installer and run it) - doing this will stop windows then detecting the actual smartcard as a device in its own right and will make it much easier to get a reliable system
2.Place the downloaded OSCAM files (OSCAM 1.10rc-svn build #5876 works with Windows 7) into C:\oscam
3. SMARTGO: If you are using a Smargo smartreader + rename the file oscam.server_smargo to oscam.server edit and using WordPad or notepad edit the file to suit your needs
OMNIKEY: If you are using an Omnikey 3121 reader rename the file oscam.server_omnikey to oscam.server and using WordPad or notepad edit the file to suit your needs
(note: I have only tested the omnikey reader with this instruction).
4. You will need to edit the following 3 files (using notepad) and past the text from below into each of them (replace any similar text inside the existing files):
oscam.conf:
Code:
[global]
logfile = /dev/tty
disablelog = 0
disableuserfile = 0
usrfileflag = 0
clienttimeout = 5000
fallbacktimeout = 2500
clientmaxidle = 120
bindwait = 120
netprio = 0
clientdyndns = 0
resolvedelay = 30
unlockparental = 0
nice = -1
serialreadertimeout = 1500
maxlogsize = 2048
waitforcards = 1
preferlocalcards = 1
saveinithistory = 1
readerrestartseconds = 4
lb_mode = 1
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
[newcamd]
port = 15008@0963:000000
key = 0102030405060708091011121314
allowed =
keepalive = 1
mgclient = 0
[webif]
httpport = 8080
httpuser = ADMIN
httppwd = ADMIN
httprefresh = 0
httpallowed = 192.168.1.2-192.168.1.9
httphideidleclients = 0
httpreadonly = 0
oscam.user (this is where the two user names should go - note you need a user name per tuner, so this setup assumes 2 tuners, if you have more tuners just copy the block and call it USER3, USER4 etc).
Code:
[account]
user = USER1
pwd = USER1
disabled = 0
expdate =
group = 1
hostname =
uniq = 1
sleep = 0
monlevel = 1
au = cam1
services =
caid = 0963
betatunnel =
ident =
chid =
cccmaxhops = 10
keepalive = 1
numusers = 0
penalty = 0
[account]
user = USER2
pwd = USER2
disabled = 0
expdate =
group = 1
hostname =
uniq = 1
sleep = 0
monlevel = 1
au = cam1
services =
caid = 0963
betatunnel =
ident =
chid =
cccmaxhops = 10
keepalive = 1
numusers = 0
penalty = 0
oscam.server
Code:
[reader]
label = cam1
enable = 1
protocol = pcsc
device = 0
services =
caid = 0963
ident =
group = 1
emmcache = 1,3,2
ecmcache = 1
blockemm-g = 0
lb_weight = 100
All other files remain unchanged and you do not need to enter your box ID with this later version of OSCAM.
5. Run the OSCAM.exe (a command window will open), then using your web browser, navigate to
AVForums.com - UK Online (or replace "localhost" with the IP of the OSCAM PC if you are using a different PC to access the webservice). (Username "ADMIN" Password "ADMIN"). You should see roughly the same information as is shown in the command window in the webservice status page.
6. Click on "Readers". Give your card reader a name (any will do), then select PCSC Protocol, then click Add (don't bother with this if a PCSC protocol is already in the list of readers).
7. Insert the Viewing Card into the Card Reader. The command window (and the webservice status page if you press F5) will then list your entitlements (if not, try restarting OSCAM).
8. Download MDAPI (
MDAPI 2008 for Mediaportal - Techwatch Support Forums: Digital & Satellite TV, FTA, Cable, Computers, Mobile Phones, Apple and General Tech Forums) and copy the contents to c:\MDAPI_setup.
9. Open up a dos command window in Administrator mode (right click on cmd icon in start menu and select the option to run it as administrator. Within the command prompt, navigate to the MDAPI_setup directory they run installfilter.cmd. This will install and configure the MDAPI files on your machine.
(note: if you use explorer to monitor the contents of “C:\Program Files\Team MediaPortal\TV Server\” while this installation is running, you should see a couple of new files appear, as well as a new directory call MDPlugin. These files appearing indicate the configuration has worked successfully). If you are having problems running the installation, then this thread will help you:
MediaPortal and MDapi Problem
10. When the installation is complete. Run the MP TV Server Config program.
11. Navigate to your TV Server and click on it (shown below), then select each of your DVB-S and DVB-S2 tuners in turn and enable CAM for these devices (highlight the tuner then select Edit). Leave CAM limit set at 0).
12. Navigate to the “Manual Control” menu option, and one at a time highlight each of your DVB-T, DVB-S, DVB-S2 TV tuners in turn, then click on “Start Timeshift”, followed by “Stop Timeshift” (you should do it for DVB-T tuners even though theses won't actually use the card). (note: you should tune to any FTA channel, NOT an encrypted channel).
13. Click OK to close the TV Server Config.
14. Now navigate to the “C:\Program Files\Team MediaPortal\TV Server \MDPlugin\” directory.
15. Right click on the MDAPICards.xml file and select “open with” then select “Notepad”. This file should list each of your DVB tuners in it. Make sure that for each of the DVB-S/S2 tuners, enableMdapi=1, and for each of the DVB-T tuners, enableMdapi=0. Save the file and quit notepad.
16. Within the “C:\Program Files\Team MediaPortal\TV Server\MDPlugin\” directory, there should be a number of sub-directories (one for each of your tuners listed within the MDAPICards.xml file you just edited. In to each of these directories you need to copy both Acamd.dll and cardclient.conf (which can be download from here:
Forum Gateway - Sat Universe) (pick the latest version). The remaining files from this download which are not put into the tuner sub-directories can be placed in the MDPlugin directory.
Quote:
Thanks to Paul77 for this tip:
However if the tuner folders don't appear after time shift on both then you need to - Add permissions to have full control of mdapiplugins folder
- Open mdapifilter.xml
- Edit relevant tuners to remove spaces/shorten names eg TBSA and TBSB
- Run the time shift on both cards again and folders should appear
|
17. Once each of the C:\Program Files\Team MediaPortal\TV Server \MDPlugin\” sub-directories have got Acamd.dll and cardclient.conf within them, you need to edit each of the cardclient.conf files in-turn (with notepad), giving each of the files relating to each of the tuners a unique username (USER1, or USER2).
eg. card1 should contain the text:
newcamd:127.0.0.1:15008:1:USER1:USER1:010203040506 0708091011121314,
Card2 should contain the text:
newcamd:127.0.0.1:15008:1:USER2:USER2:010203040506 0708091011121314
18. Now open MediaPortal TV Server Config and try previewing an appropriate channel (it should work, and the OSCAM command window should start updating every couple of seconds as it handshakes with ACamd).
19. (After you have proven it to work) You can set OSCAM to run as a windows service rather than in a msdos command window (it is more reliable like this). before you do this, you will need to close the OSCAM command window and do a re-boot. (note: if you don't want to setup OSCAM as a service, you will need to make sure that windows automatically runs OSCAM at startup).
Use these instructions: Create your own user-defined services Windows NT/2000/XP/2003 (Windows NT/2000/XP/2003) - TACKtech Corp.
When you put the string details in the registry (show as "String : <path> \<application.ext>" within the above link), you need to also add a -c switch and the conf file directory, so on my system the string looks like this:
Code:
C:\oscam\oscam.exe -c C:\oscam
20. From my limited experience, OSCAM is generally pretty stable, but it is often problematic during recovery from standby (problems with blocking users or not reading smartcard). Simply trying to re-start the OSCAM service after recovery from standby doesn't work as you often end up with multiple instances of OSCAM running (which stops it working all together). The best fix to this is to make sure you use the Omnikey drivers I have linked to in item 1 of this instruction.
However, if you are still having problems: Create a batch file somewhere with the single line in it
.
Download "Power Triggers" and install it (Power Triggers is a programme for running programmes and re-starting services after standby).
Configure "
Power Triggers" so that it runs your batch file before the system enters standby (thus killing OSCAM) and then also so that it "restarts" the OSCAM service upon resume. (note, selecting "start" service does not work, it must be "restart" for some reason).
This will refresh OSCAM after every standby event.