tenderlove / nfc

NFC is a ruby wrapper for the Near Field Communication library.
90 stars 27 forks source link

"unable to claim USB interface (Permission denied)" #9

Open chrisallick opened 5 years ago

chrisallick commented 5 years ago

I have an acr122u-a9 NFC reader and have confirmed with NFC Ideas OSX app that the reader works, can read and write tags. I can also include the "nfc" gem, but when I try and run the full example it errors out.

Has anyone had this issue and have a solve? I'm on Ruby 2.4.1 and OS X High Sierra.

Last login: Tue Jan 15 14:20:58 on ttys000
LANDEU-NMXc5054-2:~ chris.allick$ irb
2.4.1 :001 > require "nfc"
 => true 
2.4.1 :002 > ctx = NFC::Context.new
 => #<NFC::Context:0x007fa37b1538f0> 
2.4.1 :003 > dev = ctx.open nil
error   libnfc.driver.acr122_usb    Unable to claim USB interface (Permission denied)
RuntimeError: Unable to open the device
    from (irb):3:in `open'
    from (irb):3
    from /Users/chris.allick/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `<main>'
2.4.1 :004 > 
rivsc commented 5 years ago

There is a solution here : https://github.com/nfc-tools/libnfc/issues/426