Use NFC Reader to Get IoT Sensor Data, Change Configuration, Upgrade Firmware, Upload Sensor Data to ThingsBoard, NFC Tag, STM32L4, BG95

by huangoo in Circuits > Sensors

43 Views, 2 Favorites, 0 Comments

Use NFC Reader to Get IoT Sensor Data, Change Configuration, Upgrade Firmware, Upload Sensor Data to ThingsBoard, NFC Tag, STM32L4, BG95

NB DISCO 95接口.png

We use an NFC reader 3911 to get NB-IoT sensor data with an on-board NFC tag, and upgrade the sensor firmware.

Change the MQTT parameters of the sensor via the NFC tag and upload the sensor data to the ThingsBoard.


The NB-IoT sensor we used is NB DISCO 95, and can be found here

Sensors That Need to Be Connected

图4.png
  1. 1 X IP68 Soil Temp, Moisture, and EC sensor
  2. 1 X Class-A PT100 temperature sensor
  3. 1 X SHT30 temperature and humidity sensor

Scan the NFC Tag

图片5.png

√ Connect the NB DISCO 95 board to your PC via Micro USB

√ Connect the NFC Reader 3911 to your PC via Micro USB

√ Download and install Serial port utility Windows® PC software

√ Download and install STSW-ST25PC001 - Windows® PC software for ISO15693, ISO14443-A/B, NFC and industrial readers - STMicroelectronics

The recommended version is 2.6.2


Step 1: Open the ST25PC-NFC software.

Step 2: Press the NFC Reader 3911 S1 button once to reset the device, The 6 LEDs are fully lit to indicate that the reset is successful.

Step 3: Click Reader -> Disconnect -> Connect, When ST25R3911B-DISCO CONNECTED is displayed, it means that the NFC reader 3911 is connected to the PC successfully.

Step 4: Open the serial port utility tool and press the NB DISCO 95 S1 button once to reset the device. Then hold the NFC reader 3911 close to the ST25DV module of the NB DISCO 95 and click Scan Once.


When connected to ST25PC-NFC PC software, use the NFC reader 3911 to approach the ST25DV module of the NB DISCO 95. The serial port will print Enter FTMManagement, and when it is removed, it will print Exit FTMManagement.

Get the NB DISCO 95 Board Sensor Data

图片6.png
图片7.png

Click on the Receive a buffer in a file option, click the start button, wait for the device to collect sensor data, and then save the content as a Recv_sensor_data.txt.


View Recv_sensor_data.txt file content and serial port logs.

Upgrade the Firmware of the NB DISCO 95 Board

图片8.png
图片9.png
图片10.png

Use the NFC reader 3911 to approach the ST25DV module of the NB DISCO 95.

Click on the Firmware Upgrade option and select a firmware Application_NFC_OTA.bin.

The update is successful when an update applied log appears on the serial port.

Change the MQTT Parameters Via the NFC Tag and Upload the Sensor Data to the ThingsBoard

图片11.png
图片12.png

Step 1: Sign up for a ThingsBoard account.

Step 2: Add a new device in ThingsBoard.

Step 3: Copy the MQTT Credentials and other configurations to the configuration file.

Step 4: Write the configuration file to NB DISCO 95 via NFC Reader 3911.

Step 5: Reset the NB DICO 95 and wait for the data to be uploaded to the platform.

Step 6: View the data on ThingsBoard latest telemetry and compare whether the data is correct.