Page 1 of 1

How to read data on Mifare DESFire EV1 cards

Posted: Sun May 07, 2017 11:27 pm
by Galandas
Hey guys,

I was following the steps below to read file data on Mifare DESFire EV1 cards using ISO 7816-4 APDU commands. But I always got error "6A86".

Here are se/re APDU commands I sent:
>> 00,A4,04,00,07,AID
<< 9100

>> 00,A4,00,00,02,3F,00
<< 9100

>> 00,B0,00,00,03
<< 6A86

the command I sent to read data may be wrong, so I got error status. Would friends here tell me the right APDU command to read file data?

Thanks.

Gala

Re: How to read data on Mifare DESFire EV1 cards

Posted: Mon May 08, 2017 5:26 am
by Romanzi
Why did you receive 9100, rather than 9000? It's a bit strange. Usually, 9100 status words is returned when you use the ISO/IEC 7816-4 wrapped command set.

Re: How to read data on Mifare DESFire EV1 cards

Posted: Mon May 08, 2017 5:49 am
by chaholic
The first and second step are all to select MF. MF does not have a data part, so you can't read data from it. That is why you got 6A86.

Re: How to read data on Mifare DESFire EV1 cards

Posted: Mon May 08, 2017 6:19 am
by Galandas
chaholic wrote:The first and second step are all to select MF. MF does not have a data part, so you can't read data from it. That is why you got 6A86.


Thanks for your help. How do we know which are MF or EF? And how to select EF ?

Re: How to read data on Mifare DESFire EV1 cards

Posted: Mon May 08, 2017 6:26 am
by Galandas
Romanzi wrote:Why did you receive 9100, rather than 9000? It's a bit strange. Usually, 9100 status words is returned when you use the ISO/IEC 7816-4 wrapped command set.


Thanks for your answer. I don't know why it returned 9100 either. I always thought it was right.