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
Output Error:
ruby app.rb
Code: