Ok after more trial and error and research I have made it possible to Write and Read to Ntag215. Here are code snippets for writing and reading. It was not required to Authenticate to write the data the tag.
Writing: It is actually quite simple. The main rule is that the writing can start from the page 4. And the bufferSize has to be 4. Here is example just writing "A" character to the tag.
char charToProgram = "A";
byte data = charToProgram; // Data to write (ASCII character "A")
byte blockAddr = 4; // Block address to write to
// Write the data to the tag
MFRC522::StatusCode status = reader.MIFARE_Ultralight_Write(4, &data, 4);
if (status == MFRC522::StatusCode::STATUS_OK) {
Serial.println("SUCCESS! Wrote to card!");
reader.PICC_HaltA();
}
Reading:
int blockAddr = 4; // Block address to read from
byte data[18];
byte size = 18;
// Write the data to the tag
MFRC522::StatusCode status = reader.MIFARE_Read(blockAddr, data, &size);
if (status == MFRC522::StatusCode::STATUS_OK) {
Serial.print("Read character: ");
Serial.println((char) data[0]);
reader.PICC_HaltA();
}