Nokia Extensions for JSR-257

Nokia Extensions for JSR-257

This document describes the Nokia-supported extensions to the JSR-257 Contactless Communication API.

Packages
com.innovision.rf Provides an interface for accessing Innovision Jewel and Innovision Topaz tags.
com.nokia.nfc.llcp Provides an interface for communicating with remote devices using LLCP.
com.nokia.nfc.nxp.mfstd Provides an interface for accessing Mifare Standard smart cards.
com.nokia.nfc.nxp.simpletag Provides an interface for accessing Simple Tag RFID ICs.
com.sony.felica Provides an interface for accessing NFC Forum Type 3 tags.

API Extensions

Table 1 lists the Nokia-supported extensions to the JSR-257 Contactless Communication API. The listed system properties can be used for checking whether the API extension is available on the device. The system property values are equal to the API extension version.

Table 1. Nokia-supported extensions to JSR-257

Interface Name Package System Property Name Version
JewelTagConnection com.innovision.rf com.innovision.jewel.version 1.0
Type3TagConnectionn com.sony.felica com.sony.felica.type3tag.version 1.0
MifareStdConnection com.nokia.nfc.nxp.mfstd com.nokia.nfc.nxp.mfstd.version 1.0
SimpleTagConnection com.nokia.nfc.nxp.simpletag com.nokia.nfc.nxp.simpletag.version 1.0
LLCPConnection com.nokia.nfc.llcp com.nokia.nfc.llcp.version 1.0

Table 2 lists additional properties for DiscoveryManager. The values of the properties can be retrieved with the DiscoveryManager.getProperty() method.

Table 2. DiscoveryManager properties

Property Name Values Description
LaunchType touch or manual Used for checking how the MIDlet was launched. If the value is touch, the MIDlet was launched by a JSR-257 PushRegistry connection, for example, when the user touched a tag that contained a specific NDEF record.
MifareStandardKeyA hexadecimal string with a length of 12 characters Defines the Mifare Standard authentication key A. This key is used for authenticating to a tag when using an NDEFTagConnection. If both the MifareStandardKeyA and MifareStandardKeyB properties are defined, the B key is used.

A key is not sector-specific; it is used for all sectors accessed during reads and writes. The key value is a hexadecimal string consisting of 12 characters. Valid characters are in the range [0-9a-fA-F]. The key is set before every read or write method call. An empty string disables the key.
MifareStandardKeyB hexadecimal string with a length of 12 characters Defines the Mifare Standard authentication key B. This key is used for authenticating to a tag when using an NDEFTagConnection. If both the MifareStandardKeyA and MifareStandardKeyB properties are defined, the B key is used.

A key is not sector-specific; it is used for all sectors accessed during reads and writes. The key value is a hexadecimal string consisting of 12 characters. Valid characters are in the range [0-9a-fA-F]. The key is set before every read or write method call. An empty string disables the key.

Security

Writing to an NDEF tag is a protected operation. The write permission is assigned to a new function group called NFC Write Access.

Table 3. Mapping JSR-257 permissions to function groups

Permission Name Function Group
javax.microedition.contactless.ndef.NDEFTagConnection.write NFC Write Access

PushRegistry

The Nokia implementation of JSR-257 supports PushRegistry connections as defined in the JSR-257 specification 1.0 Appendix B. Secure element push is not supported.

The listener is notified, if a MIDlet is launched by touching an NDEF tag, and if an NDEFRecordListener is registered to DiscoveryManager using the appropriate NDEF record type within 30 seconds of receiving the DiscoveryManager instance. The recordDetected() parameter contains the NDEF record that triggered the launch.

The LLCP specific PushRegistry support is described in the LLCP API package description.

The PushRegistry connection URL syntax is:

   <conn url> ::= <ndef url>
   <ndef url> ::= "ndef:"<type format>"?name="<ndef fqn>
   <type format> ::= "rtd" | "external_rtd" | "mime" | "uri"
   <ndef fqn> ::= String of US_ASCII characters, the fully qualified name of the record type

Reserved NDEF Record Types

Some NDEF record types are reserved for native applications and cannot be used for PushRegistry registrations. If a MIDlet registers an NDEFRecordListener for a reserved NDEF record type, the MIDlet is notified of new records only if it is running in the foreground. The reserved NDEF record type are listed in Table 4.

Table 4. Reserved NDEF Record Types

Type Name Type Name Format Description
urn:nfc:ext:nokia.com:bt NFC Forum External Type Bluetooth 2.0
application/vnd.bluetooth.ep.oob MIME Bluetooth 2.1
urn:nfc:wkt:Hr NFC Forum RTD Handover request
urn:nfc:wkt:Hs NFC Forum RTD Handover select
urn:nfc:wkt:Sp NFC Forum RTD Smart poster
urn:nfc:wkt:U NFC Forum RTD URI
audio/* MIME Any audio file
image/* MIME Any image file
text/* MIME Any text file
video/* MIME Any video file
application/java-archive MIME Java archive file (JAR)
application/x-java-archive* MIME Any non-standard Java archive file
application/vnd.nokia.ringing-tone MIME Nokia ringtone
application/vnd.symbian.install MIME Symbian installation file (SIS)
application/vnd.wap* MIME Any WAP file

Default Mifare Standard Authentication Keys

If the user does not specify an authentication key when accessing a Mifare Standard card, the device uses one of the default authentication keys described in Table 5.

Table 5. Default Mifare Standard authentication keys

Authentication Key Description
0xd3 f7 d3 f7 d3 f7 The public NDEF key is used as the A key for reads and writes and as the B key for writes.
0xff ff ff ff ff ff Transport key is used as the A key for all operations and as the B key for writes.
0xa0 a1 a2 a3 a4 a5 The public MAD key is used for read operations in MAD sectors.

Nokia Extensions for JSR-257

Copyright � 2010 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.