title: What is meaning of the response status word 0x61xx from a smart card?
body: <p>I wrote a Java Card applet that saves some data into the APDU buffer at offset <code>ISO7816.OFFSET_CDATA</code> and sends those bytes as a response.</p>
  
  <pre><code>Util.arrayCopy(Input_Data, (short)0, buffer, (short) ISO7816.OFFSET_CDATA, (short)Datalength);
  apdu.setOutgoing();
  apdu.setOutgoingLength((short)(DataLength) );
  
  apdu.sendBytesLong(buffer, ISO7816.OFFSET_CDATA, (short)(DataLength));
  </code></pre>
  
  <p>I tested this in a simulator without any problem. But when I test this on a real smart card (Java Card v2.2.1 manufactured by Gemalto), I get the status word <code>0x6180</code> as response.</p>
  
  <p>My command APDU is <code>00 40 00 00 80 Data</code>, where data has a length of 128 bytes, so I have 4+128 bytes in the buffer and (260-(4+128)) byte is null.</p>