[Pcsclite-cvs-commit] r6248 - /trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sun Mar 25 20:54:27 UTC 2012


Author: rousseau
Date: Sun Mar 25 20:54:26 2012
New Revision: 6248

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6248
Log:
Add GET_SN command and some documentation

Modified:
    trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py

Modified: trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py?rev=6248&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py (original)
+++ trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py Sun Mar 25 20:54:26 2012
@@ -19,6 +19,10 @@
 #
 #   You should have received a copy of the GNU General Public License along
 #   with this program; if not, see <http://www.gnu.org/licenses/>.
+
+# You have to enable the use of Escape commands with the
+# DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED bit in the ifdDriverOptions
+# option of the CCID driver Info.plist file
 
 from smartcard.System import readers
 from smartcard.pcsc.PCSCPart10 import (getFeatureRequest, hasFeature,
@@ -42,10 +46,15 @@
 if tlv['PCSCv2_PART10_PROPERTY_wIdVendor'] == 0x0F14 \
     and (tlv['PCSCv2_PART10_PROPERTY_wIdProduct'] in [0x0037, 0x0038]):
 
-    # proprietary escape command for Xiring readers
+    # proprietary escape command for Xiring Leo readers
     version = [ord(c) for c in "VERSION"]
     res = card_connection.control(ccid_esc_command, version)
     print res
-    print ''.join([chr(x) for x in res])
+    print "VERSION:", ''.join([chr(x) for x in res])
+
+    serial = [ord(c) for c in "GET_SN"]
+    res = card_connection.control(ccid_esc_command, serial)
+    print res
+    print "GET_SN:", ''.join([chr(x) for x in res])
 else:
     print "Xiring Leo reader not found"




More information about the Pcsclite-cvs-commit mailing list