Some tools to be used with smart cards and PC/SC
================================================

This archive contains some tools usefull for a PC/SC user.
PC/SC lite [1] from MUSCLE [2].

The tools provided are:

- pcsc_scan (Ludovic Rousseau <ludovic.rousseau@free.fr>)
    regularly scans every PC/SC reader connected to the host
    if a card is inserted or removed a "line" is printed

    For example:

     PC/SC device scanner
     V 1.2.0 (c) 2001-2002, Ludovic Rousseau <ludovic.rousseau@free.fr>
     PC/SC lite version: 1.1.2
     0: GemPC410 0 0
     1: GemPC430 0 0
     
     Wed Aug 21 10:08:02 2002
      Reader 0 (GemPC410 0 0)
             Card state: Card removed, 
     
     Wed Aug 21 10:08:09 2002
      Reader 0 (GemPC410 0 0)
             Card state: Card inserted, 
             ATR: 3B 6D 00 FF 00 31 80 71 8E 64 48 D5 02 00 82 90 00
     
     ATR: 3B 6D 00 FF 00 31 80 71 8E 64 48 D5 02 00 82 90 00
     + TS = 3B --> Direct Convention
     + T0 = 6D, Y(1): 0110, K: 13 (historical bytes)
       TB(1) = 00 --> Programming Param P: 0, I: 0
       TC(1) = FF --> Extra guard time: 255
     + Historical bytes: 00 31 80 71 8E 64 48 D5 02 00 82 90 00
     
     Possibly identified card:
     3B 6D 00 FF 00 31 80 71 8E 64 48 D5 02 00 82 90 00
             Blue for Business, American Express@Business

     Wed Aug 21 10:09:57 2002
      Reader 0 (GemPC410 0 0)
             Card state: Card removed, 


- ATR_analysis (Christophe Levantis and Ludovic Rousseau)
    Perl script used to parse the smart card ATR.
    This script is called (by default) by pcsc_scan

    This code was originally written by Christophe in August 2000 for a
    Perl wrapper using "TLP driver" (and not PC/SC) to access the
    smartcard.

- smartcard_list.txt (Ludovic Rousseau)
    This list contains ATR of some cards. The list is used by
    ATR_analysis to find a card model corresponding to the ATR.
    I took the initial list from SCEZ by Matthias Bruestle.

    Please send me (<ludovic.rousseau@free.fr>) any ATR and card
    description not included in the list.


- scriptor (Lionel Victor <lionel.victor@unforgettable.com>)
    A Perl script to send commands to a smart card. You can use a file
    containing the commands or stdin.


- gscriptor (Lionel Victor <lionel.victor@unforgettable.com>)
    A Perl script to send commands to a smart card with GTK-based
    graphical interface.


You will need the package pcsc-perl [3] to be able to use scriptor and
gscriptor.

[1] http://pcsclite.alioth.debian.org/
[2] http://linuxnet.com/
[3] http://ludovic.rousseau.free.fr/softwares/pcsc-perl/


Authors:
========

- Lionel VICTOR for scriptor and gscriptor
- Ludovic ROUSSEAU for pcsc_scan, ATR_analysis and debug of scriptor and
  gscriptor
- Christophe LEVANTIS for the original code of ATR_analysis


Licences:
=========

    pcsc-tools
    Copyright (C) 2001-2003  Lionel VICTOR, Ludovic ROUSSEAU

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


History:
========

1.4.0 - 6 August 2004, Ludovic ROUSSEAU
    - 13 new ATR in smartcard_list.txt
    - rewrite of gscriptor using libgtk2-perl
    - if the command does not contains spaces (00A4030000) we expand it

1.3.4 - 4 July 2004, Ludovic ROUSSEAU
    - 5 new ATR in smartcard_list.txt
    - pcsc_scan.c: LPSTR -> LPTSTR for pcsc-lite 1.2.9 beta4
    - scriptor, gscriptor: only send the 5 last characters of the
      response to Chipcard::PCSC::Card::ISO7816Error()
      The SW was sometimes not correctly parsed.
    - Makefile: use 'pkg-config libpcsclite [--cflags|--libs]'

1.3.3 - 2 April 2004, Ludovic ROUSSEAU
    - use a dynamic table for readers to avoid any use of the deprecated
      PCSCLITE_MAX_CHANNELS constant
    - 11 new ATR in smartcard_list.txt
    - add support of PCSC MacOS X framework

1.3.2 - 17 December 2003, Ludovic ROUSSEAU
    - scriptor: by default let pcscd select the protocol among T=0 and T=1 
      . print the protocol actually used
      . print textual status word according to ISO 7816
    - gscriptor: change menu accelerator for Run so it can be used even
      if a text Text widget is selected
      . use paned windows to resize Script and Result frames
      . print textual status word according to ISO 7816
    - 16 new ATR in smartcard_list.txt

1.3.1 - 29 Octobre 2003, Ludovic ROUSSEAU
    - ATR_analysis: only ask to send me the ATR and card description if
      it is a microprocessor card. I am not (yet) interested in a list
      of memory cards.
    - scriptor, scriptor.1p: add -p argument to specify the ISO 7816
      protocol to use (T=0 or T=1)
    - 26 new ATR in smartcard_list.txt

1.3.0 - 31 May 2003, Ludovic ROUSSEAU
    - pcsc_scan.c: detect reader insertion/removal (USB) and adjust the
      reader list accordingly
    - 4 new ATR in smartcard_list.txt

1.2.5 - 25 May 2003, Ludovic ROUSSEAU
    - use new naming scheme from pcsc-perl Chipcard::PCSC instead of
      PCSC
    - 32 new ATR in smartcard_list.txt

1.2.4 - 28 Jan 2003, Ludovic ROUSSEAU
    - 20 new ATRs in the database
    - Makefile: use PCSCBASE to find libpcsclite library

1.2.3 - 16 Nov 2002, Ludovic ROUSSEAU
    - Add the URL of the latest smartcard_list.txt file in the error
      message printed if the ATR is not already known
    - use an updated version of smartcard_list.txt

1.2.2 - 15 Oct 2002, Ludovic ROUSSEAU
    - correct some compilation problems. See Makefile if you have a xBSD
      system
    - use an updated version of smartcard_list.txt. Thanks to all the
      contributors.

1.2.1 - 27 Aug 2002, Ludovic ROUSSEAU
    - add ATR to smartcard_list.txt
    - make the ATR match case insensitive

1.2.0 - 21 Aug 2002,  Ludovic ROUSSEAU
    - creation of smartcard_list.txt
    - exploitation of the ATR list by ATR_analysis

1.1.0 - 14 Jun 2002, Ludovic ROUSSEAU
    - include ATR_analysis and support for it in pcsc_scan
    - modify pcsc_scan.c to listen to all the readers at once (Lionel)

1.0.4 - 6 Mar 2002, Ludovic ROUSSEAU
    - gscriptor: case insensitive on "reset" command
    - scriptor: case insensitive on "exit" and "reset" commands
    - add the history, authors and licence in this README

1.0.3 - 8 Nov 2001, Ludovic ROUSSEAU
    - pcsc_scan.c: set the wait time to 0 to get all the events
    - Makefile: add automatic rules to compress man pages and other
      modifications

1.0.2 - 22 Oct 2001, Ludovic ROUSSEAU
    - add manpages
    - pcsc_scan.c: go to the next reader _after_ printing information
      for the current one

1.0.1 - 18 Oct 2001, Ludovic ROUSSEAU

$Id: README,v 1.24 2004/08/06 14:45:48 rousseau Exp $

 vim:ts=8
