android - APDU 命令使用三星 Galaxy S4 从支持 visa Paywave NFC 的卡中读取信用卡数据

标签 android nfc apdu contactless-smartcard emv

  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/

相关文章:

android - 在 android 中延迟加载 recyclerView

android - Write Multiple Blocks 命令在 NfcV 上失败

android - 如何为主机卡仿真的 STORE DATA 定义 APDU?

android - 如何通过公交获得覆盖距离

android - 如何在Kotlin Android UI测试中初始化模拟的外部依赖项

android - 以编程方式检查 Android 设备上的 LTE 功能

android - TNF_EXTERNAL_TYPE NDEF 标签的 URN 格式

android - 仅适用于特定 NFC 标签的应用程序

smartcard - 选择 MF(主文件)- 读取 javacard 的 EEPROM

android - Android中如何与SIM卡进行APDU通信?