John Roberts
John Roberts

Reputation: 133

Python nfcpy showing acr122u usb device but not reading

I have nfcpy installed on my Raspberry Pi and when I run the following command

python -m nfc

I see the USB NFC Reader

I then created a python script called "test.py" and put the following code in it:

import nfc
clf = nfc.ContactlessFrontend('usb')
print(clf)

When I run the test.py script it displays:

ACS ACR122U on usb:001:005

So the nfcpy is able to detect the reader no problem. Next I tried to take it to the next stage by trying to read a NFC tag using the following code:

import nfc
clf = nfc.ContactlessFrontend('usb')
clf.connect(rdwr={})
True

However, when I run this code the script is just listening for a tag and the green light on the reader turns on but no matter how many times i touch a NFC tag to the reader it just does not read anything and the script stays listening.

Can anyone please help?

Upvotes: 0

Views: 1945

Answers (1)

John Roberts
John Roberts

Reputation: 133

I seemed to have solved this issue by doing a fresh installation of Rasbian and this time only installing nfcpy without installing libnfc or anything else. I believe problem was that installing libnfc caused a conflict of some kind

Upvotes: 0

Related Questions