JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html

What is Multi-records Reading APDU command structure?

JavaCard Applet Development Related Questions and Answers.
leonard
Posts: 25
Joined: Wed Nov 18, 2015 12:13 am
Points :176
Contact:

What is Multi-records Reading APDU command structure?

Post by leonard » Thu Dec 10, 2015 10:53 pm

I have a card support T0 protocol with an applet is installed on it. The host send a "multi-records reading" command to get records data. Records are read which are specified by record identifiers in this data field of this command. These are steps that I did:
1. Select DF
2. Send a command to read sequence of records[/list]

Code: Select all

00 B2 00 06 16 73 0A 51 02 40 01 54 04 00 10 00 04 73 08 51 02 40 02 54 02 00 01 00

The meaning of the command is as bellow:
- INS = 'B2': read record(s)
- P1 = '00': references the current record (ISO 7814-4, 7.3.3, table 48)
- P2 = '06' = '00000 110' :
'0000' indicate current short EF id (ISO 7814-4, 7.3.2, table 47)
'110' mean read all records from the last up to P1 (ISO 7814-4, 7.3.3, table 49)
- Le = 16 : data length
Data field follow the BER-TLV, for example:73 0A 51 02 40 01 54 04 00 10 00 04
Tag'73' indicate that sequence of bytes above consist hierarchy data object structure in data filed (length = '0A')
Tag'51' reference to 2-byte EF identifier = '40 01'
Tag'54' reference to one or more record identifiers, in this case are '00 10' and '00 04'

- Le = '00'

This is expect respond from card:
53 |length of data| record data| 53| length of data| record data|......


I test this command with the card, the card return 'Unknown Error' message.
Could you tell me what is wrong with the command? What is correct multi-records reading command?
Thanks.
Last edited by leonard on Thu Dec 10, 2015 11:01 pm, edited 1 time in total.

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

Re: What is Multi-records Reading APDU command structure?

Post by UNKNwYSHSA » Thu Dec 10, 2015 10:58 pm

leonard wrote:I test this command with the card, the card return 'Unknown Error' message.
Could you tell me what is wrong with the command? What is correct multi-records reading command?
Thanks.

"Unknown error"?
Give us the SW value, please.
sense and simplicity

leonard
Posts: 25
Joined: Wed Nov 18, 2015 12:13 am
Points :176
Contact:

Re: What is Multi-records Reading APDU command structure?

Post by leonard » Thu Dec 10, 2015 11:15 pm

UNKNwYSHSA wrote:
leonard wrote:I test this command with the card, the card return 'Unknown Error' message.
Could you tell me what is wrong with the command? What is correct multi-records reading command?
Thanks.

"Unknown error"?
Give us the SW value, please.

Card return '61 23' SW bytes.

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

Re: What is Multi-records Reading APDU command structure?

Post by UNKNwYSHSA » Thu Dec 10, 2015 11:52 pm

leonard wrote:
UNKNwYSHSA wrote:
leonard wrote:I test this command with the card, the card return 'Unknown Error' message.
Could you tell me what is wrong with the command? What is correct multi-records reading command?
Thanks.

"Unknown error"?
Give us the SW value, please.

Card return '61 23' SW bytes.


Send GET RESPONSE command 00 C0 00 00 23 to get response data.
sense and simplicity

leonard
Posts: 25
Joined: Wed Nov 18, 2015 12:13 am
Points :176
Contact:

Re: What is Multi-records Reading APDU command structure?

Post by leonard » Fri Dec 11, 2015 1:03 am

Thank you very much UNKNwYSHSA, you save my all day !

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

Re: What is Multi-records Reading APDU command structure?

Post by UNKNwYSHSA » Fri Dec 11, 2015 1:30 am

leonard wrote:Thank you very much UNKNwYSHSA, you save my all day !

:D
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 24 guests

JavaCard OS : Disclaimer