==============================================================================
Readme - Software for the PNEV512B Blueboard
==============================================================================

1. Document purpose

This document describes the content of the source package as well as known
problems and restrictions.
A separate User Manual describes the first steps how to use the software in
combination with the Hardware.

2. Known problems and restrictions

* Restrictions
The Software is restricted to the PNEV512B Blueboard. The API is intended for
the NXP contactless/contact reader ICs, as such the API is not to be ported to any technology from
any other vendor.
The Software is running on a Cortex M3 LPC1769 controller from NXP. 
NXP will not support porting to any other vendor platform. 

This software project requires at least the NFC Reader Library version 3.010.00.001407.

To get this project running, you need also the
NFC Reader Library project and the LPC1769 MCU project.

* Known Problems

  - none
	
3. Content

Polling (Eclipse project) content:
   .cproject
   .project
   Example_Pn512_Lpc17xx_P2P_Initiator.c
   Readme.txt  (this readme file)

4. Mandatory material, not included

* LPCXpresso IDE as described on the web site:
	http://www.lpcware.com/lpcxpresso
* LPCXpresso LPC1769 development board

5. Configuration

Below are the configurable flags in the application
#define SNEP_SERVER                  /* Enable for Demo application as SNEP Server could be Initiator or Target */
#define SNEP_CLIENT                  /* Enable for Demo application as SNEP Client could be Initiator or Target */
#define URIMESSAGE                   /**< Enable URI message */
#define TEXTMESSAGE                  /**< Enable for 1024 bytes text message */
#define SNEP_PUT_REQUEST             /**< Enable for SNEP PUT request message */
#define SNEP_GET_REQUEST             /**< Enable for SNEP GET request message */
#define  DEFAULT_SERVER              /**< Enable the SNEP Default Server, PUT request is possible */
#define  NON_DEFAULT_SERVER          /**< Enable the SNEP Non-Default Server, PUT and GET request is possible*/
#define DISCOVERY_MODE          PHAC_DISCLOOP_SET_LISTEN_MODE | PHAC_DISCLOOP_SET_POLL_MODE | PHAC_DISCLOOP_SET_LISTEN_MODE    /**< Enable Poll and Listen */
#define POLL_TYPE               PHAC_DISCLOOP_CON_POLL_F | PHAC_DISCLOOP_CON_POLL_A | PHAC_DISCLOOP_CON_POLL_B          /**< Enable Technology type */

a. Initiator application
1) For running the initiator application connect the system comprising of LPC1769 and PNEV512B board to the PC
2) Execute the batch script setup_project present at ex\Pn512_Lpc17xx_P2P_<xxxxx> before launching the project.
3) Create a new LpcXpresso workspace and the import this project
4) Build the project
5) Start the "Debug" session of LPCXpresso which will first flash the executable and start the task.
6) In its default configured state, it is setup to communicate with the DEFAULT SERVER on a P2P enabled phone (Samsung Galaxy S3)
	and do SNEP PUT of 1KB of message and the PN512 target application.

b. Target application
7) Before starting the target application present at ex\Pn512_Lpc17xx_P2P_Target ensure the following 
   hardware change has been done on the LPC1769 board
  - GPIO 2.13 (Pin #27) of LPC1769 should be connected
    to IRQ PIN (#26) of PNEV512 board. This is required for the system to function in target mode.
8) Connect this system comprising of LPC1769 and PNEV512B board to the PC
9) Do steps 1 to 5 for the target application also.
10) When both applications are running, the P2P data exchange status will get printed on the LPCXpresso consoles
	
NOTE: If demonstration of SNEP PUT and GET is required, then the following #define has to be enabled in both
Initiator and Target applications and the same procedure to build, flash and run described above has to be followed.
#define  NON_DEFAULT_SERVER  
Instead of "#define  DEFAULT_SERVER"

c. CLEV663B Initiator application
The Initiator application is present at ex\Rc663_Lpc17xx_P2P_Initiator
The same steps 1-5 have to be followed to start this application on the system comprising of LPC1769 and CLRC663 Blue board
version 2.1

d. Active mode Initiator
This application is present at ex\Pn512_Lpc17xx_P2P_Active_Initiator
Follow the same steps as in 1-5 on the system comprising of LPC1769 and PNEV512B board


6. Revision History

V1.0:
* First packaged version.