[Pcsclite-muscle] Alcor Micro AU9520 not recognized by libccid 1.4.31

zeroconf zeroconf at zeroconf.ee
Thu Nov 5 09:44:09 EST 2020


Hello!

> > I include longer log - hopefully it gives more information.
> Yes. It now contains what I was expecting.

Good!

> Maybe a delay is needed for the reader to boot or something like that.

Created a delay for pcscd service:
nano /lib/systemd/system/pcscd.timer #same folder, where pcscd.service
is located
[Unit]
Description=Delay for Alcor Micro AU9520

[Timer]
OnBootSec=1min #hopefully is enough

[Install]
WantedBy=timers.target

systemctl disable pcscd.service # disabling pcscd
systemctl status pcscd.service #checking status

systemctl enable pcscd.timer #enabling timer
systemctl start pcscd.timer #starting timer

After 1 min I see:

# systemctl status pcscd.service
● pcscd.service - PC/SC Smart Card Daemon
     Loaded: loaded (/lib/systemd/system/pcscd.service; indirect;
vendor preset: enabled)
     Active: active (running) since Thu 2020-11-05 16:28:44 EET; 48s ago
TriggeredBy: ● pcscd.timer
             ● pcscd.socket
       Docs: man:pcscd(8)
   Main PID: 10951 (pcscd)
      Tasks: 3 (limit: 18729)
     Memory: 1.0M
     CGroup: /system.slice/pcscd.service
             └─10951 /usr/sbin/pcscd --foreground --auto-exit

nov   05 16:28:44 MS-7596 systemd[1]: Started PC/SC Smart Card Daemon.
nov   05 16:28:50 MS-7596 pcscd[10951]: 00000000
ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
nov   05 16:28:55 MS-7596 pcscd[10951]: 05000765
ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
nov   05 16:29:00 MS-7596 pcscd[10951]: 05000801
ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
nov   05 16:29:00 MS-7596 pcscd[10951]: 00000065
ifdhandler.c:194:CreateChannelByNameOrChannel() failed
nov   05 16:29:00 MS-7596 pcscd[10951]: 00000502
readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed
(usb:058f/9520:libudev:0:/dev/bus/usb/005/002)
nov   05 16:29:00 MS-7596 pcscd[10951]: 00000030
readerfactory.c:376:RFAddReader() Alcor Micro AU9520 init failed.
nov   05 16:29:00 MS-7596 pcscd[10951]: 00000133
hotplug_libudev.c:526:HPAddDevice() Failed adding USB device: Alcor
Micro AU9520

I guess even I restart PC, the card reader won't work either:
$ opensc-tool --list-readers
No smart card readers found.

... as we see bunch of errors in log.

> Install the package libpcsclite-dev and try again.

Well, installed and even libusb-dev but still:
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libpcsclite >= 1.8.3... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ifdhandler.h usability... yes
checking ifdhandler.h presence... yes
checking for ifdhandler.h... yes
checking reader.h usability... yes
checking reader.h presence... yes
checking for reader.h... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to
x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for select... yes
checking for strerror... yes
checking for strncpy... yes
checking for memcpy... yes
checking for strlcpy... no
checking for strlcat... no
checking libusb.h usability... no
checking libusb.h presence... no
checking for libusb.h... no
configure: error: libusb.h not found, install libusb or use
./configure LIBUSB_CFLAGS=...

It would be good to add https://ccid.apdu.fr/#CCID_compliant dev
package names, that are needed to be installed BEFORE running
./configure - then it would be easier. Currently there is needed to
run every time ./configure to get information, what package is yet
missing. But currently I even have libusb-dev library:
$ dpkg -l | grep -i libusb
ii  libgusb2:amd64                             0.3.4-0.1
            amd64        GLib wrapper around libusb1
ii  libusb-0.1-4:amd64                         2:0.1.12-32
            amd64        userspace USB programming library
ii  libusb-1.0-0:amd64                         2:1.0.23-2build1
            amd64        userspace USB programming library
ii  libusb-dev                                 2:0.1.12-32
            amd64        userspace USB programming library development
files
ii  libusbmuxd6:amd64                          2.0.1-2
            amd64        USB multiplexor daemon for iPhone and iPod
Touch devices - library

...but still something is missing...

> But we are progressing.

Yes, that's good. Soon that PC goes away from me as people need to
work. Still I will have remote access, also via CLI. I need
temporarily borrow other external USB card reader (Omnikey Cardman
1021) in order to use ID-card.
----
Thank you!



More information about the pcsclite-muscle mailing list