llllbbbbllll
llllbbbbllll

Reputation: 683

How to read NFC tag data with raspberry pi and ACR122U

I'm working on a python project that requires reading data from NFC tags- specifically URLs.

I purchased a USB NFC reader and am using the libnfc library. I have my raspberry pi recognizing the reader and tags properly, and it correctly identifies when a tag is present using nfc-poll. However, it only gives me information on the tag's ID, ATQA, and SAK (I'm not sure what the last two are). It doesn't give me the data/url itself.

Any help would be appreciated in reading the tag data, either with libnfc or something else. I'm experienced in Python but have never done a project anything like this before so as simple as possible would be appreciated.

My python code is pretty simple:

from subprocess import call

while True:
   try:
      call('nfc-poll')
   except:
      print('Error')
      break

And the output when a tag is presented looks like this:

ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_REF): 00 44
       UID (NFC1D1): 04 7b a7 2c d0 6c 80
      SAK (SEL_RES): 00

Upvotes: 1

Views: 2674

Answers (0)

Related Questions