[Pcsclite-cvs-commit] r4865 - /trunk/PCSC/UnitaryTests/transmit_loop.py

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Apr 8 15:35:56 UTC 2010


Author: rousseau
Date: Thu Apr  8 15:35:54 2010
New Revision: 4865

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4865
Log:
call SCardTransmit in an endless loop

Added:
    trunk/PCSC/UnitaryTests/transmit_loop.py   (with props)

Added: trunk/PCSC/UnitaryTests/transmit_loop.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/transmit_loop.py?rev=4865&op=file
==============================================================================
--- trunk/PCSC/UnitaryTests/transmit_loop.py (added)
+++ trunk/PCSC/UnitaryTests/transmit_loop.py Thu Apr  8 15:35:54 2010
@@ -1,0 +1,36 @@
+#! /usr/bin/env python
+
+#   transmit_loop.py: call SCardTransmit in an endless loop
+#   Copyright (C) 2010  Ludovic Rousseau
+#
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 2 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program; if not, write to the Free Software Foundation, Inc.,
+#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+from smartcard.System import *
+from smartcard.CardConnection import *
+
+r = readers()
+connection = r[0].createConnection()
+connection.connect()
+
+SELECT = [0x00, 0xA4, 0x00, 0x00, 0x02, 0x3F, 0x00]
+i = 0
+while 1:
+    print "loop:", i
+    i += 1
+    data, sw1, sw2 = connection.transmit(SELECT)
+    print data
+    print "%02x %02x" % (sw1, sw2)
+
+connection.disconnect()

Propchange: trunk/PCSC/UnitaryTests/transmit_loop.py
------------------------------------------------------------------------------
    svn:executable = *




More information about the Pcsclite-cvs-commit mailing list