LoRa Basics Modem and LoRa Edge documentation

Scenario - GNSS Assisted Scan

Introduction

One of the key features of the LoRa Edge™ system is the ability to scan GNSS signals and provide the measurements to a LoRa Cloud™ processing system to determine the location of an end device. In this chapter, we review the requirements for completing an assisted GNSS scan with the LR111x device and for returning that data to the MCU.

GNSS assistance provides information that limits the number of variables the GNSS scanning algorithm must take into account in its search for signals. This helps to shorten the amount of time that a GNSS scan takes. By providing the approximate time (within 30 seconds), the assistance position (within 150km), and the GNSS almanac, the algorithm can estimate which satellites are in view, along with their Doppler at the time of the scan. The assistance data also provides information on the frequency offsets of the GNSS signals, which limits the search time for the signals from the visible satellites.

Compatibility

LoRa Basics Modem(s)

LoRa Edge LR1110 transceiver

Prerequisites/Dependencies

Common:

  • Must have synchronized the LR111x clock with the ALC Sync process (or some other source) to within 120 seconds (ideally within 10 seconds)

  • Must have an almanac less than 15 weeks old (ideally is less than 4 weeks)

  • Must have an aiding position from the application server or another source better than 150km (ideally within 50km)

  • Must have an SPI connection to exchange information between the device application and the LR111x chip

  • For GNSS operation, must have a temperature-compensated crystal oscillator (TCXO) accurate to within 5ppm

Prerequisites for LoRa Basics™ Modem:

  • Not applicable

Prerequisites for LoRa Basics Modem-E:

  • No additional requirements

Prerequisites for a Transceiver:

  • If using a LoRaWAN® network to perform ALC Sync, almanac, or position assistance, the MCU must have a LoRaWAN stack.

Step-by-Step Procedure

LoRa Basics Modem-E

  1. Complete the ALC Sync/time transfer, almanac, and assistance position steps noted above.

    Note

    If ALC Sync, the almanac, or the assistance position require a network server or LoRa Cloud Services, joining the network is also required.

  2. Optionally, specify the constellations to scan. (By default both GPS & Beidou are scanned.)

  3. Through the SPI interface, the host MCU calls the GNSS assisted scan command (0x0431) of the LoRa Basics Modem-E.

    Note

    • Scan options include: Effort Mode, ResultMask, and NbSvMax.

    • Depending on the effort level, scans may take 2-10 seconds per constellation.

    • A NbSvMax value greater than 10 results in power consumption with little to no benefit for LR111x. An NbSvMax of 10 or less is recommended to save power on both the data collection and transmission of the scan results.

  4. When the scan is complete, the EVENT signal on the LoRa Basics Modem-E is set high.

  5. The device application calls GetEventsize (command 0x0633) and GetEvent (command 0x0600).

  6. The LoRa Basics Modem-E returns the assisted GNSS scan results.

  7. The LoRa Basics Modem-E sets the EVENT signal low.

@startuml assisted_gnss_scanbox "End-Device" #ADD8E6    participant "Application" as MCU #ADD8E6    participant "LoRa Basics™\nModem-E" as LR1110 #00ADEFend boxbox LoRaWAN® #AAAAAA    participant "Gateway" as GW #D3D3D3    participant "Network Server" as NS  #D3D3D3end boxbox Cloud #ADD8E6    participant "Application Server" as AppS #ADD8E6end boxbox LoRa Cloud™ #00ADEF    participant "Device & Application Services" as LCS #00ADEFend boxlegend left|=             |= Owner || <#00ADEF>    | Semtech || <#ADD8E6>    | Customer || <#D3D3D3>    | Ecosystem |endlegend== Precursor-Join (if using Network/Cloud for ALCSYNC, Almanac or Assistance Position) ==note over MCU, NS #AAAAAA: Join LoRaWAN network== Precursor-ALCSYNC (Network/Cloud not required, may be supplied locally by Application) ==note over MCU, LCS #AAAAAA: Exchange ALCSYNC data== Precursor-Almanac (Network/Cloud not required, may be supplied locally by Application) ==note over MCU, LCS #AAAAAA: Download Almanac data== Precursor-Assistance Position (Network/Cloud not required, may be supplied locally by Application) ==note over AppS, MCU #AAAAAA: Position from Network (Application Server example)MCU -> LR1110 : Request Assistance PositionLR1110 -> GW : Request Assistance PositionGW -> NS : Request Assistance PositionNS -> AppS : Request Assistance PositionAppS -> NS : Assistance PositionNS -> GW : Assistance PositionGW -> LR1110 : Assistance PositionLR1110 -> MCU : Assistance PositionMCU -> LR1110 : GnssSet Assistance Position (Cmd 0x0410)LR1110 -> MCU : Assistance Position command confirmednote over LR1110, MCU #AAAAAA: Position Directly from the ApplicationMCU -> LR1110 : GnssSet Assistance Position (Cmd 0x0410)LR1110 -> MCU : Assistance Position command confirmednote over LCS, LR1110 #AAAAAA: This may be provided automatically by the Device & Application Services under certain conditions== Optional-Set GNSS Constellations to scan ==note over LR1110, MCU #AAAAAA: Set GNSS Constellations (default: GPS+Beidou)MCU -> LR1110 : GNSS Set Constellation to use (Cmd 0x0400)note right: Requires the bitmask documented in the \nLR1110 User Manual (bit 0=GPS, bit 1=Beidou)LR1110 -> MCU : Setting confirmed== Assisted GNSS Scan == MCU -> LR1110 : GNSS assisted scan (Cmd 0x0431)note right: Options\: EffortMode,ResultMask,NbSvMaxLR1110 -> MCU : Event high note right: Event\: GNSS scan doneMCU -> LR1110 : GetEventsize (Cmd 0x0633), GetEvent (Cmd 0x0600)LR1110 -> MCU : GNSS scan done + Resultsnote right: Scan results ready for trasmission or local storageLR1110 -> MCU : Event low        @enduml

Transceiver

  1. Complete the ALC Sync/time transfer, almanac, and assistance position steps noted above.

    Note

    If ALC Sync, the almanac, or the assistance position require a network server or LoRa Cloud Services, joining the network is also required.

  2. Optionally, specify the constellations to scan. (By default both GPS & Beidou are scanned.)

  3. Through the SPI interface, the host MCU calls the GNSS assisted scan command (0x040A) of the LR111x.

    Note

    • Scan options include: Effort Mode, ResultMask, and NbSvMax.

    • Depending on the effort level, scans may take 2-10 seconds per constellation.

    • A NbSvMax value greater than 10 results in power consumption with little to no benefit for LR111x. An NbSvMax of 10 or less is recommended to save power on both the data collection and transmission of the scan results.

  4. During the scan, the BUSY signal is high.

  5. When the scan is complete, the IRQ signal (if enabled with GNSSDone) on the LR111x is set high and the BUSY signal is set low.

  6. The device application calls GnssGetResultSize (command 0x040C) and GnssReadResults (command 0x040D).

  7. The LR111x chip returns the assisted GNSS scan results.

  8. If enabled, the LR111x chip sets the IRQ signal low.

@startuml assisted_gnss_scan_trxbox "End-Device" #ADD8E6    participant "Application" as APP #ADD8E6    participant "LoRaWAN® Stack"  as LWS #ADD8E6    participant "LR111x\nTransceiver" as LR1110 #00ADEFend boxbox LoRaWAN™ #AAAAAA    participant "Gateway" as GW #D3D3D3    participant "Network Server" as NS  #D3D3D3end boxbox Cloud #ADD8E6    participant "Application Server" as AppS #ADD8E6end boxbox LoRa Cloud™ #00ADEF    participant "Device & Application Services" as LCS #00ADEFend boxlegend left|=             |= Owner || <#00ADEF>    | Semtech || <#ADD8E6>    | Customer || <#D3D3D3>    | Ecosystem |endlegend== Precursor-Join (if using Network/Cloud for ALCSYNC, Almanac, or Assistance Position) ==note over APP, NS #AAAAAA: Join LoRaWAN network== Precursor-ALCSYNC (Network/Cloud not required, may be supplied locally by Application) ==note over APP, LCS #AAAAAA: Exchange ALCSYNC data== Precursor-Almanac (Network/Cloud not required, may be supplied locally by Application) ==note over APP, LCS #AAAAAA: Download Almanac data== Precursor-Assistance Position (Network/Cloud not required, may be supplied locally by Application) ==note over AppS, APP #AAAAAA: Position from Network (Application Server example)APP -> LR1110 : Request Assistance PositionLR1110 -> GW : Request Assistance PositionGW -> NS : Request Assistance PositionNS -> AppS : Request Assistance PositionAppS -> NS : Assistance PositionNS -> GW : Assistance PositionGW -> LR1110 : Assistance PositionLR1110 -> APP : Assistance PositionAPP -> LR1110 : GnssSet Assistance Position (Cmd 0x0410)LR1110 -> APP : Assistance Position command confirmednote over LR1110, APP #AAAAAA: Position Directly from ApplicationAPP -> LR1110 : GnssSet Assistance Position (Cmd 0x0410)LR1110 -> APP : Assistance Position command confirmed== Optional-Set GNSS Constellations to scan ==note over LR1110, APP #AAAAAA: Set GNSS Constellations (default: GPS+Beidou)APP -> LR1110 : GNSS Set Constellation to use (Cmd 0x0400)note right: Requires bitmask that documented in the \nLR1110 User Manual (bit 0=GPS, bit 1=Beidou) LR1110 -> APP : Setting confirmed== Assisted GNSS Scan == APP -> LR1110 : GNSS assisted scan (Cmd 0x040A)note right: Options\: EffortMode,ResultMask,NbSvMaxLR1110 -> APP : BUSY high note right: IRQ high (if enabled with GNSSDone), BUSY low\nGNSS scan doneAPP -> LR1110 : GnssGetResultSize (Cmd 0x040C), GnssReadResults (Cmd 0x040D)LR1110 -> APP : GNSS scan done + Resultsnote right: Scan results ready for trasmission or local storageLR1110 -> APP : IRQ low (if enabled)        @enduml

Used By

Device application, LR111x chip, LoRaWAN network server, LoRa Cloud Device Join service

Troubleshooting

If the GNSS Event starts with 0x00 the payload is NOT to be sent to the application server for processing. This GNSS event message is called GNSS Events for the Host MCU in the Reference Manual and does not contain a NAV message. Check the second byte and refer to the LR111x user manual for its significance.

References