Demo application that demonstrates the NDEF message creation and parsing using the NDEFT2T module.
- Introduction
- The example application demonstrates the usage of the NDEFT2T module. It shows how to:
User interaction is possible via:
- the WAKEUP button, connected to PIO0
- the LED, connected to PIO7 (on the NHS3100TEMODB)
- the NFC interface
- Functionality
- The LED is lit when an NFC field is detected and the tag is selected; it is turned off again when the NFC field disappears.
- The NFC memory is populated with a dual-record NDEF message containing a TEXT record and a MIME record.
- Each time the tag is re-tapped, a slighty changed TEXT record and MIME record can be read out.
- When the WAKEUP button is pressed, the NFC memory will be populated with an single-record NDEF message contaning a fixed URL. Pressing the button a second time switches back to the dual-record NDEF message.
- The payloads of the TEXT and MIME records can be changed by writing an NDEF message. When the tag reader writes an NDEF message, its contents are immediately parsed. Any TEXT record's payload is copied and used therafter in subsequent messages generated by the tag; as is the case for any MIME record's payload. Resetting the IC will revert back to the orginal payload set.
- Application flow
- The top level flow of the application is captured in the diagram below:
- Tag reader
- on Android:
- Any NFC-enabled Android phone can be used to read out the data generated by the tag, even without any APP installed or active.
- NXP's NFC TagInfo APP can be used to inspect the data in close detail.
- NXP's NFC TagWriter APP can be used to write NDEF messages, changing the data generated by the tag thereafter.
- on iOS:
- NXP's NFC TagInfo APP can be used to read out the data generated by the tag.
- on Windows and macOS:
- The NTAG SmartSensor Automator application, available in the SDK under sw/crossplatform/comm, can be used to read out the data generated by the tag, and to inspect the data in close detail. It can also be used to write NDEF messages containing MIME records, changing the data generated by the tag thereafter.