nfcsmartcardapdumifaredesfire

DESFire ev1 write data command fails with 917D (PERMISSION_DENIED)


I am writing to an 8K MIFARE EV1 card. Once the file is created, when I retrieve the file configuration (F5), it returns 00 00 EE EE 00 0F 00. Then, I attempt to write to the card with the following command: 90 3B 00 00 0D 01 00 00 00 00 00 06 70 72 75 65 62 61 00, and it returns 91 7D.

I attempted to write data to a DESFire card using the specified write command parameters. I expected the data to be successfully written and immediately available for subsequent read operations. However, I encountered an Error during the write operation and the data not being saved to the card.


Solution

  • According to Michael's instructions, the command is changed from 3B to 3D, and the order of the length bytes is modified, resulting in the following: 90 3D 00 00 0D 01 00 00 00 06 00 00 70 72 75 65 62 61 00.

    With that, it works correctly now