Get 6C80 in the response APDU
Posted: Mon Feb 22, 2016 4:57 am
Here is part of my applet code which is to handle specific APDU command :
This is the APDU command which is supposed to write data to the card.
I don't expect any data in the response. Why do I get that error? Is there any error in my applet code?
Code: Select all
...
private void updateCardMetaData(APDU apdu){
byte[] buffer = apdu.getBuffer();
short len = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);
cardMetaData= processCardMetaData(buffer,len);
short length =(short) cardMetaData.length;
Util.arrayCopyNonAtomic(cardMetaData, (short) 0, buffer, (short) 0,
(short) length);
apdu.setOutgoingAndSend((short) 0, length);
}
...
//Code for processCardMetaData
private byte[] processCardMetaData(byte[] buffer,short len){
//cardMetaData
byte tempData[]= new byte[128];
short counter=(short)0;
short counter2=(short)(counter+5);
while(counter<len){
tempData[counter] =buffer[counter2];
counter+=1;
counter2+=1;//=(short)(counter2+1);
}
return tempData;
}
This is the APDU command which is supposed to write data to the card.
Code: Select all
--> 805500002D416D626F6B6120496D6D6163756C617465204F64696D617C3130313337
36303130303030303035317C31323135
<-- 6C80
I don't expect any data in the response. Why do I get that error? Is there any error in my applet code?