Getting Started with the FP-NET-6LPETH1 Software Package: Connecting 6LoWPAN IoT Nodes to the Internet via Ethernet Networks

UM2341 - Rev 1 - December 2017

Description

FP-NET-6LPETH1 is an STM32 ODE function pack that enables the connection of IoT nodes in a 6LoWPAN wireless sensor network to the Internet via an Ethernet network. This software, combined with specific STM32 and ST devices, can be used for applications such as smart city, home automation, building management, lighting control, or remote monitoring. It runs on the STM32 microcontroller and includes drivers for SPIRIT1-based sub-1GHz RF communication modules (SPSGRF-868 or SPSGRF-915). The software is built upon STM32Cube technology and extends existing STM32Cube-based packages.

For further information, contact your local STMicroelectronics sales office. Visit www.st.com.

Acronyms and Abbreviations

The following table lists common acronyms and their descriptions used in this document:

Acronym Description
IDE Integrated development environment
BSP Board support package
DHCP Dynamic host configuration protocol
HAL Hardware abstraction layer
UDP User datagram protocol
6LoWPAN IPv6 over low power wireless personal area networks
RPL Routing protocol for low power and lossy networks
MCU Microcontroller unit
RF Radio frequency
OS Operating system
CoAP Constrained application protocol
LWM2M Lightweight machine to machine
IoT Internet of things
MEMS Micro electro-mechanical systems
GUI Graphical user interface

FP-NET-6LPETH1 Software Expansion for STM32Cube

Overview

The FP-NET-6LPETH1 software package enhances the functionality of STM32Cube. Key features include:

This software provides a sample application to connect 6LoWPAN network nodes to the Internet. Communication within the 6LoWPAN network is handled by the SPIRIT1 sub-1GHz radio (or associated expansion boards). The sample application routes all packets destined for the Internet through the Ethernet device on the NUCLEO-F429ZI board.

Detailed information on Contiki OS can be found in its Internals section. For Contiki APIs, refer to the documentation within the FP-NET-6LPETH1 package.

Architecture

The software is built on the STM32Cube HAL hardware abstraction layer for STM32 microcontrollers. It extends STM32Cube by providing a board support package (BSP) for Wi-Fi and sub-1GHz RF communication expansion boards. These drivers abstract low-level hardware details, allowing middleware components and applications to access sensor data and control SPIRIT1-based sub-1GHz RF communication modules (SPSGRF-868 or SPSGRF-915) in a hardware-independent manner.

The package includes a middleware library for a 6LoWPAN stack and a sample application to bridge IP packets between the 6LoWPAN and Ethernet networks. The device implements a "6to4" IP router functionality, converting 6LoWPAN network IPv6 packets into Ethernet network IPv4 packets.

The application software interacts with the X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 expansion boards through:

Figure 1. FP-NET-6LPETH1 software architecture description: The software architecture diagram shows the STM32Cube HAL layer at the base, supporting the Board Support Package (BSP) for RF communication modules. Above the BSP is the Middleware layer, which includes the Contiki OS and 6LoWPAN stack. The Application layer sits at the top, interacting with the middleware and utilizing the drivers. Connections are shown between the RF expansion board, the STM32 MCU, and the Ethernet interface.

Folder Structure

Figure 2. FP-NET-6LPETH1 package folder structure description: The folder structure diagram illustrates the organization of the FP-NET-6LPETH1 software package. Key folders include 'Documentation' for API details, 'Drivers' for hardware abstraction and board-specific drivers, 'Middlewares' for the Contiki OS and 6LoWPAN stack, and 'Projects' containing sample applications for various IDEs.

The software package includes the following folders:

APIs

Detailed descriptions of user APIs, functions, and parameters are available in a compiled HTML file located in the Documentation folder of the software package.

Sample Application Description

System Overview

A sample application named "IP64Router", found in the Projects directory, provides ready-to-build projects for multiple IDEs. Its functions include:

Figure 3. Overall system architecture description: The overall system architecture diagram depicts a 6LoWPAN network of wireless sensor nodes on the left, connected via an STM32 Nucleo board acting as a bridge to an Ethernet network on the right. The Ethernet network is connected to the Internet through a standard router. The bridge translates IPv6 packets from the 6LoWPAN network to IPv4 packets for the Ethernet network using NAT64 technology.

Important:

