Use secure PIN commands with javax.smartcardio
 843851Feb 6 2009 — edited Aug 5 2009
843851Feb 6 2009 — edited Aug 5 2009Hey there,
I try to use the Card.transmitControlCommand() to send ControlCommands to the cardterminal. In PC/SC v2 they say one has to use ScardControl() to commit Commands to the terminal and I found in this forum that Card.transmitControlCommand() is the javax.smartcardio equivalent.
Now I try to get a simple GET_FEATURE_REQUEST() command working. This command has control code 3400 and no data so i tried 
Card.transmitControlCommand(3400, null) 
and got a NullPointerException. Then I tried 
Card.transmitControlCommand(3400, new byte[]{})
and got
javax.smartcardio.CardException: transmitControlCommand() failed
	at sun.security.smartcardio.CardImpl.transmitControlCommand(Unknown Source)
	at de.gematik.patientAtHome.analyse.TestCardConnection.run(TestCardConnection.java:68)
	at java.lang.Thread.run(Unknown Source)
Caused by: sun.security.smartcardio.PCSCException: Unknown error 0x1
	at sun.security.smartcardio.PCSC.SCardControl(Native Method)
	... 3 more
Does anybody know how to use this command?
Thanks 
Andreas