1
votes

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?

1
It would be helpful if you showed a minimal version of the working C# code and a minimal version if the Java coe that results in the delay.Michael Roland

1 Answers

0
votes

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.