PN532 处于仿真模式 身份验证失败
我正在尝试将 PN532 配置为 Mifare 仿真模式。我使用“ACR122U”读卡器进行 Mifare 仿真,并使用“OMNIKEY CardMan 5x21-CL”作为读卡器。我成功地将ACR122配置为Mifare。我得到了我通过程序设置的ATR和UID。但是,当我尝试将密钥加载到读卡器时,发生了异常。 ACR122U内部没有SAM模块。任何人都可以帮助我了解是否可以将 PN532(ACR122U 内的 NFC 芯片)配置和模拟为完整的 MIFARE 1K,无需 SAM。
请帮忙...
I am trying to configure PN532 in to Mifare emulation mode. I am using "ACR122U" reader for Mifare Emulation and "OMNIKEY CardMan 5x21-CL" as reader. I configured ACR122 as Mifare successfully. I got ATR and UID which i have set through program. But while i am trying to load key to the reader, exception has occured. In ACR122U, there is no SAM module inside. Anyone can help me about whether it is possible to configure and emulate PN532 (NFC Chip inside ACR122U) as complete MIFARE 1K without SAM.
Please help...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很抱歉,配置 PN532 来模拟 MIFARE Classic 卡几乎是不可能的。过去几周我一直在尝试,但没有成功。数据表明确指出它可以做到这一点,但不清楚具体如何做到。但我确实知道 MIFARE 1K 仿真不需要 SAM。
不知道为什么您提到 ATR,因为这是一个 ISO 14443-4 命令,而 MIFARE Classic 仅支持最多 14443-3(即它不是启用传输协议的标签)。您可能想说 SENS_RES 和 SEL_RES?
使用 PN532 命令 TgInitAsTarget,您可以通过指定 SENS_RES 和 SEL_RES 以及 UID 来模拟 Mifare Classic 卡,如果您只想模拟 UID,那么这总是有效,但是模拟实际上可以响应 MIFARE 身份验证和读取的 MIFARE 1K命令是另一个故事。基本上,当 PN532 模拟 MIFARE 1K 并接收 MIFARE 身份验证命令(0x60 0xXX,其中 XX=块号)时,您应作为模拟卡发送的响应是一个 4 字节随机数,发起者应使用该随机数进行加密提供的密钥和内部 PN532 CRYPTO1 密码。问题是发起者永远不会响应随机数挑战,并且仿真总是失败。
我只使用 PN532 执行此操作,因此我可以直接命令 PN532,我不确定 ACR122U 提供的 API 可以做什么,但如果您可以访问实际的 PN532 命令,那么这将使您的生活变得更加困难。
查看我在 libnfc.org 上的帖子,了解我所尝试的其他详细信息:
http: //www.libnfc.org/community/topic/277/nfcemulatetag/
如果您设法使其正常工作,我很想了解更多有关您所做的事情。
祝你好运!
Configuring the PN532 to emulate a MIFARE Classic card is nearly impossible I'm sorry to say. I have been trying it the last couple weeks and had no luck. The Datasheet clearly states that it can do this but it is not clear exactly how. I do know however that a SAM is not required for MIFARE 1K emulation.
Not sure why you mentioned ATR as that is a ISO 14443-4 command, and MIFARE Classic supports only up to 14443-3 (i.e it is not a Transport Protocol Enabled tag). You may have meant to say SENS_RES and SEL_RES?
Using the PN532 command TgInitAsTarget you can emulate a Mifare Classic card by specifying the SENS_RES and SEL_RES and UID, and that always works if all you want to do is emulate a UID, however emulating a MIFARE 1K that can actually respond to MIFARE authentication an read commands is another story. Basically, when a PN532 is emulating a MIFARE 1K and receives the MIFARE authentication command (0x60 0xXX, where XX=block number) the response that you should send as an emulated card is a 4 byte random number which the initiator should then encrypt using the key provided and the internal PN532 CRYPTO1 cipher. The problem is that the initiator never responds to that random number challenge and the emulation always fails there.
I am doing this with just a PN532 so I can command the PN532 directly, I'm not sure what API is provided with the ACR122U can do but if you can's access the actual PN532 commands then that will make your life even more difficult potentially.
CHeck out my post on libnfc.org for additional details of what I've tried:
http://www.libnfc.org/community/topic/277/nfcemulatetag/
If you managed to get it to work, I would love to hear more about what you did.
BEST OF LUCK!