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
23 of 30
8.2 Choosing the NDEF message
By default the software sends an image of the NXP logo as NDEF message. There are
more NDEF messages prepared in dedicated header files (see Table 1). Only a single
header can be compiled with the SNEP client application. To choose another content of
the NDEF message for transmission just do following modifications in the Error!
Unknown document property name./source/ndef_message.c.
1. Open the ndef_message.c source file in a text editor.
2. Uncomment the line with a header file to be transmitted. Let all the other lines
commented.
3. In Table 1 in the same row as the chosen file look up two identifiers
corresponding to the chosen file.
4. In the array
nmess[]
uncomment the line with the couple of identifiers
corresponding to the type of the chosen file. Comment all the other lines.
5. Save the changes and close the text editor.
Table 1. Table of files prepared for NDEF message transmission
Identifiers from the last two columns are necessary for choosing the right line from
n_mess[]
.
Content Header Name
NDEF message
identifier
File type
identifier
PNG image
c_tablepng.h
NDEF_TYPE_IMAGE
NDEF_IMAGE_PNG
QR code of NXP
c_tableQR.h
NDEF_TYPE_IMAGE
NDEF_IMAGE_PNG
Image of NXP logo
c_tablenxp.h
NDEF_TYPE_IMAGE
NDEF_IMAGE_JPEG
Long text message
c_tabletxt.t
‘T’
LANG_EN
8.3 Folder structure of the project
In the project directory Error! Unknown document property name. there are two
directories
/source containing
all the required source files for performing the SNEP client
including the NXP Reader Library P2P
CMakeLists.txt script.
/build containing
Before compilation, this folder is empty. Afterwards object files and the executable
SNEP client file shall be here.
8.4 Building and starting the project
Before you can work with the P2P project you need to make sure that the following
additional package is installed on the Raspberry Pi:
cmake
You can install this package with the command sudo apt-get update && sudo apt-
get install cmake.
Once this package is installed, you can build the project as follows:
6. Change into the directory build