Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Examples for the nfctools library

branch: master
src clean up
.gitignore initial commit
HceDemo.cmd demo script added
README HCE demo code added
SnepDemo.cmd updated to M7
SnepDemoUrl.cmd cmd scripts
log4j.xml cmd scripts
pom.xml added isodep demo for host-based card emulation
README
== Examples for the NFC Tools for Java ==

This repository contains some examples for the NFCTools for Java:
https://github.com/grundid/nfctools

== Download compiled JAR file ==

Your can download all examples together with the dependencies as a JAR file from this URL:
https://github.com/grundid/nfctools-examples/releases

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

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

ClearCardDemo:

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

ScanWholeCardDemo

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.


Something went wrong with that request. Please try again.