Git Product home page Git Product logo

mfrc522_ruby's People

Contributors

atitan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mfrc522_ruby's Issues

MFRC522.new blocks when used on Gtk3

I'm trying to use mfrc522 with gtk3 on an RPi 3B+ with raspbian stretch. Code is

require 'gtk3'
require 'mfrc522'

win = Gtk::Window.new
win.window_position = :center
win.border_width = 5

win.signal_connect("destroy") { Gtk.main_quit }

rfid = MFRC522.new

win.show_all
Gtk.main

If I comment rfid = MFRC522.new gtk window is displayed. If I uncomment, execution blocks on rfid = MFRC522.new

mfrc522 code on console (without gtk) to read uid works well

Received empty UID data (UnexpectedDataError) raised

Hello, my connections are:
MFRC522 physical RPI3 pin
sda 24
sck 23
mosi 19
miso 21
irq not connected
gnd 6
rst 18
3.3V 1

and my test script:

require 'mfrc522'
r = MFRC522.new
print(r.picc_request(MFRC522::PICC_REQA)) # returns true
uid, sak = r.picc_select # always raises UnexpectedDataError

However, it works well with pi-rc522 (python), changing connections
irq 18
rst 22

How to troubleshoot timeout error?

Not sure if this project is still active, stuck how to troubleshoot timeout error.

Setup is working with python code and setup

I did figure out to update nrstpd to 25 based on above setup.

Error I am seeing when running

require 'mfrc522'
require 'securerandom'

r = MFRC522.new(25)

begin
  r.picc_request(MFRC522::PICC_REQA)
  uid, sak = r.picc_select
  puts "uid: #{uid}"
rescue CommunicationError => e
  abort "Error communicating PICC: #{e.message}"
end

Error communicating PICC: status_picc_timeout

Example project?

Do you happen to have an example project using AES encryption with Desfire cards?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.