Omnikey CardMan 4000 and pcsc

      No Comments on Omnikey CardMan 4000 and pcsc

There are basically two ways of getting the Omnikey CardMan 4000 to work: You can either use the original driver from HID (without CT-API support) or the free version from OpenCT

1. Installing pcsc

Well, this is the easiest part. Just pull the packages from with yum:

yum install pcsc-lite

For other distros (openSuse, debian, Ubuntu etc.) ymmv here.

2. Using the omnikey driver

The driver is available at HID’s download archive. Download cm4000_installer_v2_4_0_src.tar.gz, extract the tar archive, and copy the shared object libcm4000.so to an appropiate place (probably /usr/lib/pcsc/drivers/libcm4000.so)

$ tar xvfz cm4000_installer_v2_4_0_src.tar.gz
$ cp cm4000_installer_v2_4_0_src/libcm4000.so /usr/lib/pcsc/drivers/libcm4000.so

2.1 Configuring pcsc

Now that the driver is in place, we create a configuration file for the reader called cm4000.conf:

$ touch /etc/readers.conf.d/cm4000.conf

with the following content

# Configuration file for CardMan 4000 smartcard reader.

FRIENDLYNAME  "OMNIKEY CardMan 4000 Socket 0"
DEVICENAME  /dev/cmm0
LIBPATH   /usr/lib/pcsc/drivers/libcm4000.so
CHANNELID 0

Don’t put the configuration directly into /etc/reader.conf since the pcscd init script automatically merges all files in /etc/reader.conf.d/* into /etc/reader.conf

After restarting pcscd you’re done

$ service pcscd restart

3. Using OpenCT driver

It may be a good idea, to user the OpenCT driver instead of the original one. You don’t have to compromise your file tree (because everything can be pulled via yum) and theoretically OpenCT also provides a CT-API interface (although I did not get this to work).

So once again, we pull the necessary packages with yum:

$ yum install openct pcsc-lite-openct

3.1 Configuring pcsc for use with OpenCT

Instead of cm4000.conf (so make sure, it is renamed to cm4000.conf.bak or similar) we use use openct.conf which is already part of pcsc-lite-openct. So all we have to do is uncomment the lines in /etc/readers.conf.d/openct.conf:

# OpenCT configuration file for pcsc-lite
# http://www.opensc.org/openct/

 FRIENDLYNAME     "OpenCT"
 DEVICENAME       /dev/cmm0
 LIBPATH          /usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so
 CHANNELID        0 

# End of file

Eventually restart openct and pcscd:

$ service openct restart
$ service pcscd restart

Leave a Reply

Your email address will not be published.