Table of Contents

Class CardTransceiver

Namespace
Iot.Device.Card
Assembly
Iot.Device.Card.dll

Abstract class implementing a specific Write and Read function This class allow to transceive information with the card This class has to be implemented in all RFID/NFC/Card readers So Mifare cards can be used the same way independent of any reader

public abstract class CardTransceiver
Inheritance
CardTransceiver
Derived

Constructors

CardTransceiver()

protected CardTransceiver()

Methods

ReselectTarget(byte)

Once you have an authentication operation failing with Mifare cards or a read/write, the card stop. TYhe only way to have it back is to send the unselect and anti collision. This function provides this feature

public abstract bool ReselectTarget(byte targetNumber)

Parameters

targetNumber byte

The target number to reselect

Returns

bool

True if success

Transceive(byte, SpanByte, SpanByte)

This function has to be implemented by all NFC/RFID/Card readers. This function is used in exchange of data with the reader and the cards.

public abstract int Transceive(byte targetNumber, SpanByte dataToSend, SpanByte dataFromCard)

Parameters

targetNumber byte

Some readers have a notion of target number for the cards as they can read multiple ones

dataToSend SpanByte

A standardized raw buffer with the command at the position 0 in the array

dataFromCard SpanByte

If any data are read from the card, they will be put into this array

Returns

int

-1 in case of error, otherwise the number of bytes read and copied into the dataFromCard array