【发布时间】:2017-01-20 11:20:24
【问题描述】:
我有一个 pn532,我想将它作为被动 NFC 标签展示给阅读器,上面带有 NDEF 记录 URL。
在PN532's User Manual 之后,我可以将设备置于目标模式,并从手机读取第一个 ADPU 命令。我可以使用 2005 年的 iso-14443-4 pdf 来查看命令是 A4,读取文件,并且两个参数字节表示“按 DF 名称选择,第一次出现”。尽管如此,我不知道如何解释数据字段,它应该是请求读取的文件的名称。
此外,我不知道如何解释来自手机的初始命令 [E080]。
程序的输出:(带有#的cmets)
usart init.
i2c init.
pn532 init.
Firmware: 1.6
SAM config done.
Gen Status:
Err code: 0x00
Field: 0x00
Number of tags: 0x00
Initiating as target. # Here the pn532 waits for a reader.
tgInitAsTarget. Length: 5 # Callback function once the pn532 detects a reader and retrieves the first command from it.
Mode:
Baud: 106kbps, 14443-4: yes, DEP: no, Framing type: Mifare.
Initiator command:
0xE0
0x80
Entering tg loop.
callback: tgGetData. # The tgGetData command is sent without doing anything with the initial instructions.
status: 0x00
0x00 0xA4 0x04 0x00 0x07 0xD2 0x76 0x00 0x00 0x85 0x01 0x01 0x00
CLA: 0x00 # Single command, No SM, channel 0.
INS: 0xA4 # Select.
P1: 0x04 # Select by DF name.
P2: 0x00 # First/Only occurrence, return FCI template.
Lc: 0x07 # 7 data bytes.
Data: 0xD2 0x76 0x00 0x00 0x85 0x01 0x01 #???
Le: 0x00 # Any length response.
【问题讨论】:
-
我偶然发现了一个相关问题;慢慢地拼凑起来。 stackoverflow.com/a/23180223/1349825
-
这个 C 文件有 - 看起来像 - 第 229 行对 CC 文件的很好描述。我在其他任何地方都找不到详细的格式/布局。 github.com/nfc-tools/libfreefare/blob/master/examples/…