Procedure: How to run the IP64Router application

  1. Compile the project using a supported IDE (see Section 3.2 Software requirements).
  2. Connect the STM32 Nucleo board to your PC. A USB mass storage location will appear.
  3. Program the firmware by copying or dragging and dropping the binary file to the USB mass storage location. Alternatively, program directly via a supported development toolchain.
  4. Open a serial line monitor utility.
  5. Select the serial port for the board and configure the parameters: Baud Rate = 115200, Parity = None, Bits = 8, Stopbits = 1.

Wireless Sensor Node Setup using FP-SNS-6LPNODE1 (Optional)

To facilitate end-to-end solution testing between wireless sensor nodes and Internet servers, sample node applications are available as source code and pre-compiled binaries for STM32 Nucleo platforms with expansion boards. The software package for wireless sensor nodes is FP-SNS-6LPNODE1 (refer to UM2100 and the FP-SNS-6LPNODE1 quick start guide for detailed setup information).

Supported node configurations include:

The FP-SNS-6LPNODE1 sample applications demonstrate connecting a node to a remote server using the OMA Lightweight M2M (LWM2M) standard. This technology uses CoAP (over UDP) to publish node resources in a standard LWM2M format, making them available online. The nodes attempt to connect to a public online server, Leshan, which is a Java implementation of an LWM2M server. Leshan also provides a GUI that communicates with the server via a REST API (see http://www.eclipse.org/leshan/).

The Leshan public LWM2M server is for evaluation purposes, demonstrating end-to-end connectivity between a wireless sensor node and an Internet-connected server via the 6LoWPAN-to-Ethernet bridge using the FP-NET-6LPETH1 package.

Figure 4. Client node registered on the remote server description: This figure shows a graphical representation of a client node successfully registered on a remote server, indicating successful network connectivity.

Figure 5. Leshan server: homepage description: The Leshan server homepage screenshot displays the main interface of the Leshan LWM2M server, typically showing server status and available clients.

Figure 6. Leshan server: client homepage description: The Leshan server client homepage screenshot shows details of a specific connected client, including its resources and status.

Figure 7. Leshan server: supported binding and modes description: This screenshot from the Leshan server illustrates the supported binding modes and communication protocols for connected clients.

Procedure: How to connect a remote wireless node to the Internet

  1. Power the STM32 Nucleo board using a Mini-B USB cable connected to the PC.
  2. Program the firmware on the STM32 Nucleo board by copying (or dragging and dropping) the binary file (located in the /Utility/Binary folder) to the USB mass storage that appears when the board is connected to the PC.
  3. Open a serial line monitor utility.
  4. Select the serial port name to which the board is connected and configure the parameters: Baud Rate = 115200, Parity = None, Bits = 8, Stopbits = 1.
  5. Press the RESET (black) button on the STM32 Nucleo board and wait for the node to complete registration.
  6. Open Leshan (refer to figures for interface examples).
  7. Observe or read resources from the connected node via the Leshan interface.

System Setup Guide

Hardware Description

STM32 Nucleo-144 Platform

The STM32 Nucleo-144 boards offer an affordable and flexible platform for prototyping with various STM32 microcontrollers, balancing performance and power consumption. They feature the ST Zio connector (extending Arduino Uno V3 connectivity) and ST morpho headers for specialized shields. Integrated ST-LINK/V2-1 debugger/programmer eliminates the need for separate probes. The boards are supported by comprehensive STM32Cube software libraries and samples.

Figure 8. STM32 Nucleo-144 board description: The STM32 Nucleo-144 board is shown, highlighting its features for rapid prototyping, including the STM32 microcontroller, ST Zio connector for Arduino compatibility, ST morpho headers for expansion, and an integrated ST-LINK/V2-1 debugger/programmer.

Information regarding STM32 Nucleo-144 boards is available at www.st.com/stm32nucleo.

X-NUCLEO-IDS01A4 and X-NUCLEO-IDS01A5 Expansion Boards

These expansion boards provide a platform for evaluating the features of SPSGRF modules, based on the SPIRIT1 low data rate, low power, sub-1 GHz transceiver device. They can be plugged into the Arduino UNO R3 connectors of any STM32 Nucleo board. Other expansion boards can be stacked for evaluating different devices using sub-1 GHz communication. The boards include:

Figure 9. X-NUCLEO-IDS01A4 / X-NUCLEO-IDS01A5 expansion board description: The X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 expansion board is depicted. It features an SPSGRF module based on the SPIRIT1 sub-1 GHz transceiver, an SPI EEPROM, a user LED, and a jumper for current consumption checks.

Software Requirements

The following software components are necessary for setting up a development environment for STM32 Nucleo boards with RF expansion boards:

Hardware and Software Setup

Hardware Requirements

For implementing the bridge, the following hardware components are required:

System Setup Guide

This section details the hardware setup before writing and executing an application on the STM32 Nucleo-144 board with an RF expansion board.

The STM32 Nucleo-144 board includes the ST-LINK/V2-1 debugger/programmer. The STLINK/V2-1 USB driver can be downloaded as STSW-LINK009. The X-NUCLEO-IDS01A4 (or X-NUCLEO-IDS01A5) expansion board connects easily to the STM32 Nucleo-144 board's Arduino connector.

Figure 10. STM32 Nucleo-144 plus the sub-1GHz expansion board description: This illustration shows the physical connection of the sub-1GHz expansion board (X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5) to the STM32 Nucleo-144 board via its Arduino connector.

Important: To prevent resource usage conflicts between the X-NUCLEO-IDS01A4 (or X-NUCLEO-IDS01A5) expansion board and the NUCLEO-F429ZI board, the following modifications are necessary:

Figure 11. NUCLEO-F429ZI board (bottom view): resistor position changed description: The bottom view of the NUCLEO-F429ZI board indicates the specific location (SB121) where a 0-ohm resistor should be moved to position SB122 to prevent resource conflicts.

Figure 12. X-NUCLEO-IDS01A4 (or X-NUCLEO-IDS01A5) expansion board: resistor position changed description: The X-NUCLEO-IDS01A4 (or X-NUCLEO-IDS01A5) expansion board diagram shows the location (R4) where a 0-ohm resistor should be moved to position R7 to prevent resource conflicts.

References

Freely available at www.st.com:

Revision History

Date Version Changes
21-Dec-2017 1 Initial release.

IMPORTANT NOTICE

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

© 2017 STMicroelectronics. All rights reserved.

PDF preview unavailable. Download the PDF instead.

dm00464411-getting-started-with-the-fp-net-6lpeth1-software-package-connecting-6lowpan-iot-nodes-to-the-internet-via-ethernet-ne C2 v4.2.0220 build 670 - c2 rendition config : Techlit Active Antenna House PDF Output Library 6.5.1119 (Windows (x64)); modified using iText 2.1.7 by 1T3XT

Related Documents

Preview STM32 Nucleo-144 Boards User Manual | STMicroelectronics
Explore the STM32 Nucleo-144 boards with this comprehensive user manual. Learn about features, hardware layout, configuration, power supply options, and connectivity for STM32 microcontrollers. Ideal for prototyping and development.
Preview STM32 Nucleo-144 Boards (MB1137) User Manual
Explore the STM32 Nucleo-144 boards (MB1137) from STMicroelectronics. This user manual details features, development environment, hardware layout, and ordering information for these versatile microcontroller development kits, ideal for prototyping and embedded system design.
Preview STM32 Nucleo-144 Boards User Manual
User manual for STMicroelectronics STM32 Nucleo-144 development boards, detailing features, hardware layout, configuration, and usage for prototyping with STM32 microcontrollers. Includes model numbers like NUCLEO-F746ZG, NUCLEO-F446ZE, and support for Arm Mbed.
Preview STM32 FP-SNS-FLIGHT1 Quick Start Guide: BLE and Time-of-Flight Sensors
A quick start guide for the STM32Cube function pack FP-SNS-FLIGHT1, enabling IoT nodes with BLE connectivity and Time-of-Flight sensors. Covers hardware overview, setup, demo examples, and software.
Preview STM32 Nucleo-144 Board Data Brief | STMicroelectronics
Technical data brief for the STM32 Nucleo-144 development board from STMicroelectronics, detailing features, system requirements, development toolchains, ordering information, and revision history.
Preview STM32 Nucleo-144 Board Top and Power Schematic
Detailed schematic diagram showing the top and power connections for an STM32 Nucleo-144 development board, including USB, Ethernet, MCU, and power supply circuitry.
Preview X-NUCLEO-GFX02Z1 User Manual: STM32 Nucleo-144 Display Expansion Board
Explore the X-NUCLEO-GFX02Z1, an expansion board from STMicroelectronics that adds a 2.2-inch TFT display and GUI capabilities to STM32 Nucleo-144 development boards. Features include a joystick and Q-SPI NOR Flash memory.
Preview STM32Cube Function Pack FP-CLD-WATSON1: Quick Start Guide for IoT Development
Get started quickly with the STM32Cube function pack FP-CLD-WATSON1. This guide covers setting up your IoT node with Wi-Fi, NFC, and sensors for vibration analysis, connecting to IBM Watson IoT cloud. Includes hardware and software prerequisites for development.