Page 1 of 1

question about Le in APDU command

Posted: Tue Jul 12, 2016 2:41 am
by Benli
Hi friends in here,

I have a question about Le in APDU command.

If I don't know how many data I will have in response, is there any special value of Le for this case?

Thanks.

Re: question about Le in APDU command

Posted: Tue Jul 12, 2016 7:58 am
by crizom
If you don't know how many bytes to expect, just set Le to 0x00. It will help you get all the data back.

But there is a special case.

If your card supports T=0 protocol, you will get error state 0x 6C NN (NN is the actually the bytes length the card will give you).
At this time, you should re-send the APDU command with correct Le NN to get the data.