Getting the Smart Card reader to work on Linux

driversusb

I got a Smart Card reader, that I ripped from a Laptop the other day. It is an internal Smart Card reader, though it uses USB, so making a cable for it, was no problem.

It seems it's recognized by the USB driver correctly:

[1370965.148035] usb 1-3.2: new low-speed USB device number 25 using ehci-pci
[1370965.229948] usb 1-3.2: New USB device found, idVendor=08d4, idProduct=0009
[1370965.229962] usb 1-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[1370965.229969] usb 1-3.2: Product: Fujitsu Siemens USB Smartcard Reader
[1370965.229976] usb 1-3.2: Manufacturer: OMNIKEY AG

As it is a pretty much bog standard Fujitsu Siemens USB Smartcard Reader, it should be work with the drivers for the "Fujitsu Siemens SmartCard USB 2A" and "Fujitsu Siemens SmartCard Keyboard USB 2A". Both of which are the exact same thing, except the "Keyboard" variant is in permanently attached to a USB keyboard (as in, in the same case).

The PC/SC drivers don't recognize the reader. The readers I mentioned above are supported by libccid, but pcscd can't recognize the reader by it's vendor and product IDs:

00000286 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x08D4, PID: 0x0009, path: /dev/bus/usb/001/026

(It just steps over to the next USB device. Eventually, it tries all USB devices and does nothing after that.)

I'd like some advice what I should do now? The only thing I can do, is download the CCID driver source and try to hack it in there, or at least that's the only thing I can come up with right now. Is there anything else I can try?


I got a little bit further with OpenCT:

I had to uncomment a line in /etc/openct.conf:

driver  cardman {
    ids = {
#       usb:076b/0596, # OMNIKEY CardMan 2020
#       usb:076b/1784, # OMNIKEY CardMan 6020
        usb:08d4/0009, # Fujitsu Siemens SCR USB Reader
    };
};

I don't know why the IDs of those cardman drivers are commented-out, maybe the driver isn't really working yet?

Anyway, with this, I can get something with openct-tool:

$ openct-tool list
  0 OMNIKEY CardMan 2020/6020/6120

I've put in a simple EEPROM card and it senses this card, but I can't read from it:

$ openct-tool read
Detected OMNIKEY CardMan 2020/6020/6120
Card present, status changed
failed to reset card

So, it's still not working, really…


There used to be a driver for PC/SC that supported this card reader: pcsc-lite-cm2020, however, it seems to be gone now.

I've downloaded the source package from the manufacturer. It is very old. I've copied the contents to /usr/lib64/pcsc/drivers, but it doesn't work obviously, since it's compiled for the wrong architecture.

The only sources in there, compile the kernel module, but not the libcm2020.so that I need for pcscd.

I couldn't find the sources for libcm2020.so, if I'm missing something, and indeed it is possible to compile the library, a hint where to find the sources would be awesome.

Best Answer

openct-tool read

Try this as root,or better,check the permission for USB cardreader(i use another cardreader called smargo and is connected on ttyUSB0,so i check /dev/ttyUSB0) and then redo

openct-tool read

Related Question