Search code examples
javaandroidsmartcardapdu

Smartcard verify pin apdu command problem in android


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?


Solution

  • 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!"