A python extension for interfacing with the NXP PN512 NFC Reader. Targeted specifically for Raspberry Pi and the EXPLORE-NFC module
nxppy is a very simple Python wrapper for interfacing with the excellent NXP EXPLORE-NFC shield for the Raspberry Pi. It takes NXP’s Public Reader Library and provides a thin layer for detecting and reading the UID (unique identifier) of a Mifare RFID tag present on the reader.
This was based very heavily on NXP’s card_polling example code. The example code was only reorganized to be more conducive as an interface. NXP still retains full copyright and ownership of the example code. nxppy.c and the relevant Python setup files are distributed under the MIT license.
nxppy is available from pypi. Simply run:
pip install nxppy
To install from source, use distutils:
python setup.py build install
Currently, the module supports one static method which returns either the UID as a string or None if no card is present:
import nxppy uid = nxppy.read_mifare()
I welcome your feedback and pull requests! This project started as a necessity for my own Raspberry Pi development, but I’m hoping others will find it useful as a way to quickly bootstrap NFC-based projects. Enjoy!