PCSC icon indicating copy to clipboard operation
PCSC copied to clipboard

LIBUSB_ERROR_NO_DEVICE after reader reset

Open martonbenedek opened this issue 1 year ago • 5 comments

Versions

pcsc v2.3.0 ccid v1.6.1

Platform

Linux Kernel v6.1.28 VIX TECHNOLOGY SECURE READER (USB)

Issue

We have been using pcsc and ccid for a long time and has been working well with Linux Kernel 5.4.31 We recently upgraded to Kernel 6.1.28, pcsc and ccid still working well, however there seems to be an issue when the reader is reset (or power cycled through a USB hub), pcsc will fail to re-detect the reader, logs showing libusb_open failed: LIBUSB_ERROR_NO_DEVICE. This requires a restart of pcscd, then reader is working again. Again, this issue seems only apparent in Linux Kernel 6.1.28, no issue in Kernel 5.4.31.

Log attached

taipan2_log_pcscd230_ccid161.txt

martonbenedek avatar Sep 03 '24 07:09 martonbenedek

What is the output of the command /usr/sbin/pcscd --version?

LudovicRousseau avatar Sep 03 '24 18:09 LudovicRousseau

I do not have the "VIX TECHNOLOGY SECURE READER" reader in the list of CCID device. Please follow https://ccid.apdu.fr/#CCID_compliant

LudovicRousseau avatar Sep 03 '24 19:09 LudovicRousseau

/usr/sbin/pcscd --version

pcsc-lite version 2.2.0 Copyright (C) 1999-2002 by David Corcoran [email protected]. Copyright (C) 2001-2024 by Ludovic Rousseau [email protected]. Copyright (C) 2003-2004 by Damien Sauveron [email protected]. Report bugs to [email protected]. Enabled features: Linux arm-ostl-linux-gnueabi usb libusb usbdropdir=/usr/lib/pcsc/drivers ipcdir=/run/pcscd filter configdir=/usr/etc/reader.conf.d MAX_READERNAME: 128, PCSCLITE_MAX_READERS_CONTEXTS: 16

We have added our reader (https://vixtechnology.com/products/devices) to the ccid package, see attached output of parse. output.log

ghost avatar Sep 05 '24 09:09 ghost

Try building pcsc-lite with libudev instead of libusb.

Another idea is to enable DEBUG_HOTPLUG in src/hotplug_libusb.c to get more logs.

LudovicRousseau avatar Sep 06 '24 20:09 LudovicRousseau

Any news?

LudovicRousseau avatar Oct 09 '24 20:10 LudovicRousseau

Our platform is busybox based, so no libudev, but we implemented a workaround to restart the pcsc daemon when the reader is re-detected on the USB bus.

ghost avatar Oct 24 '24 06:10 ghost

So problem fixed on your side. Closing

LudovicRousseau avatar Oct 24 '24 16:10 LudovicRousseau