0% found this document useful (0 votes)
142 views14 pages

Getting Started LoRIS BM TRX1

This document provides instructions for getting started with a LoRIS-Base development board, including importing a sample firmware project into the STM32CubeIDE integrated development environment. It describes the basic application code structure and explains how to obtain the necessary LoRaWAN joining parameters from The Things Network platform to connect the device to a LoRaWAN network. Commissioning involves creating an account with The Things Network, registering any LoRaWAN gateways, and obtaining a device UUID, join EUI, and app key to configure the device.

Uploaded by

jk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views14 pages

Getting Started LoRIS BM TRX1

This document provides instructions for getting started with a LoRIS-Base development board, including importing a sample firmware project into the STM32CubeIDE integrated development environment. It describes the basic application code structure and explains how to obtain the necessary LoRaWAN joining parameters from The Things Network platform to connect the device to a LoRaWAN network. Commissioning involves creating an account with The Things Network, registering any LoRaWAN gateways, and obtaining a device UUID, join EUI, and app key to configure the device.

Uploaded by

jk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

LoRIS-Base

Development board
for LoRaWAN

LoRIS-BM-TRX1

Getting started

Version 1.0

Author: JK

Status of document: DRAFT

Confidentiality level: PUBLIC

ELV Elektronik AG | Maiburger Straße 29-36 | 26789 Leer


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 2/14
Development board
for LoRaWAN

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

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 3/14
Development board
for LoRaWAN

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

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 4/14
Development board
for LoRaWAN

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.

Figure 1: STM32CubeIDE import dialog

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.

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 5/14
Development board
for LoRaWAN

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.

Figure 2 shows this directory unfolded and exposes its contents:

hw_conf.h: contains pin definitions

user_conf.h: used to set LoRaWAN joining parameters


- Device EUI
- Join EUI
- App Key

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)

Figure 3: Firmware template flow chart

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 6/14
Development board
for LoRaWAN

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:

- LoRaWAN Device EUI


- LoRaWAN Join EUI (App EUI in LoRaWAN version < 1.1.0)
- LoRaWAN App Key

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

Figure 4: Adding a gateway to your TTN console

4
https://account.thethingsnetwork.org/register

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 7/14
Development board
for LoRaWAN

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

Figure 5: Adding an application to your TTN console

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

Figure 6: Adding a device to your TTN console

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 8/14
Development board
for LoRaWAN

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.

Figure 7: Customizing LoRaWAN joining parameter

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 9/14
Development board
for LoRaWAN

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

Figure 10: LoRIS-Base completely connected

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 10/14
Development board
for LoRaWAN

LoRIS-BM-TRX1

Getting started
Technical Documentation Date: 20.08.2021

Click here

Figure 11: Load the firmware into the target

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.

Figure 12: First messages in the TTN console

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 11/14
Development board
for LoRaWAN

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.

Figure 13: Serial output at startup

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 12/14
Development board
for LoRaWAN

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.

Figure 14: Connect to serial adapter

After this be sure that the baud rate is set to 115200. In Tera Term this can be found under
Setup->Serial port.

Figure 15: Choosing baud rate

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 13/14
Development board
for LoRaWAN

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.

Document title: getting-started-LoRIS-BM-TRX1.docx


PUBLIC Status: DRAFT
LoRIS-Base Version: 1.0
Page: 14/14
Development board
for LoRaWAN

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

Version Datum Status Description


1.0 08. Oct. 2021 Draft First Edition

Document title: getting-started-LoRIS-BM-TRX1.docx

You might also like