Jump to content


Photo

How to use the cardserver?


  • Please log in to reply
12 replies to this topic

#1 Dirktator

  • Senior Member
  • 52 posts

0
Neutral

Posted 24 June 2008 - 21:25

Hello

Does anyone know where I can find documentation how to use the cardserver? I see that when I start /var/bin/cardserver, a socket is created: /tmp/cardserver-powersocket1. I have a CanalDigitaal card and CCcam and mgcamd both seem to be able to use the card server since the video stream freezes when I kill the cardserver process :-)

Anyway, I would like to know how to use the cardserver in my own programs.

Hope you can help !!
DM500+, DM8000HD, rotor, 88cm dish Mac and MacBook

Re: How to use the cardserver? #2 Dirktator

  • Senior Member
  • 52 posts

0
Neutral

Posted 31 July 2008 - 16:09

Hi

I have issues with connecting to the cardserver with my own written CAM.
1. I created a socket,
2 read the 14 bytes from the server,
3 XORed them with the 14 bytes defined in the cardserver.cfg file
4. created a packet starting with E0 and then the length in the 2 next bytes
5. added the default username ("local")
6. added the cryptes password ("local",using glibc's crypt function and salted with $1$abcdefgh$)
7. Encrypted the whole packet with DES, with the key defined in step 3
The cardserver will not accept the login request. Any ideas/!?!?!?

Any suggestions would be very welcome.
Thanks!
DM500+, DM8000HD, rotor, 88cm dish Mac and MacBook

Re: How to use the cardserver? #3 bartender

  • Senior Member
  • 207 posts

0
Neutral

Posted 1 August 2008 - 09:06

I have seen source code for the newcamd protocol, look for LinCardEmu lincardemu-0.21a.tar.gz was the latest version I managed to find.

Re: How to use the cardserver? #4 Dirktator

  • Senior Member
  • 52 posts

0
Neutral

Posted 1 August 2008 - 19:52

Hi

can you remember where you got it from? Google only leads me to sites how to install it. It really amazes me how bad the documentation about the newcamd protocol is. The explanation file and sample source code that come with newcamd to not match and are very ambiguous. I have tried even the emunation code which is C++ but requires all kinds of non-standard encryption libraries :-(

Anyway, thanks for the hint so far. I will keep looking for it, but if you could provide me with a download site this would be great. In the mean time I will start trying the Radegast cardserver which at least has a MUCH simpler interface.

regds
DM500+, DM8000HD, rotor, 88cm dish Mac and MacBook

Re: How to use the cardserver? #5 bowman

  • Member
  • 17 posts

0
Neutral

Posted 1 August 2008 - 23:41

I did this a number of years back, both newcamd and radegast. My target was pure java so I had to actually figure out what the "non-standard" calls did, rather than just use them in the same way. At the time, the protocol.txt distributed with newcamd was the only source I could find (besides sniffing + reversing).

Don't recall the exact details now, but the resulting source is part of the cardservproxy: http://bowman.rtfm.s....8.6-src.tar.gz
The procedure for connecting as a client can be found in: cws/NewcamdCwsConnector.java run()

I do remember that the password hashing was the same as some existing md5-based hashing scheme (possibly from apache), but perhaps thats what glibc crypt does?

At the time I was planning to add _all_ protocols but never got around to it. Now I guess cccamd would be the obvious choice but afaik thats as closed as it gets (not even any easily reversed windows plugins available).


Re: How to use the cardserver? #6 hemertje

  • Forum Moderator
    PLi® Core member
  • 33,470 posts

+118
Excellent

Posted 3 August 2008 - 19:23

have a look on the www.dbfn.tv dreambox forum
other coders started there there own opensource softcam
you can download the softcam RQcamd and Opencam incl. there sources

ps these softcams are written for the USA Nagra system

on the Glassfibre 1GB DVB-C...


Re: How to use the cardserver? #7 bowman

  • Member
  • 17 posts

0
Neutral

Posted 5 August 2008 - 11:58

Yes opencam is an interesting read (also the vdr-sc source, on which emunation is based). For opencam/rqcam though, I don't recall seeing any cs protocols implemented, when I checked it was strictly local nagra emulation.

Re: How to use the cardserver? #8 hemertje

  • Forum Moderator
    PLi® Core member
  • 33,470 posts

+118
Excellent

Posted 5 August 2008 - 13:34

latest rqcamd versions can do cs

on the Glassfibre 1GB DVB-C...


Re: How to use the cardserver? #9 Dirktator

  • Senior Member
  • 52 posts

0
Neutral

Posted 17 August 2008 - 19:40

Thanks, the rqcamd client code works. Here is the source code from my own CAM, for those who are interested in CAM development.

Attached Files


DM500+, DM8000HD, rotor, 88cm dish Mac and MacBook

Re: How to use the cardserver? #10 bowman

  • Member
  • 17 posts

0
Neutral

Posted 19 August 2008 - 10:19

Nice initiative... is yours working in its current state? Any pitfalls or problems you'd like to share regarding the setup of the dev environment?

Re: How to use the cardserver? #11 Dirktator

  • Senior Member
  • 52 posts

0
Neutral

Posted 20 August 2008 - 20:21

Yes, its working considering you use PLi since PLi uses a specific CAPMT device.
Setup dev envt is easy. Just run it from VMware, start a terminal window in it, cd to the source folder and type make.
DM500+, DM8000HD, rotor, 88cm dish Mac and MacBook

Re: How to use the cardserver? #12 bowman

  • Member
  • 17 posts

0
Neutral

Posted 21 August 2008 - 09:41

Yeah I noticed the CAPMT socket, do you know if there are there any other cams that make use of this yet?

Re: How to use the cardserver? #13 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 21 August 2008 - 11:48

this socket has been in tuxbox enigma for a few years now, it's no longer PLi specific.
However, for e2 I think PLi is the only image offering it so far.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users