Skip to main content

USB based RFID reader with Python interface

Project description

PN5180-tagomatic

USB based RFID reader with Python interface

Python CI REUSE status PyPI version

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 ISO/IEC 14443A and ISO/IEC 15693 cards.
  • Can read/write the cards' memories.
  • Can authenticate against Mifare classic cards to read their memories.
  • Supports multiple cards within the field.

API Documentation

See API Reference.

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, RxProtocol, TxProtocol

# Create reader instance and use it
with PN5180("/dev/ttyACM0") as reader:
    versions = reader.ll.read_eeprom(0x10, 6)
    with reader.start_session(
        TxProtocol.ISO_14443_A_106, RxProtocol.ISO_14443_A_106
    ) as session:
        card = session.connect_one_iso14443a()
        print(f"Reading from card {card.id}")
        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:

  1. All code passes linting and type checking
  2. Tests are added for new functionality
  3. All files include proper REUSE-compliant license headers
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pn5180_tagomatic-0.1.1rc3.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pn5180_tagomatic-0.1.1rc3-py3-none-any.whl (52.7 kB view details)

Uploaded Python 3

File details

Details for the file pn5180_tagomatic-0.1.1rc3.tar.gz.

File metadata

  • Download URL: pn5180_tagomatic-0.1.1rc3.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pn5180_tagomatic-0.1.1rc3.tar.gz
Algorithm Hash digest
SHA256 f61363ef542c533d63cdcbf53c4d00f29d348374e86bd307e0bb6272c616caad
MD5 cff7500783475c2391b388d1bedccbc1
BLAKE2b-256 5d7fe7dd3abfe3139158f59b67e791d0c5c265f91442531f7310f2ad166a1b05

See more details on using hashes here.

Provenance

The following attestation bundles were made for pn5180_tagomatic-0.1.1rc3.tar.gz:

Publisher: publish.yml on bofh69/PN5180-tagomatic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pn5180_tagomatic-0.1.1rc3-py3-none-any.whl.

File metadata

File hashes

Hashes for pn5180_tagomatic-0.1.1rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 fab829500ef085eb7b01fff8f62214b9c0a8a55ffc1734706ea8db6cb4a4f22e
MD5 3869161965dee69f3166ccd4c3af0b50
BLAKE2b-256 d9282f4d7eb40a4bce5412e38adcc70264346ffa83e69844d7aae2fdf860f07f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pn5180_tagomatic-0.1.1rc3-py3-none-any.whl:

Publisher: publish.yml on bofh69/PN5180-tagomatic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page