尝试 CMD.ChangeFileSettings 时出现 Ntag424 DNA 完整性错误 (911e)
因此,我一直在为 NTAG424 DNA 开发 Nodejs 标签编写器,并且仍在掌握 APDU 命令的窍门。我正在跟踪 https://www.nxp 中示例的步骤.com/docs/en/application-note/AN12196.pdf,但文档有时令人困惑。我正在尝试通过在 CommMode.Full 中使用 Cmd.WriteData 写入 file02 以利用标签的 SUN/CMAC 镜像。当我写入数据时,我得到一个 <9100>好的响应代码,但在 CommMode.Full 中我相信我应该收到包含更多数据的加密响应。然后,当我尝试在 CommMode.Full 中的 WriteData 之后执行 Cmd.ChangeFileSetting 时,我收到 <911e>错误。我上下查看了我的代码两天,看看我是否摸索了初始化向量或加密数据步骤,但我认为这些部分都很好。我真的不知道为什么会发生这种情况。我正在使用上述文档中提供的示例,但我修改了 CMD.write 数据的标头以使命令长度有效(在将其从 <80> 更改为 <98> 之前,我得到了 <917e>)。 )因为我相信文档在这一步中有一个拼写错误。
将数据写入 NDEF 的 CMD:90 8d 00 00 9f 02 00 00 00 98 00 00 {encData} + {macT} + {LE} ChangeFileSettings 的 CMD:90 5f 00 00 19 02 {encData} + {macT} + {LE}
这全部参考 https://www.nxp.com/docs/en/application-note/AN12196.pdf 文档。
So I've been working on a Nodejs tag writer for the NTAG424 DNA and I am still getting the hang of APDU commands. I am tracing the steps of the example from https://www.nxp.com/docs/en/application-note/AN12196.pdf but the documentation is confusing at times. I am attempting to write to file02 to take advantage of the SUN/CMAC mirroring of the tag by using Cmd.WriteData in CommMode.Full. When I write the data I get an <9100> OK response code but in CommMode.Full I believe I should be receiving an encrypted response with more data. Then when I attempt to do Cmd.ChangeFileSetting after WriteData in CommMode.Full, I receive a <911e> error. I have looked up and down for 2 days at my code to see if maybe I fumbled the Initialization Vector or encrypted data step, but I think those parts are all good. I am truly lost as to why this is happening. I am using the example provided on the documentation mentioned above, except I modified the header for CMD.write data to make the command length valid (I was getting <917e> before I changed it from <80> to <98>) since I believe the documentation has a typo for this step.
CMD for WriteData to NDEF: 90 8d 00 00 9f 02 00 00 00 98 00 00 {encData} + {macT} + {LE}
CMD for ChangeFileSettings: 90 5f 00 00 19 02 {encData} + {macT} + {LE}
This is all in reference to 6.8.2 and 6.9 of the personalization example in the https://www.nxp.com/docs/en/application-note/AN12196.pdf document.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论