LoRa Basics™ Modems: Walk-through
LoRa Basics™ Modem-E (LR1110)¶
The LoRa Basics™ Modem-E is an easy-to-use LoRaWAN® stack running directly on the LR1110 chip. LoRa Basics Modem-E releases the host microcontroller from timing and memory constraints, and enables developers to focus on their applications: connectivity is made 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
GNSS and Wi-Fi passive scanning geolocation
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
The LR1110 chip can be converted from a transceiver to a LoRa Basics Modem-E and back, thanks to this tool.
The host microcontroller (µC) uses SPI to communicate with the LR1110.
Developers can choose to use Semtech’s 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 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.
As GNSS NAV messages and Wi-Fi scan result sizes 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 Device & Application Services server will be able to reconstruct the stream, even if some uplinks are lost.
LoRa Basics™ Modem-E Evaluation Kit¶
The Evaluation Kit is built on top of the LR1110, 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:
Node-RED application server (See Node-RED installation)
The Node-RED application runs as the LoRaWAN® application server for the modem.
Connecting the Components¶
Connect the Mbed shield to the Arduino connector on the Nucleo board.
Connect the mini-USB cable from the host PC to the Nucleo board. The cable will provide power for both boards.
Flashing the Application Firmware onto the Nucleo Board¶
To flash the application firmware onto the Nucleo board:
Ensure that the board is connected to the computer via the mini-USB cable. A temporary drive, NODE_L476RG, should be created automatically.
Download the latest application firmware binary lr1110_evk_vX.Y.Z.bin here.
Move the lr1110_evk_vX.Y.Z.bin file to the temporary drive. (You can use the drag-and-drop method).
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 will scan Wi-Fi and GNSS data, then send the data to the Node-RED Application Server. The application server will resolve the position of the end node in conjunction with the Device & Application Services server. Once resolved, the position will be displayed on a map.
After boot, the LoRa Basics Modem-E Evaluation Kit displays the splash screen. On the splash screen you can click the About button to open a page with licensing information and the version information of the modem.
To open the menu, click the Start button
Figure 2: LR1110 Evaluation Kit splash screen
Retrieving PIN and EUIs¶
On the main menu, across from “EUI” at the bottom of the list, click GO! Next, write down the DevEUI, JoinEUI and PIN. You will use these values to register the device in your network server and to claim it on the join server
Video walk-through: Retrieving PIN and EUIs
Connecting the LoRa Basics Modem-E Evaluation Kit to a LoRaWan Network¶
Before attempting to connect to a LoRaWAN network, make sure that the device is correctly registered on a network (See Working with a LoRaWAN® Network Server), and that the Node-RED application server is both running correctly and properly connected to a LoRaWAN Network Server. It is also necessary that the Node-RED application server be running on a machine accessible at address 127.0.0.1:1880.
To connect the Evaluation Kit to a LoRaWAN network, open the Connectivity menu, and click Join. The modem will start to connect to your LoRaWAN network. The connectivity indicator on top right of the screen will turn from red to yellow to indicate that a connection is being established.
After the modem receives the JoinAccept event, the connectivity indicator turns green, indicating that the device has successfully connected to the network.
Figure 3: LR1110 Evaluation Kit connectivity
Unexpected behavior has been observed when using the 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.
To demonstrate the scanning features, open the main menu and then click Demonstrations.
On the Demonstrations menu, at first, only the Wi-Fi demonstration will be available To enable the GNSS demonstration, the Evaluation Kit must join a network and receive the time via the Applicative Layer Clock Synchronization (ALC Sync) feature.
Figure 4: LR1110 Evaluation Kit demonstrations
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, open the main menu and click Demonstrations. Next, click the Go button next to the type of scan you want to run, and then click Start.
The modem will start the scanning operation selected. 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 clicking Results.
Figure 5: LR1110 Wi-Fi scan results
Figure 6: LR1110 GNSS scan results
The results can then be sent to the application server by clicking Send. This will trigger an uplink from the modem to the Node-RED Application Server. If locating the end node has been successful, the result will be visible on a map accessible via the Node-RED Application Server, see Geolocation.
Considerations Regarding Operating in US Regions¶
The LoRaWAN Regional Parameters specification defines 64 channels for the US region. However, it is possible to use an eight-channel gateway. When an eight-channel gateway is in use, LoRaWAN end devices 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 LoRaWAN device. 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. 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:
Configure the ADR profile with Network Control
Start the Join procedure
Once the Join Accept event is received, start sending uplinks. (Note: Most of the uplinks will be lost while the channel mask is unknown to the modem.)
At some point one uplink will be received by the network. This triggers a MAC command downlink with the channel mask
Upon receiving the MAC command, the modem will send the NewLinkADR to the host MCU
The host MCU can then enable the LoRa Basics Modem-E features it requires (ALC sync for instance) and reconfigure the ADR profile.
Some networks send the channel mask in the same downlink as the Join Accept message. Therefore, LoRa Basics Modem-E knows upon receipt of the Join Accept message which channels to use for the uplink. In this case there is no need to follow the procedure described above.