Skip to content

Quick Start#

Welcome to the DevZone of AVSystem!#

This Quick Start walks you through the process of building your first LwM2M application using AVSystem’s LwM2M Client Anjay and AVSystem’s LwM2M Server Coiote IoT Device Management platform.

Follow this guide to build your first LwM2M application using a simulated device within 20 minutes.

Access the Coiote IoT DM portal#

Get started by signing up to Coiote IoT Device Management platform. You can sign up for a developer account, which allows you to connect up to 10 devices free of charge.

Coiote IoT DM

Coiote Device Inventory

Run Anjay LwM2M Client Demo#

Anjay LwM2M SDK is a set of tools that enables device vendors and IoT developers to easily implement a LwM2M client on their hardware. It is available both in an advanced commercial version as well as in the open-source model you can find on GitHub.

Start by running the Anjay client on your Linux, Mac or Windows machine and simulate LwM2M telemetry data.

Note

If preferred, you can directly jump to the Getting Started guides of the popular hardware platforms:

Info

For more information about the Anjay LwM2M Client, visit the Anjay Library Documentation.

Compile the Anjay demo client:#

Open up your command line interface and install the required dependencies:

sudo apt-get install git build-essential cmake libmbedtls-dev zlib1g-dev

Create a new directory, e.g. called AVSystem:

mkdir ~/AVSystem \
    && cd AVSystem

Clone the Anjay GitHub repository and compile the Anjay demo client using Cmake:

git clone https://github.com/AVSystem/Anjay.git \
    && cd Anjay \
    && git submodule update --init \
    && cmake . \
    && make -j

Open up your terminal and install the required dependencies using Homebrew:

brew install cmake mbedtls openssl

Create a new directory, e.g. called AVSystem:

mkdir ~/AVSystem \
    && cd AVSystem

Clone the Anjay GitHub repository and compile the Anjay demo client using Cmake:

git clone https://github.com/AVSystem/Anjay.git \
    && cd Anjay \
    && git submodule update --init \
    && cmake . \
    && make -j

Install the required dependencies

  1. Install MSYS2

  2. Install Git for Windows

    Note

    You can also install these using Chocolateychoco install git msys2 but make sure to follow the instructions to update MSYS2 after installing it.

  3. Open the appropriate MINGW shell (e.g., C:\msys64\mingw32.exe or C:\msys64\mingw64.exe, depending on whether you want to build 32- or 64-bit binaries) and install the compile-time dependencies:

    pacman -Sy make ${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-cmake ${MINGW_PACKAGE_PREFIX}-mbedtls
    

Compile the project

Run the following commands in the MINGW shell, after navigating to the directory created using Git above:

cmake -G"MSYS Makefiles" -DDTLS_BACKEND="mbedtls" .
make

Add a new device in Coiote IoT DM#

After compiling the demo project, go back to the Coiote IoT DM portal.

Click + Add device in the top-right corner.

Add Device button

Add a new device using the option: Anjay LwM2M Client Demo

Anjay LwM2M Client Demo

Copy the command you find in Coiote IoT DM.

Run command in terminal

Go back to your terminal, open your Anjay directory and run the command to configure and activate the demo application.

Monitor your demo device in the Coiote IoT DM#

If the demo application started successfully, a device is shown in theCoiote IoT DMplatform.

Coiote dashboard

Review the Data model#

Go to the Data model tab in the top-menu.

Data model

Under Data model you will find all the configured LwM2M Objects, Object instances and Resources containing property values or telemetry data. This includes:

  • Object /1 LwM2M
    • Resource /0 Short Server ID
    • Resource /1 Lifetime
    • Etc.
  • Object /3 Device
    • Resource /0 Manufacturer
    • Resource /1 Modem Number
    • Resource /2 Serial Number
    • Etc.
  • Object /6 Location
    • Resource /0 Latitude
    • Resource /1 Longitude
    • Resource /2 Altitude
    • Etc.
  • Object /3303 Temperature
    • Resource /5601 Min Measured Value
    • Resource /5602 Max Measured Value
    • Resource /5700 Sensor Value
    • Etc.

Data model

Next steps#

Did you manage to run the Anjay LwM2M Client Demo? Well done! 👏

Now the fun begins. Below you can find useful links to continue your LwM2M journey.

Follow the Getting started guides to kickstart your LwM2M application using one of the popular hardware platforms: Nordic, STMicroelectronics, ESPRESSIF or Raspberry Pi.

Nordic STM ESPPRESSIF Raspberry Pi

Learn more about Coiote IoT DM#

Dive into Coiote IoT Device Management platform and explore its numerous functionalities. From device onboarding using the Bootstrap Server to Data Visualization and running automated Device Tests.

Coiote IoT DM docs

Join our community on Discord#

Join us on Discord to get in touch with AVSystem experts and to meet fellow LwM2M developers.

Join Discord


Last update: May 15, 2024