Examples for the nfctools library
Switch branches/tags
Nothing to show
Clone or download
Latest commit e95c86b Nov 8, 2013
Failed to load latest commit information.
src/main clean up Nov 8, 2013
.gitignore initial commit Mar 29, 2012
HceDemo.cmd demo script added Nov 8, 2013
README HCE demo code added Nov 8, 2013
SnepDemo.cmd updated to M7 Jun 14, 2013
SnepDemoUrl.cmd cmd scripts Jun 14, 2013
log4j.xml cmd scripts Jun 14, 2013
pom.xml added isodep demo for host-based card emulation Nov 8, 2013


== Examples for the NFC Tools for Java ==

This repository contains some examples for the NFCTools for Java:

== Download compiled JAR file ==

Your can download all examples together with the dependencies as a JAR file from this URL:

To launch the demos execute the following commands. To end a demo press CTRL-C at any time.

Host-based Card Emulation demo:

java -cp nfctools-examples.jar org.nfctools.examples.hce.HceDemo

SnepDemo demo:

java -cp nfctools-examples.jar org.nfctools.examples.snep.SnepDemo -url <url-to-send> -target -terminal <terminalname>

-target : activates target mode, please use it with Android 4.1
-terminal : pass a string as terminal name if you have several NFC devices connected

LlcpDemo demo:

java -cp nfctools-examples.jar org.nfctools.examples.llcp.LlcpDemo

LlcpService demo (old):

java -cp nfctools-examples.jar org.nfctools.examples.llcp.LlcpService

java -cp nfctools-examples.jar org.nfctools.examples.ndefreader.NdefReaderDemo


java -cp nfctools-examples.jar org.nfctools.examples.clearcard.ClearCardDemo


java -cp nfctools-examples.jar org.nfctools.examples.scancard.ScanWholeCardDemo

== Demo descriptions ==

ClearCardDemo will try to delete all data on a Mifare Classic card and put the card back into transport mode. It will
use some known keys to access the sectors.

NdefReaderDemo reads an NDEF message from a Mifare Classic card and shows it in the log.

NdefWriterDemo writes an NDEF message on a Mifare Classic card.

ScanWholeCardDemo scans the whole Mifare Classic card and shows the contents in the log.

LlcpService demonstrates a P2P connection with an Android phone. It will receive any Android Beam and NDEF Push
messages and show them in the log.
With Android 2.3 and 4.1 please set initiatorMode to false, with Android 4.0 it works best in initiatorMode set to true.