Revision as of 10:59, 23 March 2022 by Registered User (→‎Terms and definitions)
Under construction.png Coming soon

This page contains information such as, application examples, document references, and tips related to STM32 LoRaWAN®.

1. LoRaWAN® overview

1.1. What is LoRaWAN® ?

This section provides a general overview of LoRaWAN® , particularly focusing on the LoRaWAN® end device. LoRaWAN® is a type of wireless telecommunication network designed to allow long-range communication (kilometers) at a very low bit rate (suitable for transmitting small size payloads like sensor data) and enabling long-life battery-operated sensors and actuators (they can last up to 10 years on a single coin cell battery).
Classical use case is for smart farms to measure soil moisture in rural areas, but thanks to the deep indoor penetration (e.g. easily cover multi floor buildings) it is used also for indoor application. It can be deployed on public network as on private network (saving operator fees).
LoRaWAN® defines the communication and security protocol ensuring interoperability with the LoRaWAN® network. The secure communication between the end device and the application server uses AES-128 encryption. The authenticity and integrity of messages between the end device and the network server uses AES-CMAC (Cipher-based Message Authentication Code). Often in LoRaWAN® literature "Message Authentication Code" is called MIC (Message Integrity Code) because MAC acronymous is used for "Media Access Control".

By a technical point of view LoRaWAN® is a MAC (Media Access Control) layer protocol built on top of LoRa® modulation.

LoRa® (from "Long Range") is a proprietary low-power wide-area network (LPWAN) modulation technology based on spread-spectrum modulation techniques that is similar to and a derivative of chirp spread spectrum (CSS) modulation. It was developed by Cycleo, later acquired by Semtech.
LoRa® can be operated on the license free sub-gigahertz bands, like EU433 (433.05-434.79 MHz) and EU863-870 (863–870 MHz) in Europe, US902-928 (902–928 MHz) in North America, and so on for other countries and continents. It also can be operated on 2.4 GHz worldwide. That explains why private network can be implemented.

LoRaWAN® is a software layer which defines how devices use the LoRa® hardware, it is protocol which defines the communication rules from the format of the messages to the network architecture and security aspects.
LoRaWAN® message types are used to transport MAC commands and application data. They can be uplink and downlink. Message types depends on the specification’s versions 1.0.x and 1.1.

The LoRaWAN® protocol is developed and maintained by the LoRa Alliance®.
As announced by the LoRa Alliance® on December 7, 2021, LoRaWAN® is officially approved as a standard for Low Power Wide Area Networking (LPWAN) by the International Telecommunication Union (ITU). The LoRa Alliance® certification program certifies end devices and provides end-users with confidence that the devices are reliable and compliant with the LoRaWAN® specification.

The LoRaWAN® device classes are defined in the table below:

Class name Intended usage
A - All
  • Battery-powered sensors or actuators with no latency constraint
  • Most energy-efficient communication class
  • Must be supported by all devices
B - Beacon
  • Battery-powered actuators
  • Energy-efficient communication class for latency controlled downlink
  • Based on slotted communication synchronized with a network beacon
C - Continuous
  • Main powered actuators
  • Devices that can afford to listen continuously
  • No latency for downlink communication

All LoRaWAN® devices must implement Class A, whereas Class B and Class C are extensions to the specification of Class A devices.

1.2. LoRaWAN® Network architecture

The LoRaWAN® network is structured in a star of stars topology, where the end devices are connected via a single LoRaWAN® link to one gateway.

Note: While the physical layer of LoRa® is proprietary, the rest of the protocol stack (LoRaWAN® ) is kept open and its development is carried out by the LoRa Alliance® .


The STM32WL series[1] is the ideal MCU family for developing Long Range sub-gigahertz application such sensors and transmit information to central devices.

1.3. LoRaWAN® Gateway

A Gateway is required in a LoRaWAN Network. It is the interface between LoRaWAN End Device and the Cloud. A Gateway is basically converting Lora ® packet from/into an udp packet to the cloud.

Other Gateway:

And many more exists out there!

1.4. LoRaWAN® Network Server

  • Loriot
  • TTN
  • Actility

2. Wiki LoRaWAN®: pages breakdown

STM offers different devices and hardware tools to evaluate and develop a LoRaWAN® End-Device. STMicrolectronics LoRaWAN Products are shown here here. The choice depends on the customer constraint and AN5408: Migrating from STM32L0, STM32L1, and STM32L4 Series associated with SX12xx transceivers to STM32WL Series microcontrollers can help customer to choose.

3. Getting started with STM32WL Series and LoRaWAN®

The STM32WL device architecture leverage state-of-the art STM32 ultra-low-power process node and is available from 64KB up to 256KB of Flash memory and from 20KB to 64 KB of SRAM. The silicon die integrates an Arm® Cortex®-M4 and Cortex®-M0+ core (single and dual-core architectures) as well as a sub-GHz radio based-on Semtech SX126x.
Various packages are available: UFQFN48, UFBGA73.

The STM32WL Nucleo-64 development board is the NUCLEO-WL55JC integrating the STM32WL microcontroller dual-core in UFBGA73 package (with 256KB of Flash and 64KB of SRAM), as well as an STLINK-V3 debugger/programmer, 3 users LEDs, 3 users buttons, 1 reset push-button, and several boards connector (Arduino expansion connector, ST morpho extension pin headers and SMA connector). The board is delivered with an SMA antenna.

The Nucleo development board exists in 2 frequency bands:

Nucleo Reference Description
NUCLEO-WL55JC1 High-frequency band. RF frequency range from 865 to 928 MHz for EU/US/APAC
NUCLEO-WL55JC2 Low-frequency band. RF frequency range from 433 to 510 MHz for EU/CN


On the software side, the STM32CubeWL MCU Package[2] provides a software solution to allow customers to quickly and easily develop their own firmware thanks to:

  • several LoRaWAN® certified[3] applications
  • several Radio applications based on LoRa®, (G)FSK, (G)MSK, and BPSK modulations

THe STM32CubeWL Software Package can also be found on Github here

4. STM32WL learning center

4.1. STM32WL LoRaWAN®

pc videol.png

STM32WL Online Training

This training set introduces the STM32WL and ecosystem

4.2. STM32WL MOOC (massive online courses)

MOOC helvetica dark blue.png LPWAN theory
Learn main principles concerning LPWAN protocols

MOOC helvetica dark blue.png STM32CubeMonitor: how to perform RF functional tests on STM32WL MOOC
Learn basic principles concerning STM32WL55 RF parameters monitoring using STM32CubeMonitor

MOOC helvetica dark blue.png STM32WL security MOOC
Learn main principles concerning security within STM32WL family and LoRaWAN

MOOC helvetica dark blue.png STM32WL Lora Guide
Learn how to setup a LoRaWAN Network using a STM32WL with a LoRaWAN-EndNode including environmental and motion sensors

5. STM32WL software application notes and user manuals

  • AN5406 How to build a LoRa® application with STM32CubeWL
  • AN5481 LoRaWAN® AT commands for STM32CubeWL
  • AN5554 LoRaWAN® firmware update over the air with STM32CubeWL
  • AN5682 How to secure LoRaWAN® and Sigfox™ with STM32CubeWL
  • AN5687 Long-packet operation with STM32CubeWL
  • AN5564 Getting started with projects based on dual-core STM32WL microcontrollers in STM32CubeIDE
  • AN5556 Getting started with STM32WL dual core using IAR™ and Keil®

6. STM32WL hardware guidance

  • RM0453 STM32WL5x (Dual Core) Reference Manual
  • DS13293 STM32WL5x (Dual Core) Datasheet
  • RM0461 STM32WLEx (Single Core) Reference Manual
  • DS13105 STM32WLEx (Single Core) Datasheet
  • AN5407 Optimized RF board layout for STM32WL Series
  • AN5457 RF matching network design guide for STM32WL Series
  • AN5566 RF certification process for NUCLEO-WL55JC
  • AN5664 RSSI and SNR for LoRa® modulation on STM32WL Series

7. Specific tools

8. References

9. LoraWAN Alliance

https://lora-alliance.org/ lorawan-certification

10. Frequently Asked Questions

  1. Numbered list item

11. The ST Blog

FUOTA

12. Terms and definitions

Term Definition
AES Advanced encryption standard
CMAC Cipher-based Message authentication code
CSS Chirp spread spectrum
BPSK Binary phase-shift keying
BSP Board support package
FSK Frequency-shift keying
HAL Hardware abstraction layer
LoRa Long Range radio technology
LoRaWAN LoRa wide-area network
LPWAN Low-power wide-area network
MAC Media access control
MIC Message integrity code
MSK Minimum-shift keying
SMA Subminiature version A
SRAM Static random access memory