Installation

PCSC-lite 1.6.4 on Mandriva 2008.0

./configure --prefix=/usr/local/depot/pcsc-lite-1.6.4 \
  --disable-serial --enable-debugatr \
  --enable-usbdropdir=/usr/local/pcsc/drivers \
  --enable-confdir=/usr/local/etc

PC/SC lite has been configured with following options:

Version:             1.6.4
System binaries:     /usr/local/depot/pcsc-lite-1.6.4/sbin
Configuration dir:   /usr/local/etc


Host:                i686-pc-linux-gnu
Compiler:            gcc
Preprocessor flags:  -I${top_srcdir}/src
Compiler flags:      -Wall -fno-common -g -O2
Preprocessor flags:  -I${top_srcdir}/src
Linker flags:
Libraries:

PTHREAD_CFLAGS:      -pthread
PTHREAD_LIBS:
PCSC_ARCH:           Linux

pcscd binary          /usr/local/depot/pcsc-lite-1.6.4/sbin/pcscd
libhal support:       yes
libusb support:       no
USB drop directory:   /usr/local/pcsc/drivers
ATR parsing messages: true
ipcdir:               /var/run/pcscd
use serial:           no
use usb:              yes

make
make install
cd src
./testpcsc

$ ./testpcsc

MUSCLE PC/SC Lite unitary test Program

THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS!
Do NOT use it unless you really know what you do.

Testing SCardEstablishContext   : Command successful.
Testing SCardIsValidContext     : Command successful.
Testing SCardIsValidContext     : Invalid handle. (don't panic)
Testing SCardListReaderGroups   : Command successful.
Group 01: SCard$DefaultReaders
Testing SCardFreeMemory         : Command successful.
Testing SCardListReaders        : Command successful.
Testing SCardListReaders        : Command successful.
Reader 01: AKS ifdh 00 00
Waiting for card insertion      : Command successful.
Testing SCardConnect            : Command successful.
Select file: 00 A4 00 00 02 3F 00
Testing SCardTransmit           : Command successful.
 card response: 90 00
Testing SCardControl            : Feature not supported. (don't panic)
Testing SCardGetAttrib          : Transaction failed. (don't panic)
Testing SCardFreeMemory         : Command successful.
Testing SCardGetAttrib          : Command successful.
SCARD_ATTR_ATR_STRING length: 12
SCARD_ATTR_ATR_STRING: 3B E2 00 FF C1 10 31 FE 55 C8 02 9C
Testing SCardFreeMemory         : Command successful.
Testing SCardGetAttrib          : Transaction failed. (don't panic)
Testing SCardGetAttrib          : Transaction failed. (don't panic)
Testing SCardGetAttrib          : Transaction failed. (don't panic)
Testing SCardSetAttrib          : Transaction failed. (don't panic)
Testing SCardStatus             : Command successful.
Current Reader Name             : AKS ifdh 00 00
Current Reader State            : 0x0034
Current Reader Protocol         : T=1
Current Reader ATR Size         : 12 bytes
Current Reader ATR Value        : 3B E2 00 FF C1 10 31 FE 55 C8 02 9C
Testing SCardFreeMemory         : Command successful.
Testing SCardFreeMemory         : Command successful.
Press enter:
Testing SCardReconnect          : Command successful.
Testing SCardDisconnect         : Command successful.
Testing SCardFreeMemory         : Command successful.
Testing SCardReleaseContext     : Command successful.

PCSC-lite 1.4.100 on Ubuntu 7.10

  • Note: libhal is now the default rather than libusb
  • Note: libhal seems to cause pcscd to crash without logging a useful message.
  • ./configure --prefix=/usr/local/depot/pcsc-lite-1.4.100 --mandir=/usr/local/depot/pcsc-lite-1.4.100/man --enable-confdir=/usr/local/etc --enable-usbdropdir=/usr/local/pcsc/drivers --enable-debugatr --enable-libusb --disable-libhal --enable-runpid=/var/run/pcscd.pid --enable-ipcdir=/var/run --enable-extendedapdu
  • With libhal: ./configure --prefix=/usr/local/depot/pcsc-lite-1.4.100 --mandir=/usr/local/depot/pcsc-lite-1.4.100/man --enable-confdir=/usr/local/etc --enable-usbdropdir=/usr/local/pcsc/drivers --enable-debugatr --enable-runpid=/var/run/pcscd.pid --enable-ipcdir=/var/run --enable-extendedapdu
  • configuration results

    EAD_CFLAGS: -pthread
    PTHREAD_LIBS:
    PCSC_ARCH: Linux

    libhal support: no
    libusb support: yes
    SCF reader support: false
    USB drop directory: /usr/local/pcsc/drivers
    ATR parsing messages: true
    confdir: /usr/local/etc
    ipcdir: /var/run

PCSC-lite 1.4.4 on Mandriva 2006

  • ./configure --prefix=/usr/local/depot/pcsc-lite-1.4.4 --mandir=/usr/local/depot/pcsc-lite-1.4.4/man --enable-confdir=/usr/local/etc --enable-usbdropdir=/usr/local/pcsc/drivers --enable-debugatr --enable-runpid=/var/run/pcscd.pid --enable-ipcdir=/var/run --enable-extendedapdu
  • configuration results

    enable libusb support : yes
    enable USB drop directory : /usr/local/pcsc/drivers
    enable ATR parsing messages : true
    enable SCF reader support : false
    enable confdir : /usr/local/etc
    enable ipcdir : /var/run
    enable runpid : /var/run/pcscd.pid
    plateform endianess : little endian

PCSC-lite 1.3.2 on Mandriva 2006

  • If you want to do the installation as a non-root user, create the following directories and chown them to the user doing the install.
    • mkdir -p /usr/local/etc/reader.conf.d
    • mkdir -p /usr/local/depot/pcsc-lite-1.3.2
    • touch /usr/local/etc/reader.conf
  • ./configure --prefix=/usr/local/depot/pcsc-lite-1.3.2 --mandir=/usr/local/depot/pcsc-lite-1.3.2/man --enable-confdir=/usr/local/etc --enable-usbdropdir=/usr/local/pcsc/drivers --enable-debugatr --enable-runpid=/var/run/pcscd.pid --enable-ipcdir=/var/run --enable-extendedapdu
  • configuration results

    enable libusb support : yes
    enable USB drop directory : /usr/local/pcsc/drivers
    enable ATR parsing messages : true
    enable SCF reader support : false
    enable confdir : /usr/local/etc
    enable runpid : /var/run/pcscd.pid
    enable ipcdir : /var/run
    plateform endianess : little endian

  • make
  • make install
  • update-reader.conf (This creates /usr/local/etc/reader.conf from the files in /etc/reader.conf.d.)
  • chown the installed files to root.
  • A startup script in in the build directory etc/pcscd.init. For an opt_depot install, some paths have to be corrected in this file.
  • ln -s /usr/local/lib/libpcsclite.so.1.0.0 libpcsclite.so.0 in /usr/lib to keep AKS middleware happy.

PCSC-Perl 1.4.7 On Ubuntu 7.10

  • Make sure pkg-config --libs libpcsclite works.
  • perl Makefile.PL PREFIX=/usr/local/depot/site_perl INST_MAN3DIR=/usr/local/depot/site_perl/man/man3
  • make
  • make install
  • Test with pcsc_scan

PCSC-Perl 1.4.4 On Mandriva 2006

  • Make sure pkg-config --libs libpcsclite works.
  • PKG_CONFIG_PATH=/usr/local/lib/pkgconfig perl Makefile.PL PREFIX=/usr/local/depot/site_perl INST_MAN3DIR=/usr/local/depot/site_perl/man/man3
  • PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make
  • PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make install
  • Use PERL5LIB=/usr/local/lib/perl5/site_perl/5.8.7/i386-linux to run.

PCSC-Tools 1.4.17 On Mandriva 2008.0

  • You must have PCSC built and installed.
  • Make sure pkg-config --libs libpcsclite works.
  • PKG_CONFIG_PATH=/usr/local/lib/pkgconfig DESTDIR=/usr/local/depot/pcsc-tools-1.4.17 make
  • PKG_CONFIG_PATH=/usr/local/lib/pkgconfig DESTDIR=/usr/local/depot/pcsc-tools-1.4.17 make install

PCSC-Tools 1.4.13 On Ubuntu 7.10

  • You must have PCSC built and installed.
  • Make sure pkg-config --libs libpcsclite works.
  • Edit Makefile for man page install directory
  • DESTDIR=/usr/local/depot/pcsc-tools-1.4.13 make
  • DESTDIR=/usr/local/depot/pcsc-tools-1.4.13 make install

PCSC-Tools 1.4.11 On Mandriva 2006

  • You must have PCSC built and installed.
  • Make sure pkg-config --libs libpcsclite works.
  • Edit Makefile for man page install directory
  • DESTDIR=/usr/local/depot/pcsc-tools-1.4.11 make
  • DESTDIR=/usr/local/depot/pcsc-tools-1.4.11 make install

Troubleshooting

  • Startup without anything in /usr/local/pcsc/drivers:
    Sep 25 10:36:47 m-6 pcscd: pcscdaemon.c:464:main() pcsc-lite 1.3.2 daemon ready.
    Sep 25 10:36:47 m-6 pcscd: hotplug_libusb.c:217:HPReadBundleValues() No bundle files in pcsc drivers directory: /usr/local/pcsc/drivers
    Sep 25 10:36:47 m-6 pcscd: hotplug_libusb.c:218:HPReadBundleValues() Disabling USB support for pcscd
    
    This should not be a problem since the eToken is handled by hotplugging.
    If you want to get rid of the message, put a bundle file in /usr/local/pccs/drivers.
  • Normal startup

    Sep 25 11:42:30 m-6 pcscd: readerfactory.c:1093:RFInitializeReader() Attempting startup of AKS ifdh 00 00 using /usr/local/lib/aksifdh.so
    Sep 25 11:42:30 m-6 pcscd: readerfactory.c:930:RFBindFunctions() Loading IFD Handler 2.0
    Sep 25 11:42:30 m-6 pcscd: pcscdaemon.c:464:main() pcsc-lite 1.3.2 daemon ready.
    Sep 25 11:42:30 m-6 pcscd: hotplug_libusb.c:105:HPReadBundleValues() Cannot open PC/SC drivers directory: /usr/local/pcsc/drivers
    Sep 25 11:42:30 m-6 pcscd: hotplug_libusb.c:106:HPReadBundleValues() Disabling USB support for pcscd.

    Be sure you get the message about }{Attempting startup of AKS ifdh}}. If you don't, check your reader.conf.
  • Using pcsc_scan
    pcsc_scan

    $ pcsc_scan -n

    PC/SC device scanner
    V 1.4.6 (c) 2001-2006, Ludovic Rousseau <ludovic.rousseau@free.fr>
    Compiled with PC/SC lite version: 1.3.2
    Scanning present readers
    0: AKS ifdh 00 00

    Mon Sep 25 16:08:12 2006
    Reader 0: AKS ifdh 00 00
    Card state: Card removed,

    $ PERL5LIB=/usr/local/lib/perl5/site_perl/5.8.7/i386-linux pcsc_scan
    PC/SC device scanner
    V 1.4.6 (c) 2001-2006, Ludovic Rousseau <ludovic.rousseau@free.fr>
    Compiled with PC/SC lite version: 1.3.2
    Scanning present readers
    0: AKS ifdh 00 00

    Fri Sep 29 15:45:03 2006
    Reader 0: AKS ifdh 00 00
    Card state: Card inserted,
    ATR: 3B E2 00 FF C1 10 31 FE 55 C8 02 9C

    ATR: 3B E2 00 FF C1 10 31 FE 55 C8 02 9C
    + TS = 3B --> Direct Convention
    + T0 = E2, Y(1): 1110, K: 2 (historical bytes)
    TB(1) = 00 --> Programming Param P: 0 Volts, I: 0 milliamperes
    TC(1) = FF --> Extra guard time: 255
    TD(1) = C1 --> Y(i+1) = 1100, Protocol T = 1


    TC(2) = 10 --> Work waiting time: 960 x 16 x (Fi/F)
    TD(2) = 31 --> Y(i+1) = 0011, Protocol T = 1


    TA(3) = FE --> IFSC: 254
    TB(3) = 55 --> Block Waiting Integer: 5 - Character Waiting Integer: 5
    + Historical bytes: C8 02
    Category indicator byte: C8 (proprietary format)
    + TCK = 9C (correct checksum)

    Possibly identified card (using /usr/local/pcsc/smartcard_list.txt):
    3B E2 00 FF C1 10 31 FE 55 C8 02 9C
    Aladdin eToken PRO (USB token)
    Siemens CardOS M4.0

    • If insertion and removal isn't seen, you have an issue with devfs/usbfs/hotplug/udev.
    • Part of pcsc-tools

PCSC CCID

  • PCSC-CCID
  • Make sure pkg-config --libs libpcsclite works.
  • PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/usr/local/depot/ccid-1.3.13 --disable-twinserial
  • multi threading         : yes
    bundle directory name   : ifd-ccid.bundle
    USB drop directory      : /usr/local/pcsc/drivers
    build and install serial Twin driver : false
    serial twin install dir : /usr/local/pcsc/drivers/serial
    checking for SCardEstablishContext in -lpcsclite... yes
    compiled for pcsc-lite  : yes
    
  • {{PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make}
  • {{PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make install}
  • No labels