The Best Streaming Software!
VIVO Rent A Car - Your car rental
Върни се   Digital TV Forums - БЪЛГАРСКИЯТ ФОРУМ ЗА ЦИФРОВА ТЕЛЕВИЗИЯ > ЗА НАЧИНАЕЩИ > Уроци и съвети за начинаещи

Уроци и съвети за начинаещи Споделете своя опит или се научете от опита на другите

Отговори
 
Контрол над темата Търси в тази тема Начин на разглеждане
  #1  
Стар 03-02-2009
Аватара на Ланселот
Ланселот Ланселот не е на линия
Модератор
 

Дата на присъединяване: Feb 2008
Местоположение: Разград/Казанлък
Мнения: 655
Благодари: 26
Получил благодарност:
134 пъти в 75 поста
Сваляния: 72
Ъплоуди: 1
По подразбиране Tutorial Gbox - Как да си направим сървър

І.How to Setup Gbox Card Sharing Server for DVB card and Dream Box.

Ans). We Start Setting for Gbox Step by Step.
1. Get the files
2. Put the files in the right folders
3. Make the needed configuration
4. add and exchange dlines
5. control your gbox
6. possible errors and reasons

ІІ.Extract the files and you will see also the path where the files should be put
//var/bin => gbox
//var/keys => cwshare.cfg,gbox.cfg,softcam.cfg
//var/script => gbox_cam.sh
//var/tuxbox/plugins => egboxcenter.cfg,egboxcenter.so,gboxsuite.cfg, egboxsuite.so, gbv.cfg,gbv.ident,gbv.so

Use a Ftp program to put the files in the folders. I prefer flashfxp. After you had put the files in the folders. Make CHMOD changes for the following files. You can make the CHMOD changes by using the right mouse button (FLASHFXP) on the file and selecting Attribute (CHMOD).
//var/bin/gbox => CHMOD 755
//var/keys => cwshare.cfg => 644
//var/keys => gbox_cfg => 644
//var/scripts => gbox_cam.sh => 755

ІІІ. Coniguration

You must made only individual changes to cwshare.cfg and gbox_cfg

CWSHARE:

This file is responsbile for communication between the peers.
Following lines should be inside this files
M: => Adress of your gbox
I: => Configuration about till which distance cards you allows to get
X: => Configuration abotu how many of the same card you allows to get
D: => Communication line between the peers
N: =>
W: =>

CWSHARE.CFG HOWTO
Cwshare.cfg
This is an example of cwshare.cfg with the most important communication lines:

M: { box1.dyndns.org { 11111111 }}
#
D: { box2.dyndns.org { 5566 5580 { 22222222 { A3 A3 }}}}
D: { box3.dyndns.org { 5566 5566 { 33333333 { A3 A3 }}}}
#
D: { 192.168.1.102 { 5566 5590{ 44444444 { A3 A3 }}}}



The M-line. M: { you're DNSNAME { you're password }}
• The DNS name is the name that you did sign up for.
• The password contains 8 numbers/letters 1-9 A-F

The D-line. D :{ DNSNAME { PORT1 PORT2 { password { share level 2 x }}}}

• The DNSNAME is the name the one you are going to share with is using.
• PORT1 is the port you are using yourself 5566.
That port has to opened in your router.
• PORT2 is the port the person you are going to share with is using. This port has to be opened in his router .
• Password, this has to be the same as in his M-line.
• The share levels: is how far you allow the card to be shared. For example A3 A3. The first A3 says how far the local card in this box can be shared. The second A3 says how far the cards in you're network(=virtual cards that you might get from others) can be shared. (if possible)This shouldnt be put to high,cards shared over 3 will start to cause freezes and caus a lot of unnecessery trafic.The A hasnt got anything to do with the level it simply allows NDS cards to be shared.

You should never use the same code for different boxes !!!!!!.
You can use the same port for several shares.

In the example the last D line is for sharing in house.

Sharing over the net.

With this the example cwshare.cfg from the client would look like this:

M: { box2.dyndns.org { 22222222 }}
#
D: { box1.dyndns.org { 5580 5566 { 11111111 { A5 A5 }}}}

