debian and smargo

nistleboy

Inactive User
Joined
Aug 4, 2010
Messages
1,504
Reaction score
403
Location
was manchester now n.i.
hi all

hope someone can help just finished loading debian and cccam i have a smargo witch i put the dev usb in it in cfg . been googling but cant find the answer. how do i know if smargo is working and reading my card. is there a code that will bring my smargo and what it is reading.thanks for any help, will be much appreciated.
nitleboy:Fish:
 
Last edited:
hi all

hope someone can help just finished loading debian and cccam i have a smargo witch i put the dev usb in it in cfg . been googling but cant find the answer. how do i know if smargo is working and reading my card. is there a code that will bring my smargo and what it is reading.thanks for any help, will be much appreciated.
nitleboy:Fish:

log into debian as root, then:

/emu/cccam/./CCcam.x86 -d

will run cccam in debug mode

Make sure your smargos are set up in the config
 
hi manicuk
im getting this and other errors
can not open var/etc/cccam cfg.
in the tut i read it said to ftp cccam 86 and cccam cfg into emu/cccam i just checked and they are still there.
im thinking maybe my cccam 86 maybe wrong as i removed it from cccam 2.13 maybe there is a debian cccam 86.
any help mateys.
nistleboy
 
hi manicuk
im getting this and other errors
can not open var/etc/cccam cfg.
in the tut i read it said to ftp cccam 86 and cccam cfg into emu/cccam i just checked and they are still there.
im thinking maybe my cccam 86 maybe wrong as i removed it from cccam 2.13 maybe there is a debian cccam 86.
any help mateys.
nistleboy

Did you manually install Debian or do an auto install.
Do you have the configupdate script installed?

Your CCcam.cfg belongs in /var/etc however the cam emulator belongs in /emu/cccam
 
hi manicuk
i manually installed it been at it a week now and its starting to piss me off mate.there was a tut from a guy called cc_share which i followed to the letter.when i was checking where i put cfg i was looking for var/etc but there was no cccam . not sure about configupdate script installed? is that the 2nd part ie CCcam php as i dont think i done anything wrong apart from following the tut.
thanks manic not sure if im going to get this sorted if all else fails ill prob use tm600 as server a lot less complicated.
nistleboy
 
hi manicuk
in the tut there is a vim /emu/script/configupdate.sh.which i did is this what u mean.am i right FTP program to upload CCcam.x86 and CCcam.cfg to /emu/cccam it is only these two files its not all the cccam files.the config is supposed to back up my cfg in var/etc .there is nothing there i tried to ftp cfg file but it keeps giving me critical error.
thanks again.
nistleboy
 
hi manicuk
in the tut there is a vim /emu/script/configupdate.sh.which i did is this what u mean.am i right FTP program to upload CCcam.x86 and CCcam.cfg to /emu/cccam it is only these two files its not all the cccam files.the config is supposed to back up my cfg in var/etc .there is nothing there i tried to ftp cfg file but it keeps giving me critical error.
thanks again.
nistleboy

If you have put your files in emu/cccam then just use this command from the prompt: /emu/script/configupdate.sh

if everything has been done correctly that should copy your CCcam.cfg to var/etc.
 
Last edited:
hi manicuk/wiz
getting the mess after /emu/script/configupdate.sh .no new config present,nothing to process. i take it i have to type configupdate again dont know where its gone.
thanks for help guys appreciated.
 
hi manicuk/wiz
getting the mess after /emu/script/configupdate.sh .no new config present,nothing to process. i take it i have to type configupdate again dont know where its gone.
thanks for help guys appreciated.

It is looking for the new CCcam.cfg in /home/cccam

you need to upload your CCcam.cfg via ftp to the above directory then run /emu/script/./configupdate.sh

:)
 
It is looking for the new CCcam.cfg in /home/cccam

you need to upload your CCcam.cfg via ftp to the above directory then run /emu/script/./configupdate.sh

:)

Nope it should be looking for it in emu/cccam,are you sure you ftp'ed your CCcam.cfg there first?

Apart from the fact that you should be able to put your cfg straight into var/etc to start with as the above script is really only for future cfg updates,

so I would be more inclined to figure out why you cant ftp it to var/etc to begin with?

are you logged in as root?

This is the guide I used to get my Virtual server working,although I dont use it now but it works perfectly,you may be able to compare it to what you did or even use it to start from scratch,


This is not my work but I have used this to setup a server on a Virtual Machine so can highly recommend it
icon_e_wink.gif


Download and Install Debian

First download the netinstall cd of debian linux
You can download it from the following URL:
Debian -- Network install from a minimal CD
(Most people will generally want the i386 version)
This will install the basic debian linux system on your hard disk.

During the installation process, it will ask you several questions
Hostname and domain are not really of much importance right now as you can change it at a later date. Here you can input a hostname and domain of your choice.

Another question you will be asked is if it can use the entire hard disk. As it is going to be a dedicated server, you can use the entire hard disk.
Quote:
Guided - use entire disk
When it's asking you for a network mirror, make sure you choose a fast and stable server.
Usually local university servers are fast and stable.

