For my HTPC setup
I have to read a smart-card to get the keys to decrypt the digital cable (DVB-C) signals. I desided to run this card server on my little server (currently running Ubuntu 6.06LTS on my T23).
The hardware (a Phoenix/Smartmouse cardreader) is connected through a USB to Serial interface, so it comes up as /dev/ttyUSB0
on my computer.
Most of the set-up is described on this site: Cardsharing Forums - Setting up a NewCS cardserver
But it's a bit different on my Ubuntu machine, so I'll try to run through it here.
In my distribution of newcs-1.50 I didn't get the newcs.x86
file, so I use newcs.i686
in stead, and it works just fine :o)
I placed Newcs in a directory under my home dir, but you can put it where you like.
You'll probably have to make a link to libcrypto.so.0.9.7
, which is in /usr/lib/
, we need to make a link to it from /lib/
ln /usr/lib/libcrypto.so.0.9.7 /lib/libcrypto.so.0.9.7
Newcs expects the config file to be /etc/newcs.xml
You can copy the file that comes with Newcs that's called newcs.xml.phoenix
to that location.
The important parts to change in the file is <node>/dev/ttyUSB0</node>
And the of course enable the servers you need. I currently use the newcamdserver
and connects to it with the Acamd multidec plugin in GB-PVR
. Somehow I can't get the Yankse multidec plugin to connect to the Newcs server, which is strange, 'cos it worked when I ran it on a windows box, though, it doesn't matter as long as Newcs + ACamd works :o)
Now we can run the server, just go to the directory where the newcs.i686
file (which you may have to made executable with chmod 777 newcs.i686
) is (in my case it's in /home/USER/newcs-1.50/bin
While we're testing the server, just run it with ./newcs.i686
this will show you what the server is doing while it's running. Hopefully it'll show you that it has found the smart card, that it's adding the keys, and that it's starting the servers you've chosen. When the multidec plugin asks the server for keys you should see messages about that too.
When the server is running as it's suppose to, you'll probably want to redirect those messages to somewhere else (which could be /dev/null
if you don't want them at all), I direct them to a log file so I have a chance of seeing if anything has failed, so I start Newcs with this command:
./newcs.i686 &> /home/USER/newcs-log.txt &
This will start the Newcs server and redirect any output that would otherwise have been displayed in the terminal to the file /home/USER/newcs-log.txt