Hi kuafu,
Thank you again for offering to help out!!!
I will try to make this as short as possible.
As per ISO7816-3 (10.3.3)
After transmitting the header as a string of five characters (C-APDU), the interface device shall wait for a character conveying a procedure byte (R-APDU). There are three types of procedure bytes: NULL, SW1, ACK.
NULL: 0x60
SW1, SW2: (Example: 9000 - command normally completed etc...)
ACK:
If the value is '60', it is a NULL byte. It requests no action on data transfer. The interface device shall wait for a character conveying a procedure byte.
At each procedure byte, the card can proceed with the command by NULL or ACK, or finish the command by SW1 SW2, or show its disapproval by becoming unresponsive (WT will be exceeded).
I am trying to respond to a Generate Application cryptogram request:
80 AE 80 00 1D (CLA, INS, P1, P2, P3)
I would like the card to respond with a NULL byte 0x60 to request the interface device for more time.
If I write the following code:
ISOException.throwIt((short) 0x60);
The interface device will throw an error and disconnect the communication with the card as 0x60 is not an SW1 byte (as defined by ISO7816-3)
If I write the following code:
{
(byte) 0x60
};
short len = (short) sendbyte.length;
Util.arrayCopyNonAtomic(sendbyte, (short)0, buffer, (short)0, (short)len);
apdu.setOutgoing();
apdu.setOutgoingLength(len);
apdu.sendBytes((short) 0, (short)len);
The card will respond with the following data: 60 90 00, this is also incorrect parameters (as defined by ISO7816-3).
Someone has asked a similar question in another post:
https://javacardos.com/javacardforum/vi ... +byte#p231
The reply in that post stated:
public static void waitExtension() throws APDUException
Note:
1-In T=0 protocol, a NULL procedure byte is sent to reset the work waiting time.
2-In T=1 protocol, the implementation needs to request the same T=0 protocol work waiting time quantum by sending a T=1 protocol request for wait time extension.
is this related to me? if so how can i implement this function in my code?
A sample code would be greatly appreciated!!!
Thanks in advance!!!!!!!!!!!!!!!!