You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,17 @@
14
14
15
15
## Overview
16
16
17
-
The Asset Tracker Template is a modular framework for developing IoT applications on nRF91-based devices. Built on [nRF Connect SDK](https://www.nordicsemi.com/Products/Development-software/nRF-Connect-SDK) and [Zephyr RTOS](https://docs.zephyrproject.org/latest/), it provides an event-driven architecture for battery-powered IoT use cases with cloud connectivity, location tracking, and sensor data collection.
17
+
The Asset Tracker Template is a modular framework for developing IoT applications on nRF91-based devices.
18
+
It is built on the [nRF Connect SDK](https://www.nordicsemi.com/Products/Development-software/nRF-Connect-SDK) and [Zephyr RTOS](https://docs.zephyrproject.org/latest/), and provides a modular, event-driven architecture suitable for battery-powered IoT use cases.
19
+
The framework supports features such as cloud connectivity, location tracking, and sensor data collection.
18
20
19
-
The system uses modules that communicate through [zbus](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/zbus/index.html) channels for loose coupling and maintainability. It's suitable for asset tracking, environmental monitoring, and other IoT applications requiring modularity and power efficiency.
21
+
The system is organized into modules, each responsible for a specific functionality, such as managing network connectivity, handling cloud communication, or collecting environmental data.
22
+
Modules communicate through [zbus](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/zbus/index.html) channels, ensuring loose coupling and maintainability.
> **Note**: If you're new to nRF91 series and cellular IoT, consider taking the [Nordic Developer Academy Cellular Fundamentals Course](https://academy.nordicsemi.com/courses/cellular-iot-fundamentals).
26
+
> [!NOTE]
27
+
> If you're new to nRF91 series and cellular IoT, consider taking the [Nordic Developer Academy Cellular Fundamentals Course](https://academy.nordicsemi.com/courses/cellular-iot-fundamentals).
24
28
25
29
## Quick Start
26
30
@@ -29,9 +33,9 @@ For detailed setup instructions using the [nRF Connect for VS Code extension](ht
29
33
For pre-built binaries, refer to the latest tag and release artifacts documentaion; [release artifacts](docs/common/release.md).
30
34
31
35
> [!TIP]
32
-
> Use the [Download nRF Connect for Desktop Quick Start application](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop/download#infotabs) for a guided setup and provisioning process.
36
+
> Download and run the [Quick Start app](https://docs.nordicsemi.com/bundle/nrf-connect-quickstart/page/index.html) in the [nRF Connect for Desktop](https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop)`_ for a guided setup and provisioning process.
33
37
>
34
-
> You can also refer to [Exercise 1](https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/lessons/lesson-1-cellular-fundamentals/topic/lesson-1-exercise-1/) in [Nordic Developer Academy Cellular Fundamentals Course](https://academy.nordicsemi.com/courses/cellular-iot-fundamentals).
38
+
> You can also refer to [Exercise 1](https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/lessons/lesson-1-cellular-fundamentals/topic/lesson-1-exercise-1/) in [Nordic Developer Academy Cellular Fundamentals Course](https://academy.nordicsemi.com/courses/cellular-iot-fundamentals) for more details.
Copy file name to clipboardExpand all lines: docs/common/architecture.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ This document provides an overview of the architecture and explains how the diff
13
13
The Asset Tracker Template is built around a modular architecture where each module is responsible for a specific functionality. The template consists of the following modules:
14
14
15
15
-**[Main module](../modules/main.md)**: The central coordinator that implements the business logic and controls the overall application flow.
16
+
-**[Storage module](../modules/storage.md)**: Forwards or stores data from enabled modules.
16
17
-**[Network module](../modules/network.md)**: Manages LTE connectivity and tracks network status.
17
18
-**[Cloud module](../modules/cloud.md)**: Handles communication with nRF Cloud using CoAP.
18
19
-**[Location module](../modules/location.md)**: Provides location services using GNSS, Wi-Fi, and cellular positioning.
@@ -224,9 +225,8 @@ In the image, the black dots and arrow indicate initial transitions.
224
225
In this case, the initial state is set to `STATE_RUNNING`. In the state machine definition, initial transitions are configured, such that the state machine ends up in `STATE_DISCONNECTED_SEARCHING` when first initialized.
225
226
From there, transitions follows the arrows according to the messages received and the state machine logic.
226
227
227
-
!!! important "Important"
228
-
229
-
In a hierarchical state machine, the run function of the current state is executed first, and then the run function of the parent state is executed, unless a state transition happens, or the child state marks the message as handled using `smf_state_handled()`.
228
+
> [!IMPORTANT]
229
+
> In a hierarchical state machine, the run function of the current state is executed first, and then the run function of the parent state is executed, unless a state transition happens, or the child state marks the message as handled using `smf_state_handled()`.
The Asset Tracker supports multiple location methods that can be prioritized based on your needs. Configuration is done through board-specific configuration files.
The storage module handles collected data in two modes: **Passthrough** (forward immediately, default) or **Buffer** (store and transmit in batches for lower power consumption).
110
110
See [Storage Module Documentation](../modules/storage.md) for details.
111
111
112
112
**Basic configuration** in `prj.conf`:
113
113
114
-
Passthrough mode is the default mode, to enable buffer mode use:
114
+
Passthrough mode is the default mode. To enable buffer mode use:
115
115
116
116
```bash
117
117
CONFIG_APP_STORAGE_INITIAL_MODE_BUFFER=y
@@ -124,7 +124,7 @@ CONFIG_APP_STORAGE_MAX_RECORDS_PER_TYPE=8 # Records per data type
PSM allows the device to enter deep sleep while maintaining network registration. Configuration is done through Kconfig options:
194
194
195
-
#### PSM Parameters
195
+
#### PSM parameters
196
196
197
197
***Periodic TAU (Tracking Area Update)**
198
198
@@ -223,7 +223,7 @@ The following are the Key aspects:
223
223
- Stays active for the duration specified by RAT.
224
224
225
225
226
-
### APN (Access Point Name)
226
+
### Access Point Name (APN)
227
227
228
228
The Access Point Name (APN) is a network identifier used by the device to connect to the cellular network's packet data network. Configuration options:
229
229
@@ -243,7 +243,7 @@ Common scenarios for APN configuration:
243
243
> [!NOTE]
244
244
> In most cases, the default APN provided by the carrier should work without additional configuration.
245
245
246
-
## LED Status Indicators
246
+
## LED status indicators
247
247
248
248
The Asset Tracker Template uses LED colors to indicate different device states:
249
249
@@ -252,7 +252,7 @@ The Asset Tracker Template uses LED colors to indicate different device states:
252
252
- **Blue** (Blinking, 10 repetitions): Device is in lower power mode state between samples.
253
253
- **Purple** (Blinking, 10 repetitions): FOTA download in progress.
254
254
255
-
### Example: Setting LED Colors
255
+
### Example: Setting LED colors
256
256
257
257
You can control the LED colors through the LED module using zbus messages. The following is an example of how to set different LED patterns:
5. Implement sensor data acquisition using the Zephyr Sensor API:
211
+
1. Implement sensor data acquisition using the Zephyr Sensor API:
212
212
213
213
```c
214
214
err = sensor_sample_fetch(bmm350);
@@ -241,7 +241,7 @@ Thingy:91 X is used as an example, as it is a supported board in the template wi
241
241
};
242
242
```
243
243
244
-
6. Update the `environmental_msg` structure in `environmental.h` to include the magnetic field data:
244
+
1. Update the `environmental_msg` structure in `environmental.h` to include the magnetic field data:
245
245
246
246
```c
247
247
struct environmental_msg {
@@ -254,9 +254,9 @@ Thingy:91 X is used as an example, as it is a supported board in the template wi
254
254
};
255
255
```
256
256
257
-
The magnetometer data is now part of the environmental message and will be automatically handled by the storage module through the existing `ENVIRONMENTAL` data type. No changes to `storage_data_types.h` or `storage_data_types.c` are needed since the existing `environmental_check()` and `environmental_extract()` functions will handle the entire structure including the magnetic field data.
257
+
The magnetometer data is now part of the environmental message and will be automatically handled by the storage module through the existing `ENVIRONMENTAL` data type. No changes to `storage_data_types.h` or `storage_data_types.c` are needed since the existing `environmental_check()` and `environmental_extract()` functions will handle the entire structure, including the magnetic field data.
258
258
259
-
7. Add cloud integration in the `send_storage_data_to_cloud()` function in `cloud.c` to send magnetometer data to nRF Cloud. Add this code after the existing environmental sensor data handling:
259
+
1. Add cloud integration in the `send_storage_data_to_cloud()` function in `cloud.c` to send magnetometer data to nRF Cloud. Add this code after the existing environmental sensor data handling:
260
260
261
261
```c
262
262
#if defined(CONFIG_APP_ENVIRONMENTAL)
@@ -316,14 +316,14 @@ To add your own module, complete the following steps:
316
316
mkdir -p app/src/modules/dummy
317
317
```
318
318
319
-
2. Create the following files in the module directory:
319
+
1. Create the following files in the module directory:
320
320
321
321
- `dummy.h` - Module interface definitions.
322
322
- `dummy.c` - Module implementation.
323
323
- `Kconfig.dummy` - Module configuration options.
324
324
- `CMakeLists.txt` - Build system configuration.
325
325
326
-
3. In `dummy.h`, define the module's interface:
326
+
1. In `dummy.h`, define the module's interface:
327
327
328
328
```c
329
329
#ifndef _DUMMY_H_
@@ -363,7 +363,7 @@ To add your own module, complete the following steps:
363
363
#endif /* _DUMMY_H_ */
364
364
```
365
365
366
-
4. In `dummy.c`, implement the module's functionality:
366
+
1. In `dummy.c`, implement the module's functionality:
367
367
368
368
```c
369
369
#include<zephyr/kernel.h>
@@ -521,7 +521,7 @@ To add your own module, complete the following steps:
521
521
K_LOWEST_APPLICATION_THREAD_PRIO, 0, 0);
522
522
```
523
523
524
-
5. In `Kconfig.dummy`, define module configuration options:
524
+
1. In `Kconfig.dummy`, define module configuration options:
525
525
526
526
```kconfig
527
527
menuconfig APP_DUMMY
@@ -557,20 +557,20 @@ To add your own module, complete the following steps:
557
557
endif # APP_DUMMY
558
558
```
559
559
560
-
6. In `CMakeLists.txt`, configure the build system to include the source files of the module:
560
+
1. In `CMakeLists.txt`, configure the build system to include the source files of the module:
7. Add the module to the main application's CMakeLists.txt:
567
+
1. Add the module to the main application's CMakeLists.txt:
568
568
569
569
```cmake
570
570
add_subdirectory(src/modules/dummy)
571
571
```
572
572
573
-
8. Increase `CONFIG_TASK_WDT_CHANNELS` in the `prj.conf` file to accommadate for the new module's task watchdog integration.
573
+
1. Increase the value of the `CONFIG_TASK_WDT_CHANNELS` Kconfig option in the `prj.conf` file to accommadate for the new module's task watchdog integration.
574
574
575
575
The dummy module is now ready to use. It provides the following functionality:
0 commit comments