Hello Community,
I’m trying to integrate a PN532 NFC reader with nfcpy
via UART on the AML-S905X-CC with Raspbian 12. Although the reader works flawlessly with libnfc
, I’m encountering issues when switching to nfcpy
(my goal is to have a python solution to controlling the PN532).
Successful libnfc
Setup:
- Device: PN532, connected via UART at
/dev/ttyAML6
- System: Linux Ubuntu 20.04
- Configured using:
./configure --with-drivers=pn532_uart --sysconfdir=/etc sudo make install
- Established udev rules for device permissions.
- Merged the
uart-a
overlay and ensured correct pin connections:- VCC to Pin 2 (7J1)
- GND to Pin 6 (7J1)
- SCL (TX) to Pin 8 (7J1)
- SDA (RX) to Pin 10 (7J1)
Current nfcpy
Issue:
Attempting to initialize with:
import nfc
def main():
clf = nfc.ContactlessFrontend('tty:AML6:pn532')
if clf:
print("Device is connected")
clf.close()
else:
print("Failed to connect to the device")
if __name__ == "__main__":
main()
Results in:
OSError: [Errno 19] No such device
Device permissions and path are verified correct, and I am in the dialout
group.
Questions:
- Has anyone successfully used PN532 via UART with
nfcpy
? - Are there specific
nfcpy
configurations or versions that are required? - Do I need to adjust any Linux settings further to enable this communication?
I would greatly appreciate any insights or guidance on how to get nfcpy
to recognize my PN532 device connected via UART.
Thank you!