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).

Dashboard 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 three distincts areas:

  1. In the upper left corner, three nodes manage the 'Clear' button

  2. In the center at the top the nodes retrieve the information for the first tab: the generic NFC information, as well as the NDEF (if any).

  3. Finally, the main part of the graph (lower part) prepares series of three commands in order to retrieve the type of Tap, the serial number and the firmware version. These lwM2M commands need to be constructed (in a JSON), then sent by the ST25DV FTM Write node (#57). The response is retrieved by the ST25DV FTM Read node (#59) then formatted and dispatched to the corresponding display components. It is the StaCounter variable which identifies the field currently being read.

Back to top