0
votes

I have both a Visa Electron and Debit Mastercard, however whenever i try to select the Application using their respective AIDs A0000000032010 and A0000000041010 I get a 6A82 response meaning the file was not found.

Here's my code snippet for both selections

//SELECTING VISA ELECRON CARD APPLICATION
byte[] ApduCMDVC = new byte[] {  (byte) 0x00, (byte) 0xA4, (byte) 0x04,
            (byte) 0x00, (byte) 0x0E,
            (byte) 0x41, (byte)0x30, (byte) 0x30, (byte) 0x30,
            (byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
            (byte) 0x33,(byte) 0x32,(byte) 0x30,(byte) 0x31,(byte) 0x30};

//SELECTING MASTER CARD APPLICATION
byte[] ApduCMDMC = new byte[] {  (byte) 0x00, (byte) 0xA4, (byte) 0x04,
            (byte) 0x00, (byte) 0x0E,
            (byte) 0x41, (byte)0x30, (byte) 0x30, (byte) 0x30,
            (byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
            (byte) 0x34,(byte) 0x31,(byte) 0x30,(byte) 0x31,(byte) 0x30};

Could there be something I'm doing wrong?

1
Hi, how are you issuing the APDUs? Java? Jacal? Also, can you post a code snippet, all you are showing is the byte array for the AIDs.Greycon
Hi Greycon, yes I'm using Java, I am developing a mobile pos app for android and I have an sdk from the card reader manufacturers that sends the apdu commands to the card reader, So I am basically sending the apdu commands as byte arrays. The snippet I pasted earlier is from my code only thing missing is the method that sends the request to the card reader.Jide Kolade
OK, I have some Java code that does this, it's a few years old - standby while I go hunting. I presume you did the select of the "Payfile.sys" or whatever it is first?Greycon
Thanks a lot Greycon, I'll be expecting the code. I skipped the selection of 1PAY.SYS.DDF01 because some cards especially the Visa Electron doesn't support the application. So I'm just going straight to selecting by AID. Could this be a problem?Jide Kolade

1 Answers

0
votes

I looked back at some C++ code I used for this in the past, and I believe your problem is that you are sending the AID in ASCII, as opposed to binary. Here's the C++ byte array I use:

static  BYTE    selectAIDCmd[] = {0x00, 0xA4, 0x04, 0x00, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x04, 0x10, 0x10 };

So, you need this:

    byte[] ApduCMDMC = new byte[] {  (byte) 0x00, (byte) 0xA4, (byte) 0x04,
        (byte) 0x00, (byte) 0x07,
        (byte) 0xA0, (byte)0x00, (byte) 0x00, (byte) 0x00, (byte)0x03,(byte) 0x20,(byte) 0x10};