android 中的智能卡验证 pin apdu 命令问题
Smartcard verify pin apdu command problem in android
我正在研究 android pos 设备。当我插入智能卡和 运行 以下命令时,它会给我 9000 响应并且工作正常:
00 A4 00 00 08 610433BE00010001
CLA/INS/P1/P2/Lc/DATA
但是当我想发送密码验证命令时:
00 20 00 00 02 80 12
(以8012为例)
它给我 6D00 错误,这意味着不支持该命令。
这个命令有什么问题?
我找到了解决方案。
每条apdu命令都需要逐级传送,例如:
select小程序>验证密码>获取卡片注册信息
"before run any command on smartcard, i need to run select applet first!"
您应该发送此 APDU 命令来验证您的密码:
00 20 00 00 04 38 30 31 32 instead of 00 20 00 00 02 80 12
04 => 4 bytes
38 => Hex of integer value of 8
30 => Hex of integer value of 0
31 => Hex of integer value of 1
32 => Hex of integer value of 2
and of course result should be 9000
我正在研究 android pos 设备。当我插入智能卡和 运行 以下命令时,它会给我 9000 响应并且工作正常:
00 A4 00 00 08 610433BE00010001
CLA/INS/P1/P2/Lc/DATA
但是当我想发送密码验证命令时:
00 20 00 00 02 80 12 (以8012为例)
它给我 6D00 错误,这意味着不支持该命令。
这个命令有什么问题?
我找到了解决方案。 每条apdu命令都需要逐级传送,例如:
select小程序>验证密码>获取卡片注册信息
"before run any command on smartcard, i need to run select applet first!"
您应该发送此 APDU 命令来验证您的密码:
00 20 00 00 04 38 30 31 32 instead of 00 20 00 00 02 80 12
04 => 4 bytes
38 => Hex of integer value of 8
30 => Hex of integer value of 0
31 => Hex of integer value of 1
32 => Hex of integer value of 2
and of course result should be 9000