Thursday, September 10, 2009

Testing NewCS using CCcam as a Client in a Virtual Machine

Note: This is a continuation of:

I wanted to test NewCS with a client application outside the NewCS Virtual Machine (VM).

After looking around the web I found a client that would make for a relatively simple, but thorough test. The application is CCcam (in client mode). This powerful application requires a Linux o/s and can be configured to poll a local or IP-addressed newcamd server (ie NewCS).

The method I used to set this up is as follows:

- Using the VirtualBox (VB) 'Export' command, export your previously created ClarkConnect5 VM (ie make a copy)
- Import this copy back into VB and give it a different name and also a different IP address (either by leasing an IP on your router, or setting a new IP manually in the CCcam VM. Also make sure your CCcam VM has a unique MAC address)
- Install CCcam on to the newly created CC5 VM
- Configure CCcam to act as your newcamd client
- Boot your NewCS VM and and start NewCS (with a smartcard inserted)
- Open a NewCS Telnet window in Win7
- Boot your CCcam VM and start CCcam

On the NewCS Telnet window you should see NewCS run through its initialisation and then see CCcam request and log into NewCS. If you open a CCcam browser window you will see the card details are passed down to CCcam as a client of NewCS. If this happens then the test is successful and NewCS is definitely working as a card server.

Here is an extract from the NewCS log file:
Card Inserted
[ 17:20:23 ] [ Loader ] Card xxxx on port /dev/ttyS0 ready
[ 17:20:27 ] [ Newcamd ] new connection from on socket 9
[ 17:20:27 ] [ Newcamd:15000 ] Connection from
[ 17:20:27 ] [ Newcamd:15000 ] User user1 logged in, client: CCcam
[ 17:20:27 ] [ Newcamd:15000 ] Command E3 from user1 len 3
[ 17:20:27 ] [ Newcamd:15000 ] Sending Card Information to user1:
[ 17:20:27 ] [ Newcamd ] ProvID 0 Key xxxxxx on caid xxxx type 0
[ 17:20:27 ] [ Newcamd ] ProvID 0 Key xxxxxx on caid xxxx type 1

Excellent CCcam/ClarkConnect tutorial here (access requires registration):
Many thanks
to kapzas and the Eurocardsharing Forum for this.

No comments:

Post a Comment