pcscd8
Pc/sc smart card daemon
Usage
pcscd [-acfTdeCvHSI]
[--apdu]
[--config
dir]
[--foreground]
[--color]
[--debug]
[--info]
[--error]
[--critical]
[--force-reader-polling]
[-t
number]
[--max-thread
number]
[-s
number]
[--max-card-handle-per-thread
number]
[-r
number]
[--max-card-handle-per-reader
number]
[--version]
[--hotplug]
[--reader-name-no-serial]
[--reader-name-no-interface]
[--disable-polkit]
pcscd -h
pcscd --help
Options
-
-a, --apdu -
log APDUs and SW using the debug method (see
--debug).
-
-c, --config dir -
Specifies the directory dir as an alternate location for /etc/reader.conf.d/. The argument can also be a single configuration file (for backward compatibility).
-
-f, --foreground -
Runs pcscd in the foreground and sends log messages to stderr instead of syslog(3).
-
-T, --color -
force use of colored logs.
-
-d, --debug -
use the lowest log level. Any log message of this level or above will be sent to stderr or syslog(3) depending on the use of
--foreground.
-
--info -
use info log level. This is the default log level.
-
-e, --error -
use error log level.
-
-C, --critical -
use critical log level.
The log levels are ordered as: debug < info < error < critical. Use a log level l will log this level and all the levels above it.
-
--force-reader-polling -
ignore the IFD_GENERATE_HOTPLUG reader capability
-
-t, --max-thread number -
maximum number of threads (default 200).
This is the maximum number of clients (SCardEstablishContext) that pcscd can handle.
-
-s, --max-card-handle-per-thread number -
maximum number of card handle per thread (default: 200).
This is the maximum number of card handle (SCardConnect) per client (SCardEstablishContext).
-
-r, --max-card-handle-per-reader number -
maximum number of card handle per reader (default: 200)
This is the maximum number of card handle (SCardConnect) per reader.
-
-h, --help -
Displays information about the pcscd command line
-
-v, --version -
Displays the program version number
-
-H, --hotplug -
Ask pcscd to re-read the /etc/reader.conf.d/my_reader.conf files to detect added or removed non-USB readers (serial or PCMCIA).
-
-x, --auto-exit -
pcscd will quit after 60 seconds of inactivity after the release of the last PC/SC context. This is used when pcscd is started on demand by systemd.
-
-S, --reader-name-no-serial -
Do not include the USB serial number in the reader name.
-
-I, --reader-name-no-interface -
Do not include the USB interface name in the reader name.
-
--disable-polkit -
Ignore polkit rules. All accesses are allowed.
Overview
pcscd is the daemon program for pcsc-lite. It is a resource manager that coordinates communications with smart card readers and smart cards and cryptographic tokens that are connected to the system.
It allows applications to access smart cards and readers using the WinSCard API but without knowing details of the card or reader.
pcscd coordinates the loading of drivers for card readers.
Serial smart card reader drivers
Smart card reader drivers are placed in the /usr/lib/pcsc/drivers directory. Each driver is simply an .so file. pcscd locates the driver using the /etc/reader.conf.d/my_reader.conf files. See the reader.conf(5) manual page for more information.
Some drivers are available at https://muscle.apdu.fr/musclecard.com/drivers.html.
Usb smart card reader drivers
USB smart card reader drivers are located in /usr/lib/pcsc/drivers directory as a bundle. You shall NOT add a USB driver in a /etc/reader.conf.d/my_reader.conf file.
Configuration file
It is possible to set arguments that will be used by pcscd with the configuration file /etc/default/pcscd For example you can increase the debug level using:
PCSCD_ARGS=--debug
Or set environment variables like:
PCSCLITE_FILTER_IGNORE_READER_NAMES="Twin" PCSCLITE_FILTER_EXTEND_READER_NAMES=" $HOSTNAME"
See ⟨https://blog.apdu.fr/posts/2021/08/pcsc-lite-configuration-using/⟩ for more details.
Udev usb reader filtering (linux only)
If udev support is enabled, setting the udev property PCSCLITE_IGNORE=1 on a USB device will cause that reader to be ignored. For example to ignore any reader attached to USB port 3 of bus 1, add the following to a foobar.rules file in the /etc/udev/rules.d/ directory:
ACTION!="remove|unbind", SUBSYSTEM=="usb", KERNEL=="1-3", ENV{PCSCLITE_IGNORE}="1"
Files
/etc/default/pcscd : daemon configuration file
/etc/reader.conf.d/* : Serial reader configuration files
/run/pcscd/pcscd.pid : process id of the running pcscd
/usr/lib/pcsc/drivers/ : directory containing bundles for USB drivers
Releases
12 releases since Debian 3.1 (Sarge); the text changed 11 times.
--auto-exit since Debian 8 (Jessie);
--color since Debian 8 (Jessie);
--critical since Debian 4.0 (Etch);
--disable-polkit since Debian 13 (Trixie);
--error since Debian 4.0 (Etch);
--force-reader-polling since Debian 8 (Jessie);
--hotplug since Debian 5.0 (Lenny);
--info since Debian 4.0 (Etch);
--max-card-handle-per-reader since Debian 8 (Jessie);
--max-card-handle-per-thread since Debian 8 (Jessie);
--max-thread since Debian 8 (Jessie);
--reader-name-no-interface since Debian 8 (Jessie);
--reader-name-no-serial since Debian 8 (Jessie);
-C since Debian 8 (Jessie);
-H since Debian 5.0 (Lenny);
-I since Debian 8 (Jessie);
-S since Debian 8 (Jessie);
-T since Debian 8 (Jessie);
-e since Debian 8 (Jessie);
-r since Debian 8 (Jessie);
-s since Debian 8 (Jessie);
-t since Debian 8 (Jessie);
-x since Debian 8 (Jessie).