I am writing a smart card application and after a successful selection of the application with its AID, when it gets to sending Get Processing Options
I get 6E 00 as response - Invalid CLA command. This is part of the code that sends the command and receive the response:
ResponseAPDU rapdu = sendCommand(new byte[]{(byte)0x80, (byte)0xA8, (byte)0x00, (byte)0x00, (byte)0x02, (byte)0x83, (byte)0x00, (byte)0x00});
private ResponseAPDU sendCommand(byte[] apdu) throws CardException{
CommandAPDU capdu = new CommandAPDU(apdu);
ResponseAPDU rpd = channel.transmit(capdu);
return rpd;
}
I am using the same command to read the card using Jaccal library and it's working perfectly, but it's just that jaccal is not appropriate for my application because of it's use of external dll file. I don't know why it's giving me this kind of response.
A number of blog/forum entries discuss this issue:
In my case VISA cards appear to be "forgiving", but MasterCards are not (6E 00). Note, contrary to advice, upgrading to Java 7 didn't fix it for me. You're probably looking at the sun.security.smartcardio.t0GetResponse solution and handling responses.
I did the following to get it working:
System.setProperty("sun.security.smartcardio.t0GetResponse", "false");
Handle responses with GET RESPONSE (see EMV 4.3 Book 1, Section 9.3.1.3). This link is also useful:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With