PDA

View Full Version : Problems getting local card to work with NewCS



KidOtaku
29-12-2009, 08:38 PM
Hello everyone,

I am quite new to the card sharing scene, and am trying to get NewCS to read my local card (Cryptoworks), but no matter what I try I can't get it to work. I have read numerous post, including the one gathering info about various cards, to no avail. The channels remain scrambled, however MultiCAS unscrambles them fine so it does not seem to be an issue with the card.

When I run NewCS in telnet, I do not get an error message, the card seems to be identified correctly and NewCS is communicating with it. I tried connecting by telnet to NewCS (it is listening on port 1001), I seem to get the connection (in raw mode) but no prompt (and no reply to the commands I type).

I also tried several frequencies in the <mhz> tag (500, 398, 357, 375), no luck...

Any ideas?


Thanks!

mp
30-12-2009, 12:02 AM
How do you know its not reading your card?

Do you have a password set in the debug section of newcs.xml? if so you need to authenticate before issuing raw commands in debug mode

Also if the debug level is set too low then you will not get any output

Newcs is a pure server not reader it expects a connection from client eg: cccam or mgcamd

forget the raw telnet and forget telnetting to the debug port 1001 just telnet to the azbox and run newcs from the prompt

eg: pocket ppc linux issue command ps

standard linux is ps -aux

ps allows you to see if newcs is runnning as a process

kill the process by issuing command kill -9 (process id) where process id is the a numeric id on the left

Once thats done run newcs from the command prompt and see if it identifies the card as you said it appears to be recognising the card

However your not going to know what newcs sends back until you get a client to connect and what I mean by client is a cam emulator such as cccam or mgcamd

I dont know the azbox too well so I dont know which clients work you will have to do some research

Hope this helps

KidOtaku
30-12-2009, 11:43 AM
Thanks for the reply!


How do you know its not reading your card?

When NewCS is running, the channels normally unscrambled by my card (using MultiCAS) remain scrambled on the TV.


Do you have a password set in the debug section of newcs.xml? if so you need to authenticate before issuing raw commands in debug mode

Also if the debug level is set too low then you will not get any output

No, there is no password set there; here is my newcs.xml file, for reference:


<?xml version="1.0"?>
<newCSconfig>
<readers name="Card Readers">
<device>
<name>upper</name>
<type>azbox</type>
<node>/dev/scard</node>
<export>yes</export>
<enabled>yes</enabled>
<blocksa>no</blocksa>
<blockua>no</blockua>
<blockga>no</blockga>
<newcamd_port>20000</newcamd_port>
<autosid>yes</autosid>
<carddetect>yes</carddetect>
<priority>hard</priority>
<PTShandshake>yes</PTShandshake>
<mhz>357</mhz>
<boxkey>79FDC0E18D278138</boxkey>
<rsa>9ED52515321F04BCF7772151149D68951 54B559A8D825A4E7D711A9FAFD5C66BF6 4689501B254DF1832F754C21095379CF9 7B4E5BE6E0F1C9CEBF0A0E91D5ACD</rsa>
</device>
</readers>
<xmlserver>
<enabled>0</enabled>
</xmlserver>
<radegastserver>
<enabled>0</enabled>
</radegastserver>
<cache>
<emm>10</emm>
<ecm>-1</ecm>
</cache>
<debug>
<darint39>sintoi51</darint39>
<level>internal</level>
<type>all</type>
<output>console, tcp</output>
<logfile>/tmp/newcs.txt</logfile>
<console_options></console_options>
<file_options></file_options>
<udp_host>172.16.1.1</udp_host>
<udp_port>9000</udp_port>
<udp_options></udp_options>
<tcp_port>1001</tcp_port>
<tcp_options></tcp_options>
</debug>
<newcamdserver>
<enabled>no</enabled>
<name>local</name>
<deskey>01 02 03 04 05 06 07 08 09 10 11 12 13 14</deskey>
<user>
<name>dummy</name>
<password>dummy</password>
<hostname>127.0.0.1</hostname>
<port>12000</port>
</user>
</newcamd_server>
</newCSconfig>



Newcs is a pure server not reader it expects a connection from client eg: cccam or mgcamd
...
your not going to know what newcs sends back until you get a client to connect and what I mean by client is a cam emulator such as cccam or mgcamd


Mmm, I set the newcamd_server/enabled node to false, basically I wanted to do things step by step, first get NewCS to unscramble the channels on the card, then figure out how to hook up a client.

I realize I don't fully understand the pipeline of operations here. :confused: Would the client be responsible for sending the unscrambled signal to the TV? That would explain why I get no error but still no picture.


forget the raw telnet and forget telnetting to the debug port 1001 just telnet to the azbox and run newcs from the prompt
Once thats done run newcs from the command prompt and see if it identifies the card as you said it appears to be recognising the card


Here is the console output I get when running newcs manually:



