Difference between revisions of "NFC Type 4 Applet"
m |
m |
||
Line 12: | Line 12: | ||
<br>This page describes how to use a NXP SmartMX with JCOP as NFC Forum Type 4 Tag. |
<br>This page describes how to use a NXP SmartMX with JCOP as NFC Forum Type 4 Tag. |
||
<br> |
<br> |
||
+ | Let's start with the usual headers: |
||
+ | {{#fileanchor: nfct4t.java}} |
||
+ | <source lang=java> |
||
+ | package nfct4t; |
||
+ | import javacard.framework.*; |
||
+ | </source> |
||
+ | Then we'll display a welcome message: |
||
+ | {{#fileanchor: nfct4t.java}} |
||
+ | <source lang=java> |
||
+ | // todo |
||
+ | </source> |
||
+ | [{{#filelink: nfct4t.java}} nfct4t.java can be downloaded here] |
||
<br> |
<br> |
||
<br> |
<br> |
Revision as of 11:18, 2 May 2012
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:
{{#fileanchor: nfct4t.java}}
package nfct4t;
import javacard.framework.*;
Then we'll display a welcome message: {{#fileanchor: nfct4t.java}}
// todo
[{{#filelink: nfct4t.java}} 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.