I found the root cause for the problems with talking to the MIFARE Desfire EV3: After successful card activation and after successful reception of ATS, the card only communicates with ISO/IEC 14443-4 protocol.
The PN5180 library I have did send the native commands, but not wrap the command in the block format described in the ISO/IEC 14443-4 .
All I needed to do was adding the Prologue field. I only use the PCB byte with 0x02, which marks the following data as "I-block". The Epilogue field (2 byte CRC) do not seem to be required, in another forum message I found that this CRC is created and appended automatically by the PN5180.
The PN532, which I use on Linux together with libnfc and libfreefare, seem to have this block framing embedded, which seems to be one of the major differences between those chips.
But now I am stuck with another issue: If I send the "Format" command (0xFC) to the card (of course after selecting the PICC and authentication), I do not get an answer. The card is supposed to acknowledge the command with 0x00, but I do not get any response at all. I tried with a longer delay between sending the command and checking for a reply, but there is no answer within 80ms, after 80ms I get a response "0xf2 0x01", which is an S-block with WTX and according to the ISO14443-4 the PICC request more time. I do not understand the "Frame waiting time" chapter in the ISO14443-4, nor do have an idea what to do after reception of a S-block with WTX. Do I simply need to wait some more time and try to read a response after a certain time again?
The real big issue is that after such a failed "Format" command my library cannot access the EV3 card with ISO14443-4 framed blocks any more!
Activation and the RATS (with ISO14443-3 commands) works, but any later command with ISO14443-4 framed blocks will not get an answer. Even releasing the card from the reader or switching off the RF field does not bring the card back to a normal state.
Only way to get such an EV3 card back to work is reading it once with the PN532 reader and libfreefare on Linux. You don't need to call the "Format" command, just do a mifare-desfire-info, which returns some info from the card (by sending some ISO14443-4 commands to the card, exactly the same commands that I send and which do not get a reply ?!)
So there are two questions open now:
How to deal with the FWT (FrameWaitTime) and a s-block with "WTX" ?
What to do to get a EV3 card back to normal operation mode after a failed "Format" command ?
Best Regards
Cajus