Reputation: 85
I'm working on an android pos device. when I inserted the smart card and run the following command it gives me 9000 response and works fine :
00 A4 00 00 08 610433BE00010001
CLA/INS/P1/P2/Lc/DATA
but when I want to send pin verification command :
00 20 00 00 02 80 12 (the pin is 8012 for example)
It give me 6D00 error, which means the command not supported.
what's wrong with this command?
Upvotes: 3
Views: 761
Reputation: 1
You should send this APDU command to verify your pin:
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
Upvotes: 0
Reputation: 85
I found the solution. every apdu command needs to transmit step by step, for example:
select applet > check pin verify > get card registration info
"before run any command on smartcard, i need to run select applet first!"
Upvotes: 1