Skip to content

nrfconnect/Asset-Tracker-Template

Repository files navigation

Asset Tracker Template

Oncommit

Target tests

Nightly

Target_tests Power Consumption Badge

RAM Usage thingy91x FLASH Usage thingy91x

Overview

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: Thingy:91 X, nRF9151 DK

Note

If you're new to nRF91 series and cellular IoT, consider taking the Nordic Developer Academy Cellular Fundamentals Course.

Quick Start

For detailed setup instructions using the nRF Connect for VS Code extension and advanced configuration options, see the Getting Started Guide.

For pre-built binaries, refer to the latest tag and release artifacts documentaion; release artifacts.

Tip

Download and run the Quick Start app in the nRF Connect for Desktop for a guided setup and provisioning process.

You can also refer to Exercise 1 in Nordic Developer Academy Cellular Fundamentals Course for more details.

Prerequisites

  • nRF Connect SDK development environment (setup guide)

Build and Run

1. Initialize workspace:
# Install nRF Util
pip install nrfutil

# or follow install [documentation](https://docs.nordicsemi.com/bundle/nrfutil/page/guides/installing.html)

# Install toolchain
nrfutil toolchain-manager install --ncs-version v3.1.0

# Launch toolchain
nrfutil toolchain-manager launch --ncs-version v3.1.0 --shell

# 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 --erase

For nRF9151 DK:

west build --pristine --board nrf9151dk/nrf9151/ns
west flash --erase
3. Provision device:
  1. Get the device attestation token over terminal shell:

    at at%attesttoken

    Note: Token is printed automatically on first boot of unprovisioned devices.

  2. In nRF Cloud: Security ServicesClaimed DevicesClaim Device

  3. Paste token, set rule to "nRF Cloud Onboarding", click Claim Device

    If "nRF Cloud Onboarding" rule is not showing:

    Create a new rule using the following configuration:

    Claim Device
  4. Wait for the device to provision credentials and connect to nRF Cloud over CoAP. Once connected, the device should be available under Device ManagementDevices.

See Provisioning for more details.

System Architecture

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

System overview

Key Features

  • 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.

Table of Content

Module Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages