0

I have a RFID project, and wants the system to detect the card on the card reader as it is in read range and capture the UID and continue the process. As of now I have placed a button called ScanCard, in it I have placed the card read functionality, which would return the UID of the Card. I am using just two type of ATR. Want to get rid of the Scan Card button and want to automate the scanning function. I am using Python 2.7 and HID Omnikey Card Reader on Windows 7

atr = "3B 8F 80 01 80 4F 0C A0 00 00 03 06 0A 00 18 00 00 00 00 7A"

cardtype = ATRCardType( toBytes( "%s" %(atr) ))

cardrequest = CardRequest( timeout=1, cardType=cardtype )

cardservice = cardrequest.waitforcard()

cardservice.connection.connect()

SELECT = [0xFF, 0xCA, 0x00, 0x00, 0x00]

apdu = SELECT

print 'sending ' + toHexString(apdu)

response, sw1, sw2 = cardservice.connection.transmit( apdu )

print 'response: ', response, ' status words: ', "%x %x" % (sw1, sw2)

tagid = toHexString(response).replace(' ','')

print "tagid ",tagid

id = tagid

print" UID is",id

The above code is what I am following now. I need to keep the wait for card unlimited, what could be a optimum way to do it?

Cleb
  • 25,102
  • 20
  • 116
  • 151
Prasanth
  • 339
  • 1
  • 6
  • 19

1 Answers1

1

Maybe try the official pyscard documentation, such as the part on monitoring, which I have linked to.

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
  • hi, Does pyscard support the omneykey 5421 contactless reader? http://www.hidglobal.com/products/readers/omnikey/5421 Thanks – Pototo Mar 21 '14 at 19:41
  • CCID devices are PCSC compliant so I would be very very surprised if it doesn't support that reader. – Maarten Bodewes Mar 21 '14 at 23:31
  • What would be the ADPU of a 1386 isoprox card II ? I cannot find it anywhere online. Thanks in advanced – Pototo May 15 '14 at 20:26
  • @Pototo None, that does not seem to be a card that supports APDU's. APDU's have been defined for Smart Cards (sporting a CPU), although some memory cards have an APDU layer as well. Proximity cards: not likely. – Maarten Bodewes May 15 '14 at 21:21