0
votes

I am writing a software in java, on the reader side, to communicate with a MiFare DESfire EV1 card. I am using for this javax.smartcardio. I managed to create a channel and send wrapped APDU of native DESfire commands. For example I managed to read a file or even to authenticate.

What I have been struggling with, those last days, is trying to send a PPS command at level-4 to be able to set the Baud rate between the reader and the card.

The native PPS command is as follow:

DESFIRE command code 0xD0
DESFIRE command parameter 0x11 0x0A 

If I am coherent with my previous technique to build ISO 7816-4 wrapped APDU, then it is supposed to look like this 0x90 0xD0 0x00 0x00 0x2 0x11 0x0A 0x00.

Here is the response of this command:

SW1 : 0x91
DESFIRE response data : 0x1C
SW2 : none

0x1C stands for ILLEGAL_COMMAND_CODE; the syntax seems correct to me, why cannot I send this command?

1

1 Answers

1
votes

With APDU wrapping you can only wrap DESFire commands. The PPS command is part of the underlying ISO 14443-4 layer. In fact the PPS command is part of the initialization phase of the ISO 14443-4 transmission protocol. However, once you are at the point where you can transmit APDUs, the ISO 14443-4 transmission protocol (ISO-DEP / T=CL) has already been established. So at this point you cannot change any protocol parameters with the PPS command.

In general you can't change these parameters through javax.smartcardio unless the smartcard reader implements some specific interface for re-activation of the card with a different data rate.