JCOP offcard
843851Nov 2 2005 — edited Jun 26 2008I am having problems trying to use JCOP offcard for a terminal application using the SCR331-DI reader on an XP platform. The problem is better described by this snippet:
JCTerminal jcTerminal = JCTerminal.getInstance("pcsc:4", null);
jcTerminal.open();
jcTerminal.waitForCard(5000); // ** THIS NEVER WAITS FOR A CARD **
I go on further and use:
JCard jCard = new JCard(jcTerminal, null, 5000); // **THIS NEVER WAITS EITHER **
What am I missing here? I don't see where any kind of a listener is documented in JCOP offcard. Obviously the blocking version is not working either. The Javadoc for JCTerminal does not give me much clue as to the param values for getInstance(String, String) which is where I suspect the problem might be.
I have dug through and reached the end of the internet looking for the solution. Please help.
Best Regards,
Sami
PS. OpenCard equiv code works fine:
SmartCard.start();
CardRequest cr = new CardRequest(CardRequest.NEWCARD, null, null);
SmartCard sc = SmartCard.waitForCard(cr); // WORKS FINE