← Back to list

How to read and write large data files on a Mifare DESFire EVx NFC tag on an ESP32 with PN532…

In my last tutorials, I wrote about “How to work with a Mifare DESFire EVx NFC tag on an ESP32 with PN532 reader” in part 1 and part 2. In…

AndroidCrypto · 2025-11-24 11:59 · 2 claps · 15.7 min read
#esp32 #pn532 #nfc #mifare-desfire #desfire
Open on Medium ↗

How to read and write large data files on a Mifare DESFire EVx NFC tag on an ESP32 with PN532 reader

In my last tutorials, I wrote about “How to work with a Mifare DESFire EVx NFC tag on an ESP32 with PN532 reader” in part 1 and part 2. In these publications, I explained how to write to and read from a Standard Data file with a file size of 32 bytes. This tutorial is about reading from and writing to a larger Standard Data file (file size of 255 bytes).

You may ask yourself, “what is the difference between small and large data files on a Mifare DESFire EVx tag ?” I will show how the tag is reacting when doing so. As this tutorial follows the named ones, I strongly recommend reading both, as I am building upon what has already been written.

Topics of this tutorial:

  • Changes to the previous tutorial
  • Changes to the Adafruit_PN532 library (IMPORTANT)
  • Create a Standard Data file with a file size of 255 bytes
  • Read from a Standard Data file with a file size of 255 bytes
  • Solution for reading from a Standard Data file with a file size of 255 bytes
  • Write to a Standard Data file with a file size of 255 bytes
  • Solution for writing to a Standard Data file with a file size of 255 bytes
  • Summary

Changes to the previous tutorial

The complete tutorial workflow is available in the new file “T02_Large_File_Handling.h”. It looks like a copy & paste of the last tutorial file “T01_Basic.h”, but I changed the file number from “01” to “03” and the file size from “32” to “255”. Let’s see what effects these changes have.

Changes to the Adafruit_PN532 library

It is necessary that you make two changes in the source code of the Adafruit_PN532 library, or you won’t be able to proceed further !

Please change the file “Adafruit_PN532.cpp” that is located in the libraries' folder ⇾ Adafruit_PN532. Open the file with a text editor and search for “#define PN532_PACKBUFFSIZ”. There should be a value of 64 appended, please change to the new value 255:

//#define PN532_PACKBUFFSIZ 64 ///< Packet buffer size in bytes
#define PN532_PACKBUFFSIZ 255  ///< Packet buffer size in bytes

Please scroll down to the “inDataExchange” method and change the timeout from 1000 milliseconds to the new value of 5000 milliseconds:

