相关疑难解决方法(0)

Android NFC IsoDep读取文件内容

我正在尝试从ISO/IEC 14443 A型卡中读取一些信息.

在使用Android应用程序NFC TagInfo分析卡片后,我发现应用程序(AID:15845F)具有我需要的特定文件(文件ID:01).

我已经设法连接到卡并选择应用程序.

String action = getIntent().getAction();
if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(action))
{
    Tag tagFromIntent = getIntent().getParcelableExtra(NfcAdapter.EXTRA_TAG);  
    Log.i(TAG, Arrays.toString(tagFromIntent.getTechList()));

    IsoDep isoDep = IsoDep.get(tagFromIntent);
    try
    {
        isoDep.connect();

        byte[] SELECT = { 
            (byte) 0x00, // CLA = 00 (first interindustry command set)
            (byte) 0xA4, // INS = A4 (SELECT)
            (byte) 0x04, // P1  = 04 (select file by DF name)
            (byte) 0x0C, // P2  = 0C (first or only file; no FCI)
            (byte) 0x06, // Lc  = 6 …
Run Code Online (Sandbox Code Playgroud)

android apdu nfc mifare contactless-smartcard

7
推荐指数
1
解决办法
8590
查看次数

标签 统计

android ×1

apdu ×1

contactless-smartcard ×1

mifare ×1

nfc ×1