Hi,
I want to use OCF and PCSC to access the card reader I presently have. I'm
using a Towitoko chipdrive extern. When I insert the card the reader
indicated an error (LED displaying Red, Green then Red). I have the Towitoko
drivers installed for PCSC.
I've assumed I can use the reference implementation for PCSC, as detailed
below, and access the card as displayed below.
Is there something I'm missing?
I created the following .properties file:
OpenCard.services =
com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminalFactory
OpenCard.services = opencard.opt.database.BasicDatabaseFactory
OpenCard.trace = opencard:5
and the following source file:
import opencard.core.service.SmartCard;
import opencard.core.service.CardRequest;
import opencard.opt.iso.fs.FileAccessCardService;
import opencard.opt.iso.fs.CardFile;
public class ReadFile
{
public static void main (String[] args)
{
try
{
SmartCard.start();
CardRequest cr = new CardRequest(FileAccessCardService.class);
SmartCard sc = SmartCard.waitForCard(cr);
if (sc == null)
{
// Handle error
}
else
{
sc.close();
}
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
SmartCard.shutdown();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
}
Thanks
Gary
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.