【发布时间】:2014-12-31 07:19:05
【问题描述】:
我想获取智能卡的 ATR。我正在使用 HID omnikey 5321。我正在关注此链接“http://pyscard.sourceforge.net/user-guide.html#requesting-any-card”
到目前为止我已经尝试过:
>>>from smartcard.CardType import AnyCardType
>>>from smartcard.CardRequest import CardRequest
>>>from smartcard.util import toHexString
>>>
>>> cardtype = AnyCardType()
>>> cardrequest = CardRequest( timeout=1, cardType=cardtype )
>>> cardservice = cardrequest.waitforcard()
>>>
>>>>>> cardservice.connection.connect()
我遇到了错误
cardservice.connection.connect()
类似的错误:
raise CardConnectionException('Unable to connect with ptotocol[pcscprotocol] + . '+ScardGetErrorMessage(hresult)
CardConnectionException: Unable to conenct the card with T0 or T1 . Card is not responding to reset.
【问题讨论】:
-
你的卡是非接触式的吗?
标签: python-2.7 smartcard-reader contactless-smartcard pyscard