ST com ST25DV-I2C NFC Dynamic Tag User Manual

June 3, 2024
ST com

ST-com-LOGO

ST com ST25DV-I2C NFC Dynamic Tag

ST-com-ST25DV-I2C-NFC-Dynamic-Tag-PRODUCT-IMAGE

Introduction

The ST25 mediated handover demonstration shows how an ST25DV-I2C NFC dynamic tag can ease the connection of a device to a Wi-Fi® network, using a smartphone as a mediator.
This demonstration implements the NFC Forum mediated handover protocol to communicate the Wi-Fi network credentials to the device, and the TNEP protocol to manage the communication between the smartphone and the ST25DV-I2C NFC dynamic tag. The B-L4S5I-IOT01A board (orderable from www.st.com) is required to run the demonstration.
The firmware (STSW-ST25DV008), running on B-L4S5I-IOT01A board and the Android application (STSW-ST25007) with its source code (STSW-ST25008) are available on www.st.com.

Description

The ST25DV-I2C device is an NFC dynamic tag featuring a RF interface to communicate with an NFC reader or smartphone, and an I2C interface to communicate with an MCU.
Many IOT devices, while widely connected, do not have any user interface, or a very rudimentary one. Thus, the problem to solve is how to configure the IoT devices to provide them with the network information such as SSID and password of a consumer home Wi-Fi® network.
The NFC Forum mediated handover protocol provides a user-friendly and cost- effective solution to this problem, by using a smartphone to transmit the Wi- Fi credentials from the Wi-Fi access point to the Wi-Fi device.
The ST25 mediated handover demonstration shows an implementation of this NFC Forum standard to connect an IOT board to a Wi-Fi network.

  1. The user’s smartphone first read the Wi-Fi network credential stored in an NFC tag coming with the Wi-Fi Access Point.

  2. The network credentials are communicated to the IOT device thanks to an embedded ST25DV-I2C NFC Dynamic tag.

  3. Finally, the IOT device connects to the Wi-Fi network, using the provided credentials.

ST-com-ST25DV-I2C-NFC-Dynamic-Tag-03

NFC Forum standards

The NFC Forum mediated handover protocol defines the messages to be exchanged between the smartphone and the Wi-Fi access point, and between the smartphone and the IOT device. Two options are proposed to transmit these messages:

  • Peer 2 peer
  • TNEP

The ST25 mediated handover demonstration is using the NFC Forum TNEP, which defines a communication scheme between an NFC reader (for instance a smartphone) and an NFC dynamic tag (for instance a
ST25DV‑I2C). This TNEP protocol allows an NFC reader to select the mediated handover service on the IOT device, and then to exchange the handover data.

Hardware and software installation

The ST25 mediated handover demonstration requires the following hardware:

  •  a Wi-Fi access point
  •  an Android smartphone
  • a B-L4S5I-IOT01A board
  • a X-NUCLEO-NFC04A1 expansion board (optional)
  • a ST25 NFC tag
Wi-Fi access point

The Wi-Fi access point is used to create a Wi-Fi network on which the IOT board is connected during the demonstration.

Android phone

The Android phone is used as a mediator to read the Wi-Fi access point network credentials and transmit them to the IOT board.
The ST25 mediated handover Android application (STSW-ST25007) is required to run the demonstration. This application can be downloaded on www.st.com and on Google play. The minimum Android version requested is 6.0.

B-L4S5I-IOT01A board

This board is used as an IOT device to be connected to the Wi-Fi network.
It features a Wi-Fi module and a ST25DV‑I2C NFC dynamic tag.

ST-com-ST25DV-I2C-NFC-Dynamic-Tag-04

The B-L4S5I-IOT01A board (orderable from www.st.com) is required to run the demonstration.
The ST25 mediated handover demonstration firmware (STSW-ST25DV008) for this board can be downloaded on www.st.com and installed on the B-L4S5I-IOT01A board through the ST-LINK connection. To flash the firmware, connect the micro-USB STLINK port to a computer (this port is also used to power the board) and drag and drop the “Mediated Handover.bin” to the B-L4S5I-IOT01A icon in the computer directory.
The B-L4S5I-IOT01A board also has an ARDUINO® Uno V3 connector, which can be used to connect a X-NUCLEO-NFC04A1.

X-NUCLEO-NFC04A1 expansion board (optional)

