Accueil  Support  Famille CSB6 : PC/SC sur Linux et Mac avec PCSC-Lite

Using SpringCard CSB6 with PCSC-Lite

Nous sommes désolés, mais cette page n'est pas encore disponible en français.
Jump to : Linux | Mac OS X

Products in the SpringCard CSB6 Family (CSB6, Prox'N'Roll PC/SC, EasyFinger and CrazyWriter) are smartcard readers, compliant with both standards PC/SC and CCID.

This makes those products usable on non-Windows operating systems thanks to PCSC-Lite CCID driver.

Introduction

PC/SC standard

PC/SC is the de-facto standard to interface Personal Computers with Smart Cards (and smartcard readers of course). Even if PC/SC has been initialy promoted by Microsoft -and has been implemented for long in Windows-, the standard is not limited to MS' operating systems.

PCSC-Lite is an open source implementation of PC/SC, part of a global project named MUSCLE (Movement for the Use of Smart Cards in a Linux Environment). Despite its name, the PC/SC stack offered by MUSCLE is not limited to GNU/Linux anymore. Their compatibility list now includes other popular UNIXes, including Apple Mac OS X and Solaris.

CCID standard

The USB CCID specification from the USB working group aims to normalize USB smartcard readers, in order to have a single driver (supplied once for all with the operating system) for virtually any reader from any manufacturer.

PCSC-Lite project includes an open source CCID driver. This driver has been tested with SpringCard CSB6 on GNU/Linux, and should work on the other operating systems targetted by the project.

Disclaimer and warning

There's no relationship between SpringCard and the developers involved in the open source PCSC-Lite project.

Apart from this explanation page, SpringCard can't provide any technical support related to PCSC-Lite middleware nor PCSC-Lite CCID driver.

CSB6 Family on GNU/Linux

In this part we're going to install PCSC-Lite and CSB6's drivers on Ubuntu 8.04.1 (Hardy). Some parts of the procedure may vary a little, depending on the GNU/Linux distribution you're working with.

Do not connect the device to your computer now ! You must download and install the driver before connecting the product.

Download

Go to pcsclite.alioth.debian.org to download both PCSC-Lite and its CCID Driver :

  • PCSC-Lite : file named pcsc-lite-x.y.z.tar.bz2, "x.y.z" being the version number,
  • CCID driver : file named ccid-x.y.z.tar.bz2, "x.y.z" being the version number.

Installation

Connect as root.

Uncompress both archives.

N.B. : On Ubuntu (and on some other Linuxes), connecting as root is not possible. In this case, one must prefix every command by "sudo", to gain root's priviledges temporary.

Installing PCSC-Lite

Open a terminal and go to the directory where you have uncompressed the PCSC-Lite archive. Enter the commands :

./configure
make
make install

Troubleshooting

If the configure step fails with message error: usb.h not found, use ./configure LIBUSB_CFLAGS=..., maybe you don't have the libusb library installed ?

If so, download and install the complete library (libusb.sourceforge.net) before retrying the installation of PCSC-Lite.

On Ubuntu or Debian, you may use apt-get to download and install the libusb-dev package :
apt-get install libusb-dev.

Installing CCID driver

Open a terminal and go to the directory where you have uncompressed the CCID Driver archive. Enter the commands :

./configure
make
make install

Enabling PCSC-Lite daemon

PCSC-Lite's pcscd process must be running in the background.

Starting pcscd manually

Open a terminal and go to the directory where PCSC-Lite has been installed. Typically, this is /usr/local/sbin/pcscd.

In this directory, enter the command ./pcscd.

Configuring pcscd to be launched on startup

It is better to have pcscd automatically started when the computer starts. To do so, you must add pcscd in the list of processes started in rc.local or equivalent startup script.

Connecting the device

Plug the device onto an unused USB connector.

In a terminal, use the command lsusb to verify device's information.

result of lsusb

In the above screenshot, we have a CSB6 connected : Vendor ID=0x1C34 (Pro Active and SpringCard), Product ID=0x7124 (CSB6 Ultimate, PC/SC mode). Other devices will have different ProductIDs ; all products in the CSB6 PC/SC family have a ProductID in the 0x7100 to 0x71FF range.