bool Adafruit_PN532::inDataExchange(uint8_t *send, uint8_t sendLength,
                                    uint8_t *response,
                                    uint8_t *responseLength) {
...
//if (!sendCommandCheckAck(pn532_packetbuffer, sendLength + 2, 1000)) {
if (!sendCommandCheckAck(pn532_packetbuffer, sendLength + 2, 5000)) {
...

Then save and close the file — you are done ! A modified version of the library is available in my project repository of part 1/2).

Create a Standard Data file with a file size of 255 bytes

There are just 2 changes to create a Standard Data file with a size of 255 bytes.

Serial.println(DIVIDER);
Serial.println("Create a Standard Data file with Free Access Rights and fileSize 255 bytes");
byte sdP03No = 0x03;  // standard data plain
uint8_t sdP03Size = 255;
dfStatusCode = desfire.DF_Plain_CreateStandardFileDefaultFreeAccessSized(sdP03No, sdP03Size, ESP32_DESFire::DF_COMMMODE_PLAIN);
desfire.DF_StatusCodeDebugPrint(dfStatusCode);

Running this code gives the awaited response “0x9100h” meaning “Success”.

Read from a Standard Data file with a file size of 255 bytes

We are using the same method for reading the Standard Data file (DF_Plain_ReadData_Simple) but with different parameters (sdP03No, sdP03Size):

Serial.println(DIVIDER);
Serial.println("Read from a file with Free Access Rights and fileSize 255 bytes (Simple)");
memset(appData, 0, sdP03Size);
appLenExt = 255;
dfStatusCode = desfire.DF_Plain_ReadData_Simple(sdP03No, sdP03Size, 0, appData, &appLenExt);
if (dfStatusCode == ESP32_DESFire::DF_STATUS_OK) {
  Serial.printf("Read Data response length %0d data:", appLenExt);
  printHex(appData, appLenExt);
  Serial.println();
}
Send length 13
 90 BD 00 00 07 03 00 00 00 FF 00 00 00
Recv length 60
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 91 AF
Additional Frame -> Get More Data

Did we receive an error response ? Thinking back to the Get Version command in part 2, the status code “0x91AFh” at the end is indicating that the card has sent some data (in our case 58 0x00h bytes), but as we requested for more bytes (255 bytes) some additional data is still available.

Solution for reading from a Standard Data file with a file size of 255 bytes

The good news is: the card is taking over the chunking part automatically, and we just have to combine all parts to the complete file content. This is done by a separate method in the DESFire library (DF_Plain_ReadData):

Serial.println("Read from a Standard Data file with Free Access Rights and fileSize 255 bytes (Extended)");
memset(appData, 0, sdP03Size);
appLenExt = 255;
dfStatusCode = desfire.DF_Plain_ReadData(sdP03No, sdP03Size, 0, appData, &appLenExt);
desfire.DF_StatusCodeDebugPrint(dfStatusCode);
if (dfStatusCode == ESP32_DESFire::DF_STATUS_OK) {
  Serial.printf("Read Data response length %0d data:", appLenExt);
  printHex(appData, appLenExt);
  Serial.println();
}
Read from a Standard Data file with Free Access Rights and fileSize 255 bytes (Extended)
Send length 13
 90 BD 00 00 07 03 00 00 00 FF 00 00 00
Recv length 60
 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 91 AF
Send length 5
 90 AF 00 00 00
Recv length 60
 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 91 AF
Get_More_Data Returning ADDITIONAL_FRAME
Send length 5
 90 AF 00 00 00
Recv length 60
 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE 91 AF
Get_More_Data Returning ADDITIONAL_FRAME
Send length 5
 90 AF 00 00 00
Recv length 60
 AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 91 AF
Get_More_Data Returning ADDITIONAL_FRAME
Send length 5
 90 AF 00 00 00
Recv length 25
 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 91 00
Get_More_Data Returning DF_STATUS_OK
SUCCESS
Read Data response length 255 data: 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF

In the end, the library is running 5 calls to receive the complete content of the file (255 bytes).

Write to a Standard Data file with a file size of 255 bytes

Same as to the file reading, we now send an array of 255 bytes to the file:

Serial.println(DIVIDER);
Serial.println("Write to a file with Free Access Rights and fileSize 255 bytes");
memset(appData, 0, sdP03Size);
appLenExt = sdP03Size;
generateAscendingNumbersHelper(appData, sdP03Size);
Serial.printf("Generated data length %0d data:", sdP03Size);
printHex(appData, sdP03Size);
Serial.println();
dfStatusCode = desfire.DF_Plain_WriteData_Simple(sdP03No, sdP03Size, 0, appData);
desfire.DF_StatusCodeDebugPrint(dfStatusCode);
Write to a file with Free Access Rights and fileSize 255 bytes (Extended)
Generated data length 255 data: 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
Send length 12
 90 8D 00 00 06 03 00 00 00 FF 00 00
Recv length 2
 91 7E

This is a strange result on the first view, but when examine closer it gets clear. As our DF_BasicTransceive method is based on a byte variable for the length, we are crashing the value range:

statusCode = DF_BasicTransceive(sendData2, length + 13, backData, &backLen);

The (data) length is 255 plus 13 files used for the wrapped command gives an overflow and results in a send length of 12 bytes.

Okay, let us try to send just 255–13 = 242 bytes of data, that should fit in the byte variable:

Serial.println("Write 242 bytes to a file with Free Access Rights and fileSize 255 bytes");
dfStatusCode = desfire.DF_Plain_WriteData_Simple(sdP03No, 242, 0, appData);

Now we receive a different response:

Write 242 bytes to a file with Free Access Rights and fileSize 255 bytes
Send length 255
 90 8D 00 00 F9 03 00 00 00 F2 00 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 00
Recv length 255
 6D 07 40 3F 48 00 00 00 00 FF 00 00 00 00 FF 00 64 1A FC 3F A3 2A 0D 80 F0 21 FB 3F 64 1A FC 3F 6D 07 40 3F 6F 21 FB 3F AC 21 FB 3F AB 21 FB 3F 64 1A FC 3F 86 2B 0D 80 10 22 FB 3F 60 DB FB 3F 56 08 2A DD F2 00 00 00 AB 21 FB 3F 00 00 00 00 80 8D FB 3F 5F 7E 0D 80 50 22 FB 3F 00 00 00 00 03 00 00 00 0A 00 00 00 0C 22 FB 3F FF 00 00 00 FF 00 00 00 5F 7E 0D 80 50 22 FB 3F 00 00 00 00 07 56 78 9A D0 17 FC 3F C8 17 FC 3F 64 DB FB 3F 64 1A FC 3F 65 91 08 80 70 22 FB 3F 00 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF 64 1A FC 3F 00 00 00 00 90 22 FB 3F 2C 7E 0D 40 00 00 00 00 01 00 00 00 94 26 FC 3F 8C 81 FB 3F 01 00 00 00 00 00 00 00 B0 22 FB 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FAIL (not categorized)

The program is printing a “response”, but this is just some old data in the buffer, but not any returned data by the card. Scrolling to the end of the 255 bytes, there is no “0x91xxh” response, so and error occurred.

Before coming to a solution, I’m trying to write to the file with increasing data lengths, starting with 209 bytes of data:

Serial.println(DIVIDER);
Serial.println("Write increasing bytes to a file with Free Access Rights and fileSize 255 bytes");
for (uint8_t dataLength = 209; dataLength < 256; dataLength++) {
  Serial.printf("new data length: %d\n", dataLength);
  dfStatusCode = desfire.DF_Plain_WriteData_Simple(sdP03No, dataLength, 0, appData);
  desfire.DF_StatusCodeDebugPrint(dfStatusCode);
  if (dfStatusCode != ESP32_DESFire::DF_STATUS_OK) break;
}

The result brings us nearer to a solution. Please note: as we changed the timeout within the Arduino_PN532 library, the program seems to halt when writing the “new data length 211” section. Just wait and still hold the tag to the reader.

Write increasing bytes to a file with Free Access Rights and fileSize 255 bytes
new data length: 209
Send length 222
 90 8D 00 00 D8 03 00 00 00 D1 00 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 00
Recv length 2
 91 00
SUCCESS
new data length: 210
Send length 223
 90 8D 00 00 D9 03 00 00 00 D2 00 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 00
Recv length 2
 91 00
SUCCESS
new data length: 211
Send length 224
 90 8D 00 00 DA 03 00 00 00 D3 00 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 00
Recv length 255
 5C 21 FB 3F 9E 2B 0D 80 10 22 FB 3F D3 00 00 00 CC 17 FC 3F F9 2A 0D 80 F0 21 FB 3F D3 00 00 00 AB 21 FB 3F 00 00 00 00 80 8D FB 3F AB 21 FB 3F 07 00 00 00 9E 2B 0D 80 F0 21 FB 3F C0 21 FB 3F 23 F8 56 B3 D3 00 00 00 AB 21 FB 3F 00 00 00 00 80 8D FB 3F 77 7E 0D 80 50 22 FB 3F 00 00 00 00 03 00 00 00 0A 00 00 00 0C 22 FB 3F FF 00 00 00 FF 00 00 00 77 7E 0D 80 50 22 FB 3F 00 00 00 00 07 56 78 9A D0 17 FC 3F C8 17 FC 3F 64 DB FB 3F 64 1A FC 3F 65 91 08 80 70 22 FB 3F 00 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF 64 1A FC 3F 00 00 00 00 90 22 FB 3F 44 7E 0D 40 00 00 00 00 01 00 00 00 94 26 FC 3F 8C 81 FB 3F 01 00 00 00 00 00 00 00 B0 22 FB 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FAIL (not categorized)

The response from the card is clear: there seems to an internal buffer (in the PN532 chip ?) with a maximum capacity of 223 bytes. When extending this limit, the complete flow crashes.

Solution for Writing to large Data files

The solution is simple: we have to chunk the data in parts that fit in the available memory frame, in our case chunk in parts of 210 bytes. This way we avoid the buffer overflow situation. You can find the implementation in the DESFire_Library.cpp (method DF_Plain_WriteData()):

const byte PLAIN_MAX_WRITE_LENGTH = 210;

ESP32_DESFire::DF_StatusCode ESP32_DESFire::DF_Plain_WriteData(byte fileNo, uint16_t length, byte offset, byte* sendData) {
  ESP32_DESFire::DF_StatusCode df_statusCode;
  uint16_t sendDataOffset = 0;

  while (length > PLAIN_MAX_WRITE_LENGTH) {
    df_statusCode = DF_Plain_WriteData_native(fileNo, PLAIN_MAX_WRITE_LENGTH, offset, &sendData[sendDataOffset]);
    if (df_statusCode != DF_STATUS_OK)
      return df_statusCode;

    offset += PLAIN_MAX_WRITE_LENGTH;
    sendDataOffset += PLAIN_MAX_WRITE_LENGTH;
    length -= PLAIN_MAX_WRITE_LENGTH;
  }

  if (length == 0)
    return DF_STATUS_OK;

  return DF_Plain_WriteData_native(fileNo, length, offset, &sendData[sendDataOffset]);
}

By using the “DF_Plain_WriteData” method, we can send our complete data of 255 to the Standard Data file:

Write to a Standard Data file with Free Access Rights
and fileSize 255 bytes in chunks
Send length 223
 90 8D 00 00 D9 03 00 00 00 D2 00 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 00
Recv length 2
 91 00
Send length 58
 90 8D 00 00 34 03 D2 00 00 2D 00 00 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00
Recv length 2
 91 00
SUCCESS

Summary

It is easy to work with larger Standard Data files on a Mifare DESFire EVx NFC card.

Source code of the app

You find the complete code of the app in my GitHub repository.

Happy coding !


메타데이터
post_id
c32e26396dfb
slug
how-to-read-and-write-large-data-files-on-a-mifare-desfire-evx-nfc-tag-on-an-esp32-with-pn532-c32e26396dfb
url
https://medium.com/@androidcrypto/how-to-read-and-write-large-data-files-on-a-mifare-desfire-evx-nfc-tag-on-an-esp32-with-pn532-c32e26396dfb
canonical_url
https://medium.com/@androidcrypto/how-to-read-and-write-large-data-files-on-a-mifare-desfire-evx-nfc-tag-on-an-esp32-with-pn532-c32e26396dfb
author_url
https://medium.com/@androidcrypto
status
ok
fetched_at
2026-07-25 23:39:52