INSTALL OF PC/SC LITE & CCID DRIVER
===================================

  This document decribes the installation of PC/SC Lite and CCID driver. 
You can also read the texts in particular directory.

INSTALL OF LIBUSB
=================
  Before install PC/SC Lite, You should install Libusb fist. Libusb is a
portable API available for usage of USB reader.

  [usr@localhost] tar xvzf Smart.tar.gz
  [usr@localhost] cd libusb-0.1.8
  [usr@localhost] ./configure

# Hint:You can add your own environment variables by typing ./configure -h
 
Compile Libusb.
  [usr@localhost] make

Get the root privileges.
  [root@localhost] make install

Libusb will default install in /usr/local/

INSTALL OF PC/SC LITE
=====================
  Next install the PC/SC Lite.
 
  [usr@localhost] cd pcsc-lite-1.2.9
  [usr@localhost] ./configure --enable-libusb=/usr/local --enable-daemon --enable-debug
                   --enable-threadsafe --prefix=/usr/local/pcsc --sysconfdir=/etc 
	           --enable-runpid=/var/run/pcsc.pid 

# Hint:You can add your own environment variables by typing ./configure -h

Compile PC/SC Lite.
  [usr@localhost] make
  
Get the root privileges.
  [root@localhost] make install
  [root@localhost] echo "/usr/local/pcsc/lib" >> /etc/ld.so.conf
  [root@localhost] ldconfig
  [root@localhost] mkdir /dev/pcsc
  [root@localhost] mkdir /usr/local/pcsc/drivers
  [root@localhost] echo "/usr/local/pcsc/sbin/pcscd" >> /etc/rc.d/rc.local
  
You can test PC/SC Lite and Smart Card API by using testpcsc in src/

INSTALL OF CCID DRIVER
======================
  Finally install the CCID driver.
  [usr@localhost] cd ccid-0.9.1
  [usr@localhost] ./configure --enable-libusb=/usr/local LDFLAGS=-L/usr/local/pcsc/lib CPPFLAGS=-I/usr/local/pcsc/include
  
# Hint:You can add your own environment variables by typing ./configure -h

Compile CCID.
  [usr@localhost] make
  
Get the root privileges.  
  [root@localhost] make install
  
When completely installing the CCID driver, start the pcscd as follow:
  [root@localhost] /usr/local/pcsc/sbin/pcscd
  
# Hint: When Linux booting completely, the pcsc-lite driver will be started.  

Starting debug mode as follow:
  [root@localhost] /usr/local/pcsc/sbin/pcscd -d stdout
  
then you can test this driver by using formaticc in folder: /pcsc-lite-1.2.9/src/utils/ and typing ./formaticc

When strating the formaticc program, it will ask for your host name and transmit protocal.
If you use the Scard reader producted by Alcormicro.com, please choose 0 in protocal item.
There are two files (sample.in & sample.out) contained in this folder:/pcsc-lite-1.2.9/src/utils/ , and can be the input and output file.
When finishing the option step, you can check that is the driver working or not. 
  
  
  
  
  
  
  
  
