Ubuntu – ID card reader is not working in Ubuntu 12.04, 12.10? Using Omnikey3121

12.0412.10card-readerkernelopenssh

I have this Omnikey 3121 which is an USB ID card reader. Connected to my Ubuntu. When i try to read Belgiun ID Card or any other card it does not work always missing to provide results. How can i make sure the card is readable on every insert?

enter image description here
enter image description here

$ lsusb
Bus 003 Device 008: ID 076b:3021 OmniKey AG CardMan 3121

$ ps -e | grep pcsc
16399 ?        00:00:00 pcscd
$ service pcscd status
 * pcscd is running
$ service pcscd restart
 * Restarting PCSC Lite resource manager pcscd                                                                                                                   [ OK ] 

$ opensc-tool --list-readers
# Detected readers (pcsc)
Nr.  Card  Features  Name
0    No              Generic CCID Reader 00 00
$ opensc-tool --reader 0 --atr
Matched ATR in reader: Generic CCID Reader 00 00
Failed to connect to card: Unresponsive card (correctly inserted?)
$ opensc-tool --reader 0 --name
Matched ATR in reader: Generic CCID Reader 00 00
Failed to connect to card: Unresponsive card (correctly inserted?)

$ opensc-tool -l
 Detected readers (pcsc)
Nr.  Card  Features  Name
0    No              Generic CCID Reader 00 00
$ opensc-explorer
OpenSC Explorer version 0.12.2
Using reader with a card: Generic CCID Reader 00 00
Failed to connect to card: Unresponsive card (correctly inserted?)


$ pcsc_scan 
PC/SC device scanner
V 1.4.20 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.3
Using reader plug'n play mechanism
Scanning present readers...
0: Generic CCID Reader 00 00

Fri Apr 19 05:30:22 2013
Reader 0: Generic CCID Reader 00 00
  Card state: Card removed, 

Fri Apr 19 05:30:59 2013
Reader 0: Generic CCID Reader 00 00
  Card state: Card inserted, Unresponsive card, 

Fri Apr 19 05:31:04 2013
Reader 0: Generic CCID Reader 00 00
  Card state: Card removed, 


Fri Apr 19 05:33:31 2013
Reader 0: Generic CCID Reader 00 00
  Card state: Card inserted, 
  ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11

ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11
+ TS = 3B --> Direct Convention
+ T0 = 98, Y(1): 1001, K: 8 (historical bytes)
  TA(1) = 13 --> Fi=372, Di=4, 93 cycles/ETU
    43010 bits/s at 4 MHz, fMax for Fi = 5 MHz => 53763 bits/s
  TD(1) = 40 --> Y(i+1) = 0100, Protocol T = 0 
-----
  TC(2) = 0A --> Work waiting time: 960 x 10 x (Fi/F)
+ Historical bytes: A5 03 01 01 01 AD 13 11
  Category indicator byte: A5 (proprietary format)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 98 13 40 0A A5 03 01 01 01 AD 13 11
    Belgium Electronic ID card

Best Answer

  • It WORKS!

    It was not working because the driver is not correct. So I installed this one: https://www.hidglobal.com/drivers/14919

    And now I have feedback from the card reader directly, where I get ATR values.

    root@sun-M14xR2:~/Downloads/ifdokccid_lnx_x64-3.7.0# pcsc_scan 
    PC/SC device scanner
    V 1.4.20 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
    Compiled with PC/SC lite version: 1.8.3
    Using reader plug'n play mechanism
    Scanning present readers...
    0: OMNIKEY CardMan 3x21 00 00
    
    Tue Apr 23 11:23:50 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card removed, 
    
    Tue Apr 23 11:24:02 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card inserted, Unresponsive card, 
    
    Tue Apr 23 11:24:04 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card removed, 
    
    Tue Apr 23 11:24:06 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card inserted, Unresponsive card, 
    
    Tue Apr 23 11:24:06 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card removed, 
    
    Tue Apr 23 11:24:15 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card inserted, 
      ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11
    
    ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11
    + TS = 3B --> Direct Convention
    + T0 = 98, Y(1): 1001, K: 8 (historical bytes)
      TA(1) = 13 --> Fi=372, Di=4, 93 cycles/ETU
        43010 bits/s at 4 MHz, fMax for Fi = 5 MHz => 53763 bits/s
      TD(1) = 40 --> Y(i+1) = 0100, Protocol T = 0 
    -----
      TC(2) = 0A --> Work waiting time: 960 x 10 x (Fi/F)
    + Historical bytes: A5 03 01 01 01 AD 13 11
      Category indicator byte: A5 (proprietary format)
    
    Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
    3B 98 13 40 0A A5 03 01 01 01 AD 13 11
        Belgium Electronic ID card
    
    Tue Apr 23 11:24:19 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card removed, 
    
    Tue Apr 23 11:24:22 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card inserted, 
      ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11
    
    ATR: 3B 98 13 40 0A A5 03 01 01 01 AD 13 11
    + TS = 3B --> Direct Convention
    + T0 = 98, Y(1): 1001, K: 8 (historical bytes)
      TA(1) = 13 --> Fi=372, Di=4, 93 cycles/ETU
        43010 bits/s at 4 MHz, fMax for Fi = 5 MHz => 53763 bits/s
      TD(1) = 40 --> Y(i+1) = 0100, Protocol T = 0 
    -----
      TC(2) = 0A --> Work waiting time: 960 x 10 x (Fi/F)
    + Historical bytes: A5 03 01 01 01 AD 13 11
      Category indicator byte: A5 (proprietary format)
    
    Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
    3B 98 13 40 0A A5 03 01 01 01 AD 13 11
        Belgium Electronic ID card
    
    Tue Apr 23 11:24:24 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
      Card state: Card removed, 
    
    Tue Apr 23 11:24:26 2013
    Reader 0: OMNIKEY CardMan 3x21 00 00
    

    EDIT:

    1) When the system boots run this once as root, so that the service is launched for sure:

    #!/bin/bash
    ps aux | grep "pcscd" | grep -v "grep"  | awk '{print $2}' | xargs kill -9;
    pcscd -fd &
    

    2) then as your normal user run

    export DISPLAY=:0.0 && eid-viewer
    

    3) insert the card and you should see it working

  • Related Question