SpringCard Smart Readers library for .NET  19.9.20
Communicate and manage SpringCard Smart Reader devices
SpringCard.SmartReader.NtagFt422.NTAG_I2C Class Reference

The NTAG_I2C object gives access to a NTAG I2C chip through a FTDI USB/I2C bridge (FT2222) More...

Public Member Functions

 NTAG_I2C (IntPtr ftHandle)
 Instanciate the NTAG_I2C. The ftHandle parameter must be a valid handle to the FTDI's FT2XX DLL, opened against the FT42222 interface connected to the NTAG.
 
void PrintLastError ()
 Print the last error to the console.
 
bool ClearSession ()
 Reset the session flags to accept another NFC reader/writer.
 
bool WriteConfiguration ()
 Write the configuration registers according to the NTAG I2C specification.
 
bool EnablePassthroughNfcToI2c ()
 Enable the SRAM passthrough NFC->I2C for the current session.
 
bool EnablePassthroughI2cToNfc ()
 Enable the SRAM passthrough I2C->NFC for the current session.
 
bool ReadSessionRegister (byte register, ref byte value)
 Read one of the NTAG I2C's session registers. Return false on error.
 
int ReadSessionRegister (byte register)
 Read one of the NTAG I2C's session registers. Return -1 on error.
 
bool Read16 (byte addr, ref byte[] data)
 Read data from the NTAG I2C. Warning, addr is related to the I2C mapping, which is different from the NFC mapping.
 
byte [] Read16 (byte addr)
 Read data from the NTAG I2C. Warning, addr is related to the I2C mapping, which is different from the NFC mapping.
 
bool Write16 (byte addr, byte[] data)
 Write data into the NTAG I2C. Warning, addr is related to the I2C mapping, which is different from the NFC mapping. data shall be a 16-byte buffer.
 
bool Erase16 (byte addr)
 Write empty data into the NTAG I2C. Warning, addr is related to the I2C mapping, which is different from the NFC mapping.
 
void DumpMemoryContent ()
 Read all the data from the NTAG I2C and show them onto the console.
 
void DumpSessionRegisters ()
 
TLV ReadResponse ()
 Read the response from the remote device (if some) through the NTAG_I2C's SRAM.
 
bool ClearResponse ()
 Clear the NTAG_I2C's SRAM.
 

Public Attributes

const byte CONFIGURATION_REGISTERS_ADDR = 0x3A
 
const byte SESSION_REGISTERS_ADDR = 0xFE
 
const byte LAST_NDEF_BLOCK_ADDR = 0x01
 
const byte SRAM_MIRROR_BLOCK_ADDR = 0x02
 
const byte WDT_LS_ADDR = 0x03
 
const byte WDT_MS_ADDR = 0x04
 
const byte I2C_CLOCK_STR_ADDR = 0x05
 
const byte REG_LOCK_ADDR = 0x06
 
const byte NS_REG_ADDR = 0x06
 
const byte NC_REG_ADDR = 0x00
 
const byte NC_REG_NFCS_I2C_RST_ON = 0x80
 
const byte NC_REG_PASSTHROUGH_ON = 0x40
 
const byte NC_REG_FD_OFF_MASK = 0x30
 
const byte NC_REG_FD_OFF_FIELD_OFF = 0x00
 
const byte NC_REG_FD_OFF_FIELD_OFF_OR_HALT = 0x10
 
const byte NC_REG_FD_OFF_FIELD_OFF_OR_END_READ = 0x20
 
const byte NC_REG_FD_OFF_FIELD_OFF_OR_PASSTHROUGH = 0x30
 
const byte NC_REG_FD_ON_MASK = 0x0C
 
const byte NC_REG_FD_ON_FIELD_ON = 0x00
 
const byte NC_REG_FD_ON_START = 0x04
 
const byte NC_REG_FD_ON_SELECT = 0x08
 
const byte NC_REG_FD_ON_PASSTHROUGH = 0x0C
 
const byte NC_REG_SRAM_MIRROR_ON = 0x02
 
const byte NC_REG_TRANSFER_DIR_NFC_TO_I2C = 0x01
 
const byte NS_REG_NDEF_DATA_READ = 0x80
 
const byte NS_REG_I2C_LOCKED = 0x40
 
const byte NS_REG_RF_LOCKED = 0x20
 
const byte NS_REG_SRAM_I2C_READY = 0x10
 
const byte NS_REG_SRAM_RF_READY = 0x08
 
const byte NS_REG_EEPROM_WR_ERROR = 0x04
 
const byte NS_REG_EEPROM_WR_BUSY = 0x02
 
const byte NS_REG_FIELD_PRESENT = 0x01
 

Properties

bool Valid [get]
 Return true if the object is valid, i.e. if a NTAG I2C chip has actually been found on the I2C bus.
 
byte [] UID [get]
 Return the serial number (or UID). It should be in the form "04 <5 bytes> 80" for a genuine NXP NTAG I2C.
 

Detailed Description

The NTAG_I2C object gives access to a NTAG I2C chip through a FTDI USB/I2C bridge (FT2222)


The documentation for this class was generated from the following file: