NFC-V标签读取示例?

发布于 2024-11-24 07:06:52 字数 86 浏览 7 评论 0原文

有人可以提供 NFC-V 标签读取示例代码吗? Android开发指南仅提供仅适用于NDEF标签的NFCDemo代码。没有适用于所有其他类型标签的资源。谢谢!

Could somebody provide an NFC-V tag reading example code?
Android Development Guide provides only the NFCDemo code that is for NDEF tag only. There are no resources for all the other kinds of tags. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我家小可爱 2024-12-01 07:06:55

好吧 - 在 Android 2.3.4 中,您可以使用普通的 NDEF 格式并使用常用的 Android API 写入标签,就像任何其他 ndef 兼容标签一样。毕竟NFC-V一直是Android 2.3.4的主要功能。

如果您想与 NFC-V 标签进行通信:那就是 ISO 15693 标准。您应该能够通过 google 搜索找到此标签理解的 PDU,然后如果您确实需要,您可以推出自己的实现。

Well - With Android 2.3.4 you can use the ordinary NDEF format and use the usual android API to write to the tag just like any other ndef complient tag. NFC-V has been the major feature for Android 2.3.4 after all.

If you otherwise want to communicate with the NFC-V tag: It's nothing more then the ISO 15693 standard. You should be able to find the PDUs that this tag understands with a google-search and then you can roll your own implementation if you really want.

烛影斜 2024-12-01 07:06:54

读取适用于 15693 i-code sli 的块 0 演示

ByteArrayOutputStream out = new ByteArrayOutputStream();

out.write(new byte[] { (byte)0x20, (byte)0x20 }); //addressed mode,  read single blocks,  
out.write(nfcV_tag.getTag().getId()); //address
out.write(new byte[] { (byte)blockIndex }); //block 0

byte errorcode_and_block0[] = nfcV_tag.transceive(out.toByteArray());
//1st byte should be 0 if everything is ok. next 4 bytes are block 0

Reading block 0 demo working for an 15693 i-code sli

ByteArrayOutputStream out = new ByteArrayOutputStream();

out.write(new byte[] { (byte)0x20, (byte)0x20 }); //addressed mode,  read single blocks,  
out.write(nfcV_tag.getTag().getId()); //address
out.write(new byte[] { (byte)blockIndex }); //block 0

byte errorcode_and_block0[] = nfcV_tag.transceive(out.toByteArray());
//1st byte should be 0 if everything is ok. next 4 bytes are block 0
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文