Getting Started LoRIS BM TRX1
Getting Started LoRIS BM TRX1
Development board
for LoRaWAN
LoRIS-BM-TRX1
Getting started
Version 1.0
Author: JK
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
Table of Contents
1. Introduction ................................................................................................................... 3
2. Software......................................................................................................................... 3
2.1. Import ............................................................................................................................. 4
3. Application .................................................................................................................... 5
3.1. Commissioning............................................................................................................. 6
4. Serial Output ............................................................................................................... 12
5. Certification ................................................................................................................. 13
I Appendix ..................................................................................................................... 14
A. List of figures .............................................................................................................. 14
B. Change history ........................................................................................................... 14
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
1. Introduction
This document provides information on how to get started with your own firmware projects for the
LoRIS-Base development board.
It includes information about the development environment and the required programming adapter
as well as the necessary steps to use LoRaWAN and to display transmitted data using a community-
based solution.
2. Software
The software used here is based on the LoRaWAN End Node Project of the STM32Cube MCU
Package1 for STM32WL series by ST Microelectronics. This Package contains, among other things, a
driver for the radio module, a LoRaWAN v1.0.3 implementation, some basic safety aspects and many
examples of how to use the integrated peripherals.
For a first overview of the structure of this project, AN54062 - How to build a LoRa application with
STM32CubeWL can be consulted.
To get started it is recommended to use the STM32CubeIDE3, which is the Integrated Development
Environment for STM32 microcontroller. This allows easy import and use of the attached example
project.
Note: The example project was developed with version 1.7.0 of this IDE.
1
https://www.st.com/en/embedded-software/stm32cubewl.html
2
https://www.st.com/resource/en/application_note/an5406-how-to-build-a-lora-application-with-
stm32cubewl-stmicroelectronics.pdf
3
https://www.st.com/en/development-tools/stm32cubeide.html
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
2.1. Import
Once you have installed the IDE and downloaded the project, you can import it.
Open the IDE, navigate to File->Import and select General->Existing Projects into Workspace in
the appearing window as shown in Figure 1.
In the succeeding window you can specify either an archive file or the already unpacked project
directory. After that the chosen project should be listed under Projects: and you can proceed
with Finish.
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
3. Application
To make it easy to get started with the LoRIS-Base development board, an application directory,
which contains some basic implementations, has been added to the underlying project.
peripherals. *: some implementations for the LEDs and the user button
application. *: a minimal application whose flow chart can be taken from Figure 3
- Joining (including retry on failure)
Figure 2: Additional sources
- Send data (on button press and cyclic)
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
3.1. Commissioning
First of all, you will need to get LoRaWAN joining parameters in order to connect your device to a
LoRaWAN System. These are:
In this example we are using The Things Network as network operator and therefore we get the
needed parameters from there.
To do so you have to create an account4 and sign in to the console they are offering. On the
following site there is a choice between gateways and applications. If you need to register your
own gateway you should do that first.
At the top of the page (Figure 4) you have to enter a gateway ID and your gateway EUI. You can
find the EUI in the documentation of the gateway.
Now the frequency plan must be set according to the region EU868. To do so scroll down, find
frequency plan and set it to Europe 863-870 MHz (SF9 for RX2 - recommended).
4
https://account.thethingsnetwork.org/register
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
After adding your gateway, you can switch to the Applications tab for registering your first
application. Choose Add Application and enter the required information. Then confirm with
create application (Figure 5).
After that you are ready to create your first LoRaWAN device. Search for the End devices tab on
the left side and there click on Add end device. Switch the type of registration to Manually and fill
in the information according to Figure 6.
Click here
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
The last step is adding the data to your firmware. Open the project and in the application
folder navigate to user_conf.h and enter your generated device EUI, JoinEUI (AppEUI) and
your App Key.
Note: Do not use the data displayed here for your application.
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
After you have plugged in the USB cable you can connect a compatible programming adapter
(e.g. ST-Link/V2), an appropriate cable adapter like Olimex Arm-JTAG-20-10 and load the
firmware into the target (Figure 11).
Important note: See pictures for how to connect the adapter properly and double check the
orientation of the plug. A wrong connection of the adapter could damage the board.
Figure 9: Correct alignment of the plug Figure 8: ST-Link V2 with Olimex adapter
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
Click here
On startup the green LED will flash for a short time to show that the device is active and
starts to try joining the LoRaWAN network. If a gateway connected to TTN is within the range
of your device a Accept join-request message will appear in the TTN console and the device
starts working.
Note that the accept message does not necessarily mean that the joining was successful as
the transmission of the response to the device may have been interfered with. Therefore, the
success/failure will be indicated by the LEDs green/red a few seconds after the joining has
started.
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
If you have set up a serial connection (Chapter Serial Output) you should now also see the
first messages in the serial terminal (Figure 13).
Note: If the lines do not start flush left you may need to change the terminals newline setting
to CRLF.
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
4. Serial Output
To see what the device is doing you have the possibility to track serial messages sent by your device
on your development computer.
In this example the open-source tool Tera Term is used for this.
First you need to choose the serial port the adapter is connected to.
After this be sure that the baud rate is set to 115200. In Tera Term this can be found under
Setup->Serial port.
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
5. Certification
The LoRIS-BM-TRX1 platform is CE approved and thus meets the requirements that apply in the
specified applications. This condition is given if the module is operated with the specified firmware
and this firmware is not changed in areas relevant for conformity.
This means that the module is basically equipped with a reference certification, which proves that
operation within the legal requirements is possible. In order to maintain this, it is strongly
recommended not to change the firmware with regard to the configured radio parameters. This
means that you should not make any changes to the middleware in the LoRaWAN and SubGHZ_Phy
directories.
LoRIS-BM-TRX1
Getting started
Technical Documentation Date: 20.08.2021
I Appendix
A. List of figures
Figure 1: STM32CubeIDE import dialog .................................................................................................. 4
Figure 2: Additional sources .................................................................................................................... 5
Figure 3: Firmware template flow chart ................................................................................................. 5
Figure 4: Adding a gateway to your TTN console .................................................................................... 6
Figure 5: Adding an application to your TTN console ............................................................................. 7
Figure 6: Adding a device to your TTN console ....................................................................................... 7
Figure 7: Customizing LoRaWAN joining parameter ............................................................................... 8
Figure 8: ST-Link V2 with Olimex adapter ............................................................................................... 9
Figure 9: Correct alignment of the plug .................................................................................................. 9
Figure 10: LoRIS-Base completely connected ......................................................................................... 9
Figure 11: Load the firmware into the target........................................................................................ 10
Figure 12: First messages in the TTN console ....................................................................................... 10
Figure 13: Serial output at startup ........................................................................................................ 11
Figure 14: Connect to serial adapter ..................................................................................................... 12
Figure 15: Choosing baud rate .............................................................................................................. 12
B. Change history