Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[NFC] Unable to get nfc-scan-device working unlike pcsc_scan
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
thican
n00b
n00b


Joined: 09 Jul 2017
Posts: 8
Location: Earth

PostPosted: Mon Nov 06, 2017 6:03 pm    Post subject: [NFC] Unable to get nfc-scan-device working unlike pcsc_scan Reply with quote

Hello everyone!

I acquired an USB NFC reader, the ACS "ACR1252 Dual Reader" (P/N=ACR1252U-M1, idVendor=072f, idProduct=223b)[1], and I an unable to get libnfc working with it, unlike PC/SC.
(inb4) I fetched resources on Gentoo's Wiki, on libnfc's wiki[2] and on the Web, of course.

Code:
% nfc-scan-device -v -i
nfc-scan-device uses libnfc 1.7.1
Cannot open I2C bus: Permission denied
Cannot open I2C bus: Permission denied
Cannot open I2C bus: Permission denied
Cannot open I2C bus: Permission denied
No NFC device found.

% pcsc_scan
PC/SC device scanner
V 1.4.27 (c) 2001-2011, Ludovic Rousseau <email_address>
Compiled with PC/SC lite version: 1.8.16
Using reader plug'n play mechanism
Scanning present readers...
0: ACS ACR1252 1S CL Reader [ACR1252 Dual Reader PICC] 00 00
1: ACS ACR1252 1S CL Reader [ACR1252 Dual Reader SAM] 01 00


I did an strace of 'nfc-scan-device -v' but I saw nothing relevant (I got from dmesg the USB port "2-1.3" information).

Code:
readlink("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3", 0x7ffd738808d0, 1024) = -1 EINVAL (Invalid argument)
stat("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
open("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/uevent", O_RDONLY|O_CLOEXEC) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
read(6, "MAJOR=189\nMINOR=131\nDEVNAME=bus/"..., 4096) = 128
read(6, "", 4096)                       = 0
close(6)                                = 0
open("/sys/bus/usb/devices/2-1.3/busnum", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(6, "2\n", 4096)                    = 2
close(6)                                = 0
open("/sys/bus/usb/devices/2-1.3/devnum", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(6, "4\n", 4096)                    = 2
close(6)                                = 0
open("/sys/bus/usb/devices/2-1.3/speed", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(6, "12\n", 4096)                   = 3
close(6)                                = 0
open("/sys/bus/usb/devices/2-1.3/descriptors", O_RDONLY) = 6
read(6, "\22\1\0\2\0\0\0@/\7;\"\0\1\1\2\0\1\t\2\261\0\2\1\0\200d\t\4\0\0\3"..., 1024) = 195
close(6)                                = 0
readlink("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0", 0x7ffd738808d0, 1024) = -1 EINVAL (Invalid argument)
stat("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
open("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/uevent", O_RDONLY|O_CLOEXEC) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
read(6, "DEVTYPE=usb_interface\nDRIVER=usb"..., 4096) = 143
read(6, "", 4096)                       = 0
close(6)                                = 0
readlink("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.1", 0x7ffd738808d0, 1024) = -1 EINVAL (Invalid argument)
stat("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.1/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
open("/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.1/uevent", O_RDONLY|O_CLOEXEC) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
read(6, "DEVTYPE=usb_interface\nDRIVER=usb"..., 4096) = 143
read(6, "", 4096)                       = 0
close(6)                                = 0


I even put my user in the pcscd group before testing, not better, and I think this is not necessary and might be a security flaw. Even for root it doesn't work, so I guess it's not relevant. My user belongs to the groups "usb,plugdev" among other groups.
I tought the daemon pcscd was holding the device, but I have the same issue even after shuting down the daemon.

I already installed the package app-crypt/ccid, and even the driver from its website [3] in this repertory: /usr/lib/readers/usb/ifd-acsccid.bundle/ (from the README, this device is CCID compliant).

There, now I have no idea what to try now, except maybe removing the sys-apps/pcsc-lite package, but it satisfies some dependencies.

Thanks for support.

1: https://www.acs.com.hk/en/products/342/acr1252u-usb-nfc-reader-iii-nfc-forum-certified-reader/
2: http://nfc-tools.org/
3: same as 1, section "Downloads"

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum