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

zeroconf zeroconf at zeroconf.ee
Thu Nov 5 09:00:22 EST 2020


Hello!

I uploaded log files here - http://u.pc.cd/YtEctalK - as here seems to
be email size limit 40 KiB.

I installed also Ubuntu 20.10 Groovy package of libccid:
$ dpkg -l|grep -i ccid
ii  libccid                                    1.4.33-1
            amd64        PC/SC driver for USB CCID smart card readers

Created also one additional log with libccid 1.4.33 and pcscd 1.9.0 installed.

.... still not working the card reader:
$ opensc-tool --list-readers
No smart card readers found.

... which is pretty obvious:
$ journalctl -u pcscd
nov   04 16:24:54 MS-7596 systemd[1]: Started PC/SC Smart Card Daemon.
nov   04 16:24:59 MS-7596 pcscd[66362]: 00000000
ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
nov   04 16:25:04 MS-7596 pcscd[66362]: 05001596
ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
nov   04 16:25:09 MS-7596 pcscd[66362]: 05000685
ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
nov   04 16:25:09 MS-7596 pcscd[66362]: 00000072
ifdhandler.c:194:CreateChannelByNameOrChannel() failed
nov   04 16:25:09 MS-7596 pcscd[66362]: 00000498
readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed
(usb:058f/9520:libudev:0:/dev/bus/usb/005/002)
nov   04 16:25:09 MS-7596 pcscd[66362]: 00000036
readerfactory.c:376:RFAddReader() Alcor Micro AU9520 init failed.
nov   04 16:25:09 MS-7596 pcscd[66362]: 00000192
hotplug_libudev.c:526:HPAddDevice() Failed adding USB device: Alcor
Micro AU9520
----
Thank you!

On Thu, Nov 5, 2020 at 2:54 PM zeroconf <zeroconf at zeroconf.ee> wrote:
>
> Hewllo!
>
> > Why do you want to downgrade libccid?
> > Previous versions of the CCID driver worked but the new versions do not work?
>
> That's true. My former experience: version 1.4.2-2 of libccid worked
> with that card reader. This was up to Ubuntu 18.04 and its based
> distros, like Lubuntu 18.04, etc. Couldn't get that old version
> anymore and all versions, I could get, didn't work.
>
> > From your log:
> > 00000071 [139947022333888] -> 000000 65 00 00 00 00 00 00 00 00 00
> > 05001021 [139947022333888] ccid_usb.c:857:WriteUSB() write failed
> > (5/2): -7 LIBUSB_ERROR_TIMEOUT
> > 00000059 [139947022333888] -> 000000 65 00 00 00 00 00 01 00 00 00
>
> I have to admit, that I'm not developer and not familiar with that
> part, although I can read source and doing some scripting myself.
>
> > The reader does not respond to a PC_to_RDR_GetSlotStatus command.
> > Your log is not complete. I do not see the response to the next
> > PC_to_RDR_GetSlotStatus command.
>
> I include longer log - hopefully it gives more information. I
> experienced strange thing - booted computer up from scratch, started
> pcscd in debug mode, as you guided and voila - card reader worked!
> This is reflected in appropriate log*.txt included with current email.
> Certainly that debug mode required, that I stop the service in first
> place.
>
> After I stopped debug mode and started pcscd via systemd, still
> DigiDoc software told me, that pcscd service is not working.
>
> Then I did log2... but card reader was not recognized anymore.
>
> > Can you also post the output.txt as documented in
> > https://ccid.apdu.fr/#CCID_compliant ?
>
> Well, trying to do that did not succeed with following  reason:
>
> 1.4.33, /32, /31, /30, /29
> $ ./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
> configure: WARNING: libpcsclite not found by pkg-config
> 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... no
> checking ifdhandler.h presence... no
> checking for ifdhandler.h... no
> configure: error: install pcsc-lite 1.8.3 or later, or use ./configure
> PCSC_CFLAGS=...
>
> Then I searched:
> https://packages.ubuntu.com/search?suite=all&section=all&arch=any&keywords=libpcsclite&searchon=names
> https://packages.ubuntu.com/search?suite=all&section=all&arch=any&keywords=pcscd&searchon=names
> ... and got v1.9.0 these packages: libpcsclite, pcscd from higher
> version of Ubuntu 20.10 (Groovy Gorilla).
>
> Checked dependencies manually, all were satisfied, installed fine, but
> still couldn't compile ccid driver from source - still complained,
> that configure: error: install pcsc-lite 1.8.3 or later, or use
> ./configure PCSC_CFLAGS=...
>
> ... which flags to use - have no idea...
>
> But then I discovered, that card reader is working:
> $ opensc-tool --list-readers
> # Detected readers (pcsc)
> Nr.  Card  Features  Name
> 0    Yes             Alcor Micro AU9520 00 00
>
> However, this joy was short as shortly after writing current email,
> the card reader stopped working:
> $ opensc-tool --list-readers
> No smart card readers found.
> ... also DigiDoc software obviously didn't recognize the card reader.
>
> DigiDoc software can be taken at
> https://www.id.ee/en/article/operating-systems-supported-by-id-software/
> by choosing Ubuntu section. Direct link for automatic installation
> script https://installer.id.ee/media/install-scripts/install-open-eid.sh
> - this should be run as regular user with sudo permissions:
> bash install-open-eid.sh
>
> I did again debug mode log with pcscd v1.9.0 - the name is mentioned
> in log file name.
>
> Here are packages BEFORE updating pscs
> $ dpkg -l|grep -i pcsc
> ii  libpcsc-perl                               1.4.14-4build2
>             amd64        Perl interface to the PC/SC smart card
> library
> ii  libpcsclite1:amd64                         1.8.26-3
>             amd64        Middleware to access a smart card using PC/SC
> (library)
> ii  pcsc-tools                                 1.5.5-1
>             amd64        Some tools to use with smart cards and PC/SC
> ii  pcscd                                      1.8.26-3
>             amd64        Middleware to access a smart card using PC/SC
> (daemon side)
>
> ... and after updating:
> $ dpkg -l|grep -i pcsc
> ii  libpcsc-perl                               1.4.14-4build2
>             amd64        Perl interface to the PC/SC smart card
> library
> ii  libpcsclite1:amd64                         1.9.0-1
>             amd64        Middleware to access a smart card using PC/SC
> (library)
> ii  pcsc-tools                                 1.5.5-1
>             amd64        Some tools to use with smart cards and PC/SC
> ii  pcscd                                      1.9.0-1
>             amd64        Middleware to access a smart card using PC/SC
> (daemon side)
>
> Still even with pcscd 1.9.0 by restarting it:
> $ sudo systemctl restart pcscd.service
> ... the DigiDoc software still says, that pcscd is not working...
>
> ● 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 14:50:28 EET; 1min 3s ago
> TriggeredBy: ● pcscd.socket
>        Docs: man:pcscd(8)
>    Main PID: 15900 (pcscd)
>       Tasks: 3 (limit: 18729)
>      Memory: 1.0M
>      CGroup: /system.slice/pcscd.service
>              └─15900 /usr/sbin/pcscd --foreground --auto-exit
>
> nov   05 14:50:28 MS-7596 systemd[1]: pcscd.service: Succeeded.
> nov   05 14:50:28 MS-7596 systemd[1]: Stopped PC/SC Smart Card Daemon.
> nov   05 14:50:28 MS-7596 systemd[1]: Started PC/SC Smart Card Daemon.
> nov   05 14:50:33 MS-7596 pcscd[15900]: 00000000
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   05 14:50:38 MS-7596 pcscd[15900]: 05000724
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   05 14:50:43 MS-7596 pcscd[15900]: 05000730
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   05 14:50:43 MS-7596 pcscd[15900]: 00000101
> ifdhandler.c:194:CreateChannelByNameOrChannel() failed
> nov   05 14:50:43 MS-7596 pcscd[15900]: 00000535
> readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed
> (usb:058f/9520:libu>
> nov   05 14:50:43 MS-7596 pcscd[15900]: 00000017
> readerfactory.c:376:RFAddReader() Alcor Micro AU9520 init failed.
> nov   05 14:50:43 MS-7596 pcscd[15900]: 00000085
> hotplug_libudev.c:526:HPAddDevice() Failed adding USB device: Alcor
> Micro AU9520
>
> $ journalctl -u pcscd
> -- Logs begin at Mon 2020-11-02 16:32:08 EET, end at Thu 2020-11-05
> 14:52:35 EET. --
> nov   04 11:43:07 MS-7596 systemd[1]: Started PC/SC Smart Card Daemon.
> nov   04 11:43:10 MS-7596 pcscd[49114]: 00000000
> ccid_usb.c:896:ReadUSB() read failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 11:43:15 MS-7596 pcscd[49114]: 05000916
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 11:43:20 MS-7596 pcscd[49114]: 05001121
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 11:43:20 MS-7596 pcscd[49114]: 00000068
> ifdhandler.c:194:CreateChannelByNameOrChannel() failed
> nov   04 11:43:20 MS-7596 pcscd[49114]: 00000519
> readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed
> (usb:058f/9520:libu>
> nov   04 11:43:20 MS-7596 pcscd[49114]: 00000037
> readerfactory.c:376:RFAddReader() Alcor Micro AU9520 init failed.
> nov   04 11:43:20 MS-7596 pcscd[49114]: 00000207
> hotplug_libudev.c:526:HPAddDevice() Failed adding USB device: Alcor
> Micro AU9520
> nov   04 11:47:16 MS-7596 systemd[1]: pcscd.service: Succeeded.
> nov   04 13:53:46 MS-7596 systemd[1]: Started PC/SC Smart Card Daemon.
> nov   04 13:53:51 MS-7596 pcscd[53484]: 00000000
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 13:53:56 MS-7596 pcscd[53484]: 05001166
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 13:54:01 MS-7596 pcscd[53484]: 05000757
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 13:54:01 MS-7596 pcscd[53484]: 00000085
> ifdhandler.c:194:CreateChannelByNameOrChannel() failed
> nov   04 13:54:01 MS-7596 pcscd[53484]: 00000461
> readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed
> (usb:058f/9520:libu>
> nov   04 13:54:01 MS-7596 pcscd[53484]: 00000031
> readerfactory.c:376:RFAddReader() Alcor Micro AU9520 init failed.
> nov   04 13:54:01 MS-7596 pcscd[53484]: 00000101
> hotplug_libudev.c:526:HPAddDevice() Failed adding USB device: Alcor
> Micro AU9520
> nov   04 15:17:22 MS-7596 systemd[1]: pcscd.service: Succeeded.
> nov   04 15:31:16 MS-7596 systemd[1]: Started PC/SC Smart Card Daemon.
> nov   04 15:31:21 MS-7596 pcscd[58001]: 00000000
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 15:31:26 MS-7596 pcscd[58001]: 05001597
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 15:31:31 MS-7596 pcscd[58001]: 05000548
> ccid_usb.c:857:WriteUSB() write failed (5/2): -7 LIBUSB_ERROR_TIMEOUT
> nov   04 15:31:31 MS-7596 pcscd[58001]: 00000097
> ifdhandler.c:194:CreateChannelByNameOrChannel() failed
> nov   04 15:31:31 MS-7596 pcscd[58001]: 00000515
> readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed
> (usb:058f/9520:libu>
> nov   04 15:31:31 MS-7596 pcscd[58001]: 00000039
> readerfactory.c:376:RFAddReader() Alcor Micro AU9520 init failed.
>
> So, as init failed, obviously card reader is not working :(
> As you see, I restarted pscsd several times with hope, that card
> reader will start working.
>
> So, I'm stuck again...
> ----
> Thank you!



More information about the pcsclite-muscle mailing list