Class MFRC522Debug

Class Documentation

class MFRC522Debug

Public Static Functions

static const __FlashStringHelper *PICC_GetTypeName(PICC_Type type)

Returns a __FlashStringHelper pointer to the PICC type name.

Parameters:

type – One of the PICC_Type enums.

Returns:

const __FlashStringHelper *

static const __FlashStringHelper *GetStatusCodeName(StatusCode code)

Returns a __FlashStringHelper pointer to a status code name.

Parameters:

code – One of the StatusCode enums.

Returns:

const __FlashStringHelper *

static void PrintUID(Print &logPrint, const Uid &uid)
static void PrintSelectedUID(MFRC522 &device, Print &logPrint)
static void PCD_DumpVersionToSerial(MFRC522 &device, Print &logPrint)

Dumps debug info about the connected PCD to Serial. Shows all known firmware versions.

static void PICC_DumpToSerial(MFRC522 &device, Print &logPrint, Uid *uid)

Dumps debug info about the selected PICC to Serial. On success the PICC is halted after dumping the data. For MIFARE Classic the factory default key of 0xFFFFFFFFFFFF is tried.

Parameters:

uid – Pointer to Uid struct returned from a successful PICC_Select().

static void PICC_DumpDetailsToSerial(MFRC522 &device, Print &logPrint, Uid *uid)

Dumps card info (UID,SAK,Type) about the selected PICC to Serial.

Parameters:

uid – Pointer to Uid struct returned from a successful PICC_Select().

static void PICC_DumpMifareClassicToSerial(MFRC522 &device, Print &logPrint, Uid *uid, PICC_Type piccType, MIFARE_Key *key)

Dumps memory contents of a MIFARE Classic PICC. On success the PICC is halted after dumping the data.

Parameters:
  • uid – Pointer to Uid struct returned from a successful PICC_Select().

  • piccType – One of the PICC_Type enums.

  • key – Key A used for all sectors.

static void PICC_DumpMifareClassicSectorToSerial(MFRC522 &device, Print &logPrint, Uid *uid, MIFARE_Key *key, byte sector)

Dumps memory contents of a sector of a MIFARE Classic PICC. Uses PCD_Authenticate(), MIFARE_Read() and PCD_StopCrypto1. Always uses PICC_Command::PICC_CMD_MF_AUTH_KEY_A because only Key A can always read the sector trailer access bits.

Parameters:
  • uid – Pointer to Uid struct returned from a successful PICC_Select().

  • key – Key A for the sector.

  • sector – The sector to dump, 0..39.

static void PICC_DumpMifareUltralightToSerial(MFRC522 &device, Print &logPrint)

Dumps memory contents of a MIFARE Ultralight PICC.