我有一个CRT-603-CZ1智能卡读卡器,我想阅读经典的1k Mifare非接触式卡的16字节块4。验证密钥是defualt值(即0xFFFFFFFFFFFF
)。所以我必须向读者发送3个命令,如下所示:
(上述手册中提到了相应的APDU命令。)
为了发送上述APDU命令,我使用了OpenSCTool,您可以看到以下结果:
OpenSCTool:> OSC.exe -s FF82000006FFFFFFFFFFFF -s FF860000050100046000 -s FFB000
0410
Using reader with a card: CREATOR CRT-603 (CZ1) CCR RF 0
Failed to connect to card: Card is invalid or cannot be handled
OpenSCTool:> OSC.exe -s FF82000006FFFFFFFFFFFF -s FF860000050100046000 -s FFB000
0410
Using reader with a card: CREATOR CRT-603 (CZ1) CCR RF 0
Sending: FF 82 00 00 06 FF FF FF FF FF FF
Received (SW1=0x90, SW2=0x00)
Sending: FF 86 00 00 05 01 00 04 60 00
Received (SW1=0x90, SW2=0x00)
Sending: FF B0 00 04 10
Received (SW1=0x90, SW2=0x00):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
OpenSCTool:> OSC.exe -s FF82000006FFFFFFFFFFFF -s FF860000050100046000 -s FFB000
0410
Using reader with a card: CREATOR CRT-603 (CZ1) CCR RF 0
Failed to connect to card: Card is invalid or cannot be handled
OpenSCTool:> OSC.exe -s FF82000006FFFFFFFFFFFF -s FF860000050100046000 -s FFB000
0410
Using reader with a card: CREATOR CRT-603 (CZ1) CCR RF 0
Sending: FF 82 00 00 06 FF FF FF FF FF FF
Received (SW1=0x90, SW2=0x00)
Sending: FF 86 00 00 05 01 00 04 60 00
Received (SW1=0x90, SW2=0x00)
Sending: FF B0 00 04 10
Received (SW1=0x90, SW2=0x00):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
OpenSCTool:> OSC.exe -s FF82000006FFFFFFFFFFFF -s FF860000050100046000 -s FFB000
0410
Using reader with a card: CREATOR CRT-603 (CZ1) CCR RF 0
Failed to connect to card: Card is invalid or cannot be handled
OpenSCTool:> OSC.exe -s FF82000006FFFFFFFFFFFF -s FF860000050100046000 -s FFB000
0410
Using reader with a card: CREATOR CRT-603 (CZ1) CCR RF 0
Sending: FF 82 00 00 06 FF FF FF FF FF FF
Received (SW1=0x90, SW2=0x00)
Sending: FF 86 00 00 05 01 00 04 60 00
Received (SW1=0x69, SW2=0x83)
Sending: FF B0 00 04 10
Received (SW1=0x69, SW2=0x82)
OpenSCTool:>
如上所述,我尝试过这些命令不止一次。但我没有得到同样的答复。
0x9000
,0x9000
和0x9000
作为状态字。0x9000
,0x6983
和0x6982
作为APDU回复状态字。请注意,在重复上述命令期间,我不会更改有关读卡器或卡的任何信息。一切都是固定的。
出了什么问题?
更新
请注意,此阅读器具有适用于相同APDU命令的工具。看:
这些是日志部分的内容:
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
SCardTransmit...OK Send Buffer : FF 82 00 00 06 FF FF FF FF FF FF Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF 86 00 00 05 01 00 04 60 00 Receive Buffer : 90 00
SCardTransmit...OK Send Buffer : FF B0 00 04 10 Receive Buffer : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00
如您所见,不同尝试的所有响应都是相同的。
所以
更新2:
我使用PySCard库编写了一个Python程序,连续发送上述三个命令5次。并且所有五个系列都有成功的相等结果(即0x9000
所有5 * 3 = 15个命令)。所以似乎OpenSCTool存在问题。但我不知道问题是什么以及为什么会这样回应。