USB based RFID reader with Python interface
PN5180-tagomatic is a USB-based RFID reader that provides a Python interface for reading NFC/RFID tags using the PN5180 NFC Frontend module and a Raspberry Pi Pico (Zero).
- Python library for easy integration.
- Uses USB serial communication to the reader.
- Cross-platform support (Linux, Windows, macOS).
- Finds and selects single ISO/IEC 14443 cards.
- Uses NFC FORUM commands to read/write 14443-A cards' memories.
- Can authenticate against Mifare classic cards to read their memories.
- Finds ISO/IEC 15693 cards, uses 15693-3 commands to read/write their memories.
Multiple cards in the RFID field is currently not really supported, the hardware and arduino sketch supports all commands for it.
Install from PyPI:
pip install pn5180-tagomaticInstall from source:
git clone https://github.com/bofh69/PN5180-tagomatic.git
cd PN5180-tagomatic
pip install -e .See sketch/README.md for instructions on building and uploading the Raspberry Pi Pico firmware.
from pn5180_tagomatic import PN5180
# Create reader instance and use it
with PN5180("/dev/ttyACM0") as reader:
versions = reader.ll.read_eeprom(0x10, 6)
with reader.start_session(0x00, 0x80) as session:
card = session.connect_one_iso14443a()
print(f"Reading from card {card.uid.hex(':')}")
if len(card.uid) == 4:
memory = card.read_mifare_memory()
else:
memory = card.read_memory()A few simple example programs are in the examples/ directory.
# Clone the repository
git clone https://github.com/bofh69/PN5180-tagomatic.git
cd PN5180-tagomatic
# Install development dependencies
pip install -e .[dev]
# or:
make install-devpytest or make test
# Linting
make check
# Formatting
make format
# Type checking
make type-checkThis project is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).
See LICENSE for the full license text.
Contributions are welcome! Please ensure that:
- All code passes linting and type checking
- Tests are added for new functionality
- All files include proper REUSE-compliant license headers
- Code follows the project's style guidelines
This project uses FastLED by Daniel Garcia et al.
SimpleRPC by Jeroen F.J. Laros, Chris Flesher et al is also used.