LoRa Basics Modem and LoRa Edge documentation
Scenario - LoRa Basics™ Almanac Update¶
The LR1110 is able to reduce GNSS scanning time by taking into account coarse orbital parameters for different GNSS constellations (the almanac parameters). In conjunction with a coarse time and position estimate, the LR1110 uses this information to optimize the search for, and acquisition of, GNSS signals. Over time, the true satellite positions diverge from the stored almanac parameters. This means that those parameters need to be updated regularly.
The LoRa Cloud Device & Application Services Over-the-Air (OTA) GNSS almanac update feature allows a device built on the LR1110 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, the OTA GNSS almanac update process is carried out by the LoRa Basics Modem-E without any action on the host MCU side.
To use automatic almanac updates managed by the LoRa Cloud Device & Application Services, the LoRa Basics Modem-E must send its almanac status as part of its device management uplinks.
To enable this function, add the field
DM_INFO_TYPE_GNSS_ALMANAC_STATUS to the DM frame, using the
set_dm_info_field() command. The almanac will then be kept up-to-date by the LoRa Cloud Device & Application Services, without further action from the device application.
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 DM info field */ dm_info_fields.dm_info_field = 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 = LR1110_MODEM_DM_INFO_TYPE_CHARGE; dm_info_fields.dm_info_field = LR1110_MODEM_DM_INFO_TYPE_TEMPERATURE; dm_info_fields.dm_info_field = 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( &context, &dm_info_fields );
Adjust the DM frame interval to trigger almanac updates:
#include "lr1110_modem_lorawan.h" lr1110_modem_response_code_t set_dm_info_field_response_code; /* * Set DM interval to 1 hour * Units can be: * - LR1110_MODEM_REPORTING_INTERVAL_IN_SECOND * - LR1110_MODEM_REPORTING_INTERVAL_IN_DAY * - LR1110_MODEM_REPORTING_INTERVAL_IN_HOUR * - LR1110_MODEM_REPORTING_INTERVAL_IN_MINUTE */ set_dm_info_field_response_code = lr1110_modem_set_dm_info_interval( &context, LR1110_MODEM_REPORTING_INTERVAL_IN_HOUR, 1 );
A value representing the almanac state is embedded in the DM frame every time it is sent by the modem. The LoRa Cloud Device & Application Services can then determine whether the device’s almanac data needs to be updated. If it does, the LoRa Cloud Device & Application Services create a downlink with updated almanac data to be sent to the modem.
The LoRa Cloud Device & Application Services API parameter
dn_mtu is important and should be provided in the LoRa Cloud Device & Application Services query if it is known by the application server. (For details, see the Uplink documentation.) This parameter tells the LoRa Cloud Device & Application 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 LoRa Cloud Device & Application Services for updating the almanac is 28 bytes.
By default the LoRa Cloud Device & Application Services assume an available downlink MTU of 51 bytes. This corresponds to the minimum defined by the LoRaWAN specification in most regions.
The most effective way to keep the almanac up-to-date from a data volume perspective is to send the GNSS almanac status (via the DM frame) every two or three days.
End-Device almanac is not automatically updated¶
The DM frame has probably not been delivered to the LoRa Cloud Device & Application Services, or the LoRa Cloud Device & Application Services answer has not reached the modem.
Check that uplinks are correctly delivered to the LoRa Cloud Device & Application Services.
Check that the LoRa Cloud Device & Application Services are creating a downlink response.
Ensure that the LoRa Cloud Device & Application Services downlinks are being sent to the modem by the application server and the LoRaWAN network server.
LoRa Basics Modem and LoRa Edge documentation
- Overview - LoRa Edge™ Asset Management Platform
- Use Case - Basic Asset Tracking
- Use Case - IR Image Upload on Detected Motion
- Scenario - GNSS Assisted Scan
- Scenario - GNSS Autonomous Scan
- Scenario - LoRa Basics™ Wi-Fi Passive Scan
- Scenario - LoRa Cloud™ Device Join
- Scenario - GNSS Scan with ROSE
- Scenario - Wi-Fi Scan with ROSE
- Scenario - Claiming a Device
- Scenario - Unclaiming a Device
- Scenario - Modem-E Initialization
- Scenario - LoRa Basics™ Almanac Update
- Scenario - User Loaded Almanac Update
- Scenario - Intermittent Network
- Component - Application Layer Clock Synchronization
- Component - Large File Upload
- Component - Reliable Octet Stream Encoding
- Cryptographic Engine