nRF Cloud AGPS Sample
Important: this sample is outdated and no longer exists in future versions of nRF Connect SDK
The nrf_cloud_agps
sample is the easiest way to get started with generating
GPS coordinates with your nRF9160 Feather.
Precompiled Binary
Note: you can get a pre-build binary file compiled previously using NCS v1.3.2 here.
Programming nrf_cloud_apgs
Sample
-
Change directories to
ncs/nrf
(Make sure you're using NCS v1.4.0 or newer.) -
Then change directories to
/nrf/samples/nrf9160/agps/
-
Add this to
prj.conf
:# Cloud prefix for nRF9160 Feather CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX="feather-" # Image manager CONFIG_IMG_MANAGER=y CONFIG_FLASH=y CONFIG_IMG_ERASE_PROGRESSIVELY=y # Enable Zephyr application to be booted by MCUboot CONFIG_BOOTLOADER_MCUBOOT=y # COEX0 is used to enable the GPS LNA, but it has to be configured to do so. CONFIG_NRF9160_GPS_SET_COEX0=y CONFIG_NRF9160_GPS_COEX0_STRING="AT%XCOEX0=1,1,1565,1586"
Then compile as normal:
west build -b circuitdojo_feather_nrf9160_ns
Note: having trouble building? Make sure you check out the troubleshooting page.
Then load using newmgr
:
newtmgr -c serial image upload build/zephyr/app_update.bin
newtmgr -c serial reset
Setting Up nRF Connect for Cloud
During factory test, your nRF9160 Feather is added to nRF Connect for Cloud for your immediate use! The only thing you'll need, other than your nRF9160 Feather, SIM and antenna is your getting started card:
Every nRF9160 Feather has a device ID generated based on the IMEI. Your full device ID will look something like:
feather-<IMEI>
where <IMEI>
is the IMEI tied to your specific device.
Note: You can get the IMEI by running the AT+CGSN=1
command in LTE Link
Monitor while running the at_client
, default factory firmware or other
firmware with AT Commands turned on.
Here are the steps to get you the rest of the way.
- First, program your device with the
nrf_cloud_agps
sample. - Then, power up and confirm that the device can connect to the cloud.
- Create an nRF Connect for Cloud Account
- Once created, go to the top left and click the big + icon.
- Then skip the iBasis setup since we're using Hologram.
- Enter the Device ID and the PIN provided on your card.
- Once you press Add Device, nRF Connect for Cloud should notify you that your device has been added!
- Navigate to Devices and click on the device you're working wtih!
That's it!
Your device screen will adapt to the example code that you're using. For example, it should display a map when you begin to publish GPS data.
Troubleshooting
There are some things that can go wrong here. They're usually related to your nRF Cloud certs.
Reloading the certs can be done using the tutorial here.