When you've completed the network mirror, it's going to download the software list.
Now you can deselect everything to keep the server as small as possible.
All you have to select is web server.
After a while it will eject the CD and it will start to reboot.

As you might have noticed during the installation of debian it uses dhcp to acquire an ip address. For a card server, it's not recommended to have it's IP address handled by DHCP. First thing we need to do is remove the DHCP and assign a static IP to the linux server



Assigning static IP
Log in as root with the right password
then type in the following command

Code:
vim /etc/network/interfaces

now remove the following line

Code:
auto eth0
iface eth0 inet dhcp
and replace it with

Code:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
These IP addresses might be different for your situation.
Remember to replace them with ip addresses relevant to your local network.
You can save the file with the following commands.

Code:
<esc>:ZZ (I had to use :wq as it would not recognise :ZZ)
(note that’s a capital Z so shift + zz)
Once the file is saved, you can restart the network and check if your linux server is running with its new IP address.

Code:
/etc/init.d/networking restart
ifconfig

ifconfig should now look something like this
Quote:
cardserver:/home# ifconfig
eth0 Link encap:Ethernet HWaddr 00:00:00:00:70
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:4ff:fe1d:d27b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8931 errors:0 dropped:0 overruns:0 frame:0
TX packets:6028 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7585683 (7.2 MiB) TX bytes:916823 (895.3 KiB)
Interrupt:10 Base address:0x4000

Installing SSH
Next thing that needs to be done is install an SSH daemon.
This will allow you to log into the card server securely from your own computer and the server does not require a keyboard and monitor if you want to change something.

Code:
apt-get install openssh-server
Once SSH is installed, you can logout of the server, remove the keyboard and monitor as we don't need it anymore.



Getting Putty
You need to download putty to your PC so you can log into the server with SSH

http://the.earth.li/~sgtatham/putty/lat ... /putty.exe
Update apt-get software list
To make sure, you locally have a good software list available, you have to update the apt-get database

Code:
apt-get update



Installing an FTP server
To be able to transfer files between your computer and the linux server, an FTP server is needed.
During the installation it will ask you one question. Answer it with "stand-alone"
This will consume a bit more memory but will prevent linux from spawning a new process every time you log in.

Code:
apt-get install proftpd

The server is now installed and all the needed files are in place.

Preparing your server for CCcam
Now it's time to get it ready for CCcam.
First thing we need to do is make 6 directories and adjust the parameters.

