nfc-tools / libnfc

Platform independent Near Field Communication (NFC) library
http://nfc-tools.org
GNU Lesser General Public License v3.0
1.67k stars 439 forks source link

"nfc-list: ERROR: Unable to open NFC device" on macOS Monterey with Identiv uTrust 3700 F CL Reader #680

Open maziarzamani opened 1 year ago

maziarzamani commented 1 year ago

Hi everyone.

I am trying to interface my uTrust 3700 F CL Reader in macOS Monterey, but it is not going well.

% sudo nfc-list
nfc-list uses libnfc 1.8.0
nfc-list: ERROR: Unable to open NFC device: pcsc:Identiv uTrust 3700 F CL Reader

I have also tried to disable idfreader:

sudo launchctl remove com.apple.ifdreader
sudo launchctl stop com.apple.ifdreader

And even tried to install pcsc-lite.

Additional info:

% brew list libusb              
/usr/local/Cellar/libusb/1.0.26/include/libusb-1.0/libusb.h
/usr/local/Cellar/libusb/1.0.26/lib/libusb-1.0.0.dylib
/usr/local/Cellar/libusb/1.0.26/lib/pkgconfig/libusb-1.0.pc
/usr/local/Cellar/libusb/1.0.26/lib/ (2 other files)
/usr/local/Cellar/libusb/1.0.26/share/libusb/ (9 files)
% brew list nfcutils
/usr/local/Cellar/nfcutils/0.3.2_1/bin/lsnfc
1704eu commented 1 year ago

I have exactly the same problem. Did you find a solution? thx Benni

ajmas commented 4 months ago

I am currently dealing with a similar error. From what I see installing pcsc-lite is not really installing anything, since it is a stub, since it is already provided by macOS.

You can get more details via LIBNFC_LOG_LEVEL=3 nfc-list -v. For example for me:

debug   libnfc.config   key: [allow_intrusive_scan], value: [yes]
debug   libnfc.config   Unable to open directory: /usr/local/Cellar/libnfc/1.8.0/etc/nfc/devices.d
debug   libnfc.general  log_level is set to 3
debug   libnfc.general  allow_autoscan is set to true
debug   libnfc.general  allow_intrusive_scan is set to true
debug   libnfc.general  0 device(s) defined by user
nfc-list uses libnfc 1.8.0
debug   libnfc.general  0 device(s) found using arygon driver
debug   libnfc.general  0 device(s) found using pn532_uart driver
debug   libnfc.general  0 device(s) found using ACR122S driver
debug   libnfc.general  0 device(s) found using acr122_usb driver
debug   libnfc.driver.acr122_pcsc   PCSC device [Circle CIR315] is not NFC capable or not supported by libnfc.
debug   libnfc.general  0 device(s) found using acr122_pcsc driver
debug   libnfc.general  1 device(s) found using pcsc driver
debug   libnfc.general  0 device(s) found using pn53x_usb driver
debug   libnfc.driver.pcsc  Attempt to open Circle CIR315
debug   libnfc.driver.pcsc  PCSC connect failed
debug   libnfc.general  Unable to open "pcsc:Circle CIR315".
nfc-list: ERROR: Unable to open NFC device: pcsc:Circle CIR315

The line 'Unable to open directory: /usr/local/Cellar/libnfc/1.8.0/etc/nfc/devices.d' may not be of concern. I created it and it goes away.

I am going to try building libnfc from source and see if I see any differences.

BTW You can see the formula for libnfc here: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/lib/libnfc.rb

Oh and I am trying to see if using libccid helps, but so far no luck. The 'uTrust 3700' does is listed there in the 'should work' page. I had opened a ticket there, but advise what to try here.