The port 5580 is the port open on box2. The second port 5566 is the port open on box1.
11111111 is the code the server( box1) is using in his M line so it has to be in the D line of the client.

Sharing in house:
With this the example share.cfg from the client would look like this:

M: { 192.168.1.102 { 44444444 }}
#
D: { 192.168.1.101 { 5590 5566 { 11111111 { A0 A0 }}}}

In this example the ip internal of the server/ box1) is 192.168.1.101, here I use the ip, because the information is not going over the net.Share is set to A0 A0 because we are not sharing only getting from box1.

Well now everything should work......

If you get a D line from a friend. Please do not show it to others it is for you're use only.
If you post a backup img. Remove all the information about you're share's.
People will just put those lines in there own files and that creates problems!!!!

Dist and level….
This kind of information you can look in the .tmp file of you're dreambox or in the Gbox center .Or you can use PHPGbox statistics and UDPlog on a pc.
The tmp/ files
share.onl contains info about who is online and who is not. The one's with a 1 in front is online and the one's with a 0 is not.

Share.info. In this file you can see how many cards you receive and for which provider. You can also see the levels of the diffrent cards. Level 0 means, the card cant be reshared . The distance is how many boxes there are between the card and you're box.
Example: dist 1 means someone you are directly connected with has this card.

ignore.list

Is put in var/key file. This file is used to ignore the unused providers . This is important because you can't have more than 1024 cards. NOTE : When you first start... leave this alone for a while... You can alway experiment with this later!

I-line

When you reach the limit of 1024 cards gbox will set it self back to less cards. Or in a worst case, don't work at all! Normally I is set to 5 , this means you can't receive cards that are further away than 5 boxes away. You can adjust this you're self by setting this in you're cwshare.cfg: Short : The I = is the distance allowed.

I: { 3 }

This means you will not receive cards that are more than 3 boxes/hops away.


X

Lets you control how many cards you will receive for each provider. Normally it is 05, I think u should leave it this way. Or when you have troubles bring it back to f.e. 3. (Don't go any lower then that!)In early versions this value is in dec in later its in hex

X: { 05 }



Y
Here you can block bad cards.Cards theat doesnt have the full package.You actually put the boxid of the box sharing the bad card.This will however block all cards from that box
When you first start off, leave this also alone for a while. You can always experiment with this later!

Y: { 12 34 }

Now the cards from box 12 34 will not be used anymore. Be sure to put a space between the first two and the last two!!!!
Pleas keep in mind, that these Cards you insert over there, are blocked for all guys "behind" you. Useually, this should be used only for Cards with Level = 0. Generally bad cards should be insterted to the ignore.list (with the same care of course!)


G

In this line you can tell the emu to favor known good cards for providers.

G: { 0100006A 1234 }

0100006A = The provider ID, and 1234 the boxid

NOTICE: that if the box ID allready is in the Y line, The G line will not be used!!
By inserting G-Lines you can increase the total number of cards to be used for one provider... i.e. even if you put number of cards to X : 1, you can access much more cards if there are (some of course) BUT... as far as I know, there is no chance to increase the distance for single cards only..

N

N: { 01 01 03 1F 4000 6000 }

# 01 repeat EMM's
# 00 try every EMM once.

N: { 01 01 03 1F 4000 6000 }

# 01 restart the pid when there are too many.

N: { 01 01 03 1F 4000 6000 }

# 1* reset ENX for every change of channel
# *1 controle/reset ENX freezes on FTA
# *2 controle/reset ENX freezes on PayTV
# *3 controle/reset ENX freezes on both FTA and PayTV


N: { 01 01 03 1F 4000 6000 }

# 00 don't write anything in atack.txt
# 01 write in the atack.txt: password is wrong
# 02 write in the atack.txt: ID unknown
# 04 write in the atack.txt: IP is wrong
# 08 write in the atack.txt: port is worng
# 10 write in the atack.txt: share.stat
# 20 make an online.log to log online/offline
# 3F write everything. (combining = making other options!)

N: { 01 01 03 1F 4000 6000 }

# 4000 sent ecm again after 4 Seconds, when there is no answer.

N: { 01 01 03 1F 4000 6000 }

# 6000 Resynchronize the code after 6 Seconds when the net code wasn't working.


EDIT:
W: { AA BB CC } xxxx xxxx
AA=
00=no slot
01=slot1
02=slot2
03=com1
04=com2
BB=
00=dont use card localy
01=use card for all pids localy
02=use card for the following pids localy
03=dont use card for the following pids localy
CC=
00=dont use card on the net
01=use card for all pids on the net
02=use card for the following pids on the net
03=dont use card for the following pids on the net
xxxx xxxx = pids separated by space, maximum 32
(thanks to samot4 for suggestions here)

The W: line is useful to control how your local card is used. With this line you can specify PID'S that should use the card. This should make your setup more stable because you dont "overload" the local card with trying to decode channels it doesnt handle. You also avoid that gbox try to use external cards for decoding channels that can be handles by your card.
Look at this thread for more information about this issue, and also information about how to identify the needed PID's.



W line explained thoroughly

Re: W in cwshare.cfg
The W line decides how your local card shall be used and shared on the network, and goes
in cwshare.cfg like this:

W: { 0A 0B 0C } P001 P002 P003 ...

A= Slot number (1 to 8 )
B= How your card shall be used locally (on your own box)
-0= Dont use card
-1= Use card for all Pid's
-2= Use card only for following Pid's
-3= Don't use card for following Pid's
C= How the card shall be shared on the network
-0= Dont share card
-1= Share all Pid's on card
-2= Share only following Pid's on card
-3= Don't share following Pid's on card
P is the Pid's

Example 1: I want my card in slot 1 to be used for all Pid's locally, and to be shared
on the network with all Pid's ( 1FFF means all Pid's):

