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);
我正在使用上面的代码使用三星 galaxy s4 读取 VisaPayWave NFC 卡详细信息(持卡人姓名、有效期、卡号等)。我得到的输出是 [106,-126]。我认为我使用的 APDU 命令不正确。请建议正确的命令。
最佳答案
更改您的 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
};
关于android - APDU 命令使用三星 Galaxy S4 从支持 visa Paywave NFC 的卡中读取信用卡数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24631012/