The Writable NDEF Message Example shows how to use the NFC tag to expose an NDEF message, which can be overwritten with any other NDEF message by NFC device.
When the application starts, it initializes the NFC tag and generates a URI message with a URI record containing the URL "nordicsemi.com". Then it sets up the NFC library for Type 4 Tag platform, which uses the generated message and senses the external NFC field. The library works in Read-Write emulation mode. In this mode, procedures for reading and updating an NDEF message are handled internally by NFC library.
The only events handled by the application are the NFC events. Each of these events is related to following LEDs actions:
NFC event | LED action |
---|---|
NFC field on | LED 1 is lit. |
NDEF message read | LED 4 is lit. |
NDEF message updated | LED 2 is lit. |
NFC field off | All LEDs are turned off. |
The Writable NDEF Message Example shows the usage of the Experimental: NFC Type 4 Tag and the URI message generation modules.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\nfc\experimental_writable_ndef_msg
Test the Writable NDEF Message Example with a smartphone or a tablet with NFC support by performing the following steps: