Update: I installed opencs+openct and now the reader (and the weird card) are 
detected.

$ pcsc_scan 
PC/SC device scanner
V 1.4.18 (c) 2001-2011, Ludovic Rousseau <[email protected]>
Compiled with PC/SC lite version: 1.7.4
Using reader plug'n play mechanism
Scanning present readers...
0: Generic CCID Reader [CCID Interface] 00 00

Sat Sep 29 23:21:06 2012
Reader 0: Generic CCID Reader [CCID Interface] 00 00
  Card state: Card removed, 

Sat Sep 29 23:21:10 2012
Reader 0: Generic CCID Reader [CCID Interface] 00 00
  Card state: Card inserted, 
  ATR: 3B 5F 95 00 80 73 00 01 00 59 43 4C 5A 1C 00 11 40 90 00

ATR: 3B 5F 95 00 80 73 00 01 00 59 43 4C 5A 1C 00 11 40 90 00
+ TS = 3B --> Direct Convention
+ T0 = 5F, Y(1): 0101, K: 15 (historical bytes)
  TA(1) = 95 --> Fi=512, Di=16, 32 cycles/ETU
    125000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 156250 bits/s
  TC(1) = 00 --> Extra guard time: 0
+ Historical bytes: 80 73 00 01 00 59 43 4C 5A 1C 00 11 40 90 00
  Category indicator byte: 80 (compact TLV data object)
    Tag: 7, len: 3 (card capabilities)
      Selection methods: 00
      Data coding byte: 01
        - Behaviour of write functions: one-time write
        - Value 'FF' for the first byte of BER-TLV tag fields: invalid
        - Data unit in quartets: 2
      Command chaining, length fields and logical channels: 00
        - Logical channel number assignment: No logical channel
        - Maximum number of logical channels: 1
    Tag: 5, len: 9 (card issuer's data)
      Card issuer data: 43 4C 5A 1C 00 11 40 90 00

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
    NONE

Your card is not present in the database.
You can get the latest version of the database from
  http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
or use: wget 
http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt 
--output-document=/home/diego/.smartcard_list.txt

If your ATR is still not in the latest version then please send a mail
to <[email protected]> containing:
- your ATR
- a card description (in english)


Diego 
From: [email protected]
To: [email protected]
Date: Sat, 29 Sep 2012 21:26:27 -0400
Subject: [Muscle] Question about SCM3310 on linux 64 bits





Hello,

Hope this is the right place to request help.

I'm trying to setup an SCM SCR 3310 V2 on a Ubuntu Linux 12.04:

# uname -a
Linux inspiron 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 
x86_64 x86_64 x86_64 GNU/Linux
# dpkg -l libccid pcscd
...
+++-==============-==============-============================================
ii  libccid        1.4.5-1        PC/SC driver for USB CCID smart card readers
ii  pcscd          1.7.4-2ubuntu2 Middleware to access a smart card using PC/S

I installed the driver as indicated in the vendor's readme:

$ ls -l /usr/lib/pcsc/drivers/
total 12
drwxr-xr-x 3 root root 4096 Sep 29 16:01 ifd-ccid.bundle
drwxr-xr-x 3 root root 4096 Sep 29 19:27 scmccid.bundle
drwxr-xr-x 2 root root 4096 Sep 29 16:01 serial

$ ls -l /usr/lib/pcsc/drivers/scmccid.bundle/Contents/Linux/
total 180
-rwxr-xr-x 1 root root 180724 Sep 29 19:27 libscmccid.so.5.0.21

When I try pcsc_scan I got this...

$ PCSCLITE_PCSCD_ARGS=-df pcsc_scan
PC/SC device scanner
V 1.4.18 (c) 2001-2011, Ludovic Rousseau <[email protected]>
Compiled with PC/SC lite version: 1.7.4
00000000 pcscdaemon.c:231:main() pcscd set to foreground with debug send to 
stdout
00000604 configfile.l:245:DBGetReaderListDir() Parsing conf directory: 
/etc/reader.conf.d

...
after plugging the reader I get the following messages:

09230273 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 
0x04E6, PID: 0x5116, path: /dev/bus/usb/007/010
00000030 hotplug_libudev.c:309:HPAddDevice() Adding USB device: SCR3310 Smart 
Card Reader
00000093 readerfactory.c:934:RFInitializeReader() Attempting startup of SCR3310 
Smart Card Reader [CCID Interface] 00 00 using 
/usr/lib/pcsc/drivers/scmccid.bundle/Contents/Linux/libscmccid.so.5.0.21
00000350 readerfactory.c:824:RFBindFunctions() Loading IFD Handler 3.0
Loading scmccid 5.0.21
00280532 readerfactory.c:965:RFInitializeReader() Open Port 0x200000 Failed 
(usb:04e6/5116:libudev:0:/dev/bus/usb/007/010)
00000057 readerfactory.c:275:RFAddReader() SCR3310 Smart Card Reader [CCID 
Interface] init failed.
00000029 readerfactory.c:985:RFUnInitializeReader() Attempting shutdown of 
SCR3310 Smart Card Reader [CCID Interface] 00 00.
00000022 readerfactory.c:861:RFUnloadReader() Unloading reader driver.
00000142 winscard_svc.c:731:MSGSignalClient() Signal client: 6
00000027 winscard_svc.c:734:MSGSignalClient() SIGNAL rv=0x0 for client 6
00000076 hotplug_libudev.c:377:HPAddDevice() Failed adding USB device: SCR3310 
Smart Card Reader
00000037 winscard_svc.c:315:ContextThread() Received command: 
CMD_GET_READERS_STATE from client 6
found one
Scanning present readers...
00000042 readerfactory.c:934:RFInitializeReader() Attempting startup of SCR3310 
Smart Card Reader [CCID Interface] 00 00 using 
/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000110 winscard_svc.c:315:ContextThread() Received command: 
CMD_GET_READERS_STATE from client 6
00000286 readerfactory.c:824:RFBindFunctions() Loading IFD Handler 3.0
00000082 ifdhandler.c:1781:init_driver() Driver version: 1.4.5
00000744 ifdhandler.c:1798:init_driver() LogLevel: 0x0003
00000038 ifdhandler.c:1809:init_driver() DriverOptions: 0x0000
00000210 ifdhandler.c:80:IFDHCreateChannelByName() lun: 0, device: 
usb:04e6/5116:libudev:0:/dev/bus/usb/007/010
00000693 ccid_usb.c:245:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau 
([email protected])
00000036 ccid_usb.c:246:OpenUSBByName() ifdProductString: Generic CCID driver
00000031 ccid_usb.c:247:OpenUSBByName() Copyright: This driver is protected by 
terms of the GNU Lesser General Public License version 2.1, or (at your option) 
any later version.
00000315 winscard_svc.c:315:ContextThread() Received command: 
CMD_GET_READERS_STATE from client 6
00003027 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: 
SCR3310 Smart Card Reader [CCID Interface] 00 00
00000776 ccid_usb.c:424:OpenUSBByName() Can't libusb_open(7/10): -3
00000105 ifdhandler.c:102:IFDHCreateChannelByName() failed
00000025 readerfactory.c:965:RFInitializeReader() Open Port 0x200000 Failed 
(usb:04e6/5116:libudev:0:/dev/bus/usb/007/010)
00000022 readerfactory.c:275:RFAddReader() SCR3310 Smart Card Reader [CCID 
Interface] init failed.
00000023 readerfactory.c:985:RFUnInitializeReader() Attempting shutdown of 
SCR3310 Smart Card Reader [CCID Interface] 00 00.
00000035 readerfactory.c:861:RFUnloadReader() Unloading reader driver.
Waiting for the first reader...00009203 winscard_svc.c:315:ContextThread() 
Received command: CMD_GET_READERS_STATE from client 6
00000063 winscard_svc.c:315:ContextThread() Received command: 
CMD_WAIT_READER_STATE_CHANGE from client 6

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0c45:6400 Microdia 
Bus 007 Device 011: ID 04e6:5116 SCM Microsystems, Inc. SCR331-LC1 / SCR3310 
SmartCard Reader

***

As a last resort I compiled pcsc 1.8.6, manually created the 'drivers' folder, 
added the scm library,  and run it directly

$ ./pcscd -df
00000000 pcscdaemon.c:233:main() pcscd set to foreground with debug send to 
stdout
00000290 configfile.l:298:DBGetReaderList() Parsing conf file: 
/home/testing/pcsc/etc/reader.conf.d
00000045 pcscdaemon.c:525:main() pcsc-lite 1.8.6 daemon ready.
00001358 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0001, path: /dev/bus/usb/003/001
00000344 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0001, path: /dev/bus/usb/004/001
00000233 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0001, path: /dev/bus/usb/005/001
00000159 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000128 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000130 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x0C45, PID: 0x6400, path: /dev/bus/usb/001/003
00000125 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x0C45, PID: 0x6400, path: /dev/bus/usb/001/003
00000160 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0001, path: /dev/bus/usb/006/001
00000154 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0001, path: /dev/bus/usb/007/001
00000153 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0001, path: /dev/bus/usb/008/001
00000156 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
13848170 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 
0x04E6, PID: 0x5116, path: /dev/bus/usb/007/012
00000027 hotplug_libudev.c:312:HPAddDevice() Adding USB device: SCR3310 Smart 
Card Reader
00000110 readerfactory.c:978:RFInitializeReader() Attempting startup of SCR3310 
Smart Card Reader [CCID Interface] 00 00 using 
/home/testing/pcsc/lib/pcsc/drivers/scmccid.bundle/Contents/Linux/libscmccid.so.5.0.21
00000325 readerfactory.c:868:RFBindFunctions() Loading IFD Handler 3.0
Loading scmccid 5.0.21
00281867 readerfactory.c:1009:RFInitializeReader() Open Port 0x200000 Failed 
(usb:04e6/5116:libudev:0:/dev/bus/usb/007/012)
00000066 readerfactory.c:312:RFAddReader() SCR3310 Smart Card Reader [CCID 
Interface] init failed.
00000019 readerfactory.c:529:RFRemoveReader() UnrefReader() count was: 1
00000010 readerfactory.c:1029:RFUnInitializeReader() Attempting shutdown of 
SCR3310 Smart Card Reader [CCID Interface] 00 00.
00000009 readerfactory.c:905:RFUnloadReader() Unloading reader driver.
00000097 hotplug_libudev.c:384:HPAddDevice() Failed adding USB device: SCR3310 
Smart Card Reader
^C43262954 pcscdaemon.c:689:signal_trap() Received signal: 2
00000025 pcscdaemon.c:708:signal_trap() Preparing for suicide
01000319 readerfactory.c:1259:RFCleanupReaders() entering cleaning function
00000042 winscard_svc.c:130:ContextsDeinitialize() remaining threads: 0
00000010 pcscdaemon.c:638:at_exit() cleaning /var/run/pcscd

***

BTW,  I got the following on another laptop running Ubuntu 10.04 32bits (pcscd 
has version 1.5.3)

$ pcsc_scan 
PC/SC device scanner
V 1.4.16 (c) 2001-2009, Ludovic Rousseau <[email protected]>
Compiled with PC/SC lite version: 1.5.3
Scanning present readers...
Waiting for the first reader...found one
Scanning present readers...
0: SCM SCR 3310 00 00

Sat Sep 29 20:22:38 2012
 Reader 0: SCM SCR 3310 00 00
  Card state: Card inserted, 
  ATR: 3B 5F 95 00 80 73 00 01 00 59 43 4C 5A 1C 00 11 40 90 00

ATR: 3B 5F 95 00 80 73 00 01 00 59 43 4C 5A 1C 00 11 40 90 00
+ TS = 3B --> Direct Convention
+ T0 = 5F, Y(1): 0101, K: 15 (historical bytes)
  TA(1) = 95 --> Fi=512, Di=16, 32 cycles/ETU
    125000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 156250 bits/s
  TC(1) = 00 --> Extra guard time: 0
+ Historical bytes: 80 73 00 01 00 59 43 4C 5A 1C 00 11 40 90 00
  Category indicator byte: 80 (compact TLV data object)
    Tag: 7, len: 3 (card capabilities)
      Selection methods: 00
      Data coding byte: 01
        - Behaviour of write functions: one-time write
        - Value 'FF' for the first byte of BER-TLV tag fields: invalid
        - Data unit in quartets: 2
      Command chaining, length fields and logical channels: 00
        - Logical channel number assignment: No logical channel
        - Maximum number of logical channels: 1
    Tag: 5, len: 9 (card issuer's data)
      Card issuer data: 43 4C 5A 1C 00 11 40 90 00

Possibly identified card (using /home/diego/.smartcard_list.txt):
    NONE

Your card is not present in the database.
You can get the latest version of the database from
  http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
or use: wget 
http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt 
--output-document=/home/diego/.smartcard_list.txt

If your ATR is still not in the latest version then please send a mail
to <[email protected]> containing:
- your ATR
- a card description (in english)

**


Thanks in advance for your comments,

Diego



                                          

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle                                
          
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to