READER.CONF(5)

✨ NAME ✨

reader.conf β€” the configuration file for pcscd readers' drivers. This is the READER.CONF(5) manual page from PC/SC Lite, and it's literally your little guide to reader config, bestie. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

The /etc/reader.conf.d/* files contain configuration information for serial and (some) PCMCIA smart card readers. That's the vibe. πŸŽ€

🚨 USB readers SHALL NOT be configured using these files. No cap. pcscd uses another mechanism to automatically load USB drivers, so don't try to sneak a USB reader in here, okay? πŸ’…

πŸŽ€ SYNTAX πŸŽ€

The /etc/reader.conf.d/* files are regular text file. Each reader must be defined by four fields:

FRIENDLYNAME     TEXT_STRING
DEVICENAME       FILENAME
LIBPATH          FILENAME
CHANNELID        NUMBER
  • FRIENDLYNAME β€” arbitrary text used to identify the reader. This text is displayed by commands like pcsc_scan(1) that prints the names of all the connected and detected readers. It's giving "name tag but make it smart card." 🫢
  • DEVICENAME β€” this field was not used for old drivers (using the IFD handler version 2.0 or earlier). It is now (IFD handler version 3.0) used to identify the physical port on which the reader is connected. This is the device name of this port. It is dependent of the OS kernel. The first serial port device is called /dev/ttyS0 under Linux and /dev/cuaa0 under FreeBSD. Lowkey OS-specific, so check your kernel vibe. 🌈
  • LIBPATH β€” the filename of the driver code. The driver is a dynamically loaded piece of code (generally a drivername.so.* file). It's the actual driver glow-up. ✨
  • CHANNELID β€” no more used for recent drivers (IFD handler 3.0) and has been superseded by DEVICENAME. If you have an old driver this field is used to indicate the port to use. You should read your driver documentation to know what information is needed here. It should be the serial port number for a serial reader. Old-school but iconic. πŸ‘‘

🌸 EXAMPLE 🌸

Here's the example, looking all cute with serial communication:

# Gemplus GemPCTwin reader with serial communication
# connected to the first serial port
FRIENDLYNAME      "GemPCTwin serial"
DEVICENAME        /dev/ttyS0
LIBPATH           /usr/lib64/pcsc/drivers/serial/libccidtwin.so.0.4.1
CHANNELID         1

πŸ”₯ DEBUGGING πŸ”₯

In order to set up your /etc/reader.conf.d/my_reader.conf file correctly you may want to have debug messages from pcscd. I recommend you to start pscsd in the foreground and debug mode using:

# pcscd --foreground --debug

If everything seems OK you can use the pcsc_scan command to print the list of correctly detected readers and try to get the ATR of your smart cards. That's the main character energy we want. πŸ’€βœ¨

πŸ‘‘ AUTHOR πŸ‘‘

Ludovic Rousseau <ludovic.rousseau@free.fr> β€” an icon, a legend, the moment. 🫢

πŸ’œ SEE ALSO πŸ’œ

Go read these too, bestie: pcscd(8), pcsc_scan(1). Iykyk. πŸ¦‹


πŸŽ€ Cute sign-off: this page is from PC/SC Lite, with source/version Muscle, dated December 2021, and the manual name is READER.CONF(5). Now go slay those serial reader configs! πŸ’…βœ¨ Periodt.
πŸ“¦ where this page comes from