PN7161 Documentation covers quick start steps, I2C wiring, Raspberry Pi and ESP32 setup, Apple ECP differences, libraries, and troubleshooting for the ELECHOUSE PN7161 NFC RFID Module.
Quick Start
- Use the module as an I2C NFC controller with NCI 2.0 firmware.
- Wire SDA, SCL, IRQ, VEN, VDD, VANT, GND, and optional DWL to your host.
- For Raspberry Pi / Linux, use the same linux_libnfc-nci workflow used by PN7160.
- For ESP32 / Arduino IDE, follow the same I2C setup documents used for PN7160.
- If your target application needs Apple Wallet / Apple VAS / Apple ECP, use PN7161 instead of PN7160.
What Makes PN7161 Different?
| Feature | PN7161 | PN7160 |
|---|---|---|
| Apple ECP | Supported | Not supported |
| Apple Wallet / Apple VAS workflows | Compatible | Not the right choice |
| NCI 2.0 | Yes | Yes |
| I2C hardware footprint | Same | Same |
| Linux / Android driver model | Same family workflow | Same family workflow |
Pinout / Wiring Reference
PN7161 uses the same practical wiring model as PN7160.
| PN7161 Pin | Raspberry Pi 4 | Notes |
|---|---|---|
| SDA | Pin 3 (SDA) | I2C data |
| SCL | Pin 5 (SCL) | I2C clock |
| IRQ | Pin 16 / GPIO23 | Interrupt |
| VEN | Pin 18 / GPIO24 | Enable / reset control |
| VDD | Pin 1 / 3.3V | Logic supply |
| VANT | Pin 2 or 4 / 5V | Antenna supply |
| GND | Pin 6 / GND | Common ground |
| DWL | Pin 22 | Optional maintenance pin |
ESP32 Wiring
| PN7161 | ESP32 | Notes |
|---|---|---|
| DWL | GPIO19 | Control pin used in the guide |
| SDA | GPIO21 | I2C data |
| SCL | GPIO22 | I2C clock |
| IRQ | GPIO14 | Interrupt |
| VEN | GPIO13 | Enable / reset |
| VDD | 3V3 | Logic supply |
| GND | GND | Common ground |
| VANT | 5V | Antenna supply |
Supported Platforms
- Raspberry Pi
- Linux with
linux_libnfc-nci - ESP32 in Arduino IDE
- Android / embedded Linux systems
- Embedded applications that require Apple ECP support
Initialization Method
- Bring the module up exactly as you would a PN7160 I2C board.
- Enable I2C on the host and verify bus visibility.
- Install the Linux or Arduino-side software stack.
- Run a basic reader / polling test first.
- Only after baseline communication works should you move on to Apple-specific higher-level application flows.
Libraries and Drivers
- NXP linux_libnfc-nci
- Quick Guide (shared with PN7160/PN7161)
- ESP32 guide (shared workflow)
- I2C address setting guide
- Reference schematic PDF
I2C Address Options
The PN7161 family board uses the same address-selection approach documented for PN7160/PN7161 I2C boards. Supported 7-bit addresses are:
- 0x28
- 0x29
- 0x2A
- 0x2B
Example Workflow
# Raspberry Pi / Linux baseline workflow
sudo raspi-config
# enable I2C
ls /dev/i2c*
git clone https://github.com/NXPNFCLinux/linux_libnfc-nci.git -b NCI2.0_PN7160
cd linux_libnfc-nci
./bootstrap
./configure
make
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib
nfcDemoApp poll
Common Errors
- Apple use case expected, but PN7160 hardware used: switch to PN7161 if Apple ECP is required.
- No board response: verify I2C, IRQ, VEN, power rails, and device address.
- Linux driver starts but no tags are detected: re-check config file transport / device node settings.
- ESP32 example does not respond: confirm pin mapping and supply rails for both VDD and VANT.
Troubleshooting
- First validate plain NFC polling before debugging Apple-specific application layers.
- Use the same bring-up checklist as PN7160 because the hardware platform is intentionally close.
- If multiple boards share the bus, confirm address resistor settings and bus pull-up health.
Version Differences
- PN7161 is the enhanced PN7160-family option that adds Apple ECP support.
- For non-Apple NFC reading / writing use cases, PN7160 may be sufficient and lower cost.
Update History
- 2026-04-05: First public PN7161 documentation page published.
- Reference basis: shared ELECHOUSE I2C quick-start documents plus the PN7161 product page technical notes.
Related Pages
Supported NFC Standards
| Standard | Card / Tag Types | Notes |
|---|---|---|
| ISO 14443A | Mifare Classic, Ultralight, NTAG, DESFire, FeliCa (via wrapper) | Most common NFC cards and tags |
| ISO 14443B | Some bank cards, government ID chips | Less common in maker projects |
| ISO 15693 | Vicinity RFID tags (ICODE, TI HF-I, etc.) | Up to ~1m range with suitable antenna |
| NFC Forum T2T–T5T | NTAG21x, Ultralight, ICODE SLI | NDEF read/write supported |
| Apple ECP | iPhone / Apple Watch Express Transit & Wallet | PN7161 only — not available on PN7160 |
What Is Apple ECP?
Apple Enhanced Contactless Polling (ECP) is a proprietary protocol that allows iPhones and Apple Watches to detect when they are near a reader that supports Apple Wallet or Express Transit — even when the device is locked or the screen is off.
Without ECP, an iPhone will generally not respond to an NFC reader field automatically. With ECP, the device wakes its NFC stack and presents the appropriate credential (transit card, access badge, etc.) without any user interaction.
When you need ECP: ticketing gates, transit turnstiles, hotel door locks, or any system where the user should just tap without unlocking their phone first.
When you do not need ECP: any project where the app explicitly uses Core NFC to scan a tag — in that case, the user initiates the scan from within the app and ECP is irrelevant.
Minimal Arduino / ESP32 Example (NCI Polling)
The PN7161 uses NCI 2.0 over I2C. On ESP32 with Arduino IDE, use the ELECHOUSE PN7160/PN7161 NCI library:
#include <Electroniccats_PN7160.h>
#define PN7160_IRQ 14
#define PN7160_VEN 13
#define PN7160_ADDR 0x28
Electroniccats_PN7160 nfc(PN7160_IRQ, PN7160_VEN, PN7160_ADDR);
void setup() {
Serial.begin(115200);
if (nfc.begin()) {
Serial.println("Error: PN7161 not detected");
while (1);
}
if (nfc.configMode(mode_READER_WRITER)) {
Serial.println("Error: failed to set reader mode");
while (1);
}
nfc.startDiscovery();
Serial.println("PN7161 ready — tap a tag");
}
void loop() {
if (nfc.isTagDetected()) {
nfc.readNdef();
Serial.println("Tag UID: ");
for (int i = 0; i < nfc.remoteDevice.getIdLen(); i++) {
Serial.printf("%02X ", nfc.remoteDevice.getId()[i]);
}
Serial.println();
nfc.waitForTagRemoval();
nfc.restartDiscovery();
}
}
Replace pin numbers to match your ESP32 wiring. For Raspberry Pi / Linux, use the linux_libnfc-nci stack — the PN7161 uses the same NCI firmware as PN7160.
Apple ECP Troubleshooting
- iPhone does not respond at all: Confirm you are using a PN7161 board, not a PN7160. ECP is a hardware-level feature of the PN7161 chip.
- iPhone responds inconsistently: The ECP frame must be transmitted on a fixed schedule. Use the NXP reference firmware; do not implement the polling loop manually.
- Apple Wallet credential not shown: ECP only triggers the credential display — the Wallet pass itself must be set up on the iPhone side via the issuer’s app. The reader cannot force a pass to appear.
- Android works but iPhone does not: Android uses ISO 14443A polling which does not require ECP. This is the expected difference — add ECP support for iPhone.
Raspberry Pi 5 (Bookworm) Compatibility Note
The PN7161 uses the same linux_libnfc-nci software stack as the PN7160. The Raspberry Pi 5 GPIO compatibility issue (libgpiod required on Bookworm) applies equally to PN7161.
See the PN7160 Documentation for the full explanation and fix for Raspberry Pi 5 / Bookworm.
PN7161 vs PN7160 vs PN7150 — Generation Overview
| PN7150 | PN7160 | PN7161 | |
|---|---|---|---|
| NCI version | NCI 1.0 | NCI 2.0 | NCI 2.0 |
| Interface | I2C | I2C | I2C (+ MINI SPI version) |
| Apple ECP | ✗ | ✗ | ✓ |
| ISO 15693 | ✓ | ✓ | ✓ |
| Status | Previous gen | Current | Current (recommended for Apple) |
For new designs, PN7160 or PN7161 are recommended. PN7150 is suitable for existing PN7150-based designs.
