I´m starting a new project, I´m new using EMV reader and Javax SmartCardIO.
I have the list of the RID for each type of card, however the only thing I can access without knowing the type of card is the ATR, I´m wondering if there is a way to get the RID or the card type with only this info, any help is welcome.
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 is only working with an AMEX and Visa, I´m getting the error 6a82 with two MasterCard Cards(credit and debit).
This looks very strange, as far as I know all the major card issuers (including MasterCard) use 1PAY.SYS.DDF01, I can get the information I want with Try and Error of the AID but I don´t think this is the best solution.