I´m developing a personal application, using EMV reader and Javax SmartCardIO, I´m trying to get all the plain data from a SmartCard, I've been reading the specification and some tutorials, even reading some questions here but I came up with a problem:
I'm trying to get the size of a record in the SFI in order to iterate all the records with that information.
I've read in some tutorials that I need to send a request with length 0 and the chip is going to answer with an error code and the correct length of the record("6C XX"), however in my cards (Visa and AMEX) is returning another response which translates to the type of card ("VISA ELECTRON and AMERICAN EXPRESS") and I'm not getting the "6c xx" error.
My code so far looks like this:
byte[] commandArr = {(byte)0x00, (byte)0xB2, (byte)0x01, (byte)0x0C, (byte)0x00};
CommandAPDU commandTest = new CommandAPDU(commandArr);
ResponseAPDU test = this.channel.transmit(commandTest);
System.out.println(hexToAscii(bytesToHex(test.getBytes())));
Both cards have the SFI for the first PSE record in 01 (got that with the select PSE command after the 88 tag).
I'm new using this technology and I'm kind of lost right now, any help is welcome.
Thanks!