更改NFC标签为只读标签、NFC

2023-09-06 15:49:46 作者:可乐加冰

目前我使用下面的应用程序将数据写入一个NFC标签,https://play.google.com/store/apps/details?id=com.antares.nfc&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5hbnRhcmVzLm5mYyJd ,因为它可以让我指定标记的AAR。然而,当我写的标签,我发现了一个安全问题,在标签中的数据可以很容易地改变,所以我想问一下是否有可能对特定只有部分人可以重新写入标签?或者以简单的方式,锁定标记,所以没有人可以把它改写我相信在应用程序中的数据是正确的了。我依然采用了NFC技术的初学者,并发现它可能成为未来更受欢迎,因此,我想更多地了解它。

Currently I am using the following app to write data into a NFC tag, https://play.google.com/store/apps/details?id=com.antares.nfc&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5hbnRhcmVzLm5mYyJd ,as it allows me to specify the AAR of the tag. However, when I am writing the tag, I have found out an security issue, the data in the tag can be changed easily, therefore I would like to ask if it is possible to specific only some people can re-write the tag? Or in a simple way, lock the tag, so nobody can rewrite it after I am sure the data in the app is correct. I am still a beginner of using the NFC technology, and find it may become more popular in the future, therefore I would like to learn more about it.

推荐答案

如果您正在开发自己的应用程序;如果标签已经被格式化的NDEF,你有Ndef.makeReadOnly()方法,你做了Ndef.writeNdefMessage(NdefMessage)后,你可以申请。或者,如果标签没有NDEF格式化,但NdefFormatable你有方法NdefFormatable.makeReadOnly(NdefMessage),这NDEF格式化标签,写NdefMessage,使唯一的全阅读一气呵成的标记。

If you are developing you own application; If the tag is already Ndef formatted, you have the Ndef.makeReadOnly() method, which you can apply after you have done Ndef.writeNdefMessage(NdefMessage). Or if the tag is not Ndef formatted but is NdefFormatable you have the method NdefFormatable.makeReadOnly(NdefMessage), which Ndef formats the tag, writes the NdefMessage and makes the tag Read Only all in one go.

也有Play商店,这将使本已写入标签只读,如果标签技术允许其他NFC应用。但是,这是一种编程/开发网站。

There are also other NFC applications in the Play Store which will make an already written tag read only, if the tag technology allows. But this is a programming/development site.