LudovicRousseau / pcsc-tools

Some tools to be used with smart cards and PC/SC
https://pcsc-tools.apdu.fr/
GNU General Public License v2.0
185 stars 63 forks source link

Using new pcscd 2.2.3 #85

Closed Henry89em closed 1 month ago

Henry89em commented 1 month ago

Hi Ludovic,

I have the need to install again PCSCD on a Raspberry.

I remembered from previous topic (#81) that I needed to update libccid to 1.5.4 version (from the default version 1.4.26 installed from sudo npm install pcscd) together with the 1.8.20 version of pcscd.

However, the only way I have to install libccid 1.5.4 is to install the .deb file, which is not compliant with my actual lib6 version (and I am afraid to change the lib6 version).

Therefore, I tried to update pcscd and libccid to the last version (since they are the only available online now):

pcscd v2.2.3 (with the --disable-polkit option) libccid 1.6.0

I compiled the pcscd with the meson tool.

lsusb can see the ACR122U: lsusb Bus 001 Device 004: ID 072f:2200 Advanced Card Systems, Ltd ACR122U Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The output of sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee -i log.txt is:

sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee -i log.txt 00000000 ../src/debuglog.c:392:DebugLogSetLevel() debug level=debug 00000098 ../src/debuglog.c:413:DebugLogSetCategory() Debug options: APDU 00000019 [1995436032] ../src/pcscdaemon.c:359:main() Force colored logs 00000808 [1995436032] ../src/configfile.l:294:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d 00000089 [1995436032] ../src/configfile.l:328:DBGetReaderListDir() Skipping non regular file: .. 00000012 [1995436032] ../src/configfile.l:328:DBGetReaderListDir() Skipping non regular file: . 00000013 [1995436032] ../src/configfile.l:366:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin 00000257 [1995436032] ../src/pcscdaemon.c:669:main() pcsc-lite 2.2.3 daemon ready. 00000318 [1995436032] ../src/pcscdaemon.c:752:main() Using drivers directory: /usr/lib/pcsc/drivers

However, I am not able to use the ACR122U in any case.

Thank you, Enrico

Henry89em commented 1 month ago

To add completeness, I have the following output to pcscd -f -d:

00000000 [1995476992] ../src/debuglog.c:392:DebugLogSetLevel() debug level=debug 00000589 [1995476992] ../src/configfile.l:294:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d 00000085 [1995476992] ../src/configfile.l:328:DBGetReaderListDir() Skipping non regular file: .. 00000028 [1995476992] ../src/configfile.l:328:DBGetReaderListDir() Skipping non regular file: . 00000030 [1995476992] ../src/configfile.l:366:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin 00000230 [1995476992] ../src/pcscdaemon.c:669:main() pcsc-lite 2.2.3 daemon ready. 00000099 [1995476992] ../src/pcscdaemon.c:705:main() cannot create /var/run/pcscd/pcscd.pid: Permission denied 00000144 [1995476992] ../src/winscard_msg_srv.c:146:InitializeSocket() Unable to bind common socket: Permission denied 00000025 [1995476992] ../src/pcscdaemon.c:730:main() Error initializing pcscd. 00000023 [1995476992] ../src/pcscdaemon.c:807:at_exit() cleaning /var/run/pcscd 00000042 [1995476992] ../src/pcscdaemon.c:838:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.comm: No such file or directory 00000043 [1995476992] ../src/pcscdaemon.c:844:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.pid: No such file or directory

maybe the --disable-polkit option creates some issues?

Henry89em commented 1 month ago

I just have to reinstall pcsc_tools that I removed when removing (sudo apt-get remove pcscd).

Sorry