Page 1 of 1

Request data without sending data

Posted: Sat May 09, 2020 3:33 pm
by YoHidden
Hi there,

I'm trying a simple APDU command to retrieve some data information from my Applet in a smart card based on the SLE78. Since it is simply a request with no data field needed, the LC field should not be present (as ISO7816-4). But since data is expected in the response, the LE should be set to the max length expected. So, I'm sending the APDU sequence...

CLA=80 INS=B0 P1=00 P2=00 LC=00 LE=FF

I know this is incorrect since the LC should be absent (but the presence of LE made me add LC to avoid LE being taken as LC). In fact, I'm getting the response for wrong length: 67 00.

The only way for the command to succeed is to add a dummy 1 byte data field and, therefore, LC becomes 1.

Is this dummy 1 byte data the right way to proceed in this case or is there any other proper way to send this APDU ?

Thanks.