Isolus / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

libnfc tries to access a smartcard reader #287

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have and ACR38U-I1 reader 
(http://www.acs.com.hk/en/products/4/acr38-smart-card-reader/) which of course 
has nothing to do with NFC. The problem is that libnfc is trying to interact 
with it:

› nfc-scan-device -v nfc-scan-device uses libnfc 1.7.1 1 NFC device(s) found: error libnfc.driver.acr122_usb Invalid RDR_to_PC_DataBlock frame error libnfc.driver.acr122_usb PN532 init failed, trying again... error libnfc.driver.acr122_usb Invalid RDR_to_PC_DataBlock frame error libnfc.driver.acr122_usb PN532 init failed, trying again... error libnfc.driver.acr122_usb Invalid RDR_to_PC_DataBlock frame nfc_open failed for acr122_usb:004:017


That’s not a huge deal, but there is another problem. Since those devices 
seem to have the same VID and PID, udev rules shipped with libnfc also match 
this cardreader, which I definitely don’t want to happen.

Is it possible to have more precise matching at least in the udev rules?

P: /devices/pci0000:00/0000:00:1a.1/usb4/4-2 N: bus/usb/004/014 E: BUSNUM=004 E: DEVNAME=/dev/bus/usb/004/014 E: DEVNUM=014 E: DEVPATH=/devices/pci0000:00/0000:00:1a.1/usb4/4-2 E: DEVTYPE=usb_device E: DRIVER=usb E: ID_BUS=usb E: ID_FOR_SEAT=usb-pci-0000_00_1a_1-usb-0_2 E: ID_MODEL=CCID_USB_Reader E: ID_MODEL_ENC=CCID\x20USB\x20Reader E: ID_MODEL_FROM_DATABASE=ACR38 SmartCard Reader E: ID_MODEL_ID=90cc E: ID_NFC=1 E: ID_PATH=pci-0000:00:1a.1-usb-0:2 E: ID_PATH_TAG=pci-0000_00_1a_1-usb-0_2 E: ID_REVISION=0100 E: ID_SERIAL=ACS_CCID_USB_Reader E: ID_USB_INTERFACES=:0b0000: E: ID_VENDOR=ACS E: ID_VENDOR_ENC=ACS E: ID_VENDOR_FROM_DATABASE=Advanced Card Systems, Ltd E: ID_VENDOR_ID=072f E: MAJOR=189 E: MINOR=397 E: PCSCD=1 E: PRODUCT=72f/90cc/100 E: SUBSYSTEM=usb E: TAGS=:seat:uaccess: E: TYPE=0/0/0 E: USEC_INITIALIZED=55996572185

Original issue reported on code.google.com by kirelagin on 6 Feb 2015 at 11:36

GoogleCodeExporter commented 9 years ago
You should complain to ACS so they do NOT use the same product ID for all their 
USB devices. This is stupid.

The solution is to unplug your ACR38 reader when you want to use libnfc.

Original comment by ludovic....@gmail.com on 6 Feb 2015 at 12:16

GoogleCodeExporter commented 9 years ago
I totally agree that this is completely stupid. But the udev rules are a real 
problem right now. Is there really no way to tell them apart in the udev rule?

Original comment by kirelagin on 6 Feb 2015 at 1:26