Installing LibNFC on Windows 8.1
First, download the Zadig USB installer at http://zadig.akeio.ie
Install PN533 reader with libusb0 driver. If the reader is not shown, go to Options-> List All devices.
Now, we have to install LibNFC. Thanks to an article published at MobileFish (http://www.mobilefish.com/developer/LibNFC/LibNFC.html) we can make this process very easy. This is just an updated version of the previously mentioned article.
Operating system used: Windows 8.1 Professional x64
Hardware: Core i5, 8 GB RAM, 64-bit OS
Go to http://sourceforge.net/projects/tdm-gcc/ and download the TDM-GCC MinGW Compiler.
For example tdm64-gcc-4.8.1-3.exe
Double click the executable and press the Create button.
Select MinGW-w64/TDM64 Experimental (32-bit and 64-bit) and press the Next button.
Note: You need to install this version instead of MinGW/TDM (32 bit). The MinGW-w64/TDM64 version will run on 32-bit and 64-bit operating systems.
Select the TDM-GCC installation directory, for example, C:\tools\MinGW64, and press the Next button.
Select your nearest TDM-GCC download server and press the Next button.
Choose TDM-GCC Recommended, All Packages, and press the Install button.
Wait until TDM-GCC is installed and press the Next button.
For more information needed about TDM-GCC, read the README-gcc-tdm64.txt file.
Go to http://sourceforge.net/projects/libusb-win32/ and download libusb-win32.
For example libusb-win32-bin-184.108.40.206.zip
More information about this library: http://sourceforge.net/apps/trac/libusb-win32/wiki
Download and unzip the file, for example: C:\tools\libusb-win32-bin-220.127.116.11
No further action is required.
Go to http://sourceforge.net/projects/gnuwin32/files/pcre/7.0/ and download the PCRE setup wizard (Perl-compatible regular expression).
For example the pcre-7.0.exe
More information about PCRE: http://www.pcre.org
Double click the executable and press the Next button.
Accept the agreement and press the Next button.
Select the PCRE installation directory, for example, C:\tools\GnuWin32, and press the Next button.
Select Full installation and press the Next button.
Enter the PCRE shortcut in the Start menu and press the Next button.
Select additional tasks to be performed and press the Next button.
Press the Install button.
Press the Finish button.
Go to http://www.cmake.org/ and download CMake binary distribution for the Windows platform (Win32 Installer). CMake is a cross-platform, open-source build system.
For example the cmake-3.0.1-win32-x86.exe
Double click the executable and press the I Agree button.
Select Add CMake to the system PATH for all users and press the Next button.
Select the CMake installation directory, for example, C:\tools\CMake, and press the Next button.
Choose the start menu folder and press the Install button.
Wait until CMake is installed and press the Next button.
Press the Finish button to complete the CMake setup.
Go to http://www.doxygen.org/ and download Doxygen.
For example the doxygen-1.8.7-setup.exe
Select the Doxygen installation directory, for example, C:\tools\doxygen, and press the Next button.
Enter the Doxygen shortcut in the Start menu and press the Next button.
Doxygen is installing.
Read Doxygen information and press the Next button.
Go to https://bintray.com/nfc-tools/sources/LibNFC and download the free Near Field Communication library (LibNFC).
For example: LibNFC-1.7.1.tar.bz2
Unpack the file.
For example: C:\tools\LibNFC-1.7.1
More information about this library: http://nfc-tools.org
Go to System -> Advanced System settings -> Environment Variables
In the System variables, the subwindow selects the variable Path and press the Edit… button.
Edit your System variable Path. Add the following paths (if they were not already created) at the end:
To test if all required software/libraries are installed and the System PATH is set correctly, open a Dos window and type: cmake.
You should get the result as shown below:
Once the source and binary directories are selected, it is time to press the Configure button.
A window will open:
This will cause CMake to read all of the input files and discover all the variables used by the project. The first time a variable is displayed, it will be in Red. Users should inspect red variables making sure the values are correct.
For some projects the Configure process can be iterative, so continue to press the Configure button until there are no red entries.
You have to point to PCRE include and lib directories and for libusb include and lib directories.
To fix other errors:
Click on the PCRE_INCLUDE_DIRS value and goto:C:\tools\GnuWin32\include
Click on the PCRE_INCLUDE_DIRS value and goto:
Click on the PCRE_LIBRARIES value and select file:C:\tools\GnuWin32\lib\libpcre.dll.a
Click on the PCRE_LIBRARIES value and select file:
Press the Configure button again.
Click on the LIBUSB_INCLUDE_DIRS value and goto:C:\tools\libusb-win32-bin-18.104.22.168\include
Click on the LIBUSB_INCLUDE_DIRS value and goto:
Click on the LIBUSB_LIBRARIES value and select file:C:\tools\libusb-win32-bin-22.214.171.124\lib\gcc\libusb.a
Click on the LIBUSB_LIBRARIES value and select file:
With the above, you are building a 32bit application.
For a 64bit system, either a 32bit application or a 64bit application will work. 64bit application can not work on 32bit Windows OS. For a 64bit system, you need to use a 64bit driver.
A 32bit driver will not work under a 64-bit system, and vice versa, a 64bit driver will not work under the 32bit system.
32bit MinGW GCC -libusb-win32-bin-126.96.36.199\lib\gcc\libusb.a
32bit MinGW GCC -
64bit MinGW GCC -directly link to libusb0.dll or create your own import lib . Under LibNFC 1.7.1 libusb.a is correct option.
64bit MinGW GCC -
directly link to libusb0.dll or create your own import lib . Under LibNFC 1.7.1 libusb.a is correct option.
32bit MSVC (=Microsoft Visual C++) -libusb-win32-bin-188.8.131.52\lib\msvc\libusb.lib
32bit MSVC (=Microsoft Visual C++) -
64bit MSVC -libusb-win32-bin-184.108.40.206\lib\msvc_x64\libusb.lib
64bit MSVC -
64bit MSVC for IA64 -libusb-win32-bin-220.127.116.11\lib\msvc_i64\libusb.lib
64bit MSVC for IA64 -
Borland C (32bit only) -libusb-win32-bin-18.104.22.168\lib\bcc\libusb.lib
Borland C (32bit only) -
Other compiler, use dynamic -libusb-win32-bin-22.214.171.124\lib\dynamic\libusb_dyn.c
Other compiler, use dynamic -
Finally, you will get the screen with no errors.
Make sure that LibNFC_DRIVER_PN53X_USB is checked in order PN533 USB NFC stick to work properly!
Click the Configure button and then the Generate button.
This will create files to the build directory: c:\LibNFC-build
Click the Configure button and then the Generate button.
Goto folder C:\LibNFC-build and type: mingw32-make
Finally, you can test LibNFC with the “nfc-list” or “nfc-list –v” command in the command prompt.
This is the output of the MIFARE® 1K card on the PN533 USB NFC stick.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.