Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atitan/mfrc522_ruby
MFRC522 RFID Reader Library for Raspberry Pi
https://github.com/atitan/mfrc522_ruby
iso14443a library mfrc522 mifare mifare-classic mifare-desfire mifare-ultralight raspberry-pi rfid ruby
Last synced: 5 days ago
JSON representation
MFRC522 RFID Reader Library for Raspberry Pi
- Host: GitHub
- URL: https://github.com/atitan/mfrc522_ruby
- Owner: atitan
- License: mit
- Created: 2016-03-09T14:20:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-05-23T14:22:13.000Z (over 3 years ago)
- Last Synced: 2024-04-26T20:20:31.656Z (8 months ago)
- Topics: iso14443a, library, mfrc522, mifare, mifare-classic, mifare-desfire, mifare-ultralight, raspberry-pi, rfid, ruby
- Language: Ruby
- Homepage:
- Size: 122 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MFRC522_Ruby
[![Gem Version](https://badge.fury.io/rb/mfrc522.svg)](https://badge.fury.io/rb/mfrc522)
This project is aiming to provide easy access to MIFARE RFID tags using MFRC522 and Raspberry Pi.
The code itself can be ported to other platform with little effort since it's purely written in Ruby.
Inspired by [miguelbalboa/rfid](https://github.com/miguelbalboa/rfid) and [Elmue/electronic RFID Door Lock](http://www.codeproject.com/Articles/1096861/DIY-electronic-RFID-Door-Lock-with-Battery-Backup).
## Installation
Ruby version 2.3+ is required.
Linux SPIDEV is required. Raspberry Pi can use raspi-config to enable.
You can install it by doing `gem install mfrc522` or using bundler.
## Documentation
RDoc is available at [RubyDoc](http://www.rubydoc.info/github/atitan/MFRC522_Ruby/master).
## Hardware
This library assumes you have the reader connected to SPI0 CE0 on Raspberry Pi.
If not, adjust the parameters when calling MFRC522 initialize method.
NRSTPD(RST) pin should be connected to 5V or something logically HIGH.
## Supported RFID tags
Models supported and have been tested by the author:
* MIFARE Classic
* MIFARE Ultralight
* MIFARE Ultralight C
* MIFARE DESFire EV1, without ISO-7816 APDU
* MIFARE DESFire EV2, without ISO-7816 APDU and new features since EV1Models implemented but not tested:
* MIFARE Ultralight EV1
Models under development:
* MIFARE Plus
If the card model you want to use is not on the list, you can implement it on top of the `PICC` class.
The library provide basic access to ISO 14443-3 and ISO 14443-4 protocol.
## Get started
Check out files in folder `test` for example usage.
You have to rescue exceptions yourself.
## Known Issue
For older versions(< 3.0.0), the underlying library `pi_piper` we used is known to cause SegFault if you use it along with Gtk3 on Respbian Stretch, which comes with Ruby 2.3.3 by default. Upgrading Ruby to newer version is likely to solve the issue. Ref: [issue#4](https://github.com/atitan/MFRC522_Ruby/issues/4)