Build a Raspberry Pi based NFC reader or writer for tags and cards.
Add support for DESFire secure cards or NTAG 424 DNA tags to a project.
Port the NFC stack to an ESP32 microcontroller using Arduino.
| qzx/libnci | ac000/find-flv | acc4github/kdenlive-omnifade | |
|---|---|---|---|
| Stars | 0 | — | 0 |
| Language | C | C | C |
| Last pushed | — | 2013-04-05 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 2/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Requires specific NFC hardware (PN7160 chip) plus libgpiod and OpenSSL to build.
libnci is a C library for reading and writing NFC tags on Linux, built specifically for the PN7160/PN7161 chip from ELECHOUSE running on a Raspberry Pi 5. It follows the NCI (NFC Controller Interface) standard, a common protocol many NFC chips use, so the project is designed to support other similar chips later without changing its public interface. The library is organized in layers. At the bottom sits the hardware communication: one file handles the GPIO pins (using libgpiod version 2) and another handles the I2C bus. Above that is the NCI framing layer that talks the actual protocol to the chip, then a general device layer that exposes the public functions applications call. On top of that are card specific readers: one for Type 4 Tags, a common NFC tag format, and dedicated support for DESFire cards and NTAG 424 DNA tags, including their encrypted communication modes. A cryptography layer handles the AES encryption these secure cards need, using OpenSSL. Most of these layers can be tested without any physical hardware attached. Thread safety rules are spelled out clearly: each connection to the chip should only be used by one thread at a time, though separate connections can run in different threads safely. There are a couple of documented exceptions for cleanly stopping background operations from another thread. To build it you need the meson build tool, ninja, a C compiler, libgpiod, and OpenSSL. Once built, it installs like a normal system library, with headers, a pkg-config file, and support for being linked into other C, Meson, or CMake projects. There is also an experimental port to the ESP32 microcontroller using the Arduino framework, though the author notes this version has not yet been tested on real hardware. Included example programs let you detect nearby tags, read and write NDEF messages, a standard NFC data format, and manage DESFire cards. According to the README, tag detection, basic reading, and the more advanced DESFire secure messaging have all been verified against real hardware.
A C library for reading and writing NFC tags on Linux, built around the PN7160 chip and designed to support other NFC controllers later.
Mainly C. The stack also includes C, libgpiod, OpenSSL.
The README does not state a license.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.