1

I am trying to find the best way to count how many times a unique NFC tag has been tapped on a reader. There will be many NFC tags, but only a few readers which need to share a common database. I have read the answers on here and it seems I can embed a record in the NDEF message to add 1 each time a tag is tapped and this new number can either be added to through an app, or through a website.

My questions is: Is it possible to have a database stored on my website/app with all NFC unique identifiers so that when a tag is tapped, I just add 1 to my database for that tag (and do nothing to the tag). Would that mean the tag could be read only?

Any help would be great, I'm very new to this field! Thanks!

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
O B
  • 11
  • 1

1 Answers1

0

NFC tags usually have an identifier that is used during anti-collision to identify specific tags. These identifiers are often unique (either guaranteed by the manufacturer or by the fact that you only use a small number of tags compared to the number space available for the tag identifiers).

You could therefore use an app to read this this identifier and use it for your database lookups/updates.

However, access to this identifier is not possible on all platforms. For instance, if you intend to use an iOS device to read the NFC tags, the Core NFC API does not reveal the identifier. In that case you would need to write your custom identifier into an NDEF message (that's the only type of data that can currently be read through Core NFC). Many other platforms (PC/SC readers on Windows/Linux/Mac, Android NFC) typically provide access to the anti-collision identifier in some way.

Finally, be aware that the anti-collision identifier (or basically any static world-readable identifier) might not be suitable for some applications: Serials on NFC Tags - truly unique? cloneable?

Michael Roland
  • 39,663
  • 10
  • 99
  • 206