***************************************************************

 Installation instructions for 
 the OMNIKEY CardMan 4040 smartcard reader
	    
 Version 2.0.0
 OMNIKEY
 support@omnikey.com

***************************************************************

------------------------------
 What you need
------------------------------

[1] Kernel with PCMCIA support

[2] PCSCLite Version >= 1.2.0 available at 
    http://www.linuxnet.com/ 
      and/or 
    http://alioth.debian.org/projects/pcsclite/

------------------------------
 Features
------------------------------
   
[1] Extended APDUS.

[2] Support of many non-ISO-compliant cards.

[3] Supports Kernels < 2.6.13 and Kernels >= 2.6.13 (new pcmciautils)
    
------------------------------
 Driver Installation
------------------------------

After you have downloaded the tarball extract it in any directory
 
  # tar -xzvf ifdok_cm4040_lnx-2.0.0.tar.gz

change to this directory and run as root user
  
  # ./install

This script checks if PCSCLite is installed and if PCMCIA support
is available on the system.
Then it starts the main installation:
First the script tries to build and install the kernel module for you;
kernel headers have to be available at /usr/src/linux/include, or at /lib/modules/<kernel-version>/build/include.

The next step is copying the shared-library implementing the ifdhandler to the standard library path
and creating the necessary config-file entries which includes registration of the device 
with the PCMCIA layer, creating/updating the smartcard device-class file and adding 
an entry for one reader device to the PCSC reader.conf.

Maybe you have to adapt the path of the PCSC installation directory on different systems.

-----------------------------
 Support
-----------------------------

Q: What driver version am I using at the moment?

A: You can determine the driver version number by having a look at the PCSCLite
   bundle directory (usually /usr/local/pcsc/drivers): The bundle name of our 
   devices drivers contain the driver version number. 
   The driver is also printing a version string every time a reader is activated 
   by PCSCLite: This string can be found either in the system log
   or on the console you started PCSCLite daemon from.


Q: I am experiencing problems using smartcard XYZ !

A: Please send an email to our support address support@omnikey.com containing
   a description of the chain of events which lead to the misbehavior (reader plug-in/-off, 
   SC insertion/removal, commands sent to the SC or at least the program used to talk to the SC), 
   also include the name and ATR of the smartcard, and add the PCSCLite log events (should be written to
   your system log /var/log/messages or similar). Your systems kernel version and kind of distribution
   may also be helpful.

Q: I installed the driver successfully but there is no /dev/cmx* ?

A: Please run "depmod -a" as root, sometimes this step isn't done in the installation script, so you have to 
   perform it manually.

Q: There are several errors compiling the kernel module, what should i do ?

A: We tried to support all common kernels, but some distributions deliver their own kernel sources, with some 
   backports and so on. You can try to copy the kernel-submitted kernel module files from the kernel sources.
   They are usually found at /usr/src/linux/drivers/char/pcmcia/cm4040_cs.c and .h or /usr/src/linux-<kernel-version>/...
   Please copy them to the unpacked driver directory ifdok_cm4040_lnx-2.0.0/src named like your kernel. 
   This means if you run a kernel, for example 2.8.46, you should rename the file cm4040_cs.c.2.8.46, and do 
   the same with the header file. If you do not manage it, please contact support@omnikey.com.