如何使用ACR122U-A9进行卡仿真 [英] How to card emulate with ACR122U-A9

查看:123
本文介绍了如何使用ACR122U-A9进行卡仿真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ACR122U-A9,我想用它进行卡仿真. 请问谁做了这一点?你能给我一些建议吗?

I have a ACR122U-A9, I want to card emulate with it. I ask who has done this point? Can you give me some suggestions?

现在我还有其他问题,当我将白色智能卡放在此NFC读取器上时,LED仅闪烁一次.但是当我将手机放在手机上时,LED会一直闪烁直到手机退出.

Now I have also other problems, when I put the white smartcard on this NFC reader, LED blinks only once. But when I put the phone on it, the LED always blinks until phone out.

推荐答案

ACR122U包含一个PN532 NFC控制器芯片. PN532通过其TgInitAsTarget命令支持主机卡仿真(请参见 PN532用户手册).为了将命令传递到PN532,您可以连接到ACR122U,就像它是普通的智能卡读卡器一样(例如使用PC/SC).然后,您可以将PN532包命令发送到以下形式的阅读器APDU中:

The ACR122U contains a PN532 NFC controller chip. The PN532 supports host card emulation through its TgInitAsTarget command (see the PN532 user manual). In order to pass commands to the PN532, you would connect to the ACR122U just as if it was a normal smartcard reader (e.g. using PC/SC). You can then send pack PN532 commands into reader-APDUs of the form

> FF000000 <Lc> <Command>

并以以下形式获取回复

< <Response> 9000

要使ACR122进入卡仿真模式,您需要执行以下操作:

So for getting the ACR122 into card emulation mode, you would do about the following:

  1. ReadRegister:

  1. ReadRegister:

> FF000000 08 D406 6305 630D 6338
< D507 xx yy zz 9000

  • 更新寄存器值:

  • Update register values:

    xx = xx | 0x004;  // CIU_TxAuto |= InitialRFOn
    yy = yy & 0x0EF;  // CIU_ManualRCV &= ~ParityDisable
    zz = zz & 0x0F7;  // CIU_Status2 &= ~MFCrypto1On
    

  • WriteRegister:

  • WriteRegister:

    > FF000000 11 D408 6302 80 6303 80 6305 xx 630D yy 6338 zz
    < D509 9000
    

  • SetParameters:

  • SetParameters:

    > FF000000 03 D412 30
    < D513 9000
    

  • TgInitAsTarget

  • TgInitAsTarget

    > FF000000 27 D48C 05 0400 123456 20 000000000000000000000000000000000000 00000000000000000000 00 00
    < D58D xx ... 9000
    

    xx应该等于0x08.

    使用一系列TgGetData和TgSetData命令进行通信:

    Communicate using a sequence of TgGetData and TgSetData commands:

    > FF000000 02 D486
    < D587 xx <C-APDU> 9000
    

    xx是状态码(成功时应为0x00),C-APDU是读取器发送的命令.

    Where xx is the status code (should be 0x00 for success) and C-APDU is the command sent from the reader.

    > FF000000 yy D48E <R-APDU>
    < D587 xx 9000
    

    其中yy是2 + R-APDU的长度(响应),而xx是状态码(成功应为0x00).

    Where yy is 2 + the length of the R-APDU (response) and xx is the status code (should be 0x00 for success).

    这篇关于如何使用ACR122U-A9进行卡仿真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