LoRa Basics™ Modem User Manual v3.4 documentation

LoRa Basics Modem Options

The LoRa Basics Modem library is highly customizable. The following sections list the compile time options. The list of compile time options can also be obtained by issuing the command make help.

Radio Targets

Support for the following transceivers can be selected at build time:

  • sx128x - SX1280 & SX1281 Transceivers.

  • lr1110 - LR1110 Transceiver.

  • lr1120 - LR1120 Transceiver.

  • lr1121 - LR1121 Transceiver.

  • sx1261 - SX1261 Transceiver.

  • sx1262 - SX1262 Transceiver.

  • sx1268 - SX1268 Transceiver.

LoRa Basics™ Modem (LBM) should be built for a specific transceiver by using the basic_modem_<TARGET> parameter.

MCU Flags

MCU flags are passed to the compiler by means of the MCU_FLAGS build parameter. The flags are set as a single text string. For example, to build LoRa Basics Modem for an STM32L4 MCU the following MCU_FLAGS is used:

MCU_FLAGS=”-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard”


Support for one or more of the following regions can be selected at compile time:

  • AS_923 - AS923MHz ISM Band. Group selection is performed at runtime through the API.

  • AU_915 - AU915-928MHz ISM Band.

  • CN_470 - CN470-510MHz Band.

  • CN_470_RP_1_0 - CN470-510MHz Band. LoRaWAN Regional Parameters v1.0 version.

  • EU_868 - EU863-870MHz ISM Band.

  • IN_865 - IN865-867MHz ISM Band.

  • KR_920 - KR920-923MHz ISM Band.

  • RU_864 - RU864-870MHz ISM Band.

  • US_915 - US902-928MHz ISM Band.

  • WW_2G4 - Emulation of the LoRaWAN Standard for the 2.4GHz global ISM band.

The supported regions are selected through the REGION build option. If the user does not explicitly select one or more regions, all regions are included at compile time.

Regional Parameters

Two versions of the LoRaWAN Regional Parameters are supported:

  • RP2_101 - LoRaWAN Regional Parameters vRP002-1.0.1.

  • RP2_103 - LoRaWAN Regional Parameters vRP002-1.0.3 (Default). This option includes support for LR-FHSS.

The LoRaWAN Regional Parameters version is selected at compile time through the RP_VERSION compile option.

Cryptographic Engine Selection

LR11xx Transceivers include a Cryptographic Engine which provides a dedicated hardware accelerator for AES-128 encryption based algorithms. This Cryptographic Engine improves the power efficiency of cryptographic operations and reduces the code size of the software stack. Alternatively, LBM includes a software-implemented Cryptographic Engine. The selection of the Cryptographic Engine to use is done through the CRYPTO parameter. The following options are available:

  • SOFT - Use the LoRa Basics Modem Cryptographic Engine (Default).

  • LR11XX - Use the LR11xx Cryptographic Engine.

  • LR11XX_WITH_CREDENTIALS - Use the LR11xx Cryptographic Engine with pre-provisioned EUIs and keys.


LR1110 & LR1120 Transceivers include a GNSS receiver that allows fast and energy efficient indoor/outdoor geolocation. Use of the GNSS receiver can be enabled or disabled by means of the following parameter:

  • USE_GNSS=yes/no - Enable or disable the use of the LR11xx GNSS receiver.

Debug Options

The following options can be enabled for debugging:

  • VERBOSE=yes/no - Increase build verbosity (default: no).

  • DEBUG=yes/no - Enable debugging options (default: no).

  • MODEM_TRACE=yes/no - Choose to enable or disable modem trace print (default: yes).


For example to compile LoRa Basics Modem for an STM32L4 CPU with an SX1262 transceiver, with support for US_915 region using regional parameters RP2-1.0.1, without modem trace print and with increase build verbosity the following command line should be used:

make basic_modem_sx1262 MCU_FLAGS=”-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard” REGION=US_915 RP_VERSION=RP2_101 CRYPTO=SOFT MODEM_TRACE=no VERBOSE=yes