nfc-tools/libnfc
FreePlatform independent Near Field Communication (NFC) library
FreeFree tier
About nfc-tools/libnfc
libnfc is a free/libre, platform-independent library that provides userspace application access to Near Field Communication (NFC) devices. It supports a wide range of NFC hardware through multiple drivers (e.g., pn53x_usb, acr122_usb, acr122_pcsc, pcsc) and includes configuration files for Linux (udev) and FreeBSD (devd) to manage device permissions. Originally maintained by a community of contributors, the library is hosted on GitHub under the nfc-tools organization.
Key Features
Platform-independent (Linux, FreeBSD, Windows)
Userspace library for NFC device access
Supports multiple NFC drivers: pn53x_usb, acr122_usb, acr122_pcsc, pcsc
Configuration file support and per-device configuration
Udev rules for Linux and devd rules for FreeBSD
Open source under LGPL license (see COPYING)
Command-line utilities and examples included
Pros & Cons
Pros
- Free and open source (LGPL)
- Cross-platform support (POSIX, Windows)
- Wide hardware compatibility through multiple drivers
- Active community development on GitHub
- Includes example code and utilities
Cons
- Official website and forum are no longer available (archived via Wayback Machine)
- Documentation may be scattered; primary source is the README and source comments
- Build process requires autotools and external dependencies (libusb, pcsc-lite)
- Some drivers depend on non-default third-party libraries
Best For
Developing NFC-enabled applicationsReading and writing NFC tagsEmulating NFC cards or readersBuilding tools for contactless communication experiments
FAQ
What is libnfc?
libnfc is a free/libre, platform-independent library that gives userspace applications access to Near Field Communication (NFC) devices. It supports a wide range of NFC hardware drivers and provides configuration options.
How can I build libnfc?
Building from source requires running `autoreconf -vis` (if from git clone) then `./configure && make && make install`. See the README for detailed instructions and driver-specific options.
Which NFC readers are supported?
The library supports readers via drivers such as pn53x_usb, acr122_usb, acr122_pcsc, and pcsc. Many USB and UART-based NFC readers are compatible.
Is libnfc free?
Yes, libnfc is free and open source, licensed under the LGPL. The source code is publicly available on GitHub.