Oncommit
Nightly
The Asset Tracker Template is a modular framework for developing IoT applications on nRF91-based devices. It is built on the nRF Connect SDK and Zephyr RTOS, and provides a modular, event-driven architecture suitable for battery-powered IoT use cases. The framework supports features such as cloud connectivity, location tracking, and sensor data collection.
The system is organized into modules, each responsible for a specific functionality, such as managing network connectivity, handling cloud communication, or collecting environmental data. Modules communicate through zbus channels, ensuring loose coupling and maintainability.
Supported hardware:
If you're new to nRF91 series and cellular IoT, consider taking the Nordic Developer Academy Cellular Fundamentals Course.
The fastest way to get started is to download and run the Quick Start app in nRF Connect for Desktop. It provides a guided setup and provisioning process that gets your device connected to nRF Cloud in minutes.
Alternatively, you can download pre-built firmware binaries from the latest release and flash them directly to your device. See the release artifacts documentation for details.
To build the firmware from source, you need the nRF Connect SDK development environment (setup guide). There are two options for setting up and building the project. For a detailed walkthrough, see the Getting Started Guide.
Use the nRF Connect for VS Code extension for an integrated development experience:
- Open VS Code and go to the nRF Connect extension.
- Select Create New Application → Browse nRF Connect SDK add-on Index.
- Search for Asset Tracker Template and create the project.
- Use the Actions panel in the extension to build and flash the application.
For more details, see the Getting Started Guide.
1. Initialize workspace
-
Install nRF Util. Follow the nRF Util documentation for installation instructions.
-
Install sdk-manager:
nrfutil install sdk-manager
-
Install toolchain:
nrfutil sdk-manager install v3.1.0
-
Launch toolchain:
nrfutil sdk-manager toolchain launch --ncs-version v3.1.0 --terminal
This will launch a new terminal window with the specified toolchain activated, use this terminal in the coming steps.
-
Initialize workspace:
west init -m https://github.com/nrfconnect/Asset-Tracker-Template.git --mr main asset-tracker-template cd asset-tracker-template/project/app west update
2. Build and flash
For Thingy:91 X:
west build --pristine --board thingy91x/nrf9151/ns
west thingy91x-dfu # For Thingy:91 X serial bootloader
# Or with external debugger:
west flash --eraseFor nRF9151 DK:
west build --pristine --board nrf9151dk/nrf9151/ns
west flash --eraseAfter building and flashing (using either option above), you need to provision the device to connect to nRF Cloud.
Provisioning steps
-
Get the device attestation token. Open a serial terminal connected to the device (115200 baud) and run the following AT command in the device shell:
at at%attesttoken
Note: The token is also printed automatically to the serial log on first boot of unprovisioned devices.
-
Log in to the nRF Cloud portal.
-
Navigate to Security Services → Claimed Devices → Claim Device.
-
Paste the attestation token, set rule to "nRF Cloud Onboarding", and click Claim Device.
-
After claiming, wait for the device to provision credentials and connect to nRF Cloud over CoAP. Once connected, the device will be available under Device Management → Devices.
[!NOTE] The device polls the provisioning service at its own interval. This means it may take a few minutes for the device to pick up the claim and complete provisioning. If you want a quicker response, press Button 1 on the device or reset it to trigger an immediate provisioning poll.
See Provisioning to nRF Cloud for more details.
Core modules include:
- Main: Central coordinator implementing business logic
- Storage: Data collection and buffering management
- Network: LTE connectivity management
- Cloud: nRF Cloud CoAP communication
- Location: GNSS, Wi-Fi, and cellular positioning
- LED: RGB LED control for Thingy:91 X
- Button: User input handling
- FOTA: Firmware over-the-air updates
- Environmental: Sensor data collection
- Power: Battery monitoring and power management
- State Machine Framework (SMF): Predictable behavior with run-to-completion model
- Message-Based Communication: Loose coupling via zbus channels
- Modular Architecture: Separation of concerns with dedicated threads for blocking operations
- Power Optimization: LTE PSM enabled by default with configurable power-saving features
The architecture is detailed in the Architecture documentation.