6A80 exception during applet installation
Posted: Wed Sep 20, 2017 11:19 pm
I am stuck in a problem while downloading and installing my applet(a very simple applet) to a JCOP card. It threw error code "6A 80 ". The following is my applet and command log, could anyone help me figure out where is the problem. Thanks.
Here is the command log:
Code: Select all
package com.duc.javacard.atcapplet;
import javacard.framework.*;
public class CardApplet extends Applet {
private CardApplet (byte[] bArray,short bOffset,byte bLength){
register();
}
public static void install(byte[] bArray, short bOffset, byte bLength){
new CardApplet(bArray, bOffset, bLength);
}
public boolean select() {
return true;
}
public void deselect() {
}
public void process(APDU apdu) throws ISOException {
getBalance(apdu);
}
private void getBalance(APDU apdu) {
byte[] buffer = apdu.getBuffer();
short le = apdu.setOutgoing();
if ( le < 2 )
ISOException.throwIt
(ISO7816.SW_WRONG_LENGTH);
apdu.setOutgoingLength((byte)2);
buffer[0] = (byte)(0xFF);
buffer[1] = (byte)(0xFF);
apdu.sendBytes((short)0, (short)2);
}
}
Here is the command log:
Code: Select all
--Install for load command:
80E602001009A00000006203010C06000002EF000000
SW: 9000
--Load command 1:
80E80000EFC4820111010013DECAFFED010204000109A00000006203010C0602001F00130
01F000E000B000E0012001E000A00070000005900000000000001010004000B01020107A00000006
2010103000E010AA00000006203010C0601000806001200800300FF00040400000018FFFF0014001
B07001E000140188C00007A04308F0001181D1E8C00027A0110047800107A00207A08000A0000000
000000000000005000E0003068003000100000006000001090007000000030506060B00590100010
0000000000005FF820001000A00050000000000090008000A000A0000000006010014000D0002000
00000040100180000
SW: 9000
--Load Command 2:
80E8800126080001000000000701001B000F00010000000000030008FFFF000A011004B43
10120066800A100
SW: 9000
--Install for install and make selectable:
80E60C002609A00000006203010C060AA00000006203010C06010AA0000000
6203010C0601010002C9000000
SW: 6A80