Reading Config file from /var/tuxbox/config/newcs.xml
Reading Config file from /PLUGINS/OpenXCAS/NewCS/newcs.xml
****** INTERNAL enabled
TCP-log password is disabled!
level: internal
type: all
output: console, tcp
logger config: level 16777215 type 255 output 5
Console log options: level 16777215 type 255
tcp port: 1001
TCP log options: level 16777215 type 255
[ 09:35:31 ] [ Box detect ] Box type 9
[ 09:35:31 ] [ Config ] hwkey not found !
[ 09:35:31 ] [ Config ] ekpair not found !
[ 09:35:31 ] [ Config ] /dev/scard ECM priority: hard
[ 09:35:31 ] [ EMM Cache ] Initialising Cache with 10 entries
[ 09:35:31 ] [ ECM Cache ] Initialising dynamic Cache
[ 09:35:31 ] Calibrating delay loops
[ 09:35:31 ] usleep(5) takes: 0 s 14 us
[ 09:35:31 ] usleep(10) takes: 0 s 16 us
[ 09:35:31 ] usleep(100) takes: 0 s 108 us
[ 09:35:31 ] usleep(500) takes: 0 s 662 us
[ 09:35:31 ] [ Loader ] Reader type 11 on node /dev/scard
[ 09:35:31 ] [ azbox ] Opening device /dev/scard
SCARD_IOC_CHECKCARD: ATR len=-1
SCARD_IOC_CHECKCARD: ATR len=-1
SCARD_IOC_CHECKCARD: ATR len=13
[ 09:35:35 ] ATR: 3B 78 12 00 00 A0 C4 06 00 8F F1 90 00
[ 09:35:35 ] [ ******* ] Atr header is 3B 78 [NORMAL]
[ 09:35:35 ] parseAtr: 3B 78 12 00 00 A0 C4 06 00 8F F1 90 00 00
[ 09:35:35 ] [ ATR ] T=0 1etu=186.00us Guardtime:12etu WWT:19200etu
[ 09:35:35 ] [ ATR ] Fi 1 (372) Di 2 (2)
[ 09:35:35 ] [ ATR ] Historical bytes: [A0] [C4] [06] [00] [8F] [F1] [90] [00]
[ 09:35:35 ] [ ATR ] freq 1000000.000 sciFreq 3570000.000
[ 09:35:35 ] [ azbox ] Set card type to 0xD00 (mode 6)
[ 09:35:35 ] [ Loader ] Init Cryptoworks card
[ 09:35:35 ] [ azbox ] Delay is 52us
[ 09:35:35 ] write: FF 10 12 FD
[ 09:35:35 ] [ azbox ] Timeout is 1000308us
[ 09:35:35 ] read: FF 10 12 FD
[ 09:35:35 ] [ CryptoWorks ] PTS handshake successful
[ 09:35:35 ] [ CryptoWorks ] Sending to Card: A4C0000011
[ 09:35:35 ] [ azbox ] Delay is 52us
[ 09:35:35 ] write: A4 C0 00 00 11
[ 09:35:35 ] [ azbox ] Timeout is 1000308us



Hope this helps

It sure does! Thanks a lot! :respect-001:

valerica
30-12-2009, 12:49 PM
You must connect newcs with an emu ; example : newcs + mgcamd or newcs + ccamd . What's yr choice ?

Cheers ,
Val .

KidOtaku
30-12-2009, 01:21 PM
You must connect newcs with an emu ; example : newcs + mgcamd or newcs + ccamd . What's yr choice

Thanks for your answer! I installed mgcamd and lo and behold, some of my channels are unscrambled, thank you! However, only a small number of my card's channels are open.

Anyone has an idea as to why not all channels are open? Are there standard log files I can examine? For some reason, the camds do not work properly when I start them manually (i.e. all channels remain scrambled, even with MultiCAS), I need to start them through the plugins menu, so I can't route the output of the console to a file. I updated the L: line in mg_cfg for mgcamd to the following, but no log file was created:


# Log option, summ of:
# 00 Off
# 01 Network
# 02 console
# 04 file, appended ! delete it by yourself, before it eat all your hdd
L: { 04 } /EMU/OpenXCAS/mgcamd/log.txt

Any ideas?


Cheers

valerica
30-12-2009, 02:00 PM
You hv to create file newcamd.list inside folder /PLUGINS/OpenXCAS/mgcamd with the following lines :


CWS_KEEPALIVE = 300
CWS_INCOMING_PORT = 12000
CWS = 127.0.0.1 20000 dummy dummy 01 02 03 04 05 06 07 08 09 10 11 12 13 14

and give attributes 755 to this file .
Now make only newcs & mgcamd active (no # in front) & restart/yellow these 2 .

Cheers ,
Val .

2jj
30-12-2009, 06:07 PM
If U still wants to use MultiCAS+newcs connect to your own newcs through newcamd client in MultiCAS by deit one connection with in your case port 12000 name dummy pass dummy and hostname 127.0.0.1

KidOtaku
30-12-2009, 08:53 PM
You hv to create file newcamd.list inside folder /PLUGINS/OpenXCAS/mgcamd with the following lines :


CWS_KEEPALIVE = 300
CWS_INCOMING_PORT = 12000
CWS = 127.0.0.1 20000 dummy dummy 01 02 03 04 05 06 07 08 09 10 11 12 13 14

and give attributes 755 to this file .
Now make only newcs & mgcamd active (no # in front) & restart/yellow these 2 .


Thanks for the hint; this file was already present in my folder, with the same config (except for the KEEPALIVE line). But I still can only open three channels. Am trying with cccam now to see if it gets any better (and to isolate the issue to either NewCS or mgcamd) but without luck.



If U still wants to use MultiCAS+newcs connect to your own newcs through newcamd client in MultiCAS by deit one connection with in your case port 12000 name dummy pass dummy and hostname 127.0.0.1

This would probably work but I'm not sure what the advantage would be; the thing I am trying to achieve in the end is to share my local card, and I think that MultiCAS itself cannot be used as a server except for its own protocol (which I suspect is not very popular). Am I mistaken here? It's a shame as MultiCAS opens all my card's channels without a hitch; is there a way to somehow relay the server functionality of MultiCAS to another emu... ideally to cccam?

If not, could anyone with a working NewCS-CCCam configuration (and a bit of time on their hand :)) send me his config files?

Cheers!