APDU命令使用Samsung Galaxy S4从Visa Wave NFC签证中读取信用卡数据

use*_*152 5 android apdu emv nfc contactless-smartcard

  byte[] APDUCommand = { 
            (byte) 0x00, // CLA Class           
            (byte) 0xA4, // INS Instruction     
            (byte) 0x04, // P1  Parameter 1
            (byte) 0x00, // P2  Parameter 2
            (byte) 0x0A, // Length
            0x63,0x64,0x63,0x00,0x00,0x00,0x00,0x32,0x32,0x31 // AID
        };


    Intent intent = getIntent();
    Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
    IsoDep iso = IsoDep.get(tag);        
    iso.connect();

    byte[] result = iso.transceive(APDUCommand);
Run Code Online (Sandbox Code Playgroud)

我使用上面的代码使用三星galaxy s4阅读VisaPayWave NFC卡详细信息(持卡人姓名,有效期,卡号等).我得到的输出是[106,-126].我认为我使用的APDU命令不正确.请建议正确的命令.

小智 2

更改您的 APDU 命令定义

byte[] APDUCommand = { 
        (byte) 0x00, // CLA Class           
        (byte) 0xA4, // INS Instruction     
        (byte) 0x04, // P1  Parameter 1
        (byte) 0x00, // P2  Parameter 2
        (byte) 0x07, // Length
        (byte) 0xA0,0x00,0x00,0x00,0x03,0x10,0x10 // AID
    };
Run Code Online (Sandbox Code Playgroud)