I am starting a new project, but I am using an EMV reader and Javax SmartCardIO.
I have a RID list for each type of card, but the only thing I can get without knowing the type of card is ATR, I am wondering if there is a way to get RID or card type using just this information, any help is appreciated.
Thanks in advance!
EDIT:
I tried to execute the select PSE command with this method:
public static byte[] selectPSE(CardChannel channel) throws CardException { byte[] selectPSE = {(byte)0x00, (byte)0xA4, (byte)0x04, (byte)0x00, (byte)0x0E, (byte)0x31, (byte)0x50, (byte)0x41, (byte)0x59, (byte)0x2E, (byte)0x53, (byte)0x59, (byte)0x53, (byte)0x2E, (byte)0x44, (byte)0x44, (byte)0x46, (byte)0x30, (byte)0x31}; CommandAPDU command = new CommandAPDU(selectPSE); ResponseAPDU response = channel.transmit(command); System.out.println(response.getBytes()); return response.getBytes(); }
However, it only works with AMEX and Visa, I get error 6a82 with two MasterCard cards (credit and debit).
It looks very strange, as far as I know, all major card issuers (including MasterCard) use 1PAY.SYS.DDF01, I can get the information I want using Try and Error of AID, but I do not think this is the best decision.