NFC Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NFC Knowledge Base

Discussions

Sort by:
The video shows how to read the NDEF message under password protection. For more details , please kindly refer to https://community.nxp.com/docs/DOC-347622 
View full article
MIFARE DESFire Light read and write demonstration
View full article
Example sends Wi-Fi credentials from phone to IoT device, so it can join the Wi-Fi network.  Using: iOS and Android phone with NXP's TagWriter app PN7462 NFC Reader device on PNEV7462B eval board, part of kit OM27462CDK Host Card Emulation mode example based on NfcrdlibEx8_HCE_T4T example from NFC Reader Library Example will also print out other NDEF messages received.  NDEF formats include: Contacts / Business Cards URL link Wi-Fi network and credentials Bluetooth MAC address for pairing Email address Phone number Geo location Launch application on host OS Plain text SMS (sorry the audio is horrible)
View full article
The NXP-NCI example is based on NXP-NCI lib and LPCopen lib, and due to the good consistency, the porting is mainly focus on LPCopen lib switching.   Software setup download lpcopen package via http://www.nxp.com/assets/downloads/data/en/software/lpcopen_3_01_lpcxpresso_nxp_lpcxpresso_11u68.zip  download SW3241 via https://www.nxp.com/webapp/Download?colCode=SW3241&appType=license&location=null&fsrch=1&sr=3&pageNum=1&Parent_n…  import NXP-NCI_LPC11Uxx_example by LPCXpresso v8.1.4.   LPCopen porting remove *.h and *.c in the folder of LPC11Uxx/inc and LPC11Uxx/src. 2.import header files and c files from lpc_chip_11u6x/inc and lpc_chip_11u6x/src to LPC11Uxx/inc and LPC11Uxx/src 3. repeat step 2 , import source files and header files from lpc_board_nxp_lpcxpresso_11u68/inc and lpc_board_nxp_lpcxpresso_11u68/src to Drivers/inc and Drivers/src. 4.Change MCU settings 5.Change project settings. 6.compiling error fixes: 6.1 solution: replace with i2c_11u6x.h 6.2 solution: 6.3 solution: create a template project for LPC11U6x and import the source file of "cr_startup_lpc11u6x.c"   Porting Result   This porting guide is for LPC11U68 Xpresso v2 Rev C, and can also be used a reference when you try to port NXP-NCI examples to other lpcxpresso boards.   Please kindly refer to the attachment for details. Original Attachment has been moved to: NXP-NCI_LPC11Uxx_example.zip
View full article
This post contains a guide of how to use the NFC Reader Library with LPC845 using the Basic Discovery Loop example. The vanilla Basic Discovery Loop example is larger than the flash size of LPC845 (64KB), so the project needs to be reduced in size as well. How to reduce the size is explained in section “Porting the NFC Reader Library and reducing the size of project” A ready to use package “lpcxpresso845max_Basic_Discovery_Loop” example from the NFC Reader Library to be run on LPC845 and CLRC663 plus frontend is attached with this document. This document is structured as follows:   Overview of LPC845 The LPCXpresso-MAX family of boards provides a powerful and flexible development system for NXP's low-end Arm® Cortex®-M0+ based MCUs. They can be used with a range of development tools, including the MCUXpresso IDE toolchain. The LPCXpresso845-MAX board was created to enable evaluation of and prototyping with the LPC84x family of MCUs. Based on the Arm® Cortex®-M0+ core, LPC845 is a low-cost, 32-bit MCU family operating at frequencies of up to 30 MHz. The LPC845 MCU contains 64 KB of flash memory and 16 KB of SRAM.  Hardware Requirements Following hardware is required to run the project: LPCXpresso845-MAX development board. CLEV6630B board or BLE-NFC-V2 board. Both boards contain CLRC663 plus frontend. Here we use BLE-NFC-V2.   Connections Connect the two boards as follows: Porting the NFC Reader Library and reducing the size of Project: The porting of Basic Discovery Loop Example (NFC Reader Library) to LPC845 Max was done following the procedure mentioned in “NFC Reader Library Porting to i.MX RT1050” document. However, after completing the porting and building the project, the size of the binary, which is 134.264 KB, is greater than the size of Flash of LPC845 which is 64KB of flash. To reduce the size of the project, the following two steps were taken: 1. Apply compiler optimization for size. This can be done in the MCUXpresso by: Opening properties of project. Right Click project-   >Properties Go to Settings->Optimization. For Optimization Level choose “Optimize for Size” Building the project after this step results in a successful build but the project takes up 93% of all Flash, leaving very little space for adding more functionality. 2. The vanilla Basic discovery loop example detects all types of NFC tags. This increases our code size, so further size reduction can be achieved by limiting the number of protocols used. To limit our Basic Discovery loop to only look for Type A tags, do the following: Open the file “ph_NxpBuild_App.h” file which is inside in the “intfs” folder. This file defines the protocols (types) which are detected by the Basic Discovery Loop example. The type A cards uses the “ISO 14443-3A” protocol, so comment out all other protocol definitions except for “ISO 14443-3A” protocol as shown in Figure.   Building the project after this step takes up only 42.784KB of space consuming 65% of the Flash, leaving sufficient amount of space for adding application code.   Running Basic Discovery Loop on LPC845 If this is the first time you’re using the LPCXpresso845 Max board, follow the getting started guide first ->  LPC845Max | NXP . Make sure to install the SDK package LPCXpresso845 Max which is required for the project below to run. Download the “lpcxpresso845max_Basic_Discovery_Loop” package which you will find attached to this post. Drag and drop the downloaded package to the “Project Explorer” tab of your MCUXpresso IDE workspace (If you don’t have MCUXpresso, it can be downloaded for free from here: https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE ) Now that the package has been imported to the MCUXpresso IDE (via drag and drop), click on Debug icon from the Quickstart panel to begin a debug session. Once the debug session has started, click on the run icon to run the code: After step 4, the project should be running now. The output “BasicDiscoveryLoop Example” can be seen in the console. The project contains basic discovery loop functionality. Bring any NFC card near the frontend’s RF antenna and the output console will show the detection and type of the card. Running other examples from NFC Reader Library on LPC845: Once the “lpcxpresso845max_Basic_Discovery_Loop” project is running on the LPC845, running other examples from NFC Reader Library is simple. Here we use the “NfcrdlibEx9_NTagI2C” example from the reader library to describe the process. In “intfs” folder remove everything except the “phaApp_Init.h” file. Then go to the “intfs” folder of the NFC Reader Library example you want to run (“NfcrdlibEx9_NTagI2C” in this case), and copy all the files except “phaApp_Init.h” and paste them in the original “intfs” folder.  In line 57 of the “ph_NxpBuild_App.h” file in “intfs” folder, replace  Go to “source” folder and remove every file except “phApp_Init.c“ and “semihost_hardfault.c” files. Then go to “src” folder of the example you want to run (“NfcrdlibEx9_NTagI2C” in this case) and copy all the files except “phaApp_Init.c” and paste them into the “source” folder.  Finally, copy the main file of the example you want to run (NfcrdlibEx9_NTagI2C in this case) and paste it into the “source” folder as well. The project is ready to build and run on LPC845. Available Resources: Porting NFC Reader Library to i.MX RT1050. (Detailed Description of porting) https://community.nxp.com/docs/DOC-341843 NFC Reader Library  NFC Reader Library | NXP  LPC845 Max  LPCXpresso845-MAX Board for LPC84x Microcontrollers (MCUs) | NXP 
View full article
Hello NFC community,  as you may know the The PN7462 family consists of 32-bit Arm® Cortex®-M0-based NFC microcontrollers offering high performance and low power consumption. It has a simple instruction set and memory addressing along with a reduced code size compared to existing architectures. PN7462 family offers an all-in-one-solution, with features such as NFC, supporting all NFC Forum modes, microcontroller, optional contact smart card reader, and software in a single chip. It operates at CPU frequencies of up to 20 MHz. and  MIFARE® Ultralight-based tickets offer an ideal solution for low-cost, high-volume applications such as public transport, loyalty cards and event ticketing. They serve as a perfect contactless replacement for magnetic stripe, barcode, or QR-code systems. The introduction of the contactless MIFARE Ultralight® ICs for limited-use applications can lead to reduced system installation and maintenance costs. As you may know the MIFARE family has the Ultralight C tag which is a contactless IC supporting 3DES cryptography is mostly used in limited use applications such smart ticketing, this tag complies with ISO 14443-3 type A and it is defined as type 2 tag. In this document I am going to show you how to modify an example that is provided in the NXP Reader Library to authenticate to a not personalized Mifare Ultralight C and perform a Read operation. Materials: PN7462 or PNEV7462 ( this is the evaluation board  from NXP) PN7462 Reader library Mifare Ultralight C Mifare Ultralight C Data sheet MCUXpresso First we are going to go to  NfcrdlibEx4_MIFAREClassic.c, I am going to explain as much as I can with comments in the code and add some information here we are going to  add the following include: #define MFULC_READ_DATA_SIZE 16 /* Number of bytes that is read by MIFARE Ultralight Read command */ #define MFULC_USER_MEMORY_BEGIN 0x04 /* Number of bytes that is read by MIFARE Ultralight Read command */ #define MFULC_PAGE_SIZE 0x04 /* Size of page of MIFARE Ultralight card */ #define KEYCOUNT 0x7FU /* number of keys */ #define KEYVERSIONS 0x01U /* number of key versions */ #define RAND_KEY_2K3DES_ADDRESS 0x01U /* Random 2K3DES key address in keystore */ #define RAND_KEY_2K3DES_VERSION 0x00U /* Random 2K3DES key version in keystore */ #define UL_C_KEY_ADDRESS 0x02U /* Ultralight C key address in keystore */ #define UL_C_KEY_VERSION 0x00U /* Ultralight C key version in keystore */ #define KEY_POSITION 0x00U /* Key position */ ‍ ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ after this in the Global Variable declaration section we will have to add the following: phCryptoSym_Sw_DataParams_t cryptoEnc; /* CryptoSym parameter structure for ENC */ phCryptoSym_Sw_DataParams_t cryptoSymRng; /* CryptoSym parameter structure for SymRng */ phCryptoRng_Sw_DataParams_t cryptoRng; /* CryptoRng parameter structure for Rng */ phKeyStore_Sw_DataParams_t keyStore; /* KeyStore parameter structure */ static uint8_t gaUlcKey[] = {0x49, 0x45, 0x4D, 0x4B, 0x41, 0x45, 0x52, 0x42, 0x21, 0x4E, 0x41, 0x43, 0x55, 0x4F, 0x59, 0x46}; phacDiscLoop_Sw_DataParams_t * pDiscLoop; /* Discovery loop component */ void *psKeyStore; void *psalMFUL; void *ppalMifare;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ the variable static uint8_t gaUlcKey[] = {0x49, 0x45, 0x4D, 0x4B, 0x41, 0x45, 0x52, 0x42, 0x21, 0x4E, 0x41, 0x43, 0x55, 0x4F, 0x59, 0x46}; this is the key for default in the Mifare Ultralight c as stated in the datasheet section 7.5.6 this is a reference for the key we should be using. Then we are going to change the PAL variables /*PAL variables*/ phKeyStore_Sw_KeyEntry_t aKeyEntry[KEYCOUNT]; phKeyStore_Sw_KeyVersionPair_t aKeyVersion[KEYCOUNT * KEYVERSIONS]; phKeyStore_Sw_KUCEntry_t aKeyUsageCounter[KEYCOUNT]; uint8_t bDataBuffer[DATA_BUFFER_LEN]; /* universal data buffer */ uint8_t bSak; /* SAK card type information */ uint16_t wAtqa; /* ATQA card type information */ ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ then we are going to change this in line 131 psalMFC = phNfcLib_GetDataParams(PH_COMP_AL_MFC);‍‍‍ to psalMFUL = phNfcLib_GetDataParams(PH_COMP_AL_MFUL);‍‍‍ so this get the MIFARE Ultralight AL-Components, then after this line we are going to add  ppalMifare = phNfcLib_GetDataParams(PH_COMP_PAL_MIFARE);‍‍‍  then we are going to erase the Mifare classic  functionality to avoid any kind of error due to Mifare classic not being present in the field.and add the following: First we are going to proceed with the Authentication part, we are going tu use the API phalMful_UlcAuthenticate(pDataParams, wKeyNumber, wKeyVersion);  the first  parameter is the structure pointing to the tag that was activated by the discoveryloop, then the key address and last the  version of the key. as you can see we do not send the key we only tell the tag where is the key stored and the version if it was updated. to ensure the confidentiality of the communication. /* Authenticate with the Key even if no memory of Ultralight Card is restricted by Authentication access Authentication with correct key provides access to any part of the memory (beside key storage) . */ /* Send authentication for entire Ultralight C */ status = phalMful_UlcAuthenticate(psalMFUL, UL_C_KEY_ADDRESS, UL_C_KEY_VERSION); /* Check for Status */ if ((status & PH_ERR_MASK) != PH_ERR_SUCCESS) { /* Print Error info */ DEBUG_PRINTF("\nAuthentication Failed!!!"); DEBUG_PRINTF("\nPlease correct the used key"); DEBUG_PRINTF("\nExecution aborted!!!\n"); break; } DEBUG_PRINTF("\nAuthentication Successful"); /* ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ after this the status should be  OK  and no error found, if you have an error in this please check that the card you are using was not tampered before and changed the key or if you distributor delivered a configured key please be sure to use the correct key. then we are going to proceed to the Read operation: phalMful_Read(pDataParams, bAddress, pData) as you can see  the first parameter is the same as authentication because we are still talking to the same tag,  the MFULC_USER_MEMORY_BEGIN its value is 04 this is because as you can see in the datasheet section 7.5 Memory organization the user memory starts in page 4 and ends in page 39 so we just want to read the first page of the tag and the bDataBuffer variable will store the received information. /* *************** READ operation ****************************** */ /* Empty the bDataBuffer */ memset(bDataBuffer, '\0', DATA_BUFFER_LEN); DEBUG_PRINTF("\n\nRead data from page %d, %d, %d, %d", MFULC_USER_MEMORY_BEGIN, MFULC_USER_MEMORY_BEGIN + 1, MFULC_USER_MEMORY_BEGIN + 2, MFULC_USER_MEMORY_BEGIN + 3); /* Read data from custom */ status = phalMful_Read(psalMFUL, MFULC_USER_MEMORY_BEGIN, bDataBuffer); /* Check for Status */ if (status != PH_ERR_SUCCESS) { /* Print Error info */ DEBUG_PRINTF("\nRead operation failed!!!\n"); DEBUG_PRINTF("\nExecution aborted!!!\n\n"); break; /* Break from the loop*/ } DEBUG_PRINTF("\nRead Success"); DEBUG_PRINTF("\nThe content of page %d is:\n", MFULC_USER_MEMORY_BEGIN); phApp_Print_Buff(&bDataBuffer[0], MFULC_READ_DATA_SIZE);‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ and that is all of our project, this is a simple project but can help a lot of people to understand how to work with Mifare Ultralight C using the PN7462 and then help people to start doing more complex examples based on this project. if you want to know how to configure a Mifare Ultralight c product using our PEGODA reader please check the document I posted called "Mifare Ultralight C - Changing default password and protecting page address". if you have any questions please let me know. BR Jonathan
View full article
Environments & Devices --Hardware 1、PN7462 DEMO Board(PNEV7642B) --Software 1、Ubuntu 16.04 desktop 2、Test tools ---libusb ---pcsc-lite ---ccid driver ---opensc          Before testing, please install above test tools to Ubuntu 16.04 according to document on the link https://community.nxp.com/docs/DOC-334952 !          Then follow steps below to begin testing PN7462 DEMO board by above test tools. 1、Update firmware of PN7462 DEMO board          Please update firmware of PN7462 DEMO board according to UM10915.pdf, then test it on windows, ensuring PN7462 DEMO board can normally work at CCID protocol on window platform. 2、Connecting PN7462 DEMO Board to PC USB via USB OTG Cable.          On PENV7462B side, X3 connector should be used for USB OTG cable. 3、Using lsusb to list USB devices weidong@ubuntu:~$ lsusb Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 004: ID 0e0f:0008 VMware, Inc. Bus 002 Device 005: ID 1fc9:0117 NXP Semiconductors          Last line is PN7472 DEMO board. 4、Open 2 terminals at the same time on Ubuntu desktop (1) One terminal is used to run “pcsc” command weidong@ubuntu:~$ sudo /usr/local/sbin/pcscd -adf [sudo] password for weidong: 00000000 pcscdaemon.c:345:main() pcscd set to foreground with debug send to stdout 00012288 configfile.l:361:DBGetReaderList() Parsing conf file: /usr/local/etc/reader.conf.d 00000037 pcscdaemon.c:658:main() pcsc-lite 1.8.22 daemon ready. 00023126 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001 00000101 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001 00000113 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0003, path: /dev/bus/usb/002/002 00000112 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001 00000160 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0002, path: /dev/bus/usb/002/003 00000152 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0008, path: /dev/bus/usb/002/004 00000115 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0008, path: /dev/bus/usb/002/004 00000165 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0002, path: /dev/bus/usb/002/003 00000263 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001 ^V56546837 hotplug_libudev.c:651:HPEstablishUSBNotifications() USB Device add 00000101 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1FC9, PID: 0x0117, path: /dev/bus/usb/002/006 00000007 hotplug_libudev.c:436:HPAddDevice() Adding USB device: PN7462 USB Reader 00000045 readerfactory.c:1074:RFInitializeReader() Attempting startup of PN7462 USB Reader (1.00) 00 00 using /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so 00127887 readerfactory.c:949:RFBindFunctions() Loading IFD Handler 3.0 00000236 ifdhandler.c:1965:init_driver() Driver version: 1.4.27 00000477 ifdhandler.c:1982:init_driver() LogLevel: 0x0003 00000004 ifdhandler.c:1993:init_driver() DriverOptions: 0x0000 00000165 ifdhandler.c:111:CreateChannelByNameOrChannel() Lun: 0, device: usb:1fc9/0117:libudev:0:/dev/bus/usb/002/006 00000021 ccid_usb.c:302:OpenUSBByName() Using: /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist 00000727 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr) 00000016 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver 00000004 ccid_usb.c:322:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version. 00000433 ccid_usb.c:656:OpenUSBByName() Found Vendor/Product: 1FC9/0117 (PN7462 USB Reader) 00000005 ccid_usb.c:658:OpenUSBByName() Using USB bus/device: 2/6 00000021 ccid_usb.c:717:OpenUSBByName() bNumDataRatesSupported is 0 00128471 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFB3, usb:1fc9/0117:libudev:0:/dev/bus/usb/002/006 (lun: 0) 00000027 readerfactory.c:396:RFAddReader() Using the reader polling thread 00004709 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFAE, usb:1fc9/0117:libudev:0:/dev/bus/usb/002/006 (lun: 0) 00000023 ifdhandler.c:477:IFDHGetCapabilities() Reader supports 1 slot(s) (2)The other terminal is used to run “"testpcsc " in pcsc-lite/src source code weidong@ubuntu:~/ccid/pcsc-lite-1.8.22/src$ ./testpcsc   MUSCLE PC/SC Lite unitary test Program   THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS! Do NOT use it unless you really know what you do.   Testing SCardEstablishContext        : Command successful. Testing SCardIsValidContext   : Command successful. Testing SCardIsValidContext   : Invalid handle. (don't panic) Testing SCardListReaderGroups      : Command successful. Group 01: SCard$DefaultReaders Testing SCardFreeMemory               : Command successful. Testing SCardListReaders        : Command successful. Testing SCardListReaders        : Command successful. Reader 01: PN7462 USB Reader (1.00) 00 00 Waiting for card insertion        :          2 screenshots for above 2 terminals: 5、Test cards (All cards are contactless) (1) MIFARE Plus x 4K card Re move it: (2) MIFARE Nano card          Note: testpcsc should be run again. Remove it: (3) MIFARE EV1 card Remove it: 6、Using Opensc-tool to Test cards            Open a new terminal for running the command, please! (1)No cards (2) MIFARE Plus x 4K card (close to antenna , then run opensc-tool) (3) MIFARE Nano card (4) MIFARE EV1 card    TIC Weidong Sun 2018-07-09
View full article
This post contains step by step guide of how to use the NTAG I²C plus with LPC55S69. This is easy and straightforward to do, since the MCUXpresso SDK Builder tool has an option to add NTAG I²C plus example directly to SDK of LPC55S69. Hardware Needed: LPC55S69-EVK NTAG I²C plus explorer kit Follow the following simple steps to use NTAG I²C plus with LPC55S69: Download and install MCUXpresso IDE (if you don’t have it already). It can be download for free by clicking here: Next step is to use the MCUXpresso SDK Builder tool to build and download the SDK for LPC55S69. For this: Go to  the MCUXpresso SDK Builder website: https://mcuxpresso.nxp.com/en/select Select the LPC55S69 board and then click on ‘Build MCUXpresso SDK’ button: Click on ‘Add Software component’, then select the NTAG I2C component, click ‘Save changes’ and then download the SDK. Drag and drop the downloaded SDK to the installed SDK’s tab in the MCUXpresso IDE to install it. Click on the ‘Import SDK example(s)’ in the Quickstart Panel in the MCUXpresso IDE. Then select LPC55S69, ‘check the ntag_i2c_plus_example’ box and hit ‘Finish’. Connect the LPC55S69 and NTAG I²C plus boards together. Details of these connections can be found in the “readme.txt” file in the “doc” folder of the project: Finally click on debug in the Quickstart Panel to build the project, flash it to the MCU, and start debugging. This is how the output looks like in the Console tab of IDE: Bring any active nfc device (e.g. an NFC phone with NFC enabled) near the ntagi2c board. The program will detect it and consequently blink the LED as well as display a message on the console: Read the “readme.txt” file for more details regarding the project. Available Resources: BLE pairing with NFC on KW41 and NTAG I²C plus source code www.nxp.com/downloads/en/snippets-boot-code-headers-monitors/SW4223.zip NTAG I²C plus kit for Arduino pinout www.nxp.com/demoboard/OM23221ARD
View full article
Hello NFC Community,   This document focuses to the configuration of the LPC8N04 to be controlled by the data it receives though the NFC interface. The document is based on the nfc_eeprom project of LPC8N04’s SDK. It will basically be necessary to modify the code within while(1) loop as below.   Get the data from NFC and store it on d_Data buffer:             if (NDEFT2T_GetMessage(g_NdefInstance, g_Data, sizeof(g_Data))) { /* Save NDEF Data into EEPROM */ //Chip_EEPROM_Write(LPC_EEPROM, 0, g_Data, sizeof(g_Data)); }‍‍‍‍‍‍‍ Clear respective semaphore and Flag: /** Clear Memory Write Semaphore */ releaseMemSemaphore(); /** Clear Write Flag */ g_TargetWritten = 0;‍‍‍‍‍‍‍   Now that the information is in the g_Data buffer now you may proceed to verify the received data with the one expected to trigger a function e.g., to turn on/off a led.   if(g_Data[7] == 'A') { Led_Set(true); } else if(g_Data[7] == 'B') { Led_Set(false); }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍     On the other side, it will only be necessary to approach the reader to the LPC8N04's antenna and the NDEFT2T_GetMessage(g_NdefInstance, g_Data, sizeof(g_Data)) function will get the data and store it on the g_data buffer mentioned above. Happy development! BR, Ivan.
View full article
This demonstration is based on RFIDDiscover full version and Pegoda EV710. You may refer to the following links for more details. RFIDDiscover | NXP  PEGODA Contactless Smart Card Reader | NXP  Before start the demonstration, please connect Pegoda with your PC via USB and place the MIFARE DESFire Light card on the reader. The history and log can be fetched from the attachment. Please refer to the video for more details.  
View full article
Hello NFC community, The purpose of this document is to show the steps to port the Bluetooth pairing example for NTAG I²C Plus from KW41Z to KW36.  Setup For this, we will work with following boards: 1. Arduino NTAG I²C plus board (OM23221ARD) development kit. 2. KW36 Freedom board.  Download SDK as mentioned in chapter 2.1.3 of KW41Z User Manual and pay close attention to include NTAG I²C middleware. Now, repeat the same procedure above for FRDM KW36, this will be the SDK on which we will be making the modifications for the porting. NOTE: Unlike KW41Z, for KW36 there is no NTAG I²C plus middleware as shown in the image below: Save changes and build the SDK. NTAG I²C middleware will have to be imported from KW41Z's SDK in MCUXPresso. Install the SDK and import hid _device freertos example into the workspace: Copy ntag_i2c_plus_1.0.0 folder from KW41Z workspace to KW36's Open folder properties and uncheck Exclude resources from build, then apply and close. In board.c file add the following code below BOARD_DCDCInit()  /* Init DCDC module */ BOARD_DCDCInit(); #ifdef NTAG_I2C /* Init I2C pins for NTAG communication */ BOARD_InitI2C(); #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In AppIMain.c add the following code in main_task before calling App_Thread()  #ifdef NTAG_I2C /* Initialize I2C for NTAG communication */ HAL_I2C_InitDevice(HAL_I2C_INIT_DEFAULT, I2C_MASTER_CLK_SRC, NTAG_I2C_MASTER_BASEADDR); SystemCoreClockUpdate(); /* Initialize the NTAG I2C components */ ntag_handle = NFC_InitDevice((NTAG_ID_T)0, NTAG_I2C_MASTER_BASEADDR); // HAL_ISR_RegisterCallback((ISR_SOURCE_T)0, ISR_LEVEL_LO, NULL, NULL); #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In ApplMain.c add the following under Public memory declarations /************************************************************************************ ************************************************************************************* * Public memory declarations ************************************************************************************* ************************************************************************************/ ... #ifdef NTAG_I2C NFC_HANDLE_T ntag_handle; // NTAG handle #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Include new headers to the following: In ApplMain.c include the following  #ifdef NTAG_I2C /* NTAG middleware module */ #include "HAL_I2C_driver.h" //#include "HAL_I2C_kinetis_fsl.h" #include <app_ntag.h> #endif //NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In hid_device.c include the following #ifdef NTAG_I2C /* NTAG handler */ #include <app_ntag.h> #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Copy app_ntag.c and app_ntag.h files from KW41Z  workspace to KW36's. The app_ntag.c source file contains sample functions for working with NDEF messages. Function NFC_MsgWrite() creates and writes the NDEF message in the Type-2 Tag format to the NTAG I2C chip through the ntag_i2c_plus middleware. The write algorithm is NFC-Forum compliance. Function NDEF_Pairing_Write() contains a procedure to create a BTSSP record via using the NDEF library. The same is performing function NDEF_Demo_Write() function. Here is shown how to create NDEF multi-record that contains several types of NDEF records. The app_ntag.h header file contains predefined blocks of constants (constant fields of data) that are written to the NTAG I2C chip by default during the communication which requires set the default content to the chip’s registers or erase the NTAG I2C chip user memory and registers of lock bytes. NOTE: Please change the I²C Master base address and I²C Master clock source from I2C1 to I2C0 as below in app_ntag.h: In hid_device.c make the implementation in BleApp_HandleKeys() as below. This is an extension for BLE pairing and writing NDEF messages to NTAG I²C. void BleApp_HandleKeys(key_event_t events) { #ifdef NTAG_I2C uint32_t timeout = NDEF_WRITE_TIMEOUT; // static uint8_t boApplStart = TRUE; switch (events) { case gKBD_EventPressPB1_c: // short press of SW4 { // if (boApplStart) // { /* first time startup */ BleApp_Start(); // boApplStart = FALSE; // } // boNDEFState = TRUE; // pairing via NDEF is allowed in case the apk. is running TurnOffLeds(); /* added to copy the pairing NDEF message to NTAG_I2C chip */ if (NDEF_Demo_Write()) { // report an error during creating and writing the NDEF message LED_RED_ON; } else { // indication of success by orange color on the RGB LED LED_RED_ON; LED_GREEN_ON; } /* Start advertising timer */ TMR_StartLowPowerTimer( mNDEFTimerId, gTmrLowPowerSecondTimer_c, TmrSeconds(timeout), NDEFTimerCallback, NULL); break; } case gKBD_EventPressPB2_c: // short press of SW3 { TurnOffLeds(); /* added to copy the pairing NDEF message to NTAG_I2C chip */ if (NDEF_Pairing_Write()) { // report an error during creating and writing the NDEF message LED_RED_ON; } else { // indication of success by green color on the RGB LED LED_GREEN_ON; } /* Start advertising timer */ TMR_StartLowPowerTimer( mNDEFTimerId, gTmrLowPowerSecondTimer_c, TmrSeconds(timeout), NDEFTimerCallback, NULL); break; } case gKBD_EventLongPB1_c: // long press of SW4 { if (mPeerDeviceId != gInvalidDeviceId_c) { Gap_Disconnect(mPeerDeviceId); boNDEFState = FALSE; } break; } case gKBD_EventLongPB2_c: // long press of SW3 { #if gAppUsePrivacy_d if( mAdvState.advOn ) { mAppPrivacyChangeReq = reqOff_c; /* Stop Advertising Timer*/ TMR_StopTimer(mAdvTimerId); Gap_StopAdvertising(); } else if( gBleSuccess_c == BleConnManager_DisablePrivacy() ) { TMR_StartLowPowerTimer(mPrivacyDisableTimerId, gTmrLowPowerSingleShotMillisTimer_c, TmrSeconds(mPrivacyDisableDurationSec_c), PrivacyEnableTimerCallback, NULL); } #endif break; } default: break; } #else // NTAG_I2C switch (events) { case gKBD_EventPressPB1_c: { BleApp_Start(); break; } case gKBD_EventPressPB2_c: { hidProtocolMode_t protocolMode; /* Toggle Protocol Mode */ Hid_GetProtocolMode(service_hid, &protocolMode); protocolMode = (protocolMode == gHid_BootProtocolMode_c)?gHid_ReportProtocolMode_c:gHid_BootProtocolMode_c; Hid_SetProtocolMode(service_hid, protocolMode); break; } case gKBD_EventLongPB1_c: { if (mPeerDeviceId != gInvalidDeviceId_c) Gap_Disconnect(mPeerDeviceId); break; } case gKBD_EventLongPB2_c: { #if gAppUsePrivacy_d if( mAdvState.advOn ) { mAppPrivacyChangeReq = reqOff_c; /* Stop Advertising Timer*/ TMR_StopTimer(mAdvTimerId); Gap_StopAdvertising(); } else if( gBleSuccess_c == BleConnManager_DisablePrivacy() ) { TMR_StartLowPowerTimer(mPrivacyDisableTimerId, gTmrLowPowerSingleShotMillisTimer_c, TmrSeconds(mPrivacyDisableDurationSec_c), PrivacyEnableTimerCallback, NULL); } #endif break; } default: break; } #endif //NTAG_I2C }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Add the declaration of the timer handler in Private memory declarations section of hid_device.c  /************************************************************************************ ************************************************************************************* * Private memory declarations ************************************************************************************* ************************************************************************************/ ... #ifdef NTAG_I2C static tmrTimerID_t mNDEFTimerId; static bool boNDEFState = FALSE; #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Add the declaration of the timer callback function in Private functions prototypes of hid_device.c /************************************************************************************ ************************************************************************************* * Private functions prototypes ************************************************************************************* ************************************************************************************/ ... #ifdef NTAG_I2C static void NDEFTimerCallback(void *); #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Allocate / Initialize the timer There are 3 timers used within the HID_device demo application. The NDEF timer is also necessary to allocate in the function BleApp_Config() in the hid_device.c file, at the same place as the common timers are allocated. Function TMR_AllocateTimer() returns timer ID value which is stored in the variable mNDEFTimerId. The timer ID allocation must be added behind the other timer as it is done at following C-code printout /* Allocate application timers */ mAdvTimerId = TMR_AllocateTimer(); mHidDemoTimerId = TMR_AllocateTimer(); mBatteryMeasurementTimerId = TMR_AllocateTimer(); #ifdef NTAG_I2C mNDEFTimerId = TMR_AllocateTimer(); #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Add the timer callback function It is necessary to add the NDEFTimerCallback() function at the end of the hid_device.c file. If NDEF timer counter expires timer is stopped. Then RGB LED is switched off. There is the printout of the call back function at the following lines. #ifdef NTAG_I2C /*! ********************************************************************************* * \brief Handles timer callback for writing NDEF messages * * \param[in] pParam Calback parameters. ********************************************************************************** */ static void NDEFTimerCallback(void * pParam) { /* Stop Advertising Timer*/ TMR_StopTimer(mNDEFTimerId); /* switch off the LED indication */ TurnOffLeds(); } #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Note: Change the size for timer task  in app_preinclude.h file as follows: /* Defines Size for Timer Task*/ #ifdef NTAG_I2C #define gTmrTaskStackSize_c 1024 // changed for the NTAG integration #else #define gTmrTaskStackSize_c 500 #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Security change The sample project for adding NTAG I2C middleware is hid_device and is described in chapter 3.1.1. This project requires to enter the password “999999” during the Bluetooth pairing. From this reason is necessary to decrease the security level to remove the password sequence. Security level is a part of the configuration and is set in the app_config.c file. In this file following parameter must be changed gSecurityMode_1_Level_3_c to the new parameter: gSecurityMode_1_Level_1_c Parameter gSecurityMode_1_Level_3_c is used on several places within the app_config.c file. Use the FIND function (short key is “CTRL+F”) of the IDE to find it and update. There are last two parameters of the gPairingParameters structure which are necessary to change. parameter: .securityModeAndLevel = gSecurityMode_1_Level_3_c, has to be changed to: .securityModeAndLevel = gSecurityMode_1_Level_1_c, parameter: .localIoCapabilities = gIoDisplayOnly_c, has to be changed to: .localIoCapabilities = gIoNone_c, parameter .leSecureConnectionSupported = TRUE, has to be changed to: .leSecureConnectionSupported = FALSE, Symbols Add the following symbols to project settings -> Preprocessor. The ones in red are for integration of ntag_i2c_plus middleware and the one in green is for adding the NDEF library, please see below: Include paths Please add the following includes in project settings. The ones in red are for NTAG I²C Plus middleware and the ones in green for the NDEF Library, please see below: With the previous setup it shall be able to run Bluetooth pairing example as for FRDM-KW41Z. Hope this  helps!
View full article
This post contains a step by step guide of how to use PN7150 with LPC55S69.  This document is structured as follows: Overview of PN7150:  The PN7150 is a Plug-and-Play all-in-one NFC solution for easy integration into any OS environment like Linux and Android, reducing Bill of Material (BoM) size and cost. The embedded Arm® Cortex®-M0 microcontroller core is loaded with the integrated firmware, simplifying the implementation as all the NFC real-time constraints, protocols and the device discovery (polling loop) are processed internally. In few NCI commands, the host SW can configure the PN7150 to notify for card or peer detection and start communicating with them. It has the following salient features: Full NFC forum compliancy with small form factor antenna Embedded NFC firmware providing all NFC protocols as pre-integrated feature Direct connection to the main host or microcontroller, by I2C-bus physical and NCI protocol Ultra-low power consumption in polling loop mode Highly efficient integrated power management unit (PMU) allowing direct supply from a Battery Overview of LPC55S69:  The LPCXpresso55S69 development board provides the ideal platform for evaluation of and development with the LPC55S6x MCU based on the Arm® Cortex®-M33 architecture. The board includes a high performance onboard debug probe, audio subsystem and accelerometer, with several options for adding off-the-shelf add-on boards for networking, sensors, displays and other interfaces. The LPCXpresso55S69 is fully supported by the MCUXpresso suite of tools, which provides device drivers, middleware and examples to allow rapid development, plus configuration tools and an optional free IDE. MCUXpresso software is compatible with tools from popular tool vendors such as Arm and IAR, and the LPCXpresso55S69 may also be used with the popular debug probes available from SEGGER and P&E Micro. Hardware requirements: OM5578/PN7150ARD  LPCXpresso55S69 + usb  micro cable  Using PN7150 with LPC55S69-EVK: Hardware Connections: The hardware connections are simple. Both the LPC55S69-EVK board and OM5578/PN7150ARD board have an Arduino interface. So, mount the PN7150ARD board with male Arduino connector onto the female Arduino connector of the LPC55S69-EVK board. Running the demo: If this is the first time you’re using LPC55S69-EVK board, follow the getting started guide first à  LPC55S69-EVK | NXP . Make sure to install the SDK package for LPC55S69-EVKboard which is required for the project below to run. Download the ‘NXP-NCI_PN7150_LPC55xx_example’ package which you will find attached to this post. Drag and drop the downloaded package to the “Project Explorer” tab of your MCUXpresso IDE workspace (If you don’t have MCUXpresso, it can be downloaded for free by clicking here: Now that the package has been imported to the MCUXpresso IDE (via drag and drop), click on Debug icon from the Quickstart panel to begin a debug session. Once the debug session has started, click on the run icon to run the code: The project should be running now. The project contains basic discovery loop functionality. Here is how the output looks in the console tab on MCUXpresso: Bring any NFC card near the PN7150 board’s antenna and the output console will show the detection and type of the card. For example, in the picture below, we can see that type 4 card was detected: Available Resources: AN11990 NXP-NCI MCUXpresso example document. (https://www.nxp.com/docs/en/application-note/AN11990.pdf) The example project explained in this project was ported to LPC55S69 using section 5.3 and 6 of the above mentioned document. PN7150 datasheet (https://www.nxp.com/docs/en/data-sheet/PN7150.pdf) PN7150 User Manual (https://www.nxp.com/docs/en/user-guide/UM10936.pdf) PN7150 NFC Controller SBC Kit User Manual  (https://www.nxp.com/docs/en/user-guide/UM10935.pdf)
View full article
DISCLAIMER APPLICABLE TO THIS DOCUMENT CONTENTS: This post contains a guide of how to use i.MXRT1050 demoboard with other NXP demoboards to demonstrate Secure access to industrial IOT, using NFC, embedded secure element and MCU (see picture below). A ready to use package including preparation of a secure element, and of a MIFARE DESFire EV2 card can be used as 3-step authentication example using symmetric AES keys; a session key will be generated inside SE050 which will be exported to i.MXRT1050 which will handle contactless communication thru CLRC663 plus frontend. This document is structured as follows: Hardware Requirements: Following hardware is required to run the project: i.MXRT1050 EVKB development board plus referred TFT LCD Display BLE-NFC-V2 arduino-friendly board. OM-SE050ARD, embedded secure element arduino-friendly R3 board.   1. Overview of i.MXRT1050 EVKB: The i.MXRT1050 EVKB development board provides the ideal platform for evaluation of and development with the i.MX RT1050 crossover processor, featuring NXP’s advanced implementation of the Arm ® Cortex ® -M7 core. The i.MX RT1050 EVK is a 4-layer through-hole USB-powered PCB. The board includes a high performance onboard debug probe, audio subsystem and accelerometer, with several options for adding off-the-shelf add-on boards for networking, sensors, display and other interfaces. This core operates at speeds up to 600 MHz to provide high CPU performance and best real-time response. Support for Amazon FreeRTOS ™ available within the MCUXpresso SDK.The i.MX RT1050 EVK board is now supported by Arm ® Mbed ™ OS and Zephyr ™ OS, both open source embedded operating systems for developing the Internet of Things. i.MXRT1050 EVKB board supported devices Processors and Microcontrollers i.MX RT Series i.MX-RT1050 : i.MX RT1050 Crossover Processor with Arm ® Cortex ® -M7 core Sensors 6-Axis FXOS8700CQ : Digital Motion Sensor - 3D Accelerometer (±2g/±4g/±8g) + 3D Magnetometer Interfaces USB PD-PHY and CC-Logic PTN5110 : USB PD TCPC PHY IC Power Management Load Switches NX3P190UK : Logic controlled high-side power switch NX5P3090UK : USB PD and type C current-limited power switch The i.MXRT1050 EVKB is fully supported by the MCUXpresso suite of tools, which provides device drivers, middleware and examples to allow rapid development, plus configuration tools and an optional free IDE. MCUXpresso software is compatible with tools from popular tool vendors such as Arm and IAR, and the i.MXRT1050 EVKB may also be used with the popular debug probes available from SEGGER and P&E Micro.   As final touch to this demonstrator, one LCD display will be added in order to show "access control" check result when approaching a MIFARE DESFire EV2 card to the Reader antenna, without the use of a computer console.Connection between i.MXRT1050 EVKB board and LCD Display requires attachment of two flat cables, one for touch-screeen functionality and the other for controlling Display itself.   Click here to order Touchscreen LCD Display thru buy direct:                                          P/N: RK043FN02H-CT 12NC:935358709598   2. BLE-NFC-V2: It is easier to use the BLE-NFC-V2 board due to four Arduino compliant male connectors. Current version has only double row-male connectors which imposes that BLE-NFC-V2 board will be the last board stacked on top of other arduino boards. The following figure shows the pin mapping between the two boards.   Pin Function i.MXRT1050  (Arduino connector # - Pin #) CLRC663 plus NFC BLE V2 (Arduino connector # - Pin #) MOSI J24-5 MOSI J10-P14 MISO J24-4 MISO J10-P12 SPI CLK J24-6 SCK J10-P10 SPI CS J24-3 SSEL J10-P16 RESET J22-6 CLRCL_NRST J12-P6 IRQ J22-5 IRQ J12-P8 IFSEL0 J24-7 GND IF0 Via R11 IFSEL1 J25-4 VCC IF1 Via R9 GND J25-6 GND GND J11-P11   Connections between i.MXRT1050 EVKB Board and NFC BLE V2   3 OM-SE050ARD: SE050 Arduino ® Compatible Development Kit The OM-SE050ARD is the flexible and easy-to-use development kit for the EdgeLock™ SE050 Plug & Trust product family. It can be used in various ways for example via the Arduino interface compatible to any board featuring an Arduino compatible header, including many i.MX, LPC and Kinetis ® boards, or via a direct I 2 C connection. This kit allows evaluation of the SE050 product family features and simplifies the development of secure IoT applications. More information can be found in the respective Application Note AN12395. Preparing hardware for "Secure Access to Industrial IOT demo" at i.MXRT1050 EVKB   Reworking i.MXRT1050 EVKB: It is necessary to short circuit 4 empty resistor pads: R278, R279, R280 and R281 – they connect SPI from i.MX1050 until Arduino SPI pads, which will be used by NFC BLE V2 board.   Reworking NFC-BLE V2 board: It is necessary to cut at least one male pin to avoid conflict with OM-SE050ARD board (better would be to cut first 2 pins):   Configuring OM-SE050ARD board jumpers:     Final HW configuration of these three boards altogether: Since NFC BLE V2 has only male connectors, OMSE050ARD board is first connected to i.MX1050 EVKB, then NFC BLE V2 is plugged on top of this latest pcb.       Running "Secure Access to Industrial IOT demo" at i.MXRT1050 EVKB:   If this is the first time you’re using i.MXRT1050 EVKB board, follow this link  i.MXRT1050 board overview . Make sure to install the SDK package for i.MXRT1050 EVKB which is required for the project below to run. Download the following zip package Access_RT_v_1_0_18092019.zip. This file is split in two parts and includes 3 functionalities in one MCUxpresso project: Preparation of MFDFEV2 card The touch screen display will offer three functionalities. By default, the first screen will be "Authenticate" functionality. When you choose the arrow to the right, you'll find TAB with word START, that you'll touch when you need to prepare a MIFARE DESFire EV2 card with suitable application and AES keys used for demonstrator. Just place a virgin card on top of Reader antenna, and press "START" button and check with Terminal on MCUxpresso to check sequence of actions to personalize one DESFire EV2 card. You may also use Teraterm to monitor the execution of DESFire card personalization, by inspecting the COM number used by i.MXRT1050 board.     Preparation of SE050 with proper keys    When you choose the arrow to the left once, you'll find TAB with word Authenticate; if you do it again, then you'll the word "START", which you will touch when you need to prepare a virgin OM-SE050ARD demoboardcard with suitable application and AES keys used for demonstrator. Just press "START" button and check with Terminal on MCUxpresso to check sequence of actions to personalize one SE050 board. You may also use Teraterm to monitor the execution of SE050 key provisioning, by inspecting the COM number used by i.MXRT1050 board. After steps 2.a and 2.b have been done to obtain preparation of one Secure element as well as preparation of one MIFARE DESFire EV2 card, then select using < and > keys the Default Display menu, containing word "Authenticate" : just place DESFire EV2 card on top of NFC antenna and press "Authenticate". If the DESFire EV2 card is the one you have personalized, you'll see a Locker icon that will show "Open locker" , that is "Access granted action". If you place other cards, "Locker icon"will stay closed, that is "Access denied". Again, use MCUxpresso Terminal or use Teraterm to monitor the execution of DESFire EV2 authentication steps with SE050 by inspecting the COM number used by i.MXRT1050 board. Available Resources: Application Note Secure Access to Industrial IoT: https://www.nxp.com/docs/en/application-note/AN12569.pdf  Quick start guide to integration of SE050 with i.MXRT1050 https://www.nxp.com/docs/en/application-note/AN12450.pdf i.MXRT1050 EVKB i.MX RT1050 Evaluation Kit | NXP  BLE-NFC-V2 https://www.nxp.com/products/identification-security/rfid/nfc-hf/nfc-readers/clrc663-iplus-i-and-qn902x-nfc-bluetooth-low-energy-solution-for-consumer-applications:BLE-NFC SE050: www.nxp.com/SE050 Porting guidelines of P&T MW to other non-NXP MCU's:  https://community.nxp.com/t5/Secure-Authentication/Does-the-EdgeLock-SE050-Plug-Trust-middleware-support-non-NXP/m-p/1686723#M1305  https://www.nxp.com/docs/en/application-note/AN12448.pdf  In the attachment area, you'll find:  one bundle zip file split in 2 files: Access RT...zip001.zip and ....zip001.zip. download both files, unzip them in one laptop directory, then you may re-zip them and import in MCUxpresso. They include draft of all three functionalities of secure access to industrial iot hands-on: DESFire EV2 card preparation, SE050 trust provisioning (with keys) and authentication of card with current installed SE050.
View full article
This porting guide is for FRDM-K82F, and it can also be used for any other platform supported by KSDK 2.2. The released NXPNCI-KDS_Example_KSDK2.2 is based on FRDM-K64F, so before porting, we need to configure and download KSDK 2.2 for FRDM-K82F. Please make sure you have selected Kinetis Design Studio before downloading. After downloading, extract the package to some folder like below: and change PROJECT_KSDK_PATH to this folder: Change project settings as below: Remove all files in the folder of drivers, and import new source files as below: and similar procedure for "startup" folder and "utilities" folder: Replace the source files in board folder with the files from some ksdk demo like hello_world: FRDM-K82F uses PTC3 for NCI_IRQ pin, PTC9 for NCI_VEN pin, and PTA1 and PTA2(I2C3) as the I2C interface. so add definition in board.c and modify BOARD_InitPins() as below: Change linker settings: -Build -Debug settings -Test Result:
View full article
The demonstration aims at how to protect the NDEF messages in the NTAG, here we use OM5569-NT322ER | NTAG I2C plus Explorer Kit + reader | NXP  as this dev kit contains NTAG as well as the NFC reader. The NTAG I2C plus has the unprotected memory starting from page 04h of sector 0, and NDEF messages are stored there. Referring to 8.3.11 of the data sheet, AUTH0 specifies the starting page to be protected, ACCESS[NFC_PROT] enables read&write password protection from NFC interface, PWD and PACK are for password configuration, but before changing any of above , you have to do a password authentication as below: Then you may select sector 0 and read the contents starting from E3h. Here FFh is the default value for AUTH0.  Now you may change the AUTH0,ACCESS[NFC_PROT] , PWD and PACK as you wish, for example, something like below: read the data from E3h to E6h and change the corresponding bytes in one write. The video shows how to read the NDEF message under password protection.  
View full article
The NXPNCI-KDS_Example for the PN7120/PN7150 Arduino interface boards available in NXP webpage at the time of publishing this document includes a project compatible with KSDK v2.0 for FRDM-K64F platform. With the latest KSDK v2.1 some changes in the drivers along with the later FreeRTOS v9.0.0 make the build process fail when following the instructions in the application note AN11845 NXP NCI KDS Example due to incompatibilities. Meanwhile until the project in NXP webpage is updated there is a temporary project attached to this document fixed to work with KSDK v2.1. The steps to build this project are the same as explained in the appnote, summarized below: - Download and install KSDK v2.1 for FRDM-K64F using MCUXpresso SDK online builder: Welcome to MCUXpresso | MCUXpresso Config Tools  Create a new workspace in KDS IDE. Import the "NXPNCI-KDS_Example_KSDK2.1" project from the archive file. Update the PROJECT_KSDK_PATH build variable according to the installation path of KSDK v2.1. Build the project. For more details please refer to the application note AN11845. Regards! Jorge Gonzalez
View full article
DISCLAIMER APPLICABLE TO THIS DOCUMENT CONTENTS:   This post contains a guide of how to use LPC55S69 demoboard with other NXP demoboards to demonstrate Access control using NFC, one embedded secure element and an MCU (see picture below). A ready to use package including preparation of a secure element, and of a MIFARE DESFire EV2 card can be used as 3-step authentication example using symmetric AES keys; a session key will be generated inside SE050 which will be exported to LPC55S69 which will handle contactless communication thru CLRC663 plus frontend.   This document is structured as follows: Hardware Requirements: Following hardware is required to run the project: LPC55S69-EVK development board. OM-SE050ARD development board. CLEV6630B board or BLE-NFC-V2 board. 1. Overview of LPC55S69-EVK: The LPCXpresso55S69 development board provides the ideal platform for evaluation of and development with the LPC55S6x MCU based on the Arm® Cortex®-M33 architecture. The board includes a high performance onboard debug probe, audio subsystem and accelerometer, with several options for adding off-the-shelf add-on boards for networking, sensors, displays and other interfaces. The LPCXpresso55S69 is fully supported by the MCUXpresso suite of tools, which provides device drivers, middleware and examples to allow rapid development, plus configuration tools and an optional free IDE. MCUXpresso software is compatible with tools from popular tool vendors such as Arm and IAR, and the LPCXpresso55S69 may also be used with the popular debug probes available from SEGGER and P&E Micro.   2. Overview of OM-SE050ARD demoboard: The OM-SE050ARD is the flexible and easy-to-use development kit for the EdgeLock SE050 Plug & Trust product family. It can be used in various ways for example via the Arduino interface compatible to any board featuring an Arduino compatible header, including many i.MX, LPC and Kinetis boards, or via a direct I 2 C connection. This kit allows evaluation of the SE050 product family features and simplifies the development of secure IoT applications. More information can be found in the respective Application Note AN12395.   2.1 Connections between OM-SE050ARD and LPC55S69 EVK   OM-SE050ARD LPC55S69 (Conn.# - Pin #) Port Function Name SE_SDA (J22-1) P24-6 also P17-3 PIO1_21 FC4_I2C_SDA_ARD SE_SCL (J22-4) P24-5 also P17-1 PIO1_20 FC4_I2C_SCL_ARD +5V_PC (J22-2)     VDD_TARGET GND (J22-3)     GND 2.2 Jumper settings on OM-SE050ARD to connect it to LPC55S69 EVK Connect SE050 to LPC55S Arduino stackable headers and change jumper J14 as: This connects SE_VDD directly to 3V3 and bypasses enable signal. This is required because enable pin on LPC55S coincides with Silex-2401 SPI pins so we cannot use SE_EN signal to drive SE_VDD.   3. Overview of NFC Front end boards working with LPC55S69 EVK board for this example:   3.1 BLE-NFC-V2: It is easier to use the BLE-NFC-V2 board since less changes have to made on the board as compared to the CLEV6630B board. The following figure shows the pin mapping between the two boards. It is advisable to add a pull-up resistor (4k7 to VCC) on CLRC663 plus signal IRQ.   3.2 CLEV6630B board: The CLEV6630B board consists of CLRC663 plus (NFC frontend) connected by default to an LPC1769 µC via SPI. However, the board is made in such a way that the LPC1769 MCU can be bypassed to connect to an external MCU (in our case the LPC55S69) easily. For doing so: Six resistors from the board need to be removed. These are highlighted in red in the Figure 1: Use the SPI pin connectors available on the left-hand side, on the board edge to connect to external MCU (LPC55S69 in this case) Solder jumper wires onto the following pins of CLEV6630B Board:  GND IRQ CLRC_NRST SSEL MOSI MISO SCK IF0 IF1          The CLEV6630B is shown in Figure 2 after the required changes have been made to it (Removal of resistors and soldering of wires).   Now connect the two boards as follows: Signal function LPC55S69 (conn. # - Pin #) Port CLEV6630B MOSI P17-10 PIO0_20 MOSI MISO P17-12 PIO0_19 MISO SPI SCK P17-14 PIO0_21 SCK SPI CSEL P17-6 PIO1_11 SSEL RESET P18-11 PIO0_15 CLRCL_NRST IRQ P18-3 PIO1_10 IRQ GND P17-7   GND  As final touch to this demonstrator, one LCD display will be added in order to show "access control" check result when approaching a MIFARE DESFire EV2 card to the Reader antenna, without the use of a computer console. Connection between LPC55S69 board and LCD Display:   TFT LPC55S69 (Jumper # - Pin #) Port      SPI_CLK D13 (P17-9) PIO1_2      SPI_MISO D12 (P17-11) PIO1_3      SPI_MOSI D11 (P17-13) PIO0_26      SPI_CS_TFT D10 (P17-15) PIO1_1      GPIO_LCD_BL D9 (P17-17) PIO1_5      GPIO_LCD_DC D7 (P18-1) PIO1_9 5V 5V   GND GND     Click here to order 2.8 inch TFT Display from Waveshare: P/N: 2.8 inch TFT Touch Shield Brand       4. Running "Secure Access to Industrial IOT demo" at LPC55S69:   If this is the first time you’re using LPC55S69-EVK board, follow the getting started guide first à  LPC55S69-EVK | NXP . Make sure to install the SDK package for LPC55S69-EVKboard which is required for the project below to run. Download the ‘demobinaries.zip' package which you will find attached to this post. This zip file contains 2 bin files: ex_prepareCard.bin - upload this binary file to LPC55S69 when you need to prepare a MIFARE DESFire EV2 card with suitable application and AES keys used for demonstrator. Upload bin file to LPC55S69 by using MCUxpresso. Just place a virgin card on top of Reader antenna, and reset MCU board by clicking on "RESET KEY" push button. ex_prepareSe050.bin - upload this binary file to LPC55S69 when you need to prepare a new SE050 with suitable AES keys to be used in this demo. Just  upload binary using MCUxpresso; connect a virgin OM-SE050ARD on LPC55S69 arduino connectors, connect micro USB connector to MCU board, and reset MCU by clicking "RESET KEY". After steps 2.1 and 2.2 have been done to obtain preparation of one Secure element as well as preparation of one MIFARE DESFire EV2 card, then upload the next bin file to LPC55S69 using MCUxpresso: ex_Ev2Auth_se05x.bin Alternatively, you can import the whole project in your MCUxpresso environment. Download the file EmbeddedWorld2019DemoLatest.zip at end of this page. Import this zip file project in MCUxpresso environment Now that the package has been imported to the MCUXpresso IDE (via drag and drop), click on Debug icon from the Quickstart panel to begin a debug session. Once the debug session has started, click on the run icon to run the code: PICTURE TO BE UPDATED MCUXPRESSO PICTURE TO BE UPDATED The project should be running now. The project contains a closed loop that tries to check presence of a card on top of Reader. Here is how the output looks like in LCD Display. Press the button reset, and you will see the text "Secure Access to Industrial IOT demo 2019" PICTURE TO BE UPDATED Then press the button "Wake-up". Afterwards NFC reader will enter in a loop in which he will look for a card to authenticate. If there are no cards, he will soon show the red allert with text "Access denied" Bring any NFC card near the frontend’s antenna (or in presence of no card) LCD display will show a message in RED "ACCESS DENIED". PICTURE TO BE UPDATED Only in case the "prepared DESFire EV2" card is placed on top of reader, in the picture below, we can see message in GREEN "ACCESS GRANTED" PICTURE TO BE UPDATED.     Available Resources: Porting NFC Reader Library to i.MX RT1050. (Detailed Description of porting) https://community.nxp.com/docs/DOC-341843 LPC55S69 https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc5500-cortex-m33/lpcxpresso55s69-development-board:LPC55S69-EVK BLE-NFC-V2 https://www.nxp.com/products/identification-security/rfid/nfc-hf/nfc-readers/clrc663-iplus-i-and-qn902x-nfc-bluetooth-low-energy-solution-for-consumer-applications:BLE-NFC CLEV6630B Product Information|NXP  SE050: www.nxp.com/SE050
View full article
This post contains a step by step guide of how to use PN7150 with i.MX RT1060. This document is structured as follows: Overview of PN7150 PN7150 is a Plug-and-Play all-in-one NFC solution for easy integration into any OS environment like Linux and Android, reducing Bill of Material (BoM) size and cost. The embedded Arm® Cortex®-M0 microcontroller core is loaded with the integrated firmware, simplifying the implementation as all the NFC real-time constraints, protocols and the device discovery (polling loop) are processed internally. In few NCI commands, the host SW can configure the PN7150 to notify for card or peer detection and start communicating with them. It has the following salient features: Full NFC forum compliancy with small form factor antenna Embedded NFC firmware providing all NFC protocols as pre-integrated feature Direct connection to the main host or microcontroller, by I2C-bus physical and NCI protocol Ultra-low power consumption in polling loop mode Highly efficient integrated power management unit (PMU) allowing direct supply from a Battery Hardware Requirements      1. OM5578/PN7150ARD      2. i.MX RT1060 EVK Evaluation Board + usb micro cable        Using PN7150 with i.MX RT1060 Hardware Connections The hardware connections are simple. Both the EVKB-IMXRT1060 board and OM5578/PN7150ARD board have an Arduino interface. So, mount the PN7150ARD board with male Arduino connector onto the female Arduino connector of the EVKB-IMXRT1060 board.  Running the Demo If this is the first time you’re using EVK-MIMXRT1060 board, follow the getting started guide first: i.MX RT1060 Evaluation Kit | NXP . Make sure to install the SDK package for EVK-MIMXRT1060 board which is required for the project to run.   Download the ‘evkbimxrt1060_PN7150’ package which you will find attached to this post. Drag and drop the downloaded package to the “Project Explorer” tab of your MCUXpresso IDE workspace (If you don’t have MCUXpresso, it can be downloaded for free from here: https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE Now that the package has been imported to the MCUXpresso IDE (via drag and drop), click on Debug icon from the Quickstart panel to begin a debug session. Once the debug session has started, click on the run icon to run the code: After step 3, the project should be running now. The project contains basic discovery loop functionality. Here is how the output looks in the console tab on MCUXpresso: Bring any NFC card near the PN7150 board’s antenna and the output console will show the detection and type of the card. For example, in the picture below, we can see that type 4 card was detected: Available Resources AN11990 NXP-NCI MCUXpresso example document. (https://www.nxp.com/docs/en/application-note/AN11990.pdf) The example project explained in this project was ported to i.MX RT1060 using section 5.3 and 6 of the above mentioned document. PN7150 datasheet (https://www.nxp.com/docs/en/data-sheet/PN7150.pdf) PN7150 User Manual (https://www.nxp.com/docs/en/user-guide/UM10936.pdf) PN7150 NFC Controller SBC Kit User Manual  (https://www.nxp.com/docs/en/user-guide/UM10935.pdf)
View full article
Hello NFC Community, This document describes how to write multiple NDEF Text Record by making use of NFC TagWriter app by NXP. First of all, download the TagWriter app from the Play Store: NFC TagWriter by NXP - Apps on Google Play  1) Once downloaded, go to the Write tags section. 2) In this case, a NDEF text record will be written. 3) Write a text message in the TextBox and press the Save & Write Button. 4) Now, press the ADD MORE RECORD Button so that another record can be added to the content to be written in the tag. 5) Select Plain Text again.   6) Same, procedure as in 3. 7) Finally, Tap the card and press the DONE Button. I hope this is of great help! Ivan R.
View full article