In order to make the introduction to LoRa radio technology as easy as possible, almost everything in our solution is ready to use. All boards are tested by us before delivery and loaded with a test program of the RadioShuttle software. It is only a few steps to the first own radio range tests.
We advise you to read the previous chapter The Turtle Board and its Technology. There you will find explanations of the individual components of the board, which will be discussed below.
To put the Turtle board into operation, the following preparations are required:
- Connect the included SMA antenna
- Connect the Turtle board to the computer using the micro-USB cable
In addition, the RadioShuttle software must be compiled and flashed into the board. This procedure is decribed in the following sections.
Demo video: Turtle Board First Steps – Getting Started
Demo video: Turtle board – programming sample applications
Arm Mbed development environment
Arm offers a free professional software development environment. It includes an easy-to-use web-based IDE and is free of charge. It offers the following benefits:
- Arm C/C++ compiler (generates highly optimized code)
- Mbed OS (easy-to-use embedded programming library)
- Programming editor
- Multi-user development on a project
- Version control for programming code and projects
- Library management (subscribing to and publishing libraries)
- Powerful online compiler (offline compilers also possible)
- Support portal (for questions/discussions)
- Extensive board support (Mbed supports more than 130 different development boards). The Turtle board is pin-compatible with the STM NUCLEO-L432KC board
We have chosen Arm Mbed for our Turtle boards because it offers a very professional development environment for Arm-based MCUs. Without any local software installation, a few clicks allow importing and compiling the RadioShuttle software.
All our examples are based on the Mbed online compiler. Commercial offline compilers with Keil MDK, IAR systems, or the free GCC compiler/debugger can be used as well by exporting the Mbed project to a local development environment. However this procedure is not described here.
To get started, the RadioShuttle software must be compiled and flashed into the board. This procedure is decribed in the following sections.
RadioShuttle STM32 Utility installation
To download applications (“.bin” files) into the board, a special tool is required. RadioShuttle provides these STM32 tools for Mac, Windows and Linux as a command-line version, and as a GUI version for Mac and Windows. The STM32 tools can be downloaded here (see the documentation).
Installation under Windows
To work with the Turtle board, a terminal emulator is needed. For Windows we recommend using “Tera Term” which can be downloaded here.
For both programs, RadioShuttle STM32 Utility and Tera Term, Windows drivers are required. See the “7. Install drivers on Windows” section on the RadioShuttle STM32 Utility page.
Installation under macOS
MacOS users need no further preparation because a terminal emulator and drivers are already included.
Create an Mbed account
- Enter the address https://os.mbed.com/account/signup/ in a web browser and sign up to create a free Mbed account
This account allows you to access Mbed tools and services which you will need to compile the RadioShuttle software for the Turtle board.
Import the RadioShuttle example software
A provided link leads you to the RadioShuttle software which can be imported into the Mbed IDE.
- Start the Mbed Online Compiler
- Click on “Import”
- Click on “Click here to import from URL” and enter
into the “Source URL” field
- Enter a name in the “Import Name” field, e.g. Turtle-Test
- Do not activate the “Update all libraries to the latest revision” option; not all combinations have been tested!
- Click on the “Import” button
You will probably get a warning that you have not added any platform yet to your Mbed account. If this is the case proceed as follows:
- Click on “Add Platform”
- Select “NUCLEO-L432KC” and click on “Add to your Mbed Compiler”
- After you have selected the platform click the “Import” button
A new project has been created. It includes software for the Turtle board and the RadioShuttle protocol with its RadioTest sample application (see Fig. 1).
Now the board has been added to your account, and all objects that the project is comprised of should be listed in the “Program Workspace” window.
Objects in the “Turtle_RadioShuttle” project
|BufferedSerial||A buffered serial library providing asynchronous IO when using the board with a serial debugger or UART connection|
|HELIOS_Si7021||Temperature and humidity sensor driver software|
|MBED_USBDeviceHT||A USB device library offering buffered serial CDC connections (virtual COM ports)|
|NVProperty||A non-volatile (permanent) property storage which uses the MCU internal flash memory to save settings which are preserved when installing new software|
|OLED_SSD1306||OLED display driver software|
|RadioShuttleLib||The RadioShuttle peer-to-peer LoRa wireless protocol software for STM32L4 MCUs|
|RadioShuttle.h*||RadioShuttle protocol API for developers|
*in “RadioShuttleLib/src” folder
|SX1276GenericLib||The SX127x series driver for the LoRa radio chip|
|Utils||Helper code for print debugging (dprintf), serial console setup, etc.|
|main.cpp/main.h||The main loop for the RadioShuttle program|
|mbed_app.json||Mbed Online Compiler control file|
|xPinMap.h||Turtle board MCU pin assignment and feature definitions|
|RadioTestSample.cpp||An example peer-to-peer LoRa wireless demo (“RadioTest”)|
|mbed-os||The Mbed OS library|
Compile the RadioShuttle software
- Open the Mbed website and click on “Compiler”
- In the “Program Workspace” section, in “My Programs”, select the “Turtle_RadioShuttle” project
- Click on the “Compile” button in the navigation bar
- Save the generated “Turtle_RadioShuttle.NUCLEO_L432KC.bin” file to your computer
Flash the RadioShuttle software into the board
- Make sure the Turtle board is connected to the computer
- Start the STM32 Utility
First, the board must be brought into DFU (Device Firmware Upgrade) boot mode. The status line reads
"STM32 DFU Target not available (enable via User and Reset button)":
- Hold down the “User” button and press the “Reset” button once
The status line should now read
STM32 (ID:0) Flash: 256 kB. The board is in DFU mode.
- Drag & drop the generated “Turtle_RadioShuttle.NUCLEO_L432KC.bin” file into the “RadioShuttle STM32 Utility” window
Detailed instructions can be found in the RadioShuttle STM32 Utility chapter.
Continue with RadioShuttle Program Installation for Turtle