Validating the installation

To test the newly installed reader, we'll use gscriptor, an open source PERL software, able to exchange APDUs with smartcards through the PCSC-Lite stack.

Installing PCSC-Perl

Go to ludovic.rousseau.free.fr/softwares/pcsc-perl and download pcsc-perl-x.y.z.tar.gz, "x.y.z" being the version number.

Uncompress the archive. Install the package as follow :

perl Makefile.PL
make
make install

Using gscriptor

Go to ludovic.rousseau.free.fr/softwares/pcsc-tools and download pcsc-tools-x.y.z.tar.gz, "x.y.z" being the version number.

Uncompress the archive. Launch the gscriptor program.

gscriptor - PC/SC APDU exchange in Perl + GTK

Card connect
  • Select the contactless slot of your CSB6 reader (usually the first reader in the the list),
  • Put any compliant contactless card on the reader,
  • Connect to the card (Reader -> Connect).
APDU exchange

Write the APDU command in the script panel. You may use the command FFCA000000 as a test.

Click Run. Observe card's response in the result panel.

Well, in this test this not actually a response from the card... The command FFCA000000 is interpreted by the reader (CLA=FF is reserved for the embedded APDU interpreter), so it is the reader that actually answers. The returned data are the serial number of the contactless card. Remember, we've put any contactless card on the reader, and querying the serial number is more or less the only command that will run on every card...

Troubleshooting

If invoking gscriptor fails with message Can't locate Chipcard/PCSC.pm, re-install PCSC-Perl and/or verify PERL's include directories.

CSB6 Family on Mac OS X

Starting with MacOS X version 10.4, the PCSC-Lite package and the CCID driver are included in the system. We just need to add entries for SpringCard readers into the configuration file of the CCID driver to have them supported.

Configuring CCID driver to support our readers

Open CCID driver's Info.plist

Open a Terminal window and enter this command :

sudo
  /Applications/TextEdit.app/Contents/MacOS/TextEdit
  /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist

Note : the command has been splited into 3 lines for the ease of reading. You must enter it at once, with only a single <Enter> at the end, after Info.plist

Enter your password if prompted to do so.

Invoking TextEdit in Mac's Terminal

Add SpringCard's USB Vendor ID
  • Scroll down, locate the block beginning by <key>ifdVendorID</key>,
  • Scroll down until you reach the end of the block,
  • Add 7 occurences of the line <string>0x1C34</string>.

Note : We need to add our Vendor ID 7 times, because we are to support 7 different Product IDs.

VendorID block Add 0x1C34 at the end of the block
Add the Product IDs of SpringCard's readers
  • Scroll down, locate the block beginning by <key>ifdProductID</key>,
  • Scroll down until you reach the end of the block,
  • Add the following lines :
    <string>0x7113</string>
    <string>0x7121</string>
    <string>0x7123</string>
    <string>0x7124</string>
    <string>0x7136</string>
    <string>0x7138</string>
    <string>0x7141</string>
ProductID block Add the list of products at the end of the block
Add the names of SpringCard's readers
  • Scroll down, locate the block beginning by <key>ifdFriendlyName</key>,
  • Scroll down until you reach the end of the block,
  • Add the following lines :
    <string>CrazyWriter</string>
    <string>CSB6 Basic</string>
    <string>CSB6 Secure</string>
    <string>CSB6 Ultimate</string>
    <string>EasyFinger Standard</string>
    <string>EasyFinger Ultimate</string>
    <string>Prox'N'Roll</string>
FriendlyName block Add the list of products at the end of the block
Save and restart

Save the modified file. Exit TextEdit and restart the computer.

Validation

  • Plug the reader onto a computer's USB port,
  • Open a Terminal window and enter the command pcsctest,
  • pcsctest displays the list of connected readers (in the following snapshots, only one Prox'N'Roll is connected),
  • Enter the number of the reader you want to test (in our case, only '1' is allowed).

Invoking TextEdit in Mac's Terminal

  • Put a card on the reader, and check that everything is running as expected.

Invoking TextEdit in Mac's Terminal