Question

I have smartcard usb readers ( ACR38 and ACR38 CCID ). I have some C# code that works to connect, send apdu commands perfectly with winscard.dll ((SCardEstablishContext, SCardConnect, SCardControl methods).

I need to do this with java, and I use javax.smartcardio api, with some code similar to this: PCSC sample in java

The reader and inserted card are detected ok, but there is a delay (15-20 seconds) when I try to connect. This delay only appears when card is inserted first time. If I extract-insert same card there is no delay. If I extract card and insert another one, delayed again. I can't connect the first 15-20 seconds, with java program running or not.

When reader/card is connected, I can send apdu commands perfectly.

Otherwise with C# and winscard.dll api, there is not delay.

I test with win7, win8, ACR38 reader, ACR38 CCID reader...

Why I have this delay?

Était-ce utile?

La solution

If this happens only when the card is inserted for the first time as you have described it is possible that some other process may have exclusive connection open to the reader. It may be windows built-in certificate propagation service or some similar application that is part of the card middleware you may have installed. It may also be a Windows update trying to download a minidriver for your card.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top