Multicell location¶
The Multicell location library provides a way to acquire the location of the device based on LTE cell measurements. The library uses HTTP requests to get the location from a configurable location service.
Overview¶
The library uses LTE cell information such as LTE link controller library to generate HTTP requests. The HTTP request is then sent using TLS to the configured location service.
When the location service has resolved the location based on the cell measurements provided in the request, it sends back an HTTP response to the device. After receiving the HTTP response, the Multicell location library parses the response and returns the location to the caller.
The library supports location services from nRF Cloud Location Services, HERE Positioning (v1 and v2) and Skyhook Precision Location. Note that nRF Cloud currently is a single-cell location service, and does not make use of neighboring cells in location resolution. To use the location services, see the respective documentation for account setup and for getting the required credentials for authentication.
The required credentials for the location services are configurable using Kconfig options. There is no difference in the API calls when using the services.
The library has an API to handle provisioning of the required TLS certificates for the location services, multicell_location_provision_certificate()
.
Note
Certificates must be provisioned while the modem’s functional mode is offline, or it is powered off.
The simplest way to achieve this is to call multicell_location_provision_certificate()
after booting the application, before connecting to the LTE network.
Configuration¶
To enable the multicell location library, enable the CONFIG_MULTICELL_LOCATION
Kconfig option.
The user must select nRF Cloud, HERE or Skyhook location services using one of the following options:
The next required step is to configure the authentication method. By default, API key is used for nRF Cloud, HERE and Skyhook. Depending on the selected service, one of the two options below must be configured:
Following are the options that can usually have default values:
Limitations¶
nRF Cloud uses only the current cell when resolving the location.
Retrieving the device’s location is a blocking operation.
Dependencies¶
This library uses the following nRF Connect SDK libraries:
API documentation¶
include/net/multicell_location.h
lib/multicell_location/
-
group
multicell_location
Functions
-
int
multicell_location_get
(const struct lte_lc_cells_info *cell_data, struct multicell_location *location)¶
-
int
multicell_location_provision_certificate
(bool overwrite)¶
-
struct
multicell_location
¶ - #include <multicell_location.h>
-
int