Ban*_*ill 7 java android apdu smartcard smartcard-reader
我是一名初级程序员,在 Android 移动设备上通过 USB 主机向智能卡发送 CCID 命令时遇到问题。这次我发送了 PC_to_RDR_IccPowerOn CCID 命令 PC_to_RDR_IccPowerOn 来激活卡并收到了 ATR 响应。
接下来的过程中,我将 PC_to_RDR_XfrBlock CCID 命令发送到卡以选择 Applet,但我收到了错误响应。
CCID 响应:80 00 00 00 00 00 00 40 FE 00 - 0xFE 含义 与 ICC 讨论错误代码时 CCID 超时参考文档 DWG 设备智能卡集成电路设备第 6.2.6 节。
我找到了解决这个问题的信息,但没有找到解决的方法。如何解决此问题并使 APDU 响应返回 90 00?
更多信息#1 This Byte array is the ATR value (answer to reset) that I get from RDR_to_PC_DataBlock answer is
ATR response: 3B 68 00 00 54 48 20 4E 49 44 20 36
Reference ATR value at https://smartcard-atr.appspot.com/Run Code Online (Sandbox Code Playgroud)
#2 This Byte array is APDU command that I combine with PC_to_RDR_XfrBlock CCID command to select Applet.
6F 0D000000 00 01 00 0000 00A4040008A000000054480001
Applet used to select Thailand Personal DF name of the APDU command line from this link.
https://github.com/chakphanu/ThaiNationalIDCard/blob/master/APDU.mdRun Code Online (Sandbox Code Playgroud)
对于回复,我的英语不好,但如果您愿意,我会尽力发送信息,谢谢您的帮助。
通常我使用 2 个这些命令
1 PC_to_RDR_IccPowerOn
Command (byte) 0x62, (byte) 0x00000000, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0000
Run Code Online (Sandbox Code Playgroud)
1 RDR_to_PC_DataBlock
Response 80 0C 00 00 00 00 00 00 00 00 3B 68 00 00 54 48 20 4E 49 44 20 36
Run Code Online (Sandbox Code Playgroud)
2 PC_to_RDR_XfrBlock(带有 APDU 选择小程序)
Command (byte) 0x6f, (byte) 0x0000000c, (byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x0000, (byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x08, (byte) 0xa0, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x54, (byte) 0x48, (byte) 0x00, (byte) 0x01
Run Code Online (Sandbox Code Playgroud)
2 RDR_to_PC_DataBlock
Response 80 00 00 00 00 00 00 40 FE 00
Run Code Online (Sandbox Code Playgroud)