Page 1 of 1

Extended APDUs on JC10M128C

Posted: Tue Aug 01, 2017 5:32 am
by tommihasi
Hi,

I use the JC10M128C card with JCIDE 2.0.1.70.

I have implemented an applet, which shall support extended APDUs with T=1. In general it works
for transmit and receive, I can see, that the APDU is divided in chunks to transfer data sizes above
of IFSD/IFSC.

But I see a problem during transmit from card (card->reader), if the response data is larger then 256 bytes.
In this case I get an exception during execution of command:

apdu.setOutgoingLength(outlength); // outlength is 257 -> exception
apdu.setOutgoingLength(outlength); // outlength is 256 -> no problem

The exception tells me the reason: BAD_LENGTH.

Is there any known limitation with this card ?

I use the "import javacardx.apdu.ExtendedLength;", and in general it works, but to a size of 256 bytes only.
I use the extended Le and Lc, as specified in ISO7816.

Regards,

Torsten

Re: Extended APDUs on JC10M128C

Posted: Sat Aug 05, 2017 1:24 pm
by UNKNwYSHSA
Your applet shall extends ExtendedLength interface.
Please refer to this example: https://javacardos.com/wiki/javacard-ap ... munication

Re: Extended APDUs on JC10M128C

Posted: Mon Aug 07, 2017 3:56 am
by tommihasi
Hi,

thanks a lot, this hint solved the issue. I forgot to append the "implements ExtendedLength" to the "public class" line.

Regards,

Torsten