Expanded Reader Capacity in pcsc-lite and CCID Driver
The new versions of pcsc-lite and libccid have expanded the reader limit from 16 to 256, enhancing device connectivity and performance.
The latest updates to pcsc-lite and the CCID driver have lifted the previous restriction of 16 readers, allowing for greater flexibility and functionality. The new versions, pcsc-lite 2.5.0 and libccid 1.8.0, are now available for users who require enhanced capacity.
History
Since its inception in 2002, the pcsc-lite software has had a maximum limit of 16 readers, a constraint established by the PCSCLITE_MAX_READERS_CONTEXTS constant. This limitation extended to the CCID driver, which also supported only 16 devices. Such constraints posed challenges for users needing to connect multiple devices simultaneously. While it was technically feasible to modify the PCSCLITE_MAX_READERS_CONTEXTS value and rebuild both pcsc-lite and the driver, doing so often led to unintended complications, particularly in environments like Fedora and flatpak.
Changes
The demand for an increase in the maximum number of readers has been noted since at least 2018. Discussions and proposals regarding this enhancement can be found on platforms like Debian's salsa. Developers have calculated the potential RAM savings achievable by transitioning from a fixed-size array to a more efficient list structure. As a result, users can now utilize an increased number of readers, although a maximum of 256 readers is still in place due to the naming conventions employed by pcsc-lite, which designates readers from 00 to FF.
Backward Compatibility
In version 2.4.1 of pcsc-lite, backward compatibility was introduced, allowing different versions of the internal communication protocol between the PC/SC daemon (pcscd) and the PC/SC library (libpcsclite). To eliminate the reader limitation, the internal communication protocol has been updated once again. This new protocol aims to maintain compatibility, ensuring that older versions of libpcsclite can still interact with the latest pcscd, and vice versa. While applications may still recognize only up to 16 readers, they are expected to function correctly.
Conclusion
The recent updates to pcsc-lite and the CCID driver promise significant improvements for users, including:
- Reduced RAM consumption when using a single reader.
- The capability to connect more than 16 readers simultaneously.
These enhancements are set to benefit a wide range of applications that rely on card readers, making it easier for users to manage their devices efficiently.


