Find the original README at the bottom.
branch everest: Modified branch NCI2.0_PN7160, working with PN7160 NFC controllers on 64bit Linux platforms, and optimized for used with EVerest.
The original upstream source code, released under the Apache 2.0 license and re-distributed here under the same license, has been modified as indicated below:
- Applied 64bit patches
- Added CMakeLists.txt
- Allow for runtime configuration of interface properties for alternative I²C/SPI interface
- Allow configuration files to be in a custom path
When using this library in EVerest, retrieval of the source code will be handled automatically.
Using add_subdirectory
or find_package(libnfc_nci)
in a depending CMake project, will provide the property LIBNFCNCI_CONFIG_INSTALL_PATH
, which can be retrieved to be used by the depending project:
get_target_property(LIBNFCNCI_CONFIG_INSTALL_PATH libnfc_nci::libnfc_nci LIBNFCNCI_CONFIG_INSTALL_PATH)
This path is where the configuration files
libnfc-nci.conf
libnfc-nxp.conf
are expected to be.
If libnfc_nci is included via add_subdirectory
, the depending project is responsible to install the required versions of these files.
If libnfc_nci is included via find_package()
, the depending project may still need to install the configuration files in order to overwrite the defaults installed by the library.
Standalone test builds can be done as follows:
git clone [email protected]:EVerest/linux_libnfc-nci.git
cd linux_libnfc-nci
git checkout everest
mkdir build
cd build
CMAKE_PREFIX_PATH=<path to everest-cmake> cmake -DCMAKE_INSTALL_PREFIX=<prefered install location> ..
# or, if standalone examples are required:
CMAKE_PREFIX_PATH=<path to everest-cmake> cmake -DCMAKE_INSTALL_PREFIX=<prefered install location> -DLIBNFCNCI_BUILD_EXAMPLES=ON ..
cmake --build . --parallel -j
cmake --install .
This will also install the configuration files into the expected folder.
Runtime configuration (debug output levels, detailled NFC behaviour, interface specification) happens via the above-mentioned files.
Templates, which are also the defaults to be installed in a standalone build, can be found in conf/
:
conf/libnfc-nci.conf
conf/libnfc-nxp.conf
The specification of the interface to the NFC chip is defined in libnfc-nxp.conf
.
Relevant settings are:
NXP_TRANSPORT=0x02
NXP_NFC_DEV_NODE="/dev/nxpnfc"
PIN_INT=535
PIN_ENABLE=536
PIN_FWDNLD=537
I2C_ADDRESS=0x28
I2C_BUS="/dev/i2c-1"
SPI_BUS="/dev/spidev0.0"
Original README:
branch NCI2.0_PN7160: Linux NFC stack for PN7160 NCI2.0 based NXP NFC Controller. For previous NXP NFC Controllers support (PN7150, PN7120) refer to branch master.
Information about NXP NFC Controller can be found on NXP website.
Further details about the stack here.
- NCI2.0-R1.1 fix limitation about multiple T5T, fix issue with MIFARE Classic read after write, cleanup of alternate transport definition, cleanup of logs
- NCI2.0-R1.0 is the first official release of Linux libnfc-nci stack for PN7160
- LLCP1.3 support requires OpenSSL Cryptography and SSL/TLS Toolkit (version 1.0.1j or later)
- To install on 64bit OS, apply patch