LoRa Basics Modem and LoRa Edge documentation

Scenario - LoRa Basics™ Almanac Update


The LR1110 chip is able to reduce GNSS scanning time by taking into account coarse orbital parameters for different GNSS constellations (the almanac). In conjunction with a coarse time and position estimate, the LR1110 chip uses this information to optimize the search for, and acquisition of, GNSS signals. Over time, the true satellite positions diverge from those stored in the almanac, as a result the almanac has to be updated regularly.

The LoRa Cloud™ Modem & Geolocation Services Almanac Update Over-the-Air (AUOTA) feature allows a device built on the LR1110 chip with LoRa Basics™ Modem-E firmware to automatically perform efficient partial almanac updates over a LoRaWAN® network. The almanac is stored entirely in flash memory; therefore it is kept after power-off and after sleep mode without retention.

Once enabled, AUOTA is carried out by the LoRa Basics™ Modem-E without any action on the host MCU side.


A full almanac update can also be performed by the device application. For details, see User Loaded Almanac Update.



  • The end device must have joined the network.

  • The application server forwards uplinks on a configured modem management FPort (199 by default) to the LoRa Cloud™ Modem & Geolocation Services.

  • The application server forwards LoRa Cloud™ Modem & Geolocation Services downlinks to the end device.

Step-by-Step Procedure

To use the LoRa Cloud™ Modem & Geolocation Services Almanac Update Over-the-Air feature, the LoRa Basics™ Modem-E must include the almanac status in the modem management uplinks.

To enable this function, add the field DM_INFO_TYPE_GNSS_ALMANAC_STATUS to the modem management frame, using the set_dm_info_field() command. The almanac will then be kept up-to-date by the Modem & Geolocation Services, without further action from the device application.

Sample Code

Use the following sample code to activate automatic almanac updates on the device:

#include "lr1110_modem_lorawan.h"
lr1110_modem_dm_info_fields_t dm_info_fields;
lr1110_modem_response_code_t set_dm_info_field_response_code;

/* Set modem management info field */
dm_info_fields.dm_info_field[0] = LR1110_MODEM_DM_INFO_TYPE_GNSS_ALMANAC_STATUS;
 * This command erases the previous fields activated in the
 * modem, and adds all the fields required by the application.
dm_info_fields.dm_info_field[1] = LR1110_MODEM_DM_INFO_TYPE_CHARGE;
dm_info_fields.dm_info_field[2] = LR1110_MODEM_DM_INFO_TYPE_TEMPERATURE;
dm_info_fields.dm_info_field[3] = LR1110_MODEM_DM_INFO_TYPE_VOLTAGE;
dm_info_fields.dm_info_length   = 4;

set_dm_info_field_response_code = lr1110_modem_set_dm_info_field(

Adjust the modem management frame interval to trigger almanac updates:

#include "lr1110_modem_lorawan.h"
lr1110_modem_response_code_t set_dm_info_field_response_code;

 * Set modem management interval to 1 hour
 * Units can be:
set_dm_info_field_response_code = lr1110_modem_set_dm_info_interval(

In-Depth Behavior

A value representing the almanac state is embedded in the modem management frame every time it is sent by the modem. The Modem & Geolocation Services can then determine whether the device’s almanac needs to be updated. If it does, the Modem & Geolocation Services creates a downlink with updated almanac data to be sent to the modem.


The Modem & Geolocation Services API parameter dn_mtu is important and should be provided in the Modem & Geolocation Services query if it is known by the application server. (For details, see the LoRa Cloud™ Modem & Geolocation Services uplink documentation.) This parameter tells the Modem & Geolocation Services how many bytes can be put in the downlink, which can increase the update speed and lower the number of downlinks required to update the device almanac. The minimum downlink MTU supported by the Modem & Geolocation Services for updating the almanac is 28 bytes.


By default the Modem & Geolocation Services assumes an available downlink MTU of 51 bytes. This corresponds to the minimum defined by the LoRaWAN® Standard in most regions.

@startumltitle Modem-E MGS AUOTAbox Device #ADD8E6    participant "End-Device\nApplication" as UC #ADD8E6    participant "LoRa Basics™\nModem(s)" as modem #00ADEFend boxbox LoRaWAN® #AAAAAA    participant "Network Server" as NS  #D3D3D3end boxbox Cloud #ADD8E6    participant "Application Server" as AS #ADD8E6end boxbox LoRa Cloud™ #00ADEF    participant "Modem & Geolocation Services" as DAS #00ADEFend boxlegend left|=             |= Owner || <#00ADEF>    | Semtech || <#ADD8E6>    | Customer || <#D3D3D3>    | Ecosystem |endlegendUC -> modem: Enable AUOTA\nthrough SetDmInfoField()alt Outdated entries in Alamanac    modem -> AS ++: DmStatus    AS -> DAS ++: DmStatus    return Partial almanac\nupdate downlink    return Partial almanac\nupdate downlinkendalt Almanac up to date    modem -> AS : DmStatus    AS -> DAS : DmStatus    note right: Almanac up to date,\nno downlink answered.end@enduml


The most effective way to keep the almanac up-to-date from a data volume perspective is to send the almanac status (via the modem management frame) every two or three days.

Used By



Almanac is not automatically updated

The modem management frame has probably not been delivered to the LoRa Cloud™ Modem & Geolocation Services, or the LoRa Cloud™ Modem & Geolocation Services reply has not reached the modem.

  1. Check that uplinks are correctly delivered to the Modem & Geolocation Services.

  2. Check that the Modem & Geolocation Services are creating a downlink response.

  3. Ensure that the Modem & Geolocation Services downlinks are being sent to the modem by the application server and the LoRaWAN® network server.