%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#7F8C8D'}}}%%
graph TB
subgraph P2P["Peer-to-Peer Mode"]
P1[Phone A] <-->|Data| P2[Phone B]
end
subgraph RW["Reader/Writer Mode"]
R1[Phone] -->|Read/Write| T1[Tag]
end
subgraph CE["Card Emulation Mode"]
C1[Terminal] -->|Transaction| C2[Phone as Card]
end
style P2P fill:#16A085,stroke:#2C3E50,stroke-width:2px
style RW fill:#E67E22,stroke:#2C3E50,stroke-width:2px
style CE fill:#2C3E50,stroke:#16A085,stroke-width:2px
896 Near Field Communication (NFC)
896.1 Overview
Near Field Communication (NFC) is a short-range wireless technology based on HF RFID that enables two devices to communicate when brought within 4-10 cm of each other. Operating at 13.56 MHz, NFC provides secure, intuitive touch-to-connect interactions for payments, access control, data transfer, and device pairing.
This comprehensive guide is organized into four focused chapters:
896.2 Chapter Guide
896.2.1 NFC Communication Fundamentals
Learn the core concepts of NFC technology:
- What is NFC: Definition, key characteristics, and relationship to RFID
- Operating Modes: Peer-to-peer, read/write, and card emulation modes
- Tag Types: Type 1-5 tags with varying memory and security capabilities
- NDEF Format: NFC Data Exchange Format for interoperability
896.2.2 NFC Implementation and Applications
Hands-on tag programming and real-world applications:
- Programming NFC Tags: Android, Python, and Arduino code examples
- Mobile Payments: Apple Pay, Google Pay security architecture
- Smart Home Automation: NFC tags triggering IoT scenes
- Product Authentication: Anti-counterfeiting with encrypted tags
- Security Best Practices: Encryption, authentication, and input validation
896.2.3 NFC IoT Integration and Labs
Build NFC-enabled IoT systems:
- Gateway Pattern: NFC-to-cloud pipelines with MQTT
- Lab 1: ESP32 Access Control: Door lock system with PN532 reader
- Lab 2: Smart Home Server: Raspberry Pi automation with scene triggers
- Python Implementations: Tag simulator and payment system examples
896.2.4 NFC Security and Technology Comparisons
Security analysis and technology selection:
- Payment Security: Tokenization, dynamic cryptograms, secure elements
- HCE vs SE: Host-based vs hardware card emulation tradeoffs
- NFC vs Bluetooth LE vs QR Codes: Decision matrix for different use cases
- Comprehensive Quiz Questions: Test your NFC knowledge
896.3 Key Characteristics
| Feature | Value |
|---|---|
| Frequency | 13.56 MHz (HF) |
| Range | 4-10 cm (intentionally short for security) |
| Data Rate | 106, 212, 424, or 848 Kbps |
| Power | Passive tags powered by reader field |
| Bi-directional | Can both send and receive data |
| Ubiquitous | Built into 2+ billion smartphones globally |
896.4 Operating Modes at a Glance
896.5 Prerequisites
Before diving into NFC, you should be familiar with:
- Network Access and Physical Layer Protocols: Physical layer concepts and short-range wireless technologies
- Networking Basics: Communication protocols and data exchange fundamentals
896.7 Whatβs Next
Start with NFC Communication Fundamentals to learn the core concepts, then progress through implementation, IoT integration, and security topics.