Skip to main content

Python API for NFC reader to run on the Pi Zero.

Project description

nfcreader

https://img.shields.io/pypi/v/nfcreader.svg https://img.shields.io/travis/EDWIAN004@myuct.ac.za/nfcreader.svg Documentation Status

Python API for CR95HF NFC reader to run on the Pi Zero. Used as a python wrapper for the existing C API provided for the CR95HF module by STMicroelectronics. However, it was found to be lacking for Linux users, as well as difficult to compile and run compared to a Python API.

Abstract

Use case scenario for demonstrator application: Student access to venues. The aim was to provide better support for the CR95HF’s use for the Raspberry Pi in Python3, via an API. A demonstrator application was created for showing the uses of the API for an access control use case: https://github.com/IanEdwards99/CR95HF_Demo_App

Features

  • USB Connect

  • Protocol Select

  • Send Receive

  • ResetSPI

  • Field Off

  • Send IRQ Pulse

  • Send NSS Pulse

  • STCmd Command

  • Initiate

  • ResetToReady

  • MCUrev

  • Echo

  • Idn (Get ID number of CR95HF module)

  • GetPinInterfaceState

  • Reading from NFC tag

  • Writing to NFC tag

  • IDLE for tag

  • Scan and Write

  • Tag detection and hunting

  • Clearing NFC tag

  • Read entire contents of all registers from tag

  • Extract payload

  • Prepare for writing and reading with dec/hex/string conversion functions.

Installation

pip install the file from PyUp, or clone this git repo and “make install”. It is important to install 3 dependancies to use the CR95HF with its C library and development board:

  • “sudo apt-get install build-essential”

  • “sudo apt-get install g++”

  • “sudo apt-get install libusb-1.0-0-dev”

  • Navigate to ./nfcreader/nfcreader/src and run “make” to compile a libCR95HF.so file for your current architecture.

Lastly, add libCR95HF.so, found in the src folder, to your environment variable. If your program still fails, copy it to your /lib and /usr/lib folders in your root directory.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2020-09-15)

  • First release on PyPI.

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

nfcreader-0.1.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

nfcreader-0.1.0-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nfcreader-0.1.0.tar.gz.

File metadata

  • Download URL: nfcreader-0.1.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.5.3

File hashes

Hashes for nfcreader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 354ec36b356ebb05758760a24cd126fcb6a6941fd0309002c35a30d1dd6a3103
MD5 c636876ac7b5d239d37be8d8897e5a63
BLAKE2b-256 d38ea2233834460d22820be14d1107e808538324ee3b340b733619fe34160e17

See more details on using hashes here.

File details

Details for the file nfcreader-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: nfcreader-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.5.3

File hashes

Hashes for nfcreader-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 15a2754131980c6dc0dcfe7d9f955197eebe2bc5afd97c0587ba4b9763598e6f
MD5 0a3a9637b019c61c697ff3e0932357e9
BLAKE2b-256 3167f597dc90605e5c86b0815ee7bbd16f9e6d789f72a4a8e9b65c01052c44f5

See more details on using hashes here.

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