Skip to content

NFC Template

Module status: The platform-side NFC Template configuration page is available. The companion NFC mobile-app integration is still under development, so some fields and end-to-end behavior may change in a later release.

The NFC Template binds an existing Thing Model together with a Read RPC and a Write RPC into a single reusable profile. An NFC-capable mobile app can then use that profile to read a device's parameters from an NFC tag and write new parameters back, reusing the platform's existing data-parsing (Thing Model) and command-encoding (RPC) logic — without needing a live LoRaWAN session with the device.

The configuration lives under Model Management → NFC Template.

1. Concept

An NFC Template ties three building blocks together:

BindingRole
Thing Model (required)Parses the raw bytes read from the NFC tag into standardized properties, and is used as the data shape for the parameters being written.
Read RPC (optional)Encodes the byte frame the app sends to the tag to request data, and/or decodes what is read back.
Write RPC (optional)Encodes the byte frame the app writes to the tag to update device parameters.

Because the Thing Model and RPC scripts are authored once in the platform, the same parsing and encoding logic is reused across LoRaWAN uplinks/downlinks and NFC read/write — there is no need to duplicate the byte-level logic in the mobile app.

2. Create an NFC Template

  1. Navigate to Model Management → NFC Template → Add.
  2. Fill in the fields below and click OK to save.
FieldRequiredDescription
IDAuto-generated on save; read-only.
NameYesA human-readable name for the template.
DescriptionNoFree-text notes about the template's purpose.
Thing ModelYesThe Thing Model used to parse data read over NFC and to shape the parameters written.
Read RPCNoThe RPC whose script encodes the NFC read request / decodes the response.
Write RPCNoThe RPC whose script encodes the parameters written back to the device over NFC.

The list page shows each template's Name, Description, bound Thing Model, Read RPC, Write RPC, and last update time, and supports search by name, Thing Model, or RPC.

3. Testing scripts without a device

The NFC use case often has no live device context — the app simply wants to confirm that a Thing Model or RPC script parses its inputs correctly. To support this, the Test action on the RPC Model and Thing Model editors accepts a skipDeviceCheck flag:

  • When skipDeviceCheck is true, the platform injects a synthetic placeholder device (eui = "__empty__" scoped to the current tenant) instead of looking the device up in the device cache, so the test runs even when no real device matches the entered EUI.
  • When skipDeviceCheck is false (the default for normal RPC/Thing Model testing), the platform still requires the device to exist and returns Device not found otherwise.

This lets you validate an NFC Template's bound scripts against sample input before wiring up a physical tag.

4. API

All endpoints are tenant-scoped and follow the standard table conventions:

MethodPathPurpose
POST/nfc-template/find-pagePaged query of NFC templates.
POST/nfc-template/batch-save-updateCreate or update one or more templates ({ dataList: [...] }).
POST/nfc-template/batch-delete-by-idsDelete templates by ID ({ ids: [...] }).

The NFC mobile-app read/write flow is still under development. This page documents the platform-side template configuration only; the on-device NFC interaction will be documented once that integration is finalized.