User manual

NXP Semiconductors
AN11480
Quick Start Up Guide for EXPLORE NFC working with Raspberry Pi
AN11480
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2013. All rights reserved.
Application note
COMPANY PUBLIC
Rev. 1.017 December 2013
279710
14 of 30
A specification to store data for any kind of service and application is specified in the
NFC Forum and it is called NFC Data Exchange Format. Storing NDEF formatted data
inside contactless card products as mapping models as well as the management of NFC
forum device as a specific platform such as a NFC Forum Type 4 Tag are defined in
[18.]. The following project shows an exemplary implementation of a Tag 2 Type Card on
the PN512.
7.2 Configuration of the example project
In order to change some of the possible options before compiling the project, the file
"src\NxpRdLib_PublicRelease\intfs\phCardEmu_Options.h"
should be edited. This file contains toggles to change some default values like memory
sizes or pin numbers in which the PN512 chip is connected to the Microcontroller.
Further options are also indicated in the file.
Note: To get the provided application running, you only need to make changes in the file
settings.properties. This file provides the access credentials for the Java application to
Facebook.
7.3 Building and starting the project
Before you can work with the Card Emulation project you need to make sure that the
following additional packages are installed on the Raspberry Pi:
cmake
oracle-java7-jdk
You can install these packages with the command sudo apt-get update && sudo
apt-get install cmake oracle-java7-jdk.
Once these packages are installed, you can build the project as follows:
1. Change into the directory build
2. Type the following command: cmake ../source
3. Compile the source with the command make
4. Edit the file settings.properties and enter your credentials for Facebook.
5. Run the program with the command ./cardEmulation-fb
7.4 Changing the predefined NDEF message
The predefined NDEF message can be changed in the following files:
1. Open the file
..\src\NxpRdLib_PublicRelease\comps\phceT2TCmdHdl\src\Sw\phceT2T_Const.c
2. Change the NDEF message defined in const uint8_t T2T_DATA_DEF[].
Which one of the messages is used by the software is defined with the line
#define T2T_NDEFFILE_PREDEF 4.
7.5 Source code of the Java and Android applications
The sources of all applications involved in that example are provided with these
examples. Both applications, the Android application and the Java application, are
provided as Eclipse projects.