PCSCD(8)
๐ PCSCD(8) โ the PC/SC Smart Card Daemon, bestie! ๐
Okay so listen up bestie, because this is pcscd โ literally the PC/SC Smart Card Daemon from the PC/SC Lite universe, and it's about to be your new fave. No cap, this page is giving full main character energy for your smart card setup. ๐โจ
โจ SYNOPSIS โจ
Like, here's how you summon it:
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 ๐ธ
Every single flag, accounted for. Periodt. ๐
-a,--apduโ logs APDUs and SW using the debug method (peep--debugfor that one). It's giving "I want to see everything" energy. ๐-c,--config dirโ tells pcscd to use the directory dir as an alternate location for/etc/reader.conf.d/. The argument can also be a single configuration file (for backward compatibility, because we respect the old ways ๐ซถ).-f,--foregroundโ runs pcscd in the foreground and sends log messages tostderrinstead ofsyslog(3). Lowkey perfect for when you want all the tea right in front of you. โ-T,--colorโ forces use of colored logs. Because obviously we need aesthetics in our terminal. ๐-d,--debugโ uses the lowest log level. Any log message of this level or above gets sent tostderrorsyslog(3), depending on whether you used--foreground. Maximum detail, maximum vibes. ๐--infoโ uses info log level. This is the default log level, so it's the "I'm just chilling" setting. โจ-e,--errorโ uses error log level. Only the dramatic stuff gets logged. ๐ญ-C,--criticalโ uses critical log level. Like, emergencies only, bestie. ๐
The log levels are ordered like this: debug < info < error < critical. Use a log level l and it will log this level plus all the levels above it. So basically it's a "from here upward" situation. ๐
--force-reader-pollingโ ignores theIFD_GENERATE_HOTPLUGreader capability. It's giving "I'll do it myself" energy. ๐-t,--max-thread numberโ maximum number of threads (default200). This is the maximum number of clients (SCardEstablishContext) that pcscd can handle. So like, 200 besties can connect at once. ๐ซถ-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). One client can have up to 200 card connections. Slay. ๐ณ-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. Each reader gets its own 200-handle allowance. Iconic. ๐-h,--helpโ displays information about the pcscd command line. The classic "help me help you" moment. ๐-v,--versionโ displays the program version number. Gotta know what era of pcscd you're in. ๐ฐ๏ธ-H,--hotplugโ asks pcscd to re-read the/etc/reader.conf.d/my_reader.conffiles to detect added or removed non-USB readers (serial or PCMCIA). Like a vibe check for your hardware. ๐-x,--auto-exitโ pcscd will quit after60 secondsof inactivity after the release of the last PC/SC context. This is used when pcscd is started on demand by systemd. It's the "okay bye, see you when you need me" setting. ๐-S,--reader-name-no-serialโ do not include the USB serial number in the reader name. Minimalist era. โจ-I,--reader-name-no-interfaceโ do not include the USB interface name in the reader name. Also minimalist. ๐--disable-polkitโ ignores polkit rules. All accesses are allowed. It's giving "no rules, just vibes" โ but like, be careful bestie, this is a security thing. ๐จ
๐ฆ DESCRIPTION ๐ฆ
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. Basically it's the ultimate middleman, and it's doing the most so your apps don't have to. ๐
It allows applications to access smart cards and readers using the WinSCard API, but without knowing details of the card or reader. So your apps get to stay clueless and happy. ๐
pcscd coordinates the loading of drivers for card readers. It's the driver-wrangler. The reader-whisperer. The card-coordinator. ๐
๐ SERIAL SMART CARD READER DRIVERS ๐
Smart card reader drivers are placed in the /usr/lib64/pcsc/drivers directory. Each driver is simply an .so file. pcscd locates the driver using the /etc/reader.conf.d/my_reader.conf files. Peep the reader.conf(5) manual page for more information. ๐
Some drivers are available at https://muscle.apdu.fr/musclecard.com/drivers.html. Like, go get 'em bestie. ๐
โญ USB SMART CARD READER DRIVERS โญ
USB smart card reader drivers are located in /usr/lib64/pcsc/drivers directory as a bundle.
โ ๏ธ You shall NOT add a USB driver in a /etc/reader.conf.d/my_reader.conf file. That's a big no-no, bestie. Don't do it. ๐
โโ๏ธ
๐ 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. It's like the deep-dive blog post, iykyk. ๐
๐ฅ 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"
Basically, you're telling udev to just not see that reader. Ghosted. ๐ป
๐ FILES ๐
/etc/default/pcscd: daemon configuration file. The config bestie. ๐/etc/reader.conf.d/*: Serial reader configuration files. All the serial reader tea. โ/run/pcscd/pcscd.pid: process id of the running pcscd. Where the pid lives. ๐ข/usr/lib64/pcsc/drivers/: directory containing bundles for USB drivers. The driver hangout spot. ๐
๐ซถ SEE ALSO ๐ซถ
reader.conf(5), syslog(3), udev(7). Go read these too, bestie. They're part of the lore. ๐
๐ AUTHORS ๐
David Corcoran <corcoran@musclecard.com> and Ludovic Rousseau <ludovic.rousseau@free.fr>. The legends who made this happen. Respect. ๐
This page is a Muscle production, dropped December 2021, and it's literally the PCSCD(8) manual, bestie. You're welcome. โจ๐
๐ฆ
๐ฆ where this page comes from
- fedora 43: pcsc-lite 2.3.3-2.fc43 ยท BSD-3-Clause AND BSD-2-Clause AND GPL-3.0-or-later
- fedora 44: pcsc-lite 2.4.1-2.fc44 ยท BSD-3-Clause AND BSD-2-Clause AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms