How To Setup A Linux PC Card Server

Status
Not open for further replies.

B16MCC

Dreambox Gimp & Coder
Joined
Nov 16, 2005
Messages
1,562
Reaction score
8
Points
0
Age
51
My Satellite Setup
2 Dreamboxes..........
---------------------------------------------
--- DM 8000 HD PVR & DM 800 HD ---
Motek SG2100 & Triax 80cm Dual LNB
------ Fixed Dish 28e Quad LNB -------
---- Sly HD Full & 24" Apple iMAC ----
My Location
/var/tuxbox/config
Hi guys, I've wanted to do this for a while and have finally got round to making it happen. Since buying my enormouse 24" iMAC my old ASUS pc has been sat on the bench in the garage doing nothing. Well now it has a very important job. It now runs flawlessly serving my little white card around my house and beyond.

How to setup a Linux PC Card Server.

Prerequisites :-

1. A networked PC that has no real purpose in life.
2. A clean install of ubuntu desktop edition. ( _http://www.ubuntu.com/GetUbuntu/download )
3. Configured telnet access to ubuntu.
4. Configured FTP server on ubuntu.
5. Omnikey 3121 USB card reader. ( _http://www.omnikey.com )
6. 1 - 2 spare hours.

attachment.php


I'm not going into the initial setup of Ubuntu , telnet or FTP as there are many places you can find help with that. Its dead easy !

At this point I should mention that much of this setup is done using command line instructions, in my case executed from my mac via telnet. You can of course use putty in windows or do it locally on the ubuntu machine in a terminal window. I wll not stipulate the difference between these options, thats up to you.



Required Software :-

NewCS
CCcam
PCSCd
pcsc-tools
Omnikey Driver

To install the required components simply type the following, enter your password and answer the prompt with 'yes'

sudo apt-get install pcscd
sudo apt-get install pcsc-tools


Omnikey Driver
_http://www.omnikey.com/index.php?id=69&rName=CardMan%203x21%20PC/SC%20CCID%20for%20Linux%2032%20Bit&did=69

This is a tarball I believe they're known as, its an archive basically, I unpacked it on my mac and then just FTP'd the unpacked folder to the ubuntu desktop. You can use Winrar also to unpack it or I'm sure there's a way in linux too.

Again in telnet, navigate to the unpacked folder and install by typing

./install

Once you have everything installed you can test the card reader for a response. Simply type

pcsc_scan

Code:
b16mcc@b16mcc-desktop:~$ pcsc_scan
PC/SC device scanner
V 1.4.14 (c) 2001-2008, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.4.99
Scanning present readers
0: OmniKey CardMan 3121 00 00

If your card is not in the database it tells you the command to use to update that database. I needed to do that and afterwards it knew my card. This is not essential however for it to work, just nice to see !

Code:
Possibly identified card (using /home/b16mcc/.smartcard_list.txt):
3F FD 13 25 02 50 00 0F 33 B0 0F 69 FF 4A 50 D0 00 00 53 59 02
Sly Digital (DSS satellite TV card) 2009 issue

Install and setup NewCS.
Ok so via FTP lets setup some files and folders. By default the home directory of your FTP server will be /home/username/

In that folder I made a new folder, NewCS. I did this using my FTP software.
Now lets put the files we need in those folders.

Sticking with just NewCS for now, we'll add CCcam later.
In /home/username/NewCS you need :-
newcs.i686.pcsc
newcs.xml

If you like you can now rename your newcs.i686.pcsc , I called it newcs_167

Ok, next we need to edit the newcs.xml file to read our card using our Omnikey reader. Here's my config with a few personal details removed. This is exactly my config it does work.

Code:
<newCSconfig>
<readers name="Standard Omnikey on PC">
<device>
<name>Omnikey</name>
<type>pcsc</type>
<mhz>368</mhz>
<node>0</node>
<parity>odd</parity>
<reset>normal</reset>
<export>Yes</export>
<enabled>Yes</enabled>
<boxkey>01020304</boxkey>
<blocksa>No</blocksa>
<blockua>No</blockua>
<blockga>Yes</blockga>
<blockC0>Yes</blockC0>
<carddetect>Yes</carddetect>
<newcamd_port>12010</newcamd_port>
<autosid>Yes</autosid>
<priority>round</priority>
</device>
</readers>
<radegastserver>
<enabled>No</enabled>
<port>10001</port>
<allow>
<hostname>localhost</hostname>
</allow>
</radegastserver>
<cache>
<emm>20</emm>
<ecm>-1</ecm>
</cache>
<httpd>
<server>
<port>8080</port>
<enabled>yes</enabled>
</server>
<user>
<name>admin</name>
<password>admin</password>
<accesslevel>admin</accesslevel>
</user>
</httpd>
<debug>
<password>NewCSpwd</password>
<mode>simple</mode>
<level>internal</level>
<type>all</type>
<output>console,tcp</output>
<tcp_port>1001</tcp_port>
<tcp_options>normal,init</tcp_options>
</debug>
<newcamdserver>
<enabled>Yes</enabled>
<name>newcs</name>
<deskey>01 02 03 04 05 06 07 08 09 10 11 12 13 14</deskey>
<user>
<name>CCcam</name>
<password>CCcam</password>
<au>on</au>
<sidoverride>off</sidoverride>
<spider>No</spider>
<cardlevel>1</cardlevel>
</user>
</newcamdserver>

</newCSconfig>

Once thats in place and we're happy we've had a good output from pscs_scan we can go ahead and run NewCS for the first time. Just one more thing though, NewCS has a default location where it expects to see the newcs.xml file, we of course are using a custom location so we need to tell it that. Run NewCs by typing this :-

./newcs_167 -C /home/username/NewCS/newcs.xml

The -C switch simply means use this location for the config. You can see all switches by using -h for help.

So, thats it she's running. You should now be able to open up the web browser and see your card. In your address bar type in :-

_http://dreamboxip:8080

Enter your user name and password and you're in. Have a click around the different options on the left and you should see your card.

To stop NewCS simply type in your telnet session :-

killall newcs_167

Now, its a little long winded typing that startup command with the great big -C switch so we'll make a tiny script file to do it for us.

Code:
#!/bin/bash
cd /home/username/NewCS
./newcs_167 -C /home/username/NewCS/newcs.xml
Save this file as startnewcs.sh in your /home/username folder

Now to start NewCS you can simply type :-

./startnewcs.sh

This is a very very simply way of doing it, but it works. If someone out there is a linux god then maybe you can retort here and show us how its done properly. Cheers.....

So now that the server is up and running lets connect to it from CCcam. Simply add this line to the CCcam.cfg in your Dreambox.
Code:
N: 192.168.100.100 12010 CCcam CCcam 01 02 03 04 05 06 07 08 09 10 11 12 13 14

Where 192.168.100.100 is the IP address of your new linux server.
You'll notice the port number 12010 matches with the <newcamd_port> parameter and the user and pass match with the <users> parameters.

As normal if you want to access this from outside your LAN then you'll need to forward port 12010 in your router to the Linux PC IP address and replace the IP address in the N: line with your WAN IP or your DNS address.

Ok so that enough for now, I'm going bog eyed. Oh just one thing, all the files and folders we have FTP'd or created, just make sure you CHMOD them all to 755 to ensure they have the correct permissions. Things can be a little confusing when you don't do this.

Guys, some of this I've done from memory so if there's anything thats troubling you I'm sure you'll comment and I'll be happy to help.

I'm pretty sure you can setup the CCcam server too using this basis but if anyone wants it adding to this tutorial then please ask and I'll oblige.
 

dui

Member
Joined
Jul 27, 2009
Messages
4
Reaction score
0
Points
0
Age
47
My Satellite Setup
DM800 HD
APPLE IMAC
PLENTY OF LAPTOPS
My Location
Yorks
Hi Guys,

not having much luck with this and don't know where i'm going wrong, been trying to get it to work for few days :confused

i've done a fresh install of Ubuntu Desktop 9.04.
done the following successfully (from terminal window in Ubuntu)
sudo apt-get install pcscd
sudo apt-get install pcsc-tools

then when i go to install the drivers and issue the ./install command i get an error saying that i need to install pcsc-lite.

so i download pcsc-lite and type the following (one line at a time):
./configure
make
make install

then i go back to install the omnikey driver and issue the ./install command and this time the driver installs.

but when i type 'pcsc_scan' i get the following error:

EDIT: forget that, i got it working, was typing pcsc-scan instead of pcsc_scan :-doh2

i'll continue with the rest now...

thought i'd leave the post up cos it has a few extra steps that i did which were not in the tutorial.
 

B16MCC

Dreambox Gimp & Coder
Joined
Nov 16, 2005
Messages
1,562
Reaction score
8
Points
0
Age
51
My Satellite Setup
2 Dreamboxes..........
---------------------------------------------
--- DM 8000 HD PVR &amp; DM 800 HD ---
Motek SG2100 &amp; Triax 80cm Dual LNB
------ Fixed Dish 28e Quad LNB -------
---- Sly HD Full &amp; 24&quot; Apple iMAC ----
My Location
/var/tuxbox/config
Thanks for the input, as mentioned most of it was written from memory so there may be the odd small issue. You did the right thing to mention it.
 

father ted

Regular Member
Joined
Jul 4, 2008
Messages
83
Reaction score
0
Points
0
Age
70
My Satellite Setup
just new , i have a 1meter dish, connected to open media twin unit (cable/sat)and this moment am a ladder fiend ,my wife sends meals up to me via pigeon but im loving the learning curve
My Location
scotland
pcsc_scan


Code:
b16mcc@b16mcc-desktop:~$ pcsc_scan
PC/SC device scanner
V 1.4.14 (c) 2001-2008, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.4.99
Scanning present readers
0: OmniKey CardMan 3121 00 00
If your card is not in the database it tells you the command to use to update that database. I needed to do that and afterwards it knew my card. This is not essential however for it to work, just nice to see !


Code:
Possibly identified card (using /home/b16mcc/.smartcard_list.txt):
3F FD 13 25 02 50 00 0F 33 B0 0F 69 FF 4A 50 D0 00 00 53 59 02
Sly Digital (DSS satellite TV card) 2009 issue


ive manged to get to this point ,it says everything above except it says it cant find my card in data base but when i go to it i can see it in there ,is this important?just need to do more work on my server for me to continue but looking good so far
 

B16MCC

Dreambox Gimp & Coder
Joined
Nov 16, 2005
Messages
1,562
Reaction score
8
Points
0
Age
51
My Satellite Setup
2 Dreamboxes..........
---------------------------------------------
--- DM 8000 HD PVR &amp; DM 800 HD ---
Motek SG2100 &amp; Triax 80cm Dual LNB
------ Fixed Dish 28e Quad LNB -------
---- Sly HD Full &amp; 24&quot; Apple iMAC ----
My Location
/var/tuxbox/config
Its not important mate. It will not effect NewCS.
 

shanamat

Member
Joined
Mar 28, 2009
Messages
11
Reaction score
0
Points
0
Age
63
My Satellite Setup
dm600 pvr
My Location
scotland
Hi Guys can anyone please help a damsel in distress, I've read and re read the above tut and also the above replies

@ B16MCC firstly thankyou for taking the time to post this

@ dui thankyou for posting the few extra steps that you did that were not in the first post

@ Father ted how are you getting on now, is there anything else that you can add.

Sorry for being so blond but can anyone please please post a complete idiots guide with any extra steps that they have taken to get this working

Thankyou :)
 

dui

Member
Joined
Jul 27, 2009
Messages
4
Reaction score
0
Points
0
Age
47
My Satellite Setup
DM800 HD
APPLE IMAC
PLENTY OF LAPTOPS
My Location
Yorks
have you actually tried any of the above?
work your way through the tutorial and let us know when you get stuck.
there were extra steps that i did, but can't remember and didn't write them down
( something like linking libcrypto file).
 

shanamat

Member
Joined
Mar 28, 2009
Messages
11
Reaction score
0
Points
0
Age
63
My Satellite Setup
dm600 pvr
My Location
scotland
I've got as far as this:

can get reader to see card when i insert it also it sees it when i remove it , if i do pcsc.scan it shows everything but cant get the new.cs to start (./newcs.i686 -C /var/etc/newcs.xml

can you offer any advice please :)
 

dui

Member
Joined
Jul 27, 2009
Messages
4
Reaction score
0
Points
0
Age
47
My Satellite Setup
DM800 HD
APPLE IMAC
PLENTY OF LAPTOPS
My Location
Yorks
what do you see on screen when you type ./newcs.i686 -C /var/etc/newcs.xml ?
 

compufunk

Regular Member
Joined
May 7, 2008
Messages
1,658
Reaction score
1
Points
38
My Satellite Setup
DM 600-S, VU+ Duo,
Moteck SG2100, Fracarro Penta 85 dish, LG LH3000 42&quot; TV + some computers
My Location
NW, Ireland
shanamat said:
I've got as far as this:

can get reader to see card when i insert it also it sees it when i remove it , if i do pcsc.scan it shows everything but cant get the new.cs to start (./newcs.i686 -C /var/etc/newcs.xml
can you offer any advice please :)
Try using the full path instead of ./newcs.i686.

If you dont know the full path, do the following at the command prompt.
Code:
whereis newcs.i686
If that doesn't tell you the full path, try .....
Code:
find / | grep newcs.i686
Your command with full path would look something like .......
Code:
/bin/newcs.i686 -C /var/etc/newcs.xml
or
Code:
/var/bin/newcs.i686 -C /var/etc/newcs.xml
 

BombedOne

Regular Member
Joined
Sep 9, 2008
Messages
1,107
Reaction score
6
Points
0
Age
57
My Satellite Setup
Covering 30W-105.5E range, two motors, C and Ku band. Various receivers/cards/cams/etc.
My Location
Republic of Georgia
Very interesting and educational thread.

Will Smargo USB reader work with above mentioned system?
 

shanamat

Member
Joined
Mar 28, 2009
Messages
11
Reaction score
0
Points
0
Age
63
My Satellite Setup
dm600 pvr
My Location
scotland
I have tried .newcs,i686 and know where it is , I have put the correct path wher the newcs file is, I have also tried /var/bin/newcs.i686 -c/var/etc/newcs.xml . I've also tried all the other variations that's been suggested, but im still getting this, thanks for all the help so far :
 

Attachments

  • card.JPG
    card.JPG
    104.9 KB · Views: 517

dreamer786

Member
Joined
Feb 23, 2007
Messages
14
Reaction score
0
Points
0
Age
58
My Satellite Setup
i have a 7025 dreambox
My Location
england
Hi very intresting tuotorial i have installed linux debian server i am getting error when i try to start newcs*** can not open shared libararies libcrypto.so.0.9.8 no such files or directories can you help to sort this out please
thanks
 

B16MCC

Dreambox Gimp & Coder
Joined
Nov 16, 2005
Messages
1,562
Reaction score
8
Points
0
Age
51
My Satellite Setup
2 Dreamboxes..........
---------------------------------------------
--- DM 8000 HD PVR &amp; DM 800 HD ---
Motek SG2100 &amp; Triax 80cm Dual LNB
------ Fixed Dish 28e Quad LNB -------
---- Sly HD Full &amp; 24&quot; Apple iMAC ----
My Location
/var/tuxbox/config
This thread is based on Ubuntu desktop 9.04 . Its highly likely you have missing dependencies that are in place as standard in ubuntu.
 

father ted

Regular Member
Joined
Jul 4, 2008
Messages
83
Reaction score
0
Points
0
Age
70
My Satellite Setup
just new , i have a 1meter dish, connected to open media twin unit (cable/sat)and this moment am a ladder fiend ,my wife sends meals up to me via pigeon but im loving the learning curve
My Location
scotland
shanamat said:
I have tried .newcs,i686 and know where it is , I have put the correct path wher the newcs file is, I have also tried /var/bin/newcs.i686 -c/var/etc/newcs.xml . I've also tried all the other variations that's been suggested, but im still getting this, thanks for all the help so far :

just clutching at straws here as ive not got it going either ,does anybody think it could be a faulty newcs.i686 file? does anyone have an up to date one so she could try?or let her know where to get it ,B16MCC where did you get yours?
 

shanamat

Member
Joined
Mar 28, 2009
Messages
11
Reaction score
0
Points
0
Age
63
My Satellite Setup
dm600 pvr
My Location
scotland
father ted said:
does anybody think it could be a faulty newcs.i686 file? does anyone have an up to date one so she could try?or let her know where to get it ,B16MCC where did you get yours?

great post now why didn't i think of asking that lol

so does anyone have one .... please ........ pretty please :-worship:-worship
 

B16MCC

Dreambox Gimp & Coder
Joined
Nov 16, 2005
Messages
1,562
Reaction score
8
Points
0
Age
51
My Satellite Setup
2 Dreamboxes..........
---------------------------------------------
--- DM 8000 HD PVR &amp; DM 800 HD ---
Motek SG2100 &amp; Triax 80cm Dual LNB
------ Fixed Dish 28e Quad LNB -------
---- Sly HD Full &amp; 24&quot; Apple iMAC ----
My Location
/var/tuxbox/config
Guys & Gals, if you're following this tutorial to the letter you need to use a pcsc compatible build of newcs. That means if you're using the omnikey reader which is a pcsc reader then the file newcs.i686 WILL NOT WORK.

I use v1.67 the filename is newcs.i686.pcsc but I rename once its in place. I'm pretty sure board rules don't allow me to attach this file.
 

BombedOne

Regular Member
Joined
Sep 9, 2008
Messages
1,107
Reaction score
6
Points
0
Age
57
My Satellite Setup
Covering 30W-105.5E range, two motors, C and Ku band. Various receivers/cards/cams/etc.
My Location
Republic of Georgia
As I've read elsewhere, NewCS supports Smargo SmartReader+. This means, it will also work with your setup?
 

B16MCC

Dreambox Gimp & Coder
Joined
Nov 16, 2005
Messages
1,562
Reaction score
8
Points
0
Age
51
My Satellite Setup
2 Dreamboxes..........
---------------------------------------------
--- DM 8000 HD PVR &amp; DM 800 HD ---
Motek SG2100 &amp; Triax 80cm Dual LNB
------ Fixed Dish 28e Quad LNB -------
---- Sly HD Full &amp; 24&quot; Apple iMAC ----
My Location
/var/tuxbox/config
Yes I don't see why not, but it depends on what card you want to use. For example, I've tried everything I know to get the new sly uk working in a smargo and nothing works.
 

shanamat

Member
Joined
Mar 28, 2009
Messages
11
Reaction score
0
Points
0
Age
63
My Satellite Setup
dm600 pvr
My Location
scotland
Hiya B16MCC, I am indeed using the omnikey reader and have been following your excellent tutorial to the letter.

If board rules don't allow you to attach this file would you be kind enough to pm me a link of where I can get this.

Many Thanks
Shanamat
 
Status
Not open for further replies.
Top