pcsc-lite backward & forward compatible with itself
pcsc-lite 2.4.1 now provides a backward & forward compatible mechanism that supports both the current and previous internal communication protocols.
The communication protocol we are talking about here is the one between the client (libpcsclite) and the server (pcscd) sides. It is an internal-only protocol that is specific to pcsc-lite.
Protocol negotiation
To ensure that the client and server are using the same protocol, they
negotiate the procotol they know. If they are different, the server
will refuse the connection. In the application (client side), the
SCardEstablishContext()
function will return the error code SCARD_E_SERVICE_STOPPED.
Up to version 2.4.0, both the server and the client only supported one protocol version (version 4:5).
Sandboxes
Flatpack, Snap, AppImage and other sandbox technologies are now used to distribute applications.
In some/many cases, the server (pcscd daemon) running on the host comes from a different version of pcsc-lite than the client used in the sandbox. If the internal communication protocol differs, the communication is not possible.
I receive requests to solve this problem. See:
Protocol History
pcsc-lite version |
Release Date |
Protocol version |
Compatible with |
|---|---|---|---|
2.4.1 |
1 Jan 2026 |
4:5 |
4:4 & 4:5 |
2.4.0 |
19 Oct 2025 |
4:5 |
4:5 |
2.3.3 |
2 Apr 2025 |
||
2.3.2 |
26 Mar 2025 |
||
2.3.1 |
24 Dec 2024 |
||
2.3.0 |
3 Aug 2024 |
||
2.2.3 |
26 May 2024 |
4:4 |
4:4 |
... |
|||
1.8.24 |
12 Oct 2018 |
||
1.8.23 |
18 Dec 2017 |
4:3 |
4:3 |
... |
|||
1.8.9 |
16 Oct 2013 |
||
1.8.8 |
16 Jan 2012 |
4:2 |
4:2 |
... |
|||
1.6.5 |
12 Oct 2010 |
New protocol negotiation
From pcsc-lite 2.4.1 onwards, the protocol negotiation is smarter.
The daemon side will accept the current version and also the previous
one. Versions 4:5 and 4:4 are accepted. It is straightforward, as the
only change with version 4:5 is the addition of a new command
(command CMD_GET_READER_EVENTS introduced in commit
53f57ed700bcd0bc47d970dc674ba3fd5ee5b387).
Old clients will simply not use the new command.
The client side will also accept the current version and the previous
one. These are versions 4:5 and 4:4. Using a recent client (protocol 4:5)
with an old server (protocol 4:4) will have a small side effect. The
SCardGetStatusChange() function will not include the number of
reader events (see
Improved SCardGetStatusChange() for "\\?PnP?\Notification" special reader).
Applications using pcsc-lite 2.4.1 can use a daemon as old as pcsc-lite version 1.8.24, released in October 2018.
A pcscd daemon from pcsc-lite 2.4.1 can handle clients as old as the same pcsc-lite version 1.8.24 from October 2018.
Supporting the (older) protocol version 4:3 may be possible but would require more efforts and be more complex. Contact me if you require this.
Conclusion
This change should help mix PC/SC servers and clients from more different versions.
This should prevent people from using ugly hacks.





