【问题标题】:PN532 Tag Emulation - Understanding initial response and APDU data fieldPN532 标签仿真 - 了解初始响应和 APDU 数据字段
【发布时间】: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.

【问题讨论】:

标签: nfc iso ndef


【解决方案1】:

此外,我不知道如何解释来自手机的初始命令 [E080]。

我可以为您指出一些起点。 E080 是 RATS(请求选择答案)的一部分。此 pdf (https://www.st.com/resource/en/datasheet/st25ta64k.pdf) 的第 5.9.2 节(Rats 命令和 ATS 响应)将 0xE0 分解为 INS,将 0x80 分解为位向量。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-07
    • 1970-01-01
    • 2017-09-12
    • 2023-04-07
    • 1970-01-01
    相关资源
    最近更新 更多