- Find device location from single or multiple cell towers (CELL_POS).
- Provide a device with current (assisted GPS or A-GPS) or predicted (P-GPS) satellite locations for a faster time-to-first-fix (TTFF).
- View device location history.
This guide is written for devices using the nRF9160 SiP. Location Services are not usable by nRF52 series devices.
CELL_POS services require that your device has an active SIM card.
Devices using Location Services over MQTT may use modem firmware v1.2.0 and above unless using MCELL, which requires modem firmware v1.3.x.
|MQTT||Mutual TLS||Requires certificate- and cloud-provisioning.|
|REST||JSON Web Token (JWT)||Does not require certificate- and cloud-provisioning. Can be used by proxy servers on behalf of devices they serve (requires special business agreement).|
MQTT requires your device(s) to have the proper X.509 certificates and be provisioned on nRF Cloud.
- Create and flash the device certificates.
- Provision the devices to your account.
- Follow the steps in the docs for the relevant Location Service libraries in the nRF Connect SDK.
When using our REST-based Location Service endpoints, cloud-provisioning is optional, as are device certificates.
The following steps assume you are using the REST API without provisioning your devices on nRF Cloud:
- Create a key pair and flash the private key.
- Register the public key for each device using the RegisterPublicKeys endpoint.
- Follow the steps in the docs for the relevant Location Service libraries in the nRF Connect SDK, including the REST library. For creating JSON Web Tokens, see the
AT%JWTcommand and related library in the nRF91 AT Commands documentation.
Some older DKs might have difficulty getting a GPS fix. Check that your device meets the requirements. If it doesn't have an internal GPS antenna, attach an external antenna, or query the device location using Cell.
If your device has a newer nRF9160 SiP and you are still having trouble getting a GPS fix, try the following:
- Place the device near a window with a clear view of the sky.
- Ensure that the device connection is stable.
- Query the device location using CELL_POS.
If your device is otherwise functioning normally, try the following to correct cellular issues:
- Check with your cellular network provider to make sure there's coverage in your area.
- Check that your device's SIM still has data:
- Sign in to the nRF Cloud portal.
- Click SIM cards in the navigation bar on the left.
- Buy more data for your SIM if necessary.