ESP32 Bit Pirate home
  • RFID
  • Intermediate
  • 3 min
  • Serial CLI

Recipe · Intermediate · RFID

How to erase a test NFC tag

Use RFID erase flow with PN532 for lab tags where wiping user data is expected.

RFID reader communicating with a contactless tag.
Start with read-only checks, then move to write, replay or automation only when the setup is understood.
Step 1

Commands

Use the shortest command path that matches the documented firmware workflow. When a mode needs setup, follow the prompts shown on first entry.

Result

What it means

The command path is working when the target responds and the firmware prints the expected menu, status or captured data.

Troubleshooting

  • Re-enter the mode setup when pins or peripherals are not already initialized.
  • Check common ground and target voltage before blaming software.
  • Prefer Serial CLI for long captures or high-volume output.
  • Repeat the read or capture to confirm stability.

Next steps

  • Save the output in your project notes.
  • Compare the result with the full wiki page for mode-specific details.
  • Create a shorter alias if you repeat this workflow often.

NFC tag erase FAQ

What tags should I erase with this recipe?

Use disposable lab tags where wiping user memory is expected. Do not erase access badges, payment cards or unknown tags.

Why does erase fail on MIFARE Classic?

Classic tags require authentication per block. If the keys are not default or known, the firmware may report authentication failure and stop the erase.

Does erase reset a tag to factory state?

Not necessarily. It can wipe user data, but lock bits, sector trailers, UID, access conditions or permanent protection settings may remain unchanged.

Go deeper