How to authenticate NTAG213 with ACR122U

久未见 提交于 2019-12-04 13:19:28

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 | --  |
+-----+-----+-----+-----+--------------+-----------+-----+

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

Similarly, you can send a READ command to read any page:

FF 00 00 00  04  D4 42  30  XX

where XX is the 1-byte page address.

Note that the read command should also work using the (more robust?) InDataExchange command:

FF 00 00 00  05  D4 40 01  30  XX
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!