Architecture

Serial Modem Host Applications

tags
Serial Modem Host Applications

The Location library is configured to use an external cloud service for positioning, so the module never resolves a position itself. When a scan completes, the library asks for the scan data to be resolved externally, and the module publishes the access points as a LOCATION_CLOUD_REQUEST message. The Main module forwards that message to the Cloud module, which performs the nRF Cloud ground fix request and logs the resulting position. This split keeps the module independent of which cloud the application uses.

Finding access points is treated as a successful search, regardless of whether the cloud can resolve them. The module therefore cancels the ongoing request as soon as the scan data has been published, which stops the Location library from falling back to another positioning method.

A search trigger that arrives while a search is already active is ignored, so a scan that takes longer than the application's synchronization period simply results in fewer position updates.

Note

CONFIG_LOCATION_DATA_DETAILS cannot be enabled in this application, because it makes <modem/location.h> include nRF Modem GNSS headers that only exist when the nRF Modem Library is built, and the modem is external on the host. As a result, the Location library never emits LOCATION_EVT_CANCELLED, and the module completes a canceled search from its own context instead.