Hi,

I'm a newbie, I'm writing this code using the pcsc-perl module.
All i want is to read the ATR. I got the ATR, but a warning came out
saying "Name "Chipcard::PCSC::SCARD_RESET_CARD" used only once: possible
typo at main line 256". I don't know how to get rid of it. I hope
someone can help me, the exact output is as follow:

Name "Chipcard::PCSC::SCARD_RESET_CARD" used only once: possible typo at
main line 256.
Currently installed reader is:Gemplus GemPC410 Reader 0 0
Reader's name Gemplus GemPC410 Reader 0 0
  52
third field 1
 ARRAY(0x810c87c)
so the ATR is 3B 9F 94 40 1E 00 67 16 43 46 49 53 45 10 52 66 FF 81 90
00


And the source are:-->

-----------------------------------------------
#!/usr/bin/perl -w

use Getopt::Std;
use Chipcard::PCSC;
use Chipcard::PCSC::Card;

use strict;

my $hContext;
my @ReadersList;
my $temp;
my $hCard;
my $reader_name;
my @StatusList;
my $RecvData;
my $SendData;
my $myCertificateFile;

#Create new instance of the PCSC smart abstraction interface

$hContext = new Chipcard::PCSC();
die ("Can't create the PCSC object: $Chipcard::PCSC::errno\n") unless
(defined $hContext);

#Read the list of readers available, this function will have to change
to a switch between 2 readers
@ReadersList = $hContext->ListReaders();
die ("Can't get readers' list: $Chipcard::PCSC::errno\n") unless
(defined($ReadersList[0]));

#$, = "\n  ";
#print the current reader available
$reader_name = $ReadersList[0];
print "Currently installed reader is:" .  $reader_name . "  \n";

#create a new instance of the reader
$hCard = new Chipcard::PCSC::Card($hContext, $reader_name);
die ("Can't connect to the card $reader_name error-->
$Chipcard::PCSC::errno \n") unless defined $hCard;

#try to connect to the card
$hCard->Connect($reader_name);
die ("Can't connect to the card $reader_name error-->
$Chipcard::PCSC::errno \n") unless defined $hCard;

@StatusList = $hCard->Status();
print "Reader's name " . $StatusList[0] . "\n";
print "  " . $StatusList[1]  . "\n";
print "third field " . $StatusList[2] . "\n";
print " " . $StatusList[3] . "\n";
print "so the ATR is " . Chipcard::PCSC::array_to_ascii($StatusList[3])
. "\n";



-- 
################################
##  Rizal Mohd Nor            ##
##  Managing Consultant       ##
##  dhom Technologies         ##
##  No. 5 Jalan Lurah 8/2A,   ##
##  40000 Shah Alam Selangor  ##
##  Tel: 03-55100170          ##
##  Fax: 03-55100170          ##
##  H/P: 012-2226397          ##
##  [EMAIL PROTECTED]         ##
##  www.dhomtech.com          ##
################################

_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.musclecard.com/mailman/listinfo/muscle

Reply via email to