Select 通过 AID 命令无效
Select by AID command is not working
我想重新开发新的桌面应用程序以从 EMV 智能卡读取信息并且我有以前(工作中的)应用程序的日志。
假设,EMV智能卡中有一个AID = 44 44 44 44 44 44 44 44 (DDDDDDDD)的应用
我正在发送 APDU 命令:00 A4 04 00 08 44 44 44 44 44 44 44 44 00 并收到超时异常(超时 = 60 秒)。
我尝试发送 APDU 命令:00 A4 04 00 08 44 44 44 44 44 44 44 44 并得到响应代码 = 61 37。
我尝试 select 文件 1PAY.SYS.DDF01,立即得到响应 = 6a82(正确)。
错误代码 61XX 表示您将在使用 Le=XX 调用 Get Response 命令后收到您的数据:
示例:
--> 00 A4 04 00 08 44 44 44 44 44 44 44 44
<-- 61 37
--> 00 C0 00 00 37
<-- some data of length 0x37 and status code 90 00.
相关问题:
About Get Response command in javacard
Oracle 文档:
There may be several APDU connections open at the same time using
different logical channels with the same card. However, since APDU
protocol is synchronous, there can be no interleaving of command and
their response APDUs across logical channels. Between the receipt of
the command APDU and the sending of the response APDU to that command,
only one logical channel is active. For T=0 protocol, for case 4 and
case 2 command APDUs the card may respond with '61 XX' or '6C XX'.
These special cases MUST be handled by the implementation in the
following manner:
'61 XX': The implementation MUST send GET RESPONSE to the card to get the response data before any other command is sent.
'6C XX': The implementation MUST resend the command after setting Le equal to XX received from the card before any other command is
sent.
In both the cases discussed above, the implementation MUST make sure
that between sending the command APDU, receiving status word '61 XX'
or '6C XX', and sending GET RESPONSE or resending the command APDU
with Le set to XX respectively, there MUST not be any other APDU
exchange on any logical channel with the card. In case the status word
'61 XX' is received multiple times successively from the card, the
implementation must accumulate all the response data received from the
card before returning it to the J2ME application. J2ME applications
MUST remain oblivious of the exchanges mentioned above and should only
get the response received as a result of the above operations.
我将库从 RXTXserial 更改为 JSSC,它解决了我的问题。现在我得到的响应没有 GET RESPONSE 请求。谢谢大家。
我想重新开发新的桌面应用程序以从 EMV 智能卡读取信息并且我有以前(工作中的)应用程序的日志。
假设,EMV智能卡中有一个AID = 44 44 44 44 44 44 44 44 (DDDDDDDD)的应用
我正在发送 APDU 命令:00 A4 04 00 08 44 44 44 44 44 44 44 44 00 并收到超时异常(超时 = 60 秒)。
我尝试发送 APDU 命令:00 A4 04 00 08 44 44 44 44 44 44 44 44 并得到响应代码 = 61 37。
我尝试 select 文件 1PAY.SYS.DDF01,立即得到响应 = 6a82(正确)。
错误代码 61XX 表示您将在使用 Le=XX 调用 Get Response 命令后收到您的数据:
示例:
--> 00 A4 04 00 08 44 44 44 44 44 44 44 44
<-- 61 37
--> 00 C0 00 00 37
<-- some data of length 0x37 and status code 90 00.
相关问题: About Get Response command in javacard
Oracle 文档:
There may be several APDU connections open at the same time using different logical channels with the same card. However, since APDU protocol is synchronous, there can be no interleaving of command and their response APDUs across logical channels. Between the receipt of the command APDU and the sending of the response APDU to that command, only one logical channel is active. For T=0 protocol, for case 4 and case 2 command APDUs the card may respond with '61 XX' or '6C XX'. These special cases MUST be handled by the implementation in the following manner:
'61 XX': The implementation MUST send GET RESPONSE to the card to get the response data before any other command is sent. '6C XX': The implementation MUST resend the command after setting Le equal to XX received from the card before any other command is sent.
In both the cases discussed above, the implementation MUST make sure that between sending the command APDU, receiving status word '61 XX' or '6C XX', and sending GET RESPONSE or resending the command APDU with Le set to XX respectively, there MUST not be any other APDU exchange on any logical channel with the card. In case the status word '61 XX' is received multiple times successively from the card, the implementation must accumulate all the response data received from the card before returning it to the J2ME application. J2ME applications MUST remain oblivious of the exchanges mentioned above and should only get the response received as a result of the above operations.
我将库从 RXTXserial 更改为 JSSC,它解决了我的问题。现在我得到的响应没有 GET RESPONSE 请求。谢谢大家。