USB based RFID reader with Python interface
Project description
PN5180-tagomatic
USB based RFID reader with Python interface
Overview
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).
Features
- 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.
Installation
Python Package
Install from PyPI:
pip install pn5180-tagomatic
Install from source:
git clone https://github.com/bofh69/PN5180-tagomatic.git
cd PN5180-tagomatic
pip install -e .
Firmware
See sketch/README.md for instructions on building and uploading the Raspberry Pi Pico firmware.
Usage
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()
Example Program
A few simple example programs are in the examples/ directory.
Development
Setting up development environment
# 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-dev
Running tests
pytest or make test
Code quality checks
# Linting
make check
# Formatting
make format
# Type checking
make type-check
License
This 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.
Contributing
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
Acknowledgments
This project uses FastLED by Daniel Garcia et al.
SimpleRPC by Jeroen F.J. Laros, Chris Flesher et al is also used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pn5180_tagomatic-0.0.3.tar.gz.
File metadata
- Download URL: pn5180_tagomatic-0.0.3.tar.gz
- Upload date:
- Size: 52.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a745642bdf739aaec10e739f1d22389fc46377a91eeeb6a7f0518af657d42315
|
|
| MD5 |
121c4e167b16e1af083472a65fa83091
|
|
| BLAKE2b-256 |
d78b7f4d252f1d02b4ac2cc89d4d345c859584d68813dfc2454c0ea95b934dd2
|
Provenance
The following attestation bundles were made for pn5180_tagomatic-0.0.3.tar.gz:
Publisher:
publish.yml on bofh69/PN5180-tagomatic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pn5180_tagomatic-0.0.3.tar.gz -
Subject digest:
a745642bdf739aaec10e739f1d22389fc46377a91eeeb6a7f0518af657d42315 - Sigstore transparency entry: 811426341
- Sigstore integration time:
-
Permalink:
bofh69/PN5180-tagomatic@bbe138dbb8564e2525c8565a8824ac044177efa0 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/bofh69
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bbe138dbb8564e2525c8565a8824ac044177efa0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pn5180_tagomatic-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pn5180_tagomatic-0.0.3-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
513d295ccf6725b06ce166a32600227ece0335e72bccc8112070c9d20d7fb759
|
|
| MD5 |
84b36ae78a5129cc8bf4d88425a8fe14
|
|
| BLAKE2b-256 |
da99ed3b336ccf3f53353233494727b069a86e390bbfc743981230cacd900cc0
|
Provenance
The following attestation bundles were made for pn5180_tagomatic-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on bofh69/PN5180-tagomatic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pn5180_tagomatic-0.0.3-py3-none-any.whl -
Subject digest:
513d295ccf6725b06ce166a32600227ece0335e72bccc8112070c9d20d7fb759 - Sigstore transparency entry: 811426363
- Sigstore integration time:
-
Permalink:
bofh69/PN5180-tagomatic@bbe138dbb8564e2525c8565a8824ac044177efa0 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/bofh69
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bbe138dbb8564e2525c8565a8824ac044177efa0 -
Trigger Event:
release
-
Statement type: