I would like my java card applet to emulate our legacy non-java card (native OS) in our organization. The following is the targeted behaviour of the applet:
- Select the applet (A4) and return 0x61XX.
- Use GET RESPONSE (C0) to read the response
Protocol is T1.
My sample java card is from NXP compatible with JCRE 2.2.2. In my code,
//dataLen is 10 bytes
if (selectingApplet()){ apdu.setOutgoing();
apdu.setOutgoingLength((short)dataLen);
apdu.sendBytesLong(data, (short)0, dataLen);
ISOException.throwIt((short)(ISO7816.SW_BYTES_REMAINING_00 + dataLen)
}
I loaded my applet into the test card. The following is the result:
Select applet Result: 0x610A
GET RESPONSE Result: 0x6982
What could be wrong here ? What is the proper way of achieving this if this is even possible with java card ?