PC/SC is short for “Personal Computers/Smart Card “. It’s a specification to facilitate integration of smart cards into computer environments. PC/SC Readers has a good support on Windows, as Microsoft lead a good reference implementation built on it. Linux and Mac need to use the open source pcsc-lite package.
MUTEK PC/SC readers are compliant with standards PC/SC and CCID. And thanks to PCSC-Lite CCID driver, these products are usable on non-Windows operating systems like Linux/Unix/Mac OS X.
This guide is about the testing and deployment of MUTEK PC/SC readers on Linux. This guide is done on a Raspberry Pi Raspbian release with a PT3901 PC/SC reader and will be similar for other PC/SC Readers and Linux releases.
- Install PC/SC-Lite and PCSC Tools on Raspberry Pi(Raspbian).
sudo apt-get install libusb-dev libusb++Optional
sudo apt-get install libccid
sudo apt-get install pcscd
sudo apt-get install libpcsclite1
sudo apt-get install libpcsclite-dev
sudo apt-get install libpcsc-perl
sudo apt-get install pcsc-tools
sudo apt-get update
- Update PC/SC Info.plist (Important!)
- PCSC-Lite Info.plist file stores all verified PC/SC readers.
- Readers from MUTEK or small vendors is not included in Info.plist, so vid/pid and reader description should be appended manually. This is the most ignoble
- Firstly plug the reader to the USB port and:
- lsusb to list all connected usb devices. MUTEK readers usually starts with 4143(vid) with a PID name(3901, 3500 etc.).
- sudo find / -name Info.plist to find out the location of the Info.plist, which may be as /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist. File position may vary for different Linux/Unix releases.
- Edit the Info.plist and add the vid/pid/description under the respected key arrays, structure as in quoted text.
<key>ifdVendorID</key>Info.plist with respective elements added to the end of each array. ifdVendorID and ifdProductID must follow the reader information from lsusb. ifdFriendlyName can be whatever strings you like.
<string>MUTEK PT3901-2 PCSC Reader</string>
Now you can start testing the PC/SC reader plugged. Two major commands are applied:
- pcsc_scan to list all readers and update reader status when card is inserted or removed.
- scriptor to operate card reader and transmit APDU commands.