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

Ludovic Rousseau ludovic.rousseau at gmail.com
Sat Nov 7 08:53:20 EST 2020


Hello,

Le ven. 6 nov. 2020 à 17:14, zeroconf <zeroconf at zeroconf.ee> a écrit :
>
> Hi!
> > According to the log, it seems that the read timeout in the "warm up"
> > sequence is too short. Extending the timeout to 1 second may solve the
> > issue.
>
> I guess this delay is somewhere inside the code? As I tried to increase
> pcscd service delay, didn't help. As I'm not a programmer, cannot do
> much more.

I used my AlcorMicro AU9520 USB board.

I have a similar issue during the init sequence.
00000033 [139864562644928] -> 000000 65 00 00 00 00 00 00 00 00 00
03000165 [139864562644928] ccid_usb.c:897:ReadUSB() read failed
(1/13): -7 LIBUSB_ERROR_TIMEOUT
00000011 [139864562644928] -> 000000 65 00 00 00 00 00 01 00 00 00
05000163 [139864562644928] ccid_usb.c:858:WriteUSB() write failed
(1/13): -7 LIBUSB_ERROR_TIMEOUT
00000034 [139864562644928] -> 000000 65 00 00 00 00 00 02 00 00 00
05000184 [139864562644928] ccid_usb.c:858:WriteUSB() write failed
(1/13): -7 LIBUSB_ERROR_TIMEOUT
00000038 [139864562644928]
ifdhandler.c:202:CreateChannelByNameOrChannel() failed

For the first command the read failed with a timeout after 3 seconds.
I think that should be enough for the reader to 'warm up".
The next commands fail on the write. The reader is mute.

I note that the reader/board works fine if I start pcscd first and
then I plug the USB board.

If I stop pcscd the 2 LEDs on the board go off after 2 seconds.
Then if I start pcscd again the reader is dead as above.

Since pcscd is stopped and started on demand (see "pcscd auto start
using systemd" https://ludovicrousseau.blogspot.com/2011/11/pcscd-auto-start-using-systemd.html)
I understand that this bug is blocking.

The problem is that the reader does not like being powered
off/suspended by the kernel.
And the CCID driver is configured to suspend the CCID interfaces.
See "libccid and USB selective suspend"
https://ludovicrousseau.blogspot.com/2011/04/libccid-and-usb-selective-suspend.html

I "fixed" the problem by disabling USB suspend for the AU9520 reader.
See https://salsa.debian.org/rousseau/CCID/-/commit/cd6c1e0268cdc7da4eb8992368a61f8a5e4cac2f

The problem should be fixed in the reader firmware. I will try to
contact AlcorMicro.

Bye

--
 Dr. Ludovic Rousseau



More information about the pcsclite-muscle mailing list