This Nucleo expansion board is optional, it can be used to benefit from the bigger antenna for the ST25DV‑I2C NFC dynamic tag. It connects to the B-L4S5I- IOT01A ARDUINO® Uno V3 connector. When this Nucleo expansion board is available, the firmware detects it and uses the ST25DV-I2C dynamic tag of the expansion board, instead of the one on the B-L4S5I-IOT01A board (a reset of the B-L4S5I-IOT01A board is required for the detection).

ST25 NFC tag

An NFC tag is required to store the Wi-Fi access point network credentials. Some Wi-Fi access point on the market provides an NFC tags out of the box, but if it is not available, the ST25 mediated handover Android application can configure any ST25 NFC tag with the Wi-Fi network credentials (See Section 4.1 Initialization of the NFC tag with the Wi-Fi network credentials).

Demonstration presentation

Initialization of the NFC tag with the Wi-Fi network credentials

Some Wi-Fi access points come with an NFC card with the network credential already configured. In that case, this step can be skipped.
The ST25 mediated handover Android application can configure a ST25 NFC tag with the Wi-Fi network credentials.
In the application menu, open the “Demo setup” screen.

ST-com-ST25DV-I2C-NFC-Dynamic-Tag-05

If the smartphone, is connected to the Wi-Fi access point, the SSID, authentication and encryption fields are automatically filled by the application.
The Wi-Fi password must be entered by the user.
When all fields are correctly set:

  1. click on the disk icon in the top right corner, it opens the pop-up shown in the Figure 6
  2.  tap on the NFC tag
    The network credentials are now stored into the tag and can be used for the demonstration.
Running the demonstration

When starting the ST25 mediated handover Android application, a welcome pop-up is displayed, like in Figure 7.

To start the demonstration:

  1. Touch the “Start mediated handover” button. This opens a pop-up as shown in Figure 8. Tap the NFC tag.
  2.  Follow the instruction and tap the tag initialized with the Wi-Fi network credentials.
  • A second pop-up appears, asking the user to tap the Wi-Fi device to write the Wi-Fi network credential (as shown in
    Figure 9.
    Tap the Wi-Fi device).

  • At this point the LED LD2 on the B-L4S5I-IOT01A is still blinking while the firmware is waiting for new credentials.

  • Tap the antenna on the B-L4S5I-IOT01A (of on the X-NUCLEO-NFC04A1 if connected), to automatically run the following sequence:

  1.  TNEP communication to select the mediated handover service

  2.  Mediated handover communication to provide the Wi-Fi network credentials to the B-L4S5I-IOT01A firmware
    After step 2, the application screen looks like
    Figure 10
    with all check boxes validated. At this stage, the smartphone is not used anymore, and it can be removed to follow step 3.

  3. The B-L4S5I-IOT01A firmware starts its Wi-Fi module and tries to connect to the Wi-Fi network.

Other features

Step by step demonstration

The TNEP and mediated handover sequence is run automatically by the ST25 mediated handover application.
To follow the sequence in detail, the application provides a step-by-step mode, which displays a pop-up each time a message is written or read from the ST25DV-I2C. These pop-ups describe the current state and the coming actions.
To enter step-by-step mode, click on the step icon in the top right corner of the main screen as shown in
Figure 11.

Using the console

The B-L4S5I-IOT01A firmware only communicates its state using the LED LD2.
To get more information on the firmware execution, a serial console can be used. The ST-LINK connection enables a virtual COM port, which is used by the firmware to log messages as shown in the figure below.

To open the console, connect the B-L4S5I-IOT01A STLINK USB to a computer, use a console application such as Tera Term and enable the serial port with a baud-rate of 115200.

List of acronyms and abbreviations

This section lists the standard acronyms and abbreviations used throughout the document.

Term Meaning
IoT Internet of things
LED Light emitting diode
MCU Microcontroller unit
NFC Near field communication
SSID Server set identifier
TNEP Tag NDEF exchange protocol
USB Universal serial bus

Revision history

Date Revision Changes
14-Jan-2021 1 Initial release

17-Feb-2021

| ****

2

| Updated:

•        Introduction



07-May-2021

| ****


3

| Updated:

•        Introduction

•        Section 3.3 B-L4S5I-IOT01A board

•        Section 3.4 X-NUCLEO-NFC04A1 expansion board (optional)

•        Section 4.2 Running the demonstration

IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2021 STMicroelectronics – All rights reserved

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

ST com User Manuals

Related Manuals