Skip to content

Raw NFC communication with ST25-DV

This example shows how to use low level NFC nodes in the case of a ST25-DV based target. It implements Duetware's lwM2M commands simply because it is considered that the majority of users have at least one TapNLink Primer kit or a Tapioca in their possession, but the elementary nodes used are not related to the Duetware environment in any way. This example can therefore be adapted to any application that uses the ST25-DV in a completely different context.

This first screenshot shows the content of the TAG provided by the OS. This information will be available, whatever the type of the tag:

NFC with ST25DV

This second screenshot shows the NDEF list (if any) read from the TAG. Again, it would be present as soon as some NDEF records exist (whatever the type of the tag):

NFC read NFDEF

The last screenshot displays some information read from an IoTize device (commands sent to Duetware) via a ST25-DV. You will need a device based on Duetware to get this information:

NFC with TapNLink

Note that a mobile can act in three different modes:

  1. as a reader (to communicate with a 'card'),
  2. in card emulation (to communicate with a 'reader')
  3. in peer-to-peer mode (to communicate with another mobile)

In this example, only the first mode is implemented (the TapNLink modules act as cards).

Hardware

You need any NFC device to read generic information. If you have a TapNLink/Tapioca device, you can also obtain Duetware information by running some specific ST25-DV commands. Note that the ST25-DV implements proprietary controls and the supplied nodes make it much easier to use the internal "mailbox" (dual access RAM area).

UI components

The dashboard is quite simple:

  • the first tab contains two accordions which display the general NFC information for the first, and the available NDEF records for the second. Note that not all NFC devices necessarily contain NDEF records.

  • the second tab displays the model, serial number and firmware version of the Iotize device, when you have a TapNLink (or Tapioca) module.

A 'Clear' button allows you to reset the information displayed.

Dataflow graph

Dataflow

The graph is made up of distinct zones:

  1. The NFC service is initialized. When a Tap is discovered, an event is generated by the output of the discovered NFC Tag node.

  2. The main content of the tag is formatted and displayed in a text box.

  3. If the tag contains NDEF records, they are also displayed in a second text box.

  4. When the Clear pushbutton is pressed, the reset event is generated.

  5. After a delay, a series of 3 lwM2M commands is executed, but only if the tag type matches TypeV (ISO15693).

  6. Each command is issued and the response is formatted as an ASCII string.

  7. The information is sent to the right field (the TapNLink type, SN and Fw version are read)

  8. The “No TapNLink” message is either hidden or displayed depending on the success of lwM2M commands.

Back to top