LoRaMac-node
Overview
LoRaMac-node is on open source LoRaWAN stack implementation supporting many different transceivers and hardware devices. It is hosted on github.
STM is providing a fork of LoRaMac-node within their CubeMX development environment. The stack has been adopted to support their WL SoC chipset, therefore it is suitable to run on the FMLR-WL-STM module. With minor modifications, it could also run on all other moduls, but is not actively maintained by Miromico.
This guide is using DEV-FMLR-STEVK7, which features an on-board J-Link programmer.
STM CubeMX Development Environment
STM is providing a full development environment including IDE and stack. Download and install STM32CubeIDE .
STM is also providing a LoRaMac-node based stack running on the WL-SoC. There are some minor modifications needed to run the stack on our FMLR-WL-STM module. These are:
- Adjust pin configuration for peripherals (UART, I2C, SPI)
- Forcing usage of the high power output path
We are providing a fork of the STM LoRaMac-node on our gitlab.
Clone the repository to your local computer
Import project
Start CubeIDE and import fmlr-devboard-wle5 following the steps below. In the File menu, select "Import"
Select "Existing Projects into Workspace" from "General"
In the next dialog, select "Browse" and navigate to the folder containing the source code. Click "Select Folder"
In the list of projects, select "LoRaWAN_End_Node" (and deselect the other). Click Finish to import it.
The project now shows up int the file tree of your work space
Build Project
To build the project, select "Build Project" from "Project" menu or click the hammer icon
After compiling and linking, a hex file will be generated.
Download and run
The development board has an integrated J-Link programmer. See On-Board J-Link on how to install drivers for J-Link.
To program your board from STMCubeIDE using J-Link, follow these steps:
Select "Debug Configurations..." from "Run" menu
In the dialog, select "LoRAWAN_End_Node_WLEC" from "STM32 C/C++ Application" and make sure the settings are as shown in the image below
Also check settings in Debugger section.
Click "Debug" to download the application and start debugging.
Once configuration is done, you can start a new debug session by clicking the "Debug" icon
The EVK getting started guide explains how to use the EVK software and send data through LoRaWAN.
Building LoRa Applications
The LoRaWAN stack for the STM WL SoC is provided by STM. It is based on the official LoRaMac-node stack. To modify or build your own application, check the following sites and documentation:
- LoRaMac-node on github
- LaRaWAN stack presentation from STM
- STM AN5406 how to build a LoRa application with STM32CubeWL
Important
Make sure you configure consistent LoRaWAN parameters such as DevEUi, AppEUI/JoinEUI and AppKey on your device and the network server.