[Pcsclite-muscle] index in PC/SC lite reader names may change
Greg Troxel
gdt at lexort.com
Mon May 11 10:42:17 PDT 2026
Ludovic Rousseau <ludovic.rousseau at gmail.com> writes:
> I am working on a potential change to pcsc-lite and I would like to
> get your feedback on it.
> What do you think about making the number in the reader name cycle
> instead of always restarting at 0?
>
> Currently, the PC/SC reader names are something like this (for 2
> connected readers):
> "reader A 00 00"
> "reader B 01 00"
>
> The first number is the reader "index".
> The second number is the slot index (for mutti-slot readers)
> See "What is in a PC/SC reader name?"
> https://blog.apdu.fr/posts/2010/05/what-is-in-pcsc-reader-name/ for
> more details.
>
> If "reader A" is unplugged and plugged in again, it will be named
> "reader A 00 00" again.
>
> My proposal is to name the reader "reader A 02 00" instead (or
> whatever the next available number is).
> After 99 readers have been plugged in, we go back to number 00 (if available).
What problem is this solving? While I can see your point that no one
should rely on reader names, sort of, I don't see how making them
deliberately different is helpful.
Are you trying to break usage that you see as unsound?
> The number in the reader name should NOT be interpreted by the
> application. Therefore, the proposed change should not break existing
> code.
> However, I know that developers can be very creative when using APIs
> and undocumented behaviours :-)
>
> Do you foresee any problems with my proposal?
> Any comments?
Yes, I see things that are being done not quite right breaking, and no
benefit, other than breaking things that are unsound to maybe fix them,
with the downside of people deciding to stay on old pcsc-lite to avoid
this.
More information about the pcsclite-muscle
mailing list