W: { 01 01 01 } 1FFF

Example 2: I want my card in slot 1 to be used locally for all Pid's on card, and DONT want
it to be shared on the network at all:

W: { 01 01 00 } 1FFF

Example 3: I want my card in slot 1 to be used locally with the following Pids only, and to
be shared on the network too with the following Pid's only:

W: { 01 02 02 } Pid1 Pid2 Pid3 ...
rk, and goes in cwshare.cfg like this:

W: { 0A 0B 0C } P001 P002 P003 ...

A= Slot number (1 to 8 )
B= How your card shall be used locally (on your own box)
-0= Dont use card
-1= Use card for all Pid's
-2= Use card only for following Pid's
-3= Don't use card for following Pid's
C= How the card shall be shared on the network
-0= Dont share card
-1= Share all Pid's on card
-2= Share only following Pid's on card
-3= Don't share following Pid's on card
P is the Pid's

Another thing in the cwshare.cfg is the use of the ports.
There is absolutely no need to use a different port locally and remotely.
Both can be the same!
We all want as little ports open as possible, don?t we?
Well you can have lot?s of D lines all using the same Port(s).

GBOX Share/Reshare how is it done.


In the share/reshare concept there are two files we must fill
with the correct parameters
These files are: CWSHARE.CFG and GBOX.CFG
Depending on what gbox type is installed(windows,dream,Linux)
these files are either in the root directory or in VAR/KEYS.

CWSHARE.CFG
M:
M: { ipadress(alias) { password }
Ipadress(alias) can be LAN(10.x.x.x or 192.x.x.x) or WAN( 82.212.50.24 or myip.alias.com)
LAN is used for internal resharing. As an internal ipadress is used it wil only travel over the
local area network.
WAN is for internet sharing, ipadress can be the real adress like 82.x.x.x or a more meaningfull alias.
All internet traffic is encrypted by GBOX so it doesn?t really matter however numbers
are easier decrypted. The use of aliasses is recommended for WAN sharing.


D:
D: {something.dynalias.com { 4525 4526 { FFFF0065 { A5 A5 }}}}
What does this all mean?
1....{something.dynalias.com same as in M line
2................................................{ 4525 4526 myport friendsport
3................................................. ....................{ FFFF0065 password to be used at both ends
4................................................. ..........................................{ A5 A5 }}}} mylevel friendslevel


1 is explained in the M section


2 myport is the transmitting port friendsport is the listening port
2.a as these are Tx and Rx the D line at friends should be { 4526 4525 TX talks to Rx


3 password is in hexadecimal so A...F and 0...9 length must be 8
3.a never tried it but I believe it also has to be 4 characters and 4 digits
3.b uppercase lowercase distinction? Can?t tell maybe on a Linux system yes and Windows no


4 mylevel is the share level for LOCAL cards. A local card is a card which is in the ...Dreambox internal card reader slot(sc is the name used in gbox for the internal card rdr)
...friendslevel is the level for VIRTUAL cards. A virtual card is a card shared to you by a peer
4.a Levels are also in hexadecimal and specify the depth of sharing
.....A is used(in the NDS card owners D line to tell GBOX to change the ECM/EMM rate
.....0->9 are used where 0 means your local card is used only to decrypt and can?t be reshared
.....1 means your local card is shared to your friend but he can?t reshare
.....2 means your local card is shared to your friend and he can reshare it to his friends
.....3 same as 2 but the friend friends can reshare to their friends but they can?t reshare
.....4 same as 3 but well think you can figure this out now
.....9 would mean you share your local card to the whole world. DON?T do that!
5 friendslevel same as mylevel but for virtual cards




General remarks:
a level1 at mylevel will be received as an INTERNAL gbox level 0 at the friendslevel
INTERNAL meaning within the programm itself(re-sharing mechanism).
I:
I: { 06 } sets the maximum share depth you want to receive.
..............when set to 2 you will only receive ECM/EMM from peers at distance 2
..............in/decrease this number to get at the optimum number of cards
..............maximum number of cards is 1024 after that I will be set to 3 by the gbox programm


N:
N: { 01 01 00 3F 1500 3000 }
This is a very important parameter. Settings of it is done at byte position
N: { 01 is the first byte
Can be set to 00 every EMM is handled once only whether it opens the channel or not
......................01 EMM is repeated

N: { xx 01 is the second byte
Restart pid on overflow well so be it. Documentation does not say whether it can be set to 00


N: { xx xx 00 third byte
If the firmware of the receiver is capable of recognizing freezes it will reset the ENX and
you don?t have to switch up down a channel to resolve the freeze


N: { xx xx xx 3F fourth byte
This is used to configure what is written in attack.txt./online.log/share.stat
00 write nothing
01 password is wrong will be written in attack.tx
02 ID unknown will be written in attack.tx
04 IP is wrong will be written in attack.tx
08 Port is wrong will be written in attack.tx
20 create online.log come online/offline msg?s
1F all but the come online/oflline msg?s
3F all is written in to the log files


N: { xx xx xx xx 1500 fifth byte
It sets the repeat time for sending ECM?s in milli seconds to the internet.


N: { xx xx xx xx xxxx 3000 } sixth byte
Sets the resynchronisation time in milli seconds when internet decoding fails


X:
X: { 10 }
Sets how many cards wil receive a ECM request from you.
This option also influences the number of cards online to you cq channels which decode


W: is used for multicam a card reader device which can contain upto 8 cards
S: is the same as W but W uses pid information S uses sid information
G: is used to exclude cards example is old Irdeto or old Seca1 card




Y:
Y: { AD A7 }
Is used to exclude level 0 cards which can?t be reshared by a server but do count in the
number of cards which is limited to 1024.
AD A7 is the card id to be excluded.
Makes no sense to include these lines in a receiver only set up as a level 0 still decodes the
channels serviced on that card.


This concludes the cwshare.cfg part.
Only those parameters which matter to our setup have been detailed.
Now lets take a look at the gbox.cfg
First let me say something about the F parameter
F is short for MODIFY now the F makes sense to me important things are bold


# gbox config file


# Trace/Debug
# xx yz ; xx=00 no konsole output
# xx yz ; xx=01 konsole output
# xx yz ; y=0 debug output (don't use)
# xx yz ; y=1 no debug output
# xx yz ; z=0 ouput to konsole
# xx yz ; z=1 output to /var/tmp/debug.txt
# xx yz ; z=2 Output to UDP (to capture with gboxt)
Z: { 01 10 } 192.168.1.29 8024
Useful to find what is wrong


# Task type
# 00 ** normal mode gbox mode (no season, use Multicam instead)
# 01 ** Season Emulation in a Irdeto allcam chid 0602 nonZ
# 10 ** Season Emulation in a Irdeto allcam chid 1702 nonZ
# 11 ** Season Emulation in a Irdeto allcam chid 1702 Z
# 12 ** Season Emulation in a Irdeto allcam chid 1722 Z
# 13 ** Season Emulation in a Irdeto allcam chid 1762 Z
# ** *1 Com port to use for season emulatiom (1 or 2)
# ** 0* Use CTS f?r RST detection
# ** 1* Use DCD f?r RST detection
# ** ** 9600 = Baudrate to be used (working only on dbox2)
W: { 00 00 } 9600


# gbox working mode
# 00 pure Emu
# 01 pure SoftCam (when card inside), Emu (when no card inside)
# 02 pure Net Client
# 03 Mixed mode !!!!! always use this !!!!!
G: { 03 }


# Display ECM messages on Konsole
# 00 don't show any ECM's
# 01 show only valid ECM's
# 02 show valid and bad ECM's with complete data display
C: { 00 }

# Display EMM messages on Konsole
# *0 don't show any EMM's
# *1 show only valid EMM's
# *2 show valid and bad EMM's with complete data display
# 1* Log any tier change on PW-Nagra-17xx cards into /var/keys/pwupdate.log
M: { 00 }


# AutoUpdate
# 00 is ignored (default)
# 01 enable AU
# 02 Auto AU !!!!! always use this !!!!!
A: { 02 }
Make sure your card gets its updates


# Key update
# 01 update only new keys, default setting
# 02 update all keys (used for valid PMK checking)
U: { 01 }


# Hash pids
# 00 hash all pids, DO NOT USE THIS OPTION, IT IS ONLY FOR TESTING STUFF
# 01 hash only pids with implemented algos and available keys !!!!! always use this !!!!!
H: { 01 }


# Key files folder
# 00 keyfiles in /var/keys
# 01 keyfiles in /var/tmp
T: { 01 }


# On Screen Display for the Multysystemcam on com1/com2
# 00 No OSD (default)
# 01 display Smartcard messages in Neutrino
# 02 display Smartcard messages in Neutrino new nhttpd format
# 03 display Smartcard messages in Enigma
# mypass (use user=root and pass=mypass for nhttpd)
O: { 01 } 192.168.1.51


# Logger and NET-mode UDP port Init
# 00 do not init UDP port
# 01 Init UDP port for IP, port, UDP
L: { 00 } 192.168.1.29 8017


# demux, multicam/comport configuration
# *x ** ; x = device nummber to be used (0= default)
# D* ** ; force use of /proc/bus/gtx for cw write operations
(in the dbox2 the gbox writes directly the CW's, 00 is the
recommended mode ! No drivers are required) use D* ** ONLY if
you have Problems. 0* ** should be prefered !!!
# F* ** ; write CW's in both devices (used for PVR in STB04xxx devices)
# ** y* ; y=0001b (0x1*) use slot1 as Multicam (only on STB04xxx)
# ** y* ; y=0010b (0x2*) use slot2 as Multicam (only on STB04xxx)
# ** y* ; y=0011b (0x3*) use slot1 and slot2 as Multicams (only on STB04xxx)


# ** *z ; z=0001b (0x*1) use com1 as Multicam
# ** *z ; z=0010b (0x*2) use com2 as Multicam
# ** *z ; z=0011b (0x*3) use com1 and com2 as Multicams
# ** yz ; yz=00110011b (0x33) use slot1+slot2+com1+com2 as Multicams
# ** *z ; z=0100b (0x*4) invert CTS detection on com1
# ** *z ; z=1000b (0x*8) invert CTS detection on com2
# example: yz = 0x0A = 00001010 (use com2 with inverted CTS detection line)
V: { 00 02 }


V: { 00 36 } 00 use slot1/2 as multicams this enables the internal card reader of the Dream


# ================================================== ===========================
# extra options to override default seting in case you expirience Problems,
# normaly these setings are not required.
#
# cpu, api, cw write method
#
# 00 auto
# 01 80X86
# 02 MPC823
# 03 IBM STB04xxx
# 00 auto
# 01 ibm
# 02 api2
# 03 api3
# 00 cw write style = use internal routine (only dbox2)
# 01 cw write style = CA_SET_DESCR type1 (dbox2, vdr)
# 02 cw write style = CA_SET_DESCR type2
# 03 cw write style = CA_SET_DESCR type3
# 04 cw write style = 16 byte /proc/bus/gtx
# 05 cw write style = 4096 byte /proc/bus/gtx, cw offset=0x04D0
# xx write cw in 1st device with index=xx
# yy write cw in 2nd device with index=yy
# 01 means with .index=0 (default)
# 02 means with .index=1
# 03 means with .index=0 and .index=1
# .. any bitwise combination ...
# FF means with all 8 indexes (0-7)
#J: { 01 00 00 01 01 }




# Files, folders, devices
# folder/device comment
#
#F: { 01 } /var/tmp/pmt.tmp // pmt file
#F: { 02 } /var/tmp/emm.info // key update log file
#F: { 03 } /var/tmp/ecm.info // ecm info file
#F: { 04 } /var/tmp/atack.txt // atack info file
#F: { 11 } /var/keys // folder for config files
#F: { 12 } /var/tmp // folder for temporary file
#F: { 13 } /var/tmp // folder for keyfiles
#F: { 21 } /dev/dvb/adapter0/ca0 // ca device
#F: { 22 } /dev/dvb/adapter0/dvr0 // dvr device
#F: { 23 } /dev/dvb/adapter0/demux0 // demux device
#F: { 31 } /dev/dvb/adapter0/ca1 // second ca device to write cw's (recording)
#F: { 41 } /dev/sci0 // STB04xxx slot1
#F: { 42 } /dev/sci1 // STB04xxx slot1
#F: { 43 } /dev/tts/0 // rs232 com1
#F: { 44 } /dev/tts/1 // rs232 com2



# For overclocking freaks, Clocking internal STB04xxx slots with:
# 1=7.80MHz 2=6.30MHz 3=5.25MHz 4=4.50MHz 5=3.94MHz 6=3.50MHz 7=3.15MHz
# Irdeto works fine on 7.8MHz, all other fine on 6.30MHz or 5.25MHz
# The Dream has not a clean clock signal, some cards that are sensitive will
# refuse to work even on 3.5MHz, thats why 3.15MHz is the default value there.
# On other STB04xxx recievers the same cards work with 6.30MHz
#
#F: { 51 } 02 // irdeto
#F: { 52 } 03 // seca
#F: { 53 } 03 // viaccess
#F: { 54 } 03 // nagra
#F: { 55 } 03 // crypto
#F: { 57 } 03 // conax
#F: { 58 } 03 // nds
__________________

http://www.satshop.bg - Специализираният магазин за сателитна техника
Алоууу, спамерите, ако ви шибна по един шамар и с гугъл няма да ви открият после!

Отговори с цитат
Следните потребители БЛАГОДАРЯТ на Ланселот за този полезен пост :
Джак (04-04-2009)
Отговори

Съобщения от Devil M
VIVO Rent A Car  

Тагове
gbox, tutorial, Да, как, направим, си, сървър


Активни потребители разглеждащи тази тема в момента: 1 (0 членове и 1 гости)
 

Подобни теми
Тема Започнал темата Форум Отговори Последно мнение
Tutorial за CCcam - Как да си направим сървър ! Tiesto Уроци и съвети за начинаещи 56 02-12-2010 14:41
Tutorial: Как да си направим NEWCS сървър nikec Уроци и съвети за начинаещи 15 02-07-2010 17:54
New Scam3.57 config tutorial Sharp987 Scam 0 27-12-2009 22:44
Tutorial: Как да си направим NEWCS сървър nikec Уроците на Nikec 0 27-10-2009 22:43


Всички времена са във формат GMT +3. Часът е 18:08.


DTV-BG Powered by vBulletin Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.