LoRa Basics™ Modem User Manual v3.4 documentation

Introduction

LoRa Basics™ Modem is an easy-to-use software library that simplifies the development of LoRaWAN® end-nodes. By using LoRa Basics Modem in their solution, developers can work through an event driven interface, at a high level of abstraction without needing to delve into the details of the LoRaWAN Standard.

LoRa Basics Modem allows developers to seamlessly integrate the services provided by LoRa Cloud™ into their applications. LoRa Basics Modem can be used to generate messages compatible with the LoRa Cloud Modem & Geolocation Services, including periodic Device Management messages.

Scope

This document describes the LoRa Basics Modem library (SWL2001). This version of the document pertains to version 3.3.0 of the library.

It should be read in conjunction with:

  • LoRa Basics Modem SDK User Manual and associated SDK (SWSD001)

  • LoRa Basics Modem Porting Guide

Supported Transceivers

This version of LoRa Basics Modem supports the following transceivers:

  • LR1110 with firmware 0x0308.

  • LR1120 with firmware 0x0102.

  • LR1121 with firmware 0x0102.

  • SX1261.

  • SX1262.

  • SX1268.

  • SX1280.

  • SX1281.

New Features and Changes

The following new features and changes have been introduced since version 3.2.4 of the LoRa Basics Modem library.

New Features

  • Added support for LR1121.

  • Now any of the LoRa Basics Modem define values can be changed by means of the EXTRAFLAGS parameter when issuing the make command.

  • Added a port to the Nucleo-L073 board using the LL driver for minimal flash usage.

  • Added a porting tool in the main examples to help during MCU porting.

Changes

  • Updated LR11xx driver used to version v2.3.0.

  • Updated SX126x driver used to version v2.2.0.

  • Added response code assert in exti example.

  • Removed temperature from exti example and replaced with 32-bit counter.

  • Removed unused uart4-related functions and calls from smtc_hal_l4.

  • Added randomness before call to any modem task that perfoms an uplink.

  • Capped alarm timer at 864000s, i.e. 10 days.

  • Set minimal reception window size to 16ms instead of 6ms to avoid ping slot issues in FSK.

Bugs Fixed

  • Corrected typo which prevented using environment variables to set the MCU parameters.

  • Fixed example so EUI and Keys are not overriden when code is built using the CRYPTO=LR11XX_WITH_CREDENTIALS option.

  • Removed ARM-specific flag from common.mk.

  • Fixed size error in smtc_secure_element_get_pin().

  • Fixed issue in LBT when TCXO startup is greater than default RP_MARGIN_DELAY value (8ms).

  • Corrected tx done timestamp with known padding delay to avoid issue with the following rx windows (mainly seen on US and AU regions).

  • Fixed LoRaWAN Link Adr Request channel mask control case 5 missing impact of 500MHz bank.

  • In main_exti example, fixed blue button missing pin in irq configuration.

A comprehensive list of changes is provided in the changelog file of the library.

Example Application

LoRa Basics Modem includes an example which serves to illustrate the use of the library and can also be used as a starting point when developing an application. This application is defined in the file utilities/user_app/main_examples/main_exti.c. The example application joins the LoRaWAN network and remains in sleep mode until the user button is pressed, at which time it makes a temperature measurement and sends an uplink with the measured value.

The application was developed for use in a Nucleo-L476RG or Nucleo-L073 development boards and supports the LR11xx, SX126x, SX128x transceivers.

To compile the example for a Nucleo-L476RG board, perform the following steps:

  1. Edit file utilities/user_app/main_examples/example_options.h:

    1. Replace the values of USER_LORAWAN_DEVICE_EUI, USER_LORAWAN_JOIN_EUI, and USER_LORAWAN_APP_KEY with the correct values for your device and network.

    2. Replace the value of MODEM_EXAMPLE_REGION by the value corresponding to your region.

  2. In the utilities directory, issue the command make <TARGET> where target will be either sx128x, lr1110, lr1120, sx1261, or sx1262 depending on your transceiver.

  3. Plug in the Nucleo L476RG board.

  4. Drag the file utilities/build_<TARGET>/app_<TARGET>.bin to the NODE_L476RG storage device.

The example application outputs informational messages through the UART. These messages can be viewed by means of a terminal emulator using the serial parameters: 921600 baud, 8 data bits, no parity and 1 stop bit (921600 8N1).