[Pcsclite-muscle] Multiple identical USB card readers

Ludovic Rousseau ludovic.rousseau at gmail.com
Thu Jun 5 12:57:16 PDT 2025


Le jeu. 5 juin 2025 à 16:41, it at mrtv.lt <it at mrtv.lt> a écrit :
>
> Hello,

Hello,

> thank you for your reply. As far as I understand, the proposed solutions
> allow to identify which reader is which after the system has booted.
> However, reader identification is not my goal. The aim is to make sure
> that the reader numbers do not swap, so that a reader inserted in the
> appropriate slot is always identified, e.g. as “Reader 0”. These readers
> do not have serial numbers. But they could be “bound” using other unique
> attributes visible in the udevadm info (I noticed that the USB
> controller number changes, but the USB port number stays the same, which
> allows to build a udev rule). However, I don't know how to link these
> attributes to the reader enumeration mechanism used by pcscd.

The hotplug mechanism uses libudev (by default).

The best I can propose is to provide a layer of indirection between a
stable name using the USB bus and port (retrieved using
SCARD_ATTR_CHANNEL_ID) and the PC/SC name.
For example "Reader 1 5" would be the reader connected on USB bus 1 and port 5.

Bye

--
 Dr. Ludovic Rousseau



More information about the pcsclite-muscle mailing list