Subsections


IFD_GENERATE_HOTPLUG

This capability allows pcscd to avoid continuously scanning the USB bus for new readers supported by the driver. The driver has two obligations:

Reader connection

When a reader supported by the driver is connected the driver infrastructure shall call pcscd -hotplug to signal it to pcscd.

On recent GNU/Linux systems you can use a udev rule file to do that. For example create a file /etc/udev/rules.d/pcscd_ccid.rules containing something like:

# udev rules for pcscd and CCID readers

# generic CCID device
BUS=="usb", SYSFS{bInterfaceClass}=="0b", ACTION=="add", RUN+="/usr/sbin/pcscd --hotplug"

Reader disconnection

Pcscd will not detect the reader is gone unless the driver tells it so. When the driver detects the reader is no more there (by getting an ENODEV (No such device) error for example) it shall return the error code IFD_NO_SUCH_DEVICE to pcscd.

If the driver fails to return IFD_NO_SUCH_DEVICE then pcscd will continue trying to contact the reader and will fail endlessly. This will generate a lot of errors.

Ludovic Rousseau 2008-01-18