nRF Cloud location
The nRF Cloud location library enables applications to submit cellular network and/or nearby Wi-Fi network information to nRF Cloud over MQTT to obtain device location. This library is an enhancement to the nRF Cloud library.
Note
To use the nRF Cloud location service, you need an nRF Cloud account, and the device needs to be associated with your account.
Configuration
Configure the CONFIG_NRF_CLOUD_LOCATION
Kconfig option to enable or disable the use of this library.
Request and process location data
The nrf_cloud_location_request()
function is used to submit network information to the cloud.
If specified in the request, nRF Cloud responds with the location data.
If the application provided a callback with the request, the library sends the location data to the application’s callback.
Otherwise, the library sends the location data to the application’s nRF Cloud event handler as an NRF_CLOUD_EVT_RX_DATA_LOCATION
event.
The nrf_cloud_location_process()
function processes the received location data.
The function parses the data and returns the location if it is found.
API documentation
include/net/nrf_cloud_location.h
, include/net/wifi_location_common.h
subsys/net/lib/nrf_cloud/src/