Page 1 of 1

Reading Tag ID using NFC.

Posted: Fri Feb 10, 2023 7:10 am
by Googie85
Good Evening!

I was wondering if it is possible to read the unique ID of a NFC Tag? Rather than reading a NDEF record on the card.

I hope I have explained clearly.

Many Thanks,

Googie.

Re: Reading Tag ID using NFC.

Posted: Fri Feb 10, 2023 9:01 pm
by jacque
When a tag is scanned you should get a message "nfcTagReceived". Write a handler to catch that message. The single parameter is an array containing the tag data.

Code: Select all

on nfcTagReceived pTag
  put pTag["id"] into tTagID -- extract hardware ID
  ...
end nfcTagReceived
The ID will be binary, you can convert it to ascii for human-readable text if you need to:

Code: Select all

get binaryDecode("H*",pTagID,tAsciiTag)