LoRa Basics™ Modems: Walk-through

LoRa Basics™ Modem-E (LR1110)

Introduction

The LoRa Basics™ Modem-E is an easy-to-use LoRaWAN® stack running directly on the LoRa Edge™ LR1110 chip. LoRa Basics Modem-E releases the host microcontroller unit (MCU) from timing and memory constraints, and enables developers to focus on their applications, making connectivity easy.

In addition, the modem provides convenient monitoring and management features that are linked to the LoRa Cloud™ Device & Application Services. The modem includes support for the following:

  • LoRaWAN protocol version 1.0.3, Class A

  • EU868 & US915 regional parameters

  • Geolocation with GNSS and Wi-Fi passive scanning

  • LoRa Cloud Large File Upload and streaming services

  • Over-the-Air (OTA) almanac update service for GNSS

  • Periodic device management status messages and device monitoring

  • Remote reset and re-keying

Warning

The LR1110 chip can be converted from a transceiver to a LoRa Basics Modem-E and back by using this tool.

Architecture

Basics™ Modem-E flow architecture

Figure 1: LoRa Basics Modem-E flow architecture

The host microcontroller unit (MCU) uses SPI to communicate with the LR1110.

Developers can choose to use Semtech’s LoRa Cloud Device Join server to securely manage connections without exposing the AppKey (if the LoRaWAN network server is compatible), or can export the AppKey to use the modem with a different server.

Wi-Fi and GNSS Solvers

The LoRa Cloud Device & Application Services server provides Wi-Fi and GNSS solvers. These services will answer to a GNSS NAV message or a Wi-Fi scan from the LR1110 with a geolocation position.

Note

As GNSS NAV messages and the size of Wi-Fi scan results may vary, and may be greater than the maximum LoRaWAN payload size, we recommend that you use the streaming feature. When you use this feature, the modem will take care of fragmentation and add forward error correction data, so that the LoRa Cloud Device & Application Services server will be able to reconstruct the stream, even if some uplinks are lost.

LoRa Basics™ Modem-E Evaluation Kit

The LoRa Basics™ Modem-E Evaluation Kit (the “Kit”) is built with the LoRa Edge™ LR1110 chip. This application is compatible with Semtech’s LoRa Cloud Device & Application Services and the LoRa Cloud Geolocation Service.

End Node Hardware and Software Requirements

The following hardware is required:

  • Modem: LR1110 Modem PCB_E592V01A shield

  • Development Board: Nucleo-L476RG and DisplayModule DM-TFT28-116

  • Cable: Mini-USB cable

  • Computer with one of the following operating systems: Windows 7 or above, Linux, or macOS

The following software is required:

The Node-RED application runs as the LoRaWAN application server for the modem.

Connecting the Components

  1. Connect the Mbed shield to the Arduino connector on the Nucleo board.

  2. Connect the mini-USB cable from the host PC to the Nucleo board. The cable provides power for both boards.

Flashing the Application Firmware onto the Nucleo Board

To flash the application firmware onto the Nucleo board:

  1. Ensure that the board is connected to the computer via the mini-USB cable. A temporary drive, NODE_L476RG, should be created automatically.

  2. Download the latest application firmware binary, lr1110_evk_vX.Y.Z.bin, here.

  3. Move the lr1110_evk_vX.Y.Z.bin file to the temporary drive. (You can use the drag-and-drop method).

Note

If the drive is not mounted under Windows, the necessary ST-Link driver may be missing. To obtain this driver, visit ST’s Nucleo-L073RZ product page.

LoRa Basics Modem-E Evaluation Kit Demo

In this demo, we scan Wi-Fi and GNSS data, then send the data to the Node-RED application server. The application server resolves the position of the end node in conjunction with the LoRa Cloud Device & Application Services server. Once resolved, the position is displayed on a map.

After boot, the Kit displays the splash screen. On the splash screen you can tap About to display the page that has the licensing information and the modem’s version information.

To open the menu, tap Start.

LoRa Basics Modem-E Evaluation Kit splash screen

Figure 2: LoRa Basics Modem-E Evaluation Kit splash screen

The main menu displays

LoRa Basics Modem-E Evaluation Kit main menu

Figure 3: LoRa Basics Modem-E Evaluation Kit main menu

Retrieving PIN and EUIs

To register the device in your network server and to claim it on the join server, you must have the device’s PIN and both the DevEUI and the JoinEUI``.

To retreive the device PIN and the EUIs:

  1. On the main menu, across from “EUI” at the bottom of the list, tap GO!

  2. Write down the DevEUI, JoinEUI and PIN.

Connecting the Kit to a LoRaWAN Network

Before attempting to connect to a LoRaWAN network, make sure that the device is correctly registered with the network server. (See Working With a LoRaWAN network server.) You also need to make sure that the Node-RED application server is both running correctly and is properly connected to the LoRaWAN network server. Finally, make sure that the Node-RED application server is running on a machine accessible from your computer; for example, if Node-RED is installed locally, it should be accessible at address 127.0.0.1:1880.

