More smart cards compile problem

SzentpĂ©tery István <[email protected]> Fri, 28 Apr 2017 12:13:58 +0300
Newsgroups gmane.comp.lib.muscle
Message-ID <CAAT8RKH8f+oZV-Kuvs5vSAjC0n=Tp759+=89jP-RYeip8GRtVg@mail.gmail.com>
Hello
First of all i am not that good in linux, but i need to compile the pcsc
lite to be able to handle at least 128 smart cards, and i have made the
proper changes according to this:
https://github.com/LudovicRousseau/PCSC/issues/8
And made a batch file to make the proper changes and to compile the
libraries, but i get this response from the pcsc_scan after running the
file:

PC/SC device scanner
V 1.4.27 (c) 2001-2011, Ludovic Rousseau <[email protected]>
Compiled with PC/SC lite version: 1.8.20
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader...found one
Scanning present readers...
0: "
1: "
2: "
3: "
4: "
5: "
6: "
7: "
8: "
9: "
10: "
11: "
12: "
13: "
14: "
15: "
SCardGetStatusChange: Invalid parameter given.

I am using ubuntu 16.04 LTS 32 bit version, there are no smart card
attached to the computer, but the output from the pcsc_scan is the same if
there are smart card readers attached to the computer.

pcscd -version
pcsc-lite version 1.8.20.
Copyright (C) 1999-2002 by David Corcoran <[email protected]>.
Copyright (C) 2001-2015 by Ludovic Rousseau <[email protected]>.
Copyright (C) 2003-2004 by Damien Sauveron <[email protected]>.
Report bugs to <[email protected]>.
Enabled features: Linux i686-pc-linux-gnu serial usb libudev
usbdropdir=/usr/local/lib/pcsc/drivers ipcdir=/var/run/pcscd
configdir=/usr/local/etc/reader.conf.d

I have attached the log file from this:
sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color |
tee log.txt
after running a pcsc_scan
Regards.

_______________________________________________
Pcsclite-muscle mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
log.txt (text/plain, 4.1 KB)
00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug
00000898 debuglog.c:310:DebugLogSetCategory() Debug options: APDU
00000690 pcscdaemon.c:351:main() Force colored logs
00000793 utils.c:82:GetDaemonPid() Can't open /var/run/pcscd/pcscd.pid: No such file or directory
00000652 configfile.l:358:DBGetReaderList() Parsing conf file: /usr/local/etc/reader.conf.d
00000379 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready.
00014534 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/003/001
00001104 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/004/001
00003660 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/005/001
00000545 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/006/001
00000354 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/006/001
00000474 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0461, PID: 0x4E6F, path: /dev/bus/usb/006/002
00000437 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0461, PID: 0x4E6F, path: /dev/bus/usb/006/002
00000410 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/006/001
00000400 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x045E, PID: 0x00F6, path: /dev/bus/usb/006/003
00000488 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000578 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
30362421 winscard_msg_srv.c:251:ProcessEventsServer() Common channel packet arrival
00000059 winscard_msg_srv.c:263:ProcessEventsServer() ProcessCommonChannelRequest detects: 7
00000012 pcscdaemon.c:132:SVCServiceRunLoop() A new context thread creation is requested: 7
00000132 winscard_svc.c:337:ContextThread() Authorized PC/SC client
00000012 winscard_svc.c:341:ContextThread() Thread is started: dwClientID=7, threadContext @0x985c3b0
00000022 winscard_svc.c:359:ContextThread() Received command: CMD_VERSION from client 7
00000018 winscard_svc.c:371:ContextThread() Client is protocol version 4:3
00000011 winscard_svc.c:391:ContextThread() CMD_VERSION rv=0x0 for client 7
00000115 winscard_svc.c:359:ContextThread() Received command: ESTABLISH_CONTEXT from client 7
00000025 winscard.c:215:SCardEstablishContext() Establishing Context: 0x29AB42CC
00000012 winscard_svc.c:455:ContextThread() ESTABLISH_CONTEXT rv=0x0 for client 7
00000317 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 7
00000473 winscard_svc.c:359:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 7
00000102 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 7
00000053 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 7
00000040 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 7
00000696 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 7
00000051 winscard_svc.c:359:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 7
00000032 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 7
00002706 winscard_svc.c:778:ContextThread() Client die: 7
00000128 winscard.c:226:SCardReleaseContext() Releasing Context: 0x29AB42CC
00000014 winscard_svc.c:1013:MSGCleanupClient() Thread is stopping: dwClientID=7, threadContext @0x985c3b0
00000008 winscard_svc.c:1019:MSGCleanupClient() Freeing SCONTEXT @0x985c3b0
install-pcscd.sh (application/x-sh, 934 B)
#! /bin/sh

sudo apt-get -y install dh-autoreconf libudev-dev flex libusb-dev libusb-1.0-0-dev


wget https://alioth.debian.org/frs/download.php/file/4203/pcsc-lite-1.8.20.tar.bz2

tar xjvf pcsc-lite-*.tar.bz2
cd pcsc-lite-*
sed -i 's/PCSCLITE_MAX_READERS_CONTEXTS\t\t\t[0-9]\+/PCSCLITE_MAX_READERS_CONTEXTS\t\t\t128/' src/PCSC/pcsclite.h.in
#./bootstrap
./configure
make
sudo make install
cd ..


wget https://alioth.debian.org/frs/download.php/file/4205/ccid-1.4.26.tar.bz2

tar xjvf ccid-*.tar.bz2
cd ccid-*
sed -i 's/CCID_DRIVER_MAX_READERS [0-9]\+/CCID_DRIVER_MAX_READERS 128/' src/ccid_ifdhandler.h
#./bootstrap
./configure
make
sudo make install
sudo cp src/92_pcscd_ccid.rules /etc/udev/rules.d/
cd ..

wget http://ludovic.rousseau.free.fr/softwares/pcsc-tools/pcsc-tools-1.4.27.tar.gz
tar xzvf pcsc-tools-*.tar.gz
cd pcsc-tools-*
make
sudo make install



sudo service pcscd start
sleep 1
sudo service pcscd status
pcsc_scan