Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

Doubt about Response APDU in case2 and case4

JavaCard Applet Development Related Questions and Answers.
shyjarod
Posts: 12
Joined: Wed Jul 29, 2015 1:45 am
Points :18
Contact:

Doubt about Response APDU in case2 and case4

Post by shyjarod » Fri Dec 04, 2015 6:38 am

Recently, I have read ISO/IEC 7816-3 spec to learn APDU command. But I have a doubt about Response TPDU in case 2 & case4.
As we all know, there are the four structures of command APDUs.
In case2, if process aborted, it returns 6CXX.



In case4, it returns 61XX.



What is the difference between "6CXX" and "61XX"?
You do not have the required permissions to view the files attached to this post. Please login first.

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: Doubt about Response APDU in case2 and case4

Post by UNKNwYSHSA » Fri Dec 04, 2015 10:56 pm

6CXX means to process the current APDU command, the CAD need re-issuing same APDU command on the same origin logical channel number as that of the current APDU command with the corrected length.

Code: Select all

<< 80 01 00 00 00 // The APDU command; From ISO7816-3, the APDU command is in CASE2;
>> 6C 07 // Corrected length is 0x07;
<< 80 01 00 00 07 // Reissue the APDU command with corrected length;
>> 11 22 33 44 55 66 77 90 00 // APDU command responsed data.

61XX means the CAD need send GET RESPONSE command with Le as the value of XX to got the response data of the current APDU.

Code: Select all

<< 80 01 00 00 05 11 22 33 44 55 00 // The APDU command; From ISO7816-3, the APDU command is in CASE4;
>> 61 07 // Corrected length is 0x07;
<< 00 C0 00 00 07 // Reissue the APDU command with corrected length;
>> 11 22 33 44 55 66 77 90 00 // Got responsed data.
sense and simplicity

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: Doubt about Response APDU in case2 and case4

Post by UNKNwYSHSA » Fri Dec 04, 2015 11:01 pm

If you want to understand more, class javacard.frameword.APDU in specification Java Card API document describes more details. Key word is ISO7816.SW_BYTES_REMAINING and APDUException.NO_T0_REISSUE.
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 85 guests

JavaCard OS : Disclaimer