我有一个OmniKey 5321智能卡读卡器,还有一台带Debian的电脑。以下Python代码读取卡片:
from smartcard.CardMonitoring import CardMonitor, CardObserver
from smartcard.util import *
import sys
class printobserver( CardObserver ):
def update( self, observable, (addedcards, removedcards) ):
for card in addedcards:
print "+Inserted: ", toHexString( card.atr )
for card in removedcards:
print "-Removed: ", toHexString( card.atr )
try:
print "Insert or remove a smartcard in the system."
print ""
cardmonitor = CardMonitor()
cardobserver = printobserver()
cardmonitor.addObserver( cardobserver )
raw_input('Press Enter to exit\n')
except:
print "Unexpected error: ", sys.exc_info()[0]
Python代码运行良好,但给了我同样的结果
自动变速器
许多卡片的标签。给定atr为:
3B 8F 80 01 80 4F 0C A0 00 00 03 06 00 01 00 00 00 00 6A
我怎样才能从卡片上读出一些独特的东西?我知道我必须发送一些命令,并且回复将包含UID,但是我如何找到命令?我将如何发送它们?
谢谢