To connect the Kit to a LoRaWAN network, open the Connectivity menu, and tap Join. The modem will start to connect to your LoRaWAN network. The connectivity indicator at the top right portion of the screen will turn from red to yellow, indicating that a connection is being established.

The Kit can be connected as a class A or class C device through the LoRaWAN class dropdown list. Note that the selected class must match the configuration on your network server.

After the modem receives the JoinAccept event, the connectivity indicator turns green, indicating that the device has successfully connected to the network.

LR1110 Evaluation Kit connectivity

Figure 3: LR1110 Evaluation Kit connectivity

Warning

Unexpected behavior has been observed when using the Adaptive Data Rate (ADR) network-controlled configuration with some LoRaWAN network servers. In some cases, the LoRa Basics Modem-E and the network enter into an infinite loop of MAC command exchanges. To stop this loop, simply set the ADR configuration to Mobile LR.

Scanning Demonstration

To see the scanning features in action, open the main menu, tap Demonstrations and then tap Geoloc Demos.

When the Geoloc Demos menu page displays, only the Wi-Fi scanning demo will be active at first. To enable the GNSS demonstration, you must join the Kit to a LoRaWAN network. You also need to make sure that the time on the device is synchronized with the network time via the Application Layer Clock Synchronization (ALC Sync) feature. This is handled automatically by the EVK, Node-RED Application Server, and the LoRa Cloud Device & Application Services server.

LoRa Basics Modem-E Evaluation Kit geolocation demonstration; no network connection

Figure 4: LoRa Basics Modem-E Evaluation Kit geolocation demonstration; no network connection

LoRa Basics Modem-E  Evaluation Kit geolocation demonstration connected to a LoRaWAN network

Figure 5: LoRa Basics Modem-E Evaluation Kit geolocation demonstration; connected to a LoRaWAN network

Note

The duration between receiving the JoinAccept message, and the ALC Sync update can range from few seconds to two minutes.

To run the scan demo:

  1. Open the main menu and tap Demonstrations.

  2. Tap then Geoloc Demos.

  3. Tap Go next to the type of scan you want to run.

  4. Tap Start.

The modem will start the selected scanning operation. The orange LED will turn on while the scanning operation is running. Once the scanning operation stops, a summary of the results is displayed. The detailed results can be obtained by pressing Results.

LR1110 Wi-Fi scan results LR1110 Wi-Fi scan results

Figure 6: LR1110 Wi-Fi scan results

LR1110 GNSS scan results LR1110 GNSS scan results

Figure 7: LR1110 GNSS scan results

The results can then be sent to the application server by tapping Send. This triggers an uplink from the modem to the Node-RED application server. If the end node has been successfully located, the result will be visible on a map you can access via the Node-RED application server; see the Geolocation section of this document.

Considerations Regarding Operating in U.S. Regions

The LoRaWAN Regional Parameters specification defines 64 channels for the U.S. region. However, it is possible to use an eight-channel gateway. When an eight-channel gateway is used, end devices on a LoRaWAN network cannot know in advance which channel the gateway is listening to before receiving the channel mask from the network. In this case, an end device is likely to send uplinks on channels that will not be received.

This situation may occur with any end device operating on a LoRaWAN network. However the LoRa Basics Modem-E can automatically send uplinks to comply with the user configuration. For instance, when ALC Sync is enabled, the Modem will automatically send ALC Sync request uplinks. Understand, though, that uplink loss due to the limited number of channels monitored by the gateway may artificially degrade the behavior of some modem features.

It is possible to overcome this situation by detecting when the modem has received the channel mask, and then enabling the LoRa Basics Modem feature (ALC Sync, for instance) only after the channel mask has been taken into account. LoRa Basics Modem-E does not send an event to the host MCU when a channel mask has been received from the network. Nevertheless, it is possible to use the ADR feature because the Modem sends a NewLinkADR event when it receives an ADR configuration from the network.

To enable this LoRa Basics Modem-E feature, take the following steps:

  1. Configure the ADR profile with Network Control.

  2. Start the Join procedure.

  3. Once the JoinAccept event is received, start sending uplinks. (Note: Most of the uplinks will be lost while the channel mask is unknown to the Modem.)

  4. At some point, one uplink will be received by the network. This triggers a MAC command downlink with the channel mask.

  5. Upon receiving the MAC command, the Modem sends the NewLinkADR event to the host MCU.

  6. The host MCU can then enable the LoRa Basics Modem-E features it requires (ALC Sync, for instance) and reconfigure the ADR profile.

Note

Some networks send the channel mask in the same downlink as the JoinAccept message. Therefore, LoRa Basics Modem-E knows upon receipt of the JoinAccept message which channels to use for the uplink. In this case, there is no need to follow the procedure described above.