Overview
The nfc node enables near-field communication for contactless data exchange.
Read and write NDEF records, emulate NFC tags, and establish peer-to-peer connections for tap-to-pair,
smart poster reading, and device provisioning within a range of 10cm.
Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
| device | string | Yes | - | NFC reader device path or identifier |
| mode | string | Yes | "reader" | "reader" | "emulator" | "p2p" operating mode |
| format | string | No | "ndef" | "ndef" | "raw" data format |
| timeout | number | No | 5000 | Tag detection timeout in milliseconds |
| onDetect | string | No | "read" | Action on tag detect: "read" | "write" | "event" |
| emulationData | object | No | - | NDEF data to serve in emulator mode |
Inputs
{
"payload": {
"command": "write",
"records": [
{
"type": "url",
"value": "https://edgx.cloud"
}
]
}
} {
"payload": {
"command": "emulate",
"records": [
{
"type": "text",
"value": "EdgeFlow Device v1.0"
}
]
}
} Outputs
{
"payload": {
"type": "NDEF",
"records": [
{
"tnf": "well-known",
"type": "U",
"payload": "https://edgx.cloud"
}
],
"uid": "04:A2:B3:C4:D5:E6:F7"
}
} {
"payload": {
"mode": "p2p",
"data": "Pairing complete",
"peer": "04:A2:B3:C4:D5:E6:F7",
"timestamp": "2024-01-15T10:30:45Z"
}
} Use Case Examples
Tap-to-Pair
Enable instant device pairing by tapping an NFC tag. Share Wi-Fi credentials, BLE pairing info, or configuration data.
Smart Posters
Read NFC tags embedded in posters, product labels, and signs to trigger actions, open URLs, or display information.
Payment Terminals
Build contactless payment and loyalty card readers using NFC card emulation and reader modes.
Device Provisioning
Provision IoT devices by tapping an NFC tag containing network credentials, configuration, and activation tokens.
Tips & Best Practices
NDEF format is universal across NFC devices and smartphones. Always prefer NDEF over raw data for interoperability.
Use P2P mode for bidirectional device-to-device data transfer. Reader mode is for one-way tag reading only.
NFC tags have limited storage (typically 144 bytes to 8KB). Keep NDEF records concise and use URL shorteners for links.