This project is read-only.

1. Requirements

For this version the .NET modules on Stollmann Development kit. See http://www.stollmann.de/en/stacks/nfc/download-nfc-evaluation-kit-kostenlos/download-registrierung.html?filename=NFCStack_Eva_r01.zip. A hardware NFC reader is required !

2. Installation

Install Stollmann development kit first and copy all binarys library modules (stmnfc.dll, nfcapi.dll, rs232api.dll, ehciTransport.dll, ic2capi.dll) to binary .NET project folder.

3. Usage

Some use cases are possible and supported.

* TAG Reader
Application can detect legacy NFC tags and perform low level read/write operation depending
on tag memory layout. Knowledge about memory layout and tag access is important.

* NDEF TAG Reader
Application can detect NDEF formatted NFC tags and write/read NDEF message to/from tag.
Knowledge of tag memory layout is not important.

* Host based card emulation
Application is working as host based card emulation and can detect external NFC reader.
Emulation is currently working as ISO-14443 NDEF based tag and supports all NDEF
7816 based commands for NFC-Forum type 4.

* IP-1 P2P

* Internal connection to secure element
For some NFC adapters a internal secure element exits. This SE emulates a
NFC tag.

* Transaction listener for SWP

3.1 Use case - TAG Reader (Example for NXP Mifare UL )


using NFC;
using NFC.MifareUL;

ITagListener nfcTagListener;
MifareULConnection nfcMifareULConnection;


// Initialization
NfcDiscoveryManager.CreateInstance();

// Register TAG detection handler
NfcDiscoveryManager.OnTagDetected += new NfcTagIndicationHandler(onTagDetected);
NfcDiscoveryManager.OnTagRemoved += new NfcTagIndicationHandler(onTagRemoved);

// Start listen for Mifare UL tags

nfcTagListener = NfcDiscoveryManager.StartTagReader(NfcTargetType.MifareUL);

// listen process is running ....

// Mifare UL TAG detected
void onTagDetected(object sender, NfcTagEventArgs args)
{
switch ( args.CardType )
{
case NfcTargetType.MifareUL:
nfcMifareULConnection = (MifareULConnection) args.Connection;

// Now we can write / read TAG contents wit nfcMifareULConnection interface
// Read all data
byte [] data = nfcMifareULConnection.Read(0, nfcMifareULConnection.DataSize);

// write at address 12 bytes ...

data = new byte '[12]';

nfcMifareULConnection.Write(3,data);
break;

default:
break;
}
}

//
// TAG is removed, connection not longer valid
//
void onTagRemoved(object sender, NfcTagEventArgs args)
{
nfcMifareULConnection = null;
}

// Stop the detection process

NfcDiscoveryManager.ReleaseInstance();

Last edited Apr 6, 2011 at 6:54 AM by MEllinger, version 3

Comments

kollarm Sep 16, 2013 at 9:42 AM 
Hi,
This looks very promising project. I downloaded and compiled the source code. I clicked the link in prerequisites and downloaded NFCStack_EvaKit_R6_0_77_0.zip, this is setup project, so installed. But there are no DLLs like stmnfc.dll, nfcapi.dll, rs232api.dll, ehciTransport.dll, ic2capi.dll.
Please advise me, where can I find them.

Many thanks,

Martin