Difference between revisions of "IDream ID-SMID01 SmartCard reader"

From YobiWiki
Jump to navigation Jump to search
m
m
 
(21 intermediate revisions by the same user not shown)
Line 2: Line 2:
   
 
* [http://www.idream.be/consulter.php?pid=50&tab=0 Official page]
 
* [http://www.idream.be/consulter.php?pid=50&tab=0 Official page]
* Get the driver for pcsc-lite: [http://www.idream.be/getfile.php?id=107 linux driver_STD200_THRC.zip]
+
* You can get a driver from iDream for pcsc-lite: [http://www.idream.be/getfile.php?id=107 linux driver_STD200_THRC.zip] but I could not get it working and it's for a quite old version (pcsclite 0.9.1).
  +
* Identification of the device:
* From the driver zip, copy the driver:
 
  +
lsusb
mkdir -p /usr/lib/pcsc/drivers/ifd-std200.bundle/Contents/Linux
 
  +
Bus 003 Device 004: ID 062d:0001 Taiwan Tai-Hao Enterprises Co., Ltd
cp "linux driver_STD200_THRC/driver/libifd-std200.so" /usr/lib/pcsc/drivers/ifd-std200.bundle/Contents/Linux
 
  +
I tried to install openct, there was communication with the reader with the standard CCID, I can get communication with a VISA card but with the Belgian eID I get error at protocol selection and the beidgui was not working neither.
* From the driver zip, copy reader.conf to /etc/reader.conf.d/libifd-std200 and modify the LIBPATH, then run update-reader.conf:
 
  +
LIBPATH /usr/lib/pcsc/drivers/ifd-std200.bundle/Contents/Linux/libifd-std200.so
 
  +
# openct-tool atr
update-reader.conf
 
  +
Detected CCID Compatible
/etc/init.d/pcscd restart
 
  +
Card present, status changed
  +
ATR: 3b 98 13 40 0a a5 03 01 01 01 ad 13 11
  +
Jan 8 01:09:28 mercure ifdhandler[1045]: CCID Compatible: Bad PTS response
  +
Jan 8 01:09:28 mercure ifdhandler[1045]: Protocol selection failed
  +
  +
VISA card replies correct ATR & protocol selection:
  +
# cardos-info
  +
3b:67:00:00:00:00:00:00:00:90:00
  +
Received (SW1=0x6D, SW2=0x00)
  +
  +
I could finally get it working, not with openct which gave the broken results as shown above but with [http://pcsclite.alioth.debian.org/ccid.html libccid] and pcscd:
  +
<br>Edit /etc/libccid_Info.plist and add the vendor/product ID to the list, e.g.:
  +
--- libccid_Info.plist.old 2008-02-04 23:54:26.000000000 +0100
  +
+++ libccid_Info.plist 2008-02-04 23:55:23.000000000 +0100
  +
@@ -180,6 +180,7 @@
  +
<string>0x09C3</string>
  +
<string>0x0783</string>
  +
<string>0x0C4B</string>
  +
+ <string>0x062D</string>
  +
</array>
  +
  +
<key>ifdProductID</key>
  +
@@ -268,6 +269,7 @@
  +
<string>0x0008</string>
  +
<string>0x0003</string>
  +
<string>0x0300</string>
  +
+ <string>0x0001</string>
  +
</array>
  +
  +
<key>ifdFriendlyName</key>
  +
@@ -356,6 +358,7 @@
  +
<string>ActivCard USB Reader 2.0</string>
  +
<string>C3PO LTC31</string>
  +
<string>Reiner-SCT cyberJack pinpad(a)</string>
  +
+ <string>iDream ID-SMID01</string>
  +
</array>
  +
  +
<key>Copyright</key>
  +
Now a simple call to beidgui works :-)
  +
<br>Check [[Belgian eID]] for other experiments with the eID card under Linux.
  +
  +
Avoid openct to try to open the reader: edit /etc/udev/rules.d/z60_openct.rules and comment out:
  +
# ccid
  +
#ENV{MODALIAS}=="usb:*ic0Bisc00*", RUN+="/lib/udev/openct_usb"
  +
  +
Note that I've still many messages in /var/log/messages like:
  +
pcscd: ifdhandler.c:948:IFDHTransmitToICC() lun: 0
  +
last message repeated 5 times
  +
pcscd: ifdhandler.c:948:IFDHTransmitToICC() lun: 0
  +
last message repeated 7 times
  +
...
  +
  +
I could get rid of those by lowering the level of verbosity in by creating a file /etc/default/pcscd (pcscd >= 1.4.99-2) with:
  +
DAEMON_ARGS="--error"
  +
  +
Still one issue: everything works up to the moment I remove and reinsert the card, after that, no way, always errors such as:
  +
pcscd: eventhandler.c:316:EHStatusHandlerThread() Error communicating to: iDream ID-SMID01 00 00
  +
commands.c:938:CmdGetSlotStatus Hardware error
  +
ifdwrapper.c:494:IFDStatusICC() Card not transacted: 612
  +
And I've to unplug and replug the reader from USB
  +
  +
Other useful package:
  +
apt-get install pcsc-tools
  +
pcsc_scan

Latest revision as of 23:40, 31 March 2008

10€ at Carrefour

lsusb
Bus 003 Device 004: ID 062d:0001 Taiwan Tai-Hao Enterprises Co., Ltd 

I tried to install openct, there was communication with the reader with the standard CCID, I can get communication with a VISA card but with the Belgian eID I get error at protocol selection and the beidgui was not working neither.

# openct-tool atr                                                                      
Detected CCID Compatible                                                             
Card present, status changed                                                         
ATR: 3b 98 13 40 0a a5 03 01 01 01 ad 13 11                                          
Jan  8 01:09:28 mercure ifdhandler[1045]: CCID Compatible: Bad PTS response          
Jan  8 01:09:28 mercure ifdhandler[1045]: Protocol selection failed                  
                                                                                    

VISA card replies correct ATR & protocol selection:

# cardos-info                                                                        
3b:67:00:00:00:00:00:00:00:90:00                                                     
Received (SW1=0x6D, SW2=0x00)                                                        

I could finally get it working, not with openct which gave the broken results as shown above but with libccid and pcscd:
Edit /etc/libccid_Info.plist and add the vendor/product ID to the list, e.g.:

--- libccid_Info.plist.old      2008-02-04 23:54:26.000000000 +0100
+++ libccid_Info.plist  2008-02-04 23:55:23.000000000 +0100
@@ -180,6 +180,7 @@
               <string>0x09C3</string>
               <string>0x0783</string>
               <string>0x0C4B</string>
+               <string>0x062D</string>
       </array>

       <key>ifdProductID</key>
@@ -268,6 +269,7 @@
               <string>0x0008</string>
               <string>0x0003</string>
               <string>0x0300</string>
+               <string>0x0001</string>
       </array>

       <key>ifdFriendlyName</key>
@@ -356,6 +358,7 @@
               <string>ActivCard USB Reader 2.0</string>
               <string>C3PO LTC31</string>
               <string>Reiner-SCT cyberJack pinpad(a)</string>
+               <string>iDream ID-SMID01</string>
       </array>

       <key>Copyright</key>

Now a simple call to beidgui works :-)
Check Belgian eID for other experiments with the eID card under Linux.

Avoid openct to try to open the reader: edit /etc/udev/rules.d/z60_openct.rules and comment out:

# ccid
#ENV{MODALIAS}=="usb:*ic0Bisc00*", RUN+="/lib/udev/openct_usb"

Note that I've still many messages in /var/log/messages like:

pcscd: ifdhandler.c:948:IFDHTransmitToICC() lun: 0
last message repeated 5 times
pcscd: ifdhandler.c:948:IFDHTransmitToICC() lun: 0
last message repeated 7 times
...

I could get rid of those by lowering the level of verbosity in by creating a file /etc/default/pcscd (pcscd >= 1.4.99-2) with:

DAEMON_ARGS="--error"

Still one issue: everything works up to the moment I remove and reinsert the card, after that, no way, always errors such as:

pcscd: eventhandler.c:316:EHStatusHandlerThread() Error communicating to: iDream ID-SMID01 00 00
commands.c:938:CmdGetSlotStatus Hardware error
ifdwrapper.c:494:IFDStatusICC() Card not transacted: 612

And I've to unplug and replug the reader from USB

Other useful package:

apt-get install pcsc-tools
pcsc_scan