This repository contains a public version of IOWA LwM2M stack, illustrating how to use the LwM2M library.
Don't forget to have a look at the Documentation:
This code is provided as-is, under the associated licence (./LICENSE.txt). (This code should not be used in a commercial product and is for personal evaluation ONLY)
With this code, you can jump into LwM2M and validate the build and the execution of the IOWA stack on your device, but with some limitations:
IOWA Eval SDK | IOWA Full SDK | |
---|---|---|
Free for Evaluation purpose | Contact us | |
IOWA-based LwM2M Client | ✔️ | ✔️ |
IOWA-based LwM2M Server | ❌ | ✔️ |
IOWA-based Bootstrap Server | ❌ | ✔️ |
LwM2M 1.0 | ✔️ | ✔️ |
LwM2M 1.1 | ❌ | ✔️ |
LwM2M 1.2 | ❌ | ✔️ |
TLV Data Format | ✔️ | ✔️ |
LwM2M 1.1 Data Formats | ❌ | ✔️ |
LwM2M 1.2 Data Formats | ❌ | ✔️ |
Bootstrap Support | ❌ | ✔️ |
Mandatory LwM2M Objects | ✔️ | ✔️ |
CTO IPSO Objects | ✔️ | ✔️ |
Other IPSO Objects | ❌ | ✔️ |
Custom Objects Creation | ✔️ | ✔️ |
UDP Transport | ✔️ | ✔️ |
TCP Transport | ❌ | ✔️ |
WebSockets Transport | ❌ | ✔️ |
SMS Transport | ❌ | ✔️ |
COAP Block-Wise Transfer | ❌ | ✔️ |
DTLS Support | ✔️ | ✔️ |
TLS Support | ❌ | ✔️ |
OSCORE | ❌ | ✔️ |
Muti Server Management | ✔️ | ✔️ |
Registration Rules Configuration | ❌ | ✔️ |
Server Access Control | ❌ | ✔️ |
Firmware Update | ❌ | ✔️ |
MQTT Channels Configuration | ❌ | ✔️ |
Context Storage | ❌ | ✔️ |
Power Cycle Management | ❌ | ✔️ |
Connectivity Management | ❌ | ✔️ |
Notification Storage | ❌ | ✔️ |
Asynchronous Response Support | ❌ | ✔️ |
Payload Streaming | ❌ | ✔️ |
Source Code & C-Make | ✔️ | ✔️ |
Full Documentation | ❌ | ✔️ |
Logs | ✔️ | ✔️ |
Multithread Support | ❌ | ✔️ |
Python Binding | ❌ | ✔️ |
LwM2M Object Code Generation Tool | ❌ | ✔️ |
Category | Sample name | Purpose |
---|---|---|
Basic samples | 01-baseline_client | For creating a working LwM2M Client with IOWA |
Basic samples | 02-IPSO_client | How to add an IPSO temperature sensor Object |
Custom Object | 03-custom_object_baseline_client | How to add a simple custom LwM2M Object |
Custom Object | 04-custom_object_dynamic | How to make the values exposed by the custom Object dynamic |
Custom Object | 06-custom_object_multiple_rsc_inst | Another custom object sample, multiple resources, multiples instances |
Secure client | 07-secure_client_mbedtls3 | Sample client with PSK security over mbedtls3 |
Secure client | 08-secure_client_tinydtls | Sample client with PSK security with tinydtls |
Category | Sample name | Purpose |
---|---|---|
Full SDK only | secure_client | How to use secure communications. |
Full SDK only | fwupdate_push_client | How to receive Firmware Updates in push mode. |
Full SDK only | fwupdate_pull_client | How to receive Firmware Updates in pull mode. This sample demonstrates the CoAP APIs. |
Full SDK only | timestamp_IPSO | How to timestamp values in IPSO sensors. |
Full SDK only | timestamp_custom_objects | How to timestamp values in custom LwM2M Objects. |
Full SDK only | streamable_resources | How to work with large values like images or file contents. |
Full SDK only | asynchronous_resources | How to work with time consuming value retrieval. |
Full SDK only | low_MTU_client | How to use adapt to limited network MTU. |
Full SDK only | adaptive_client | How to adapt to degraded network conditions by modifying the CoAP timers. |
And many more ... |
All the samples can be built/run on Windows and Linux. Other platforms and OS are available in:
If you prefer, a Docker version is available in the docker folder.
You can find some interesting tutorials on Hackster.io:
Initial setup: Don't forget to clone this repository:
git clone https://github.com/IOTEROP/IOWA.git
Prerequisites: An x86-64 computer with a Linux distribution installed, the cmake
utility, the make
utility and a C compiler.
To compile the 08-secure_client_tinydtls sample, you will also need git
to be installed.
-
Inside the IOWA repository, create a build folder
mkdir build
-
Go to this folder
cd build
-
Launch cmake in debug mode
cmake -DCMAKE_BUILD_TYPE=Debug ..
The last parameter point to the folder containing the CMakeLists.txt file of your target. In this case the one at the root of the repo.
-
Compile the samples.
make -j 4
(The
-j 4
parameter enables four parallel compilations, could be replaced withmake -j$(nproc)
)(After making some modifications to the code, only the step 4 is required)
-
Jump into the associated directory. E.g:
cd samples/01-baseline_client
-
Run the sample. E.g:
./baseline_client
- Install the Microsoft C++ compiler as explained here: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2022
- Select the "Build Tools for Visual Studio 2022".
- In the Installer, make sure the following optional features are checked:
- MSVC v142 - VS 2022 C++ x64/x86 build tools (Note that the version may differ)
- Windows 10 SDK
- C++ CMake tools for Windows
- Install Visual Studio Code from https://code.visualstudio.com/
- Launch Visual Studio Code.
- Go to the "Extensions" panel (Ctrl+Shift+X) on the left side.
- Install the "C/C++", "CMake", and "CMake Tools" extensions
- Open the folder containing the IOWA SDK ("File" menu -> "Open Folder..." or "Ctrl+K Ctrl+O")
- Open the CMake panel on the left side.
- On the top bar of the CMake panel, click on the icon "Configure All Projects".
- When prompted to select a kit, choose one of the Visual Studio Build Tools.
- On the top bar of the CMake panel, click on the icon "Build All Projects".
- Click on the sample of your choice.
- Right-click on the application and select "Run in terminal"
Visual Studio version must be at least 2017 for the CMake support.
- In the Visual Studio menu bar, go to "File", "Open", "Folder". Select the IOWA folder.
- In the "Solution Explorer" windows, right-click on "CMakeList.txt" and choose "Set as Startup Item".
- In the Visual Studio menu bar, go to "Build", "Build All"
You can interact with the samples or your device with ALASKA Platform
Click on the button below to jump to the ALASKA Platform