Skip to the content.

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 framework for developing IoT applications on nRF91-based devices. Built on the nRF Connect SDK and Zephyr RTOS, it 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 independent 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.

This template is suitable for applications like asset tracking, environmental monitoring, and other IoT use cases requiring modularity, configurability, and efficient power management. It includes a testing infrastructure with GitHub Actions for automated testing and continuous integration.

The framework is designed for customization, allowing developers to:

Supported and verified hardware:

If you are not familiar with the nRF91 series SiPs and cellular in general, it’s recommended to go through the Nordic Developer Academy Cellular Fundamentals Course to get a better understanding of the technology and how to customize the template for your needs.

System Architecture

The template consists of the following modules:

The image below illustrates the system architecture and the interaction between the modules. The zbus channels are indicated with colored arrows showing the direction of communication, with the arrows pointing in to the module that is subscribing to the respective channel.

System overview

Key Technical Features

  1. State Machine Framework (SMF)
    • Each module implements its own state machine using Zephyr’s State Machine Framework
    • Run-to-completion model ensures predictable behavior
  2. Message-Based Communication (zbus)
    • Modules communicate through dedicated zbus channels
  3. Modular Architecture
    • Separation of concerns between modules
    • Each module that performs blocking operations runs in its own thread and use zbus message subscribers to queue messages
    • Non-blocking modules use zbus listeners for immediate processing
  4. Power Optimization
    • LTE Power Saving Mode (PSM) enabled by default
    • Configurable power-saving features

Customization and Extension

The template is customizable and extensible, enabling developers to adapt it to specific requirements. Key points for customization include:

While designed for asset tracking applications, the template’s modular architecture makes it adaptable for various IoT use cases. The template is open-source, and we encourage contributions of improvements, bug fixes, or new features.

Quick Start

Prerequisites

Build and Run

  1. Initialize workspace:
# Launch toolchain
nrfutil toolchain-manager launch --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
  1. Build and flash:
west build -p -b thingy91x/nrf9151/ns
west thingy91x-dfu  # For Thingy:91 X serial bootloader
# Or if you use an external debugger (ensure that nRF9151 is selected with the switch on the Thingy:91 X)
west flash --erase

For detailed setup including nRF Cloud provisioning and advanced build configurations, see Getting Started.

Further reading

Modules

Oncommit

Target tests

Nightly

Target_tests Power Consumption Badge

RAM Usage thingy91x Flash Usage thingy91x

Overview

The Asset Tracker Template is a framework for developing IoT applications on nRF91-based devices. Built on the nRF Connect SDK and Zephyr RTOS, it 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 independent 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.

This template is suitable for applications like asset tracking, environmental monitoring, and other IoT use cases requiring modularity, configurability, and efficient power management. It includes a testing infrastructure with GitHub Actions for automated testing and continuous integration.

The framework is designed for customization, allowing developers to:

Supported and verified hardware:

If you are not familiar with the nRF91 series SiPs and cellular in general, it’s recommended to go through the Nordic Developer Academy Cellular Fundamentals Course to get a better understanding of the technology and how to customize the template for your needs.

System Architecture

The template consists of the following modules:

The image below illustrates the system architecture and the interaction between the modules. The zbus channels are indicated with colored arrows showing the direction of communication, with the arrows pointing in to the module that is subscribing to the respective channel.

System overview

Key Technical Features

  1. State Machine Framework (SMF)
    • Each module implements its own state machine using Zephyr’s State Machine Framework
    • Run-to-completion model ensures predictable behavior
  2. Message-Based Communication (zbus)
    • Modules communicate through dedicated zbus channels
  3. Modular Architecture
    • Separation of concerns between modules
    • Each module that performs blocking operations runs in its own thread and use zbus message subscribers to queue messages
    • Non-blocking modules use zbus listeners for immediate processing
  4. Power Optimization
    • LTE Power Saving Mode (PSM) enabled by default
    • Configurable power-saving features

Customization and Extension

The template is customizable and extensible, enabling developers to adapt it to specific requirements. Key points for customization include:

While designed for asset tracking applications, the template’s modular architecture makes it adaptable for various IoT use cases. The template is open-source, and we encourage contributions of improvements, bug fixes, or new features.

Quick Start

Prerequisites

Build and Run

  1. Initialize workspace:
# Launch toolchain
nrfutil toolchain-manager launch --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
  1. Build and flash:
west build -p -b thingy91x/nrf9151/ns
west thingy91x-dfu  # For Thingy:91 X serial bootloader
# Or if you use an external debugger (ensure that nRF9151 is selected with the switch on the Thingy:91 X)
west flash --erase

For detailed setup including nRF Cloud provisioning and advanced build configurations, see Getting Started.

Further reading

Modules