NFC Type 4 Applet

Jump to: navigation, search

NFC Forum describes officially currently 4 tags able to store NDEF messages.
Amongst them, NFC Forum Type 4 Tag Operation Specification 2.0 (November 2010):
Type 4 Tag is fully compatible with the ISO/IEC 14443 standard series.
Tags are pre-configured at manufacture to be either read and re-writable, or read-only.
The memory availability is variable, up to 32 KBytes per service;
The communication interface is either Type A or Type B compliant.

Spec is freely available but upon licensing terms agreement.

A DESFire can be used as NFC Type 4 Tag according to this application note but any card speaking ISO14443-4 type A or B can potentially become a NFC Tag.
The NFC Forum command set is a subset of the ISO APDU commands defined in ISO/IEC 7816-4.
The following commands have to be supported:

• ISO/IEC 7816-4 SELECT FILE
• ISO/IEC 7816-4 READ BINARY
• ISO/IEC 7816-4 UPDATE BINARY

This page describes how to use a NXP SmartMX with JCOP as NFC Forum Type 4 Tag.
Let's start with the usual headers:

package nfct4t;
import javacard.framework.*;

Then the code:

// todo

nfct4t.java can be downloaded here

Because we've full control on the applet we can use the compliant ReadBinary/UpdateBinary mechanism to implement protocols more elaborated than just writing and reading static NDEF messages but we could make them dynamically interpreted and modified.