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 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 can be detected within the field.

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.mdhttps://github.com/bofh69/PN5180-tagomatic/tree/0.1.1-rc2/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 [LICENSEhttps://github.com/bofh69/PN5180-tagomatic/tree/0.1.1-rc2/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.1rc2.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.1rc2-py3-none-any.whl (51.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pn5180_tagomatic-0.1.1rc2.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.1rc2.tar.gz
Algorithm Hash digest
SHA256 e9f53769e87f6ede275516bc923d9b54fc876e4771a3e2582c872fff2a706847
MD5 193776a4fe6c9858a198f2c84d87b514
BLAKE2b-256 d2f2205ccd1c42723be3d0e4a6b282bba9f74199eb8ba725befc2c62c8670b0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pn5180_tagomatic-0.1.1rc2.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.1rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for pn5180_tagomatic-0.1.1rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd983b6effad5d509244c19e6e284205e9e1710498d6f0f61b5c643b062e1c9
MD5 48460729029db946fe0588dc836e7f39
BLAKE2b-256 e18ea1c5136670ca36fbc0f12855eb7af328960ecf6142abde6dccb75765fc8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pn5180_tagomatic-0.1.1rc2-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