4) Your cardclient.cfg file needs an entry like this...
-cccam:127.0.0.1:9000:0/0123/F000
+cccam:127.0.0.1:9000:0/0000/0000:/var/emu/chroot%d/tmp/camd.socket
-(note that CCcam interface will offer to serve any ECMs)
+Note: with that CCcam will offer to serve any ECMs.
+Note: socketpath might need to be adjusted to your system.
5) Now it gets tricky, read some docs on the internet about chroot.
# NOTE: hostname & port will be ignore. GBOX must be runnning on the local
# machine. For convinience you should choose localhost:8004
gbox:hostname:port:emm/caid/mask
+#
+# ccam client
+#
+# NOTE: hostname will be ignore. CCcam must be runnning on the local machine
+# 'socket' is the name of the camd socket file. For multiple cards add %d
+# into the string. This will be replaced with the number 0-3.
+# e.g. /var/emu/chroot%d/tmp/camd.socket
+cccam:hostname:port:emm/caid/mask:socket
\r
#define LIST_ONLY 0x03 /* CA application should clear the list when an 'ONLY' CAPMT object is received, and start working with the object */\r
\r
-static char *socketPath="/var/emu/chroot%d/tmp/camd.socket";\r
-\r
// -- cCCcamCard ---------------------------------------------------------------\r
\r
class cCCcamCard : public cMutex {\r
cCCcamCard card[4];\r
int pmtversion;\r
int failedcw;\r
+ char *socketpath;\r
protected:\r
virtual bool Login(void);\r
virtual void Action(void);\r
virtual bool ProcessECM(const cEcmInfo *ecm, const unsigned char *data, unsigned char *Cw, int cardnum);\r
};\r
\r
-static cCardClientLinkReg<cCardClientCCcam> __ncd("CCcam");\r
+static cCardClientLinkReg<cCardClientCCcam> __ncd("cccam");\r
\r
cCardClientCCcam::cCardClientCCcam(const char *Name)\r
:cCardClient(Name)\r
,cThread("CCcam listener")\r
,so(DEFAULT_CONNECT_TIMEOUT,2,3600,true)\r
{\r
- pmtversion=0;\r
- for(int i=0; i<4; i++) card[i].Setup(i,socketPath);\r
+ pmtversion=0; socketpath=0;\r
}\r
\r
cCardClientCCcam::~cCardClientCCcam()\r
{\r
Cancel(3);\r
+ free(socketpath);\r
}\r
\r
bool cCardClientCCcam::Init(const char *config)\r
{\r
cMutexLock lock(this);\r
int num=0;\r
- if(!ParseStdConfig(config,&num)) return false;\r
- return true;\r
+ char path[256];\r
+ if(!ParseStdConfig(config,&num)\r
+ || sscanf(&config[num],":%255[^:]",path)!=1) return false;\r
+ PRINTF(L_CC_CORE,"%s: socket=%s",name,path);\r
+ socketpath=strdup(path);\r
+ for(int i=0; i<4; i++) card[i].Setup(i,socketpath);\r
+ return Immediate() ? Login() : true;\r
}\r
\r
bool cCardClientCCcam::Login(void)\r