Code:
mkdir /emu
mkdir /emu/cccam
mkdir /emu/script
mkdir /emu/log
mkdir /var/etc
mkdir /var/keys
chmod 777 /emu
chmod 777 /emu/*
chown username /emu
chown username /emu/*
The username stated above is the username you created during the installation. This name is going to be used for file transfers through FTP.

Start up script for CCcam
To prevent from having to change directory all the time we're going to place a script on the server so CCcam can be started from any directory on the server.
Code:
vim /emu/script/cccam
Code:
#!/bin/sh
CAMNAME="CCcam Server"
# end

# This method starts CCcam
start_cam ()
{
/emu/cccam/CCcam.x86 –C /var/etc/CCcam.cfg &
sleep 2
}
# This method stops CCcam
stop_cam ()
{
pkill CCcam.x86
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restaring $CAMNAME"
stop_cam
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0

Code:
chmod 755 /emu/script/cccam
ln /emu/script/cccam /bin/cccam
Now you can simply start, stop or restart CCcam from any directory by simply typing


Quote:
cccam start
cccam stop
cccam restart

Upload CCcam

Now use a FTP program to upload CCcam.x86 to /emu/cccam and CCcam.cfg to /var/etc

Making CCcam executable

Use putty again to give CCcam.x86 execution rights

Code:
chmod 755 /emu/cccam/CCcam.x86

Config update script

When running larger servers it’s a good idea to only update your CCcam.cfg once a day to not annoy all your peers. Following is instructions to do just that. Drop any new configs into /emu/cccam and at 3am it will backup the current one in /var/etc and copy the new one from /emu/cccam over it.
Code:
vim /emu/script/configupdate.sh

Code:
#!/bin/sh
#Script to process the new CCcam.cfg and backup the old one
SOURCE=/emu/cccam/
TARGET=/var/etc
FILE=CCcam.cfg
BACKUPDIR=/var/backup
CONFIGOLD=CCcam.old
if test -f $SOURCE/$FILE ; then
echo "New Config Present"
if test -d $BACKUPDIR ; then
if test -f $BACKUPDIR/$CONFIGOLD ; then
echo "Removing OLD config file from backup directory"
rm $BACKUPDIR/$CONFIGOLD
else
echo "No OLD config to remove."
fi

if test -f $BACKUPDIR/$FILE ; then
echo "Renaming Backup to old config"
cp $BACKUPDIR/$FILE $BACKUPDIR/$CONFIGOLD
rm $BACKUPDIR/$FILE
else
echo "No Backupfile present yet"
fi
if test -f $TARGET/$FILE ; then
echo "Copying Original config to Backup directory"
cp $TARGET/$FILE $BACKUPDIR
rm $TARGET/$FILE
else
echo "No Original Config File Present!?!?"
fi
else
echo "Backup directory does not exist."
echo "making new directory"
mkdir $BACKUPDIR
if test -f $TARGET/$FILE ; then
echo "Copying Original config to Backup directory"
cp $TARGET/$FILE $BACKUPDIR
else
echo "No Original Config File Present!?!?"
fi
fi
echo "Moving New config file to "$TARGET
cp $SOURCE/$FILE $TARGET
rm $SOURCE/$FILE
else
echo "No New Config present, Nothing to process"
fi
exit



Code:
chmod 755 /emu/script/configupdate.sh
To make sure the config update script will run at 3 am every night, we can place it in the crontab.

Code:
cd /etc
vim crontab
and add the following line to it

Quote:
00 3 * * * root /emu/script/configupdate.sh >>/emu/log/configupdate.log 2>&1
This will run the script every day at 3am, and it's output will be written in /emu/log/configupdate.log so you can check on occasion if all went well.

Starting CCcam with system boot

There's only one more thing to do. Add CCcam to the start-up so it will start on the next reboot of the server.

Code:
vim /etc/rc.local
and add the following line at the bottom

Quote:
/bin/cccam start –C /var/etc/CCcam.cfg &
test the config update script created earlier to see if that works

Code:
/emu/script/configupdate.sh
If it works, you can reboot the server and check if CCcam is running.
 
Nope it should be looking for it in emu/cccam,are you sure you ftp'ed your CCcam.cfg there first?

Apart from the fact that you should be able to put your cfg straight into var/etc to start with as the above script is really only for future cfg updates,

so I would be more inclined to figure out why you cant ftp it to var/etc to begin with?

are you logged in as root?

This is the guide I used to get my Virtual server working,although I dont use it now but it works perfectly,you may be able to compare it to what you did or even use it to start from scratch,

The version that he has installed looks for the CCcam.cfg in /home/cccam/

The configupdate.sh will look there and move the new cfg into /var/etc

on cc_shares installer of debian you cannot upload the cfg file directly to /var/etc - he has done this intentionally for security reasons.

If you do what I initially said you should not have a problem mate.
 
The version that he has installed looks for the CCcam.cfg in /home/cccam/

The configupdate.sh will look there and move the new cfg into /var/etc

on cc_shares installer of debian you cannot upload the cfg file directly to /var/etc - he has done this intentionally for security reasons.

If you do what I initially said you should not have a problem mate.

Thats funny cause the one I have quoted above is from cc_share and looks in emu/cccam and also allows ftp'ing into var/etc,

so I guess its either a very old one or an extremely new one he's using ;)
 
hi manikuk/wiz
wiz that is the tut im following sorry manic..i looked in configudate last night after work and there was 4-5 lines missing strange retyped them and checked again to see if they were still there.i think im starting to get somewhere now thanks to you guys, i think you have both hit the problem with cfg.i took the cfg file from my tm and used notepad++ to edit it . i think its maybe having probs reading my cfg file fingers crossed.on early this sat so will get a couple of hours at it.gonna take a cfg from cccam 2.13 and edit that and ftp it again hopefully probs sorted .thanks again guys i think there might be light yet.
nistleboy:)
 
Last edited:
hi guys
does this cfg look ok as i think this is my prob.


SERIAL READER : /dev/ttyUSB0 smartreader+
SERVER LISTEN PORT : 12400
BOXKEY : /dev/ttyUSB0 09 09 09 09
F: digi world66 300{0:0:2}
SMARTCARD CLOCK FREQUENCY : /dev/ttyUSB0 3430000

nistleboy
 
Last edited:
hi guys
does this cfg look ok as i think this is my prob.


SERIAL READER : /dev/ttyUSB0 smartreader+
SERVER LISTEN PORT : 12400
BOXKEY : /dev/sci0 09 09 09 09
F: digi world66 300{0:0:2}
SMARTCARD CLOCK FREQUENCY : /dev/sci0 3430000

nistleboy

The only thing that looks suspect,unless its a typo on your part is your fline,it should be formatted like this:

F: digi world66 3 0 0 { 0:0:2 }

As for the rest I cant really tell you,maybe manicuk might know more :)
 
hi manicuk and wiz
debian has found the card now so will check tom see if it sends to eagle.
thanks very much guys for all your help.your a credit to this great forum.
thanks again:)
nistleboy
 
hi manicuk and wiz
wiz you were right about the f line everything sorted now.just one quick question how often do you update your card ie sly box a month and how long.
cheers nistleboy
 
Your card will update fine using cccam alone mate, configure it so you recieve emm from only your own box and not from any of your peers. I have used this method and did not have to return the card to the sly box once.
 
Back
Top