Welcome to the camx beta release package readme.

Camx is a soft-CI emulator, with additional emu and net ecm/emm options. started out as
a test to support some smartcards in the dreambox without including emu.... 
well see how that worked out :-) 
This cam is only made for PHUN so dont bother me if you dont like it and stay to your own bizz... 
there is enough sh*t in the world to bother with!

Futher more... we would like to state that we endorse... FREEDOM OF SPEECH.... also on
certain forums, if ppl have differences of oppinions dont be so lame to remove everything
untill there is no argument left.. this doesnt work.. be a man and stand for what you
think... even if you are wrong, we all make mistakes no problem.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

Camx works in stand-alone mode, watching for channel changes on /tmp/camd.socket.

Alternatively it can read from /tmp/pmt.tmp... only when for example enigma is properly patched,
meaning in si.cpp or in (newer version )cahandler.cpp.. pmt patches are included at the bottom
of this readme.

Camx can run as a client or server on dbox2 and dreambox systems.

On i386 systems it can only run as a server, maybe this will change very soon ;-)

Supported Smartcards are:

- Seca 1/2 ECM/EMM
- Irdeto 1/2 ECM/EMM
- Viaccess 1/2 ECM
- Conax ECM
- Cryptoworks ECM/EMM
- Tunneled Nagra ECM/EMM

Supported emu systems are:

- Irdeto ECM/EMM
- Seca 1/2 ECM/EMM
- Conax ECM (removed for the moment)
- Viaccess 1/2/tps crypt ECM/EMM
- Nagravision ECM/EMM

Supported ecm's through LAN share are
- All know / supported protocols on camx, radegast and newcamd

Camx is made and tested using pli images, thanks for the great images and all code/support!

******************* Installation *******************

* On a dreambox with 108-based linux or lower, mostly recognized by the dream.o and dbox2.o kernel modules:
put the camx and server files in /var/bin
put the camx.config file in /var/etc

* On a dreambox with 109-based linux, mostly recognized by head.ko kernel module:
put the camx and server files in /var/bin
put the camx.config in /var/etc

* On a dreambox 7020, 
put the camx and server files in /usr/bin
put the config in /etc

* On a dreambox with the hydra-image you might consider to update the emu selection-text in
/var/etc/smartcam.config

* On linux systems put the camx.config and server-i386 files in the same directory
It might be neccessary to rename the server-i86 file to just server

For the brave ones, check the camx.config file to tailer it for your needs. It contains
more or less information on each parameter that can be set

*** Don't forget to CHMOD to correct rights ***
644 for the camx.config file and 755 for the other files


******************* Thanx *******************
Special thanx go out to the ppl who made this possible:

Rongogo, Pli, Souldream, Dynamit, Humax, D-mon, Xphile, NiL, Gaj1, Hutsefruts, Larson, RichardF, herbie153, appien, aixbo, Bigfoot, cheazers , dAF2000, DreamOn2003, dsr9500, E.T, f650gsrider, flea, hemertje, Henksat, Herbie153, Hyunday magic, john v'daal, joker1, Lerak2000, LiQuiD, Marcel1235, mirakels, Ome Merde, pappapiet, pepela, phenomic, prdehoop, Rick Hunter, RuKo, sat-turner, Sat Genieter, satdre, schelen, trebla, Unetwork...
all the ppl at the hutsefruts forum,
all ppl from gemini team, everybody at DN, all the ppl on Dynamit's forum, 
and ofcourse a special shout out to all other developpers.... worldwide :-)
and everybody i fogot.... 
thanks for the good times!!!

******************* history *******************
-28082005
	* Added n2 support (thanx everybody who did it !!!!)
	* Fixed v2 support

-22082005
	* Removed info on serve (for the time being)
	* Added SERVER_ONLINE_FILE_PATH for multiple servers on one machine
	* More smartcard timing options (for now)
	
-06082005
	* Server/Client protocol changed
	* Changed vi@2 keyformat to:
		V 012345 08 0011223344556677
		V 012345 18 0011223344556677
	* N@gra ecm/emm fixed
	* Removed rdgd support from camxserver, move to external app (follows)
	* Added AU for s3c@ cards on nwcd
	* Timeshift working ok on api2 (no dual channel support yet)
	* Fix api2 :-))
	* Autodetect hardware version for timeshift etc (70xx/56xx/500)
	* Added /tmp/ecm.info
	* Internal ecmcaching for demux0/1+zapping
	* Advanced serverinfo (press any key to exit)
	* Sorted fd handling (and leaking)
	* Added IGNORE_LOCATION for skipped ecmpids ( [caid] [ident] )
	* Fixed server badecm caching
	* Fixed 1rd3t0 chid handling

-22052005
	* Total overhaul serverpart.. seperated protocols to different ports
	* Changed demux handler 
	* Added more server infos
	* Lot of issues from 1904 fix
	* API 2 is still NOT GOOD.. please use API 1 

-19042005
	* Added vi@2 on emu, keyformat is 16 bytes.. V IDENTT KY 0011223344556677 8899aabbccddeeff
	* Improved server stats
	* Better socket handler
	* Server - only 1 user login with 1 name
	* Added remote osd
	* Added authentication for OSD
	* Improved emm handling and SoftCam write
	
-10042005
	* Added serverinfo on telnet
	* Server improvements
	* Changed demux fd handling, should be more stable now :-)

-30032005
	* Fix n@gra
	* Server fix..now working normal...
	* Small stuff.. idents etc

-20032005
	* Changes in network protocol
	* Lot of cleaning up done :)
	* Removed use netpilot option, internal now

-12032005
	* Fixes in serverpart concerning responsetimes
	* Osd fix
	* Change in demuxerpart
	* Fix in startup
	* Added spider ranges to config

-06032005
	* Fixed 1rd3t0 ch1d hunt
	* Added ecmhashing
	* Added vi@xzes emu emm
	* Changed OSD
	* Removed c4fra.. no need for now
	* Added tp$ algo again
	* Lot of small stuff, better now

-17022005
	* Added camxNG and serverNG, linked against new libstdc++.so.6
	* Added conax sc support.. still beta and only ecm for now
	* Fixed parser... again.. now from fta to enrcrypted is ok
	* APi2 is not ok with recording, use /dev/ca0 and api1
	* Pid proccessing improved
	* /var/etc/camx.config is new name for configfile
	* Added select() to osd to prevent long waits

-10022005
	* Added new api (500 / 70x0 support)
	* Fixed pmt parsers
	* Restored osd for server
	* i386 server release, port from ppc
	* Added scpath to config
	* Ip log file added to config

-07022005
	* Fixed 90% cpu usage :-)
	* Added pmt patch reading (autostart)
	* New config layout
	* Dbox2 working again
	* Added support for netpilot
	* Multiple Emm for cardserver

-28012025
	* Splitted cam and server
	* Fixed new encryption for networking
	* Added phoenix on serialport (sc2)
	* Old 1rd3t0 cards supported on phoenix 
	* Lot of fixez to much to name... :-)

-19012005
	* Fixed c@bo
	* Fix emu only mode
	* Better emm handling

-1.13
	* Added s2 again
	* Network protocol changed completely, using new encryption
	* Ird3t0/b3t@crypt card support added (ecm+emm)
	* Cr&ptow0rx card (ecm+emm) support
	* Vi@ccess card (ecm) support
	* S3ca card (ecm+emm FULL NOW) support
	* AES added for tp$, haskey moved to external config
	* Server ips logged to /tmp/camx.ips
	* No more forking, moved all base to phtreading
	* Lot of lowlevel stuff... boring ;)

-1.12
	* Tp$ added again
	* Added rdgd share client
	* Added newcamd client (+multiple_cws)
	* Added newcamd 25 protocol
	* Added cryptoworks card support on camx protocol (only UA update for now)
	* Added dynamic caid filtering
	* Added rescan pmt for provider who have breaks in coding
	* Added OSD
	* Added lockEmm for virgin cards
	* Possible to share supported cards in rdgd protocol
	* Lot of lowlever fixes
	* Added support for cardslot2
	* More networking fixes
	* More debugging options
	* And more faster zapping ;-)

- 1.11
	* Ok network protocol is up to speed ;-) time to bring back the i386 server
	* Major rewrite in net protocol, now supports 32 name/passess
	* Optimized channelswitch times some

- 1.10
	* Fixed N@gra au.
	* Added 4 password for server :-)
	* Changed camx again to forking client
	* Better network emm checks

- 1.09
	* Removed s2-emu support for the time being
	* Camx now NG, server+client in 1 no more loose files
	* Removed SC support from camx, moved all SC to server thread
	* Fixed bugs in network EMM

- 1.08
	* 0070 :)

- 1.07
	* Network Emm supported
	* Four servers now possible
	* Improved server handling
	* Removed encrypted sharing option, now allwayz on ;-))
	* no i386 client for now, old i386 are compatible but now emm functions
	* Smartcard info written to /tmp/sc-info (for server & client same)

- 1.06
	* Low level fixes 

- 1.05
	* Added selection dbox2 or dreambox
	* Cardserver now detect card removed / inserted
	* Added selection for comport for i386
	* More network fixes, better handling of timeouts etc.
	* Lot of low-level stuff and some temp files to make 
	  more easy for image makers ;)

- 1.04
	
	* Added c0n@x
	* Nagra (p0l$at & c@b0) Autoroll
	* 1rd3to Autoupdate
	* Sharing now with encrypted protocol, so safe now :-) 
	  all traffic is encrypted (if enabled)
	* Fixed major bug in pmt parsing from socket
	* Added prefer shared ecm over local ecm function, reduces server stress ;-)
	* Extended config options
	* More low level fixes	

- 1.03

	* Added ident 0065, not 9x table yet ;) thanx to you know who for tables
	* Added tp$, now works fine
	* No more need for pmt.tmp, cam now read data as server on socket by enigma
	* Added smarcardpolling funcion for s2 cards, to have a valid poll of the card
	  extract on s2 channel or switch to channel that the card supports, 
	  wait 10 seconds then insert card
	* Fix in network handeling, timeout is now adjustable for your comfort
	* Some fixes in server, optimized code

- 1.02 fixed

	* Network routines faster and with smart time out
	* Smartcard routines optimized
	* Server response improved, supports more clients :-)
	* Added cryptoworks smartcard detect, ecm/emm needs testing first
	* 3DES ecryption ready for sharing, ready next release
	

******************* pmt patches *******************

pmt patch for si.cpp

replace :

int PMT::data(__u8 *data)
{

with:

int PMT::data(__u8 *data)
{
	FILE *fout;
	fout=fopen("/var/tmp/pmt.tmp","wt");
	fwrite(data,((data[1]&0xf)<<8)+data[2]+3,1,fout);
	fclose(fout);


pmt patch for cahandler.cpp

in void CAService::sendCAPMT( PMT *pmt ) at the bottom of that function add:
FILE *fout = fopen("/tmp/pmt.tmp","wb");
if (fout)
	{
	__u8 *data = pmt->getRAW();
	fwrite(data, ((data[1]&0xf)<<8)+data[2]+3,1,fout);
	fclose(fout);
	delete [] data;
	}
