B4J Programming Press on the image to return to the main documentation page.

rMFRC522

List of types:

MFRC522

MFRC522


Events:

CardPresent (UID() As Byte, CardType As Byte)

Members:


  Initialize (CSPin As Byte, ResetPin As Byte, CardPresentSub As SubVoidArrayByte) As void

  IsMifare As Boolean [read only]

  LogVersion As void

  MifareAuthenticate (BlockAddress As Byte) As Boolean

  MifareAuthenticate2 (BlockAddress As Byte, Key() As Byte, KeyA As Boolean) As Boolean

  MifareRead (BlockAddress As Byte, Buffer() As Byte) As Byte

  MifareWrite (BlockAddress As Byte, Buffer() As Byte) As Boolean

  TYPE_ISO_14443_4 As Byte

  TYPE_ISO_18092 As Byte

  TYPE_MIFARE_1K As Byte

  TYPE_MIFARE_4K As Byte

  TYPE_MIFARE_MINI As Byte

  TYPE_MIFARE_PLUS As Byte

  TYPE_MIFARE_UL As Byte

  TYPE_NOT_COMPLETE As Byte

  TYPE_TNP3XXX As Byte

  TYPE_UNKNOWN As Byte

Members description:

Initialize (CSPin As Byte, ResetPin As Byte, CardPresentSub As SubVoidArrayByte) As void
Initializes the object.
CSPin - Chip Select pin (also called SS).
ResetPin - Reset pin.
CardPresentSub - Sub that will handle the CardPresent event.
IsMifare As Boolean [read only]
Returns true if the current card is a Mifare card.
LogVersion As void
Prints the firmware version.
MifareAuthenticate (BlockAddress As Byte) As Boolean
Gains access to the specified block. Uses the default key value with key A.
Returns True if successful.
MifareAuthenticate2 (BlockAddress As Byte, Key() As Byte, KeyA As Boolean) As Boolean
Gains access to the specified block.
BlockAddress - Block index.
Key - Array of 6 bytes.
KeyA - If true then key A will be used. Otherwise key B will be used.
MifareRead (BlockAddress As Byte, Buffer() As Byte) As Byte
Reads the data from the specified block. Returns the number of bytes read.
You should first call MifareAuthenticate.
BlockAddress - Block index.
Buffer - Data will be written to this buffer. Must be 18 bytes or more.
The last two bytes are the checksum.
MifareWrite (BlockAddress As Byte, Buffer() As Byte) As Boolean
Writes data to the specified block. Returns true if writing was successful.
You should first call MifareAuthenticate.
BlockAddress - Block index.
Buffer - Data to write. 16 bytes will be written (array length must be 16 or more).
TYPE_ISO_14443_4 As Byte
PICC compliant with ISO/IEC 14443-4
TYPE_ISO_18092 As Byte
PICC compliant with ISO/IEC 18092 (NFC)
TYPE_MIFARE_1K As Byte
MIFARE Classic protocol, 1KB
TYPE_MIFARE_4K As Byte
MIFARE Classic protocol, 4KB
TYPE_MIFARE_MINI As Byte
MIFARE Classic protocol, 320 bytes
TYPE_MIFARE_PLUS As Byte
MIFARE Plus
TYPE_MIFARE_UL As Byte
MIFARE Ultralight or Ultralight C
TYPE_NOT_COMPLETE As Byte
TYPE_TNP3XXX As Byte
Only mentioned in NXP AN 10833 MIFARE Type Identification Procedure
TYPE_UNKNOWN As Byte

Top