On Tue, Aug 08, 2000 at 10:03:12AM -0400, Jordan Dimov wrote:
>
> Hi there,
>
> Is there such thing as a Perl interface to the pcsc-lite suit in existence
> anywhere? If so, where? If not, anyone willing to help with writing one (or may
> be even rewriting the whole baby in Perl) ?
At Gemplus we have developped a small and simple driver to use Gemplus
readers (and maybe others) with Linux.
We also have a Perl wrapper to use a smart cardwith Perl.
The source code is not yet public (even if it has been presented during
the Gemplus Developper Conference) because of administrative tasks.
I will make an annonce on this list when the code is available.
It is NOT a PS/SC driver. PS/SC seams to be far too complex to do
what we wanted to do.
here is a small example of Perl code using it:
#
# simple.pl - very simple example
# Ludovic Rousseau
# lun avr 24 21:15:36 CEST 2000
#
use strict;
use cardreader qw(ISO7816Error);
my ($scr, $sw, $cmd);
###################### new ####################
# allocate a descriptor
# the default device is /dev/screader
$scr = new cardreader or die "Can't allocate reader: $!\n";
###################### ResetCard ####################
print "ATR: ", $scr -> ResetCard, "\n";
#################### SendIncomingAPDU #################
# CLA = 0
# INS = A4 SELECT FILE
# P1 = 00
# P2 = 00
# Lc = 02
# Data = 3F00
$cmd = "00"."A4"."00"."00"."02"."3F00";
print "=>$cmd\n";
$sw = $scr -> SendIncomingAPDU($cmd) or print "SendIncomingAPDU: $!\n";
print "sw $sw, ", ISO7816Error($sw), "\n";
############### PowerDown ################
$scr -> PowerDown or die "PowerDown: $!\n";
undef $scr;
--
Ludovic Rousseau
[EMAIL PROTECTED]
-- Normaliser Unix c'est comme pasteuriser le Camembert, L.R. --
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************