Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error libnfc.driver.acr122_usb Too small reply #7

Open
paulomcnally opened this issue Jun 8, 2016 · 0 comments
Open

error libnfc.driver.acr122_usb Too small reply #7

paulomcnally opened this issue Jun 8, 2016 · 0 comments

Comments

@paulomcnally
Copy link

Output Error:

ruby app.rb

error   libnfc.driver.acr122_usb    Too small reply
/home/polin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/nfc-3.1.1/lib/nfc/iso14443a.rb:6:in `abtUid': failed to allocate memory (NoMemoryError)
    from /home/polin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/nfc-3.1.1/lib/nfc/iso14443a.rb:6:in `uid'
    from /home/polin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/nfc-3.1.1/lib/nfc/iso14443a.rb:24:in `to_s'
    from /home/polin/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/nfc-3.1.1/lib/nfc/iso14443a.rb:33:in `inspect'
    from app.rb:10:in `p'
    from app.rb:10:in `<main>'

Code:

require 'nfc'

# Create a new context
ctx = NFC::Context.new

# Open the first available USB device
dev = ctx.open nil

# Block until a tag is available, then print tag info
p dev.select

# You can even run in an infinite loop if you'd like to continually find
# tags:

#loop do
#  p dev.select
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant