Hi,

I'm writing the support code for smart-card based authentication of an
in-house java application. The plan is to use the opencard framework
to send APDU's to the card, but there are no card services defined for
the cards we'll be using, so I'll have to work on this rather low level.

I got the following layered setup to work in Windows:

my application
IBM's PC/SC terminal factory
MS PC/SC implementation
Utimaco/OmniKey PC/SC drivers for the CardMan 2020 or 2010
hardware

But, I don't like the idea of developing on windows, so I'm trying to reproduce
this setup on the linux side. In fact, I was very happy to see the linuxnet.com
page and the list of stated goals.

I've installed the pcsc daemon and the CardMan 2010 driver (USB seems
more complex, so I'll save that for later). The daemon clearly connects
to the reader on some level, since it says:

readerfactory.c 951: RFInitializeReader: Attempting startup of Omnikey Cardman 2010 
(serial) 0 0.
readerfactory.c 740: RFBindFunctions: Loading IFD Handler 2.0
Initializing reader at: /dev/pcsc/1
-> fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe 
fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe 
fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe 
fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe 
fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe 
-> 00 
-> 03 00 00 80 
-> 00 00 00 00 
-> 00 
<- 62 00 
-> 89 
-> 00 00 00 00 
-> 00 
<- 62 00 
-> 00 00 00 00 
-> 00 
<- 62 00 
-> 00 00 00 00 
-> 00 
<- 62 00 

and then just repeats this 3-line block, but if I unplug the reader, it
changes dramatically. However, it doesn't really look like proper
communication either. 

If a smart card were returning 0x6200 it would mean that "external
authentication failed", which doesn't really seem to apply here.
 
I then tried the formaticc program to send a simple command to the
card. However, all I get is:

Please enter the desired host (localhost for this machine): localhost
Please input the desired transmit protocol (0/1): 1
Please input the desired input apdu file: x.in
Please input the desired output apdu file: x.out
Reader 01: Omnikey Cardman 2010 (serial) 0 0
Enter the desired reader number : 1

Please input a smartcard
Error connecting to reader -2146435060

which shows that the program can get the list of available card
readers, but can'tactually connect to the one I select.

The problem here is that there are too many layers of code that I don't
understand and don't know how interact. Where does the problem lie?
Is it the driver (/usr/local/pcsc/lib/libcmbs0lnx.so.1.1.0) not
communicating correctly with the reader or something else. What can I
do about it?

Thanks,
Logi

-- 
Logi Ragnarsson - [EMAIL PROTECTED]
Some day we all shall be out of scope
***************************************************************
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
***************************************************************

Reply via email to