如何使用ACR122U验证NTAG213 [英] How to authenticate NTAG213 with ACR122U
问题描述
我正在使用带有NTAG213卡的ACR122U阅读器.该卡受密码(读写)保护,密码为52 84 00 08
.我应该执行哪些APDU命令来对卡进行身份验证,并在身份验证后读取其中的第30页和第31页?
I'm using an ACR122U reader with an NTAG213 card. The card is password (reading and writing) protected with the password 52 84 00 08
. What are the APDU commands I should run to authenticate the card and also to read pages 30 and 31 of it once authenticated?
我知道使用MiFare 1k可以加载密码并验证扇区,但是我不确定ACR122U读卡器对NTAG213卡进行身份验证的方式.
I know with the MiFare 1k I could load the password and authenticate a sector, but I'm not sure how authentication works with the NTAG213 cards with the ACR122U readers.
推荐答案
使用ACR122U,您需要将直接命令发送到读取器内部的PN532 NFC控制器芯片,以便交换此类低级命令.例如,您可以使用InCommunicateThru
命令将原始命令发送到标签:
With the ACR122U you would need to send direct commands to the PN532 NFC controller chip inside the reader in order to exchange such low-level commands. For instance, you could use the InCommunicateThru
command to send a raw command to the tag:
+-----+-----+-----+-----+--------------+-----------+-----+
| CLA | INS | P1 | P2 | Lc | DATA | Le |
| FF | 00 | 00 | 00 | 2 + len(CMD) | D4 42 CMD | -- |
+-----+-----+-----+-----+--------------+-----------+-----+
这样,您可以将密码验证命令(PWD_AUTH
)发送到标签:
That way, you could send the password authentication command (PWD_AUTH
) to the tag:
FF 00 00 00 07 D4 42 1B 52 84 00 08
-- -----------
| |
| \-> password
\-> command: PWD_AUTH
对此命令的响应应该类似于
The response to this command should be something like
D5 43 00 PACK 90 00
类似地,您可以发送READ
命令来读取任何页面:
Similarly, you can send a READ
command to read any page:
FF 00 00 00 04 D4 42 30 XX
其中XX
是1字节页面地址.
where XX
is the 1-byte page address.
请注意,读取命令也应使用(更强大的功能?)InDataExchange
命令进行工作:
Note that the read command should also work using the (more robust?) InDataExchange
command:
FF 00 00 00 05 D4 40 01 30 XX
这篇关于如何使用ACR122U验证NTAG213的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!