don / NDEF

NDEF Library for Arduino. Read and Write NDEF Messages to NFC tags with Arduino.
Other
286 stars 142 forks source link

Error. Failed read block 4 In read mode tag #72

Open bard0x opened 3 years ago

bard0x commented 3 years ago

Hi everyone,

I tried to write a simple NdefMessage using a WriteTag sketch example. If I try to read the tag writed the serial monitor show me this error message:

Place a formatted Mifare Classic NFC tag on the reader. Success. Try reading this tag with your phone. Error. Failed read block 4 NFC Tag - Mifare Classic UID 08 77 E5 0E

No NDEF Message

Why occurs it?

This is my code

if (nfc.tagPresent()) { NdefMessage message = NdefMessage(); message.addTextRecord("Hello, Arduino!"); boolean success = nfc.write(message); if (success) { SERIAL.println("Success. Try reading this tag with your phone."); NfcTag tag = nfc.read(); tag.print(); } else { SERIAL.println("Write failed"); } }

Thank's in advance