LwM2M - Lightweight Machine‑to‑Machine ======================================= .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is LwM2M?** LwM2M (Lightweight Machine to Machine) is a **device management and service enablement protocol** for resource-constrained IoT devices. It was defined by the **Open Mobile Alliance (OMA)** to support remote device monitoring, configuration, and firmware updates using efficient messaging over lightweight transports. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is LwM2M useful?** * Designed for **low-power, low-bandwidth devices**. * Provides **remote device management**, including firmware updates and configuration. * Efficient use of **bandwidth and power**, suitable for NB-IoT, LTE-M, and LoRaWAN networks. * Built-in support for **security** (DTLS). * Interoperability through **standardized object models** and a REST-like interface. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * LwM2M uses a **client-server model**: * The **device (client)** connects to an **LwM2M server** to register and expose its resources. * The server can **read, write, execute, observe**, or **update** these resources. * It operates over **CoAP (Constrained Application Protocol)**, typically using **UDP**. * Supports **DTLS** for secure communication. * Resources are identified by **URIs** and represented using a **tree-like structure** (Object > Instance > Resource). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is LwM2M used?** * **Smart meters** and **utilities**. * **Industrial IoT** (remote monitoring, predictive maintenance). * **Smart cities** (streetlights, environmental sensors). * **Asset tracking**. * **Healthcare** (wearables, remote patient monitoring). * **Automotive telematics**. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * LwM2M is an **Application Layer protocol (Layer 7)** in the OSI model. * It sits on top of **CoAP** (which operates over UDP or DTLS). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS LwM2M Windows specific?** * No, LwM2M is **not Windows-specific**. * It is implemented across various platforms, including embedded systems, microcontrollers, and full-featured operating systems like Windows, Linux, and RTOS. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS LwM2M Linux Specific?** * No, LwM2M is **not Linux-specific**. * Linux is commonly used on **LwM2M servers**, but LwM2M clients can run on **RTOS**, **bare-metal firmware**, or other OSes depending on device constraints. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by LwM2M?** * LwM2M primarily uses **UDP** for communication via **CoAP**. * It can optionally use **SMS**, **TCP**, or **Non-IP transports**. * For security, **DTLS (Datagram Transport Layer Security)** is layered on top of UDP. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by LwM2M?** * Default CoAP UDP port: **5683**. * Default CoAPS (secure CoAP) port: **5684**. * These are used unless overridden by specific LwM2M implementations. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is LwM2M using Client server model?** * Yes, LwM2M is based on a **client-server model**. * The **client (IoT device)** registers and interacts with a **server**, which manages the device and requests data or actions. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`LwM2M Version&IEEE Details ` * :ref:`LwM2M Basic Setup on Ubuntu using IPv4 ` * :ref:`LwM2M Basic Setup on Ubuntu using IPv6 ` * :ref:`LwM2M Protocol Packet Details ` * :ref:`LwM2M Usecases ` * :ref:`LwM2M Basic Features ` * :ref:`Reference links ` .. _LwM2M_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _LwM2M_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _LwM2M_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _LwM2M_step5: .. tab-set:: .. tab-item:: LwM2M Version&RFC Details * rfc details .. _LwM2M_step18: .. tab-set:: .. tab-item:: LwM2M Basic Setup on Ubuntu using IPv4 * setup .. _LwM2M_step19: .. tab-set:: .. tab-item:: LwM2M Basic Setup on Ubuntu using IPv6 * setup .. _LwM2M_step6: .. tab-set:: .. tab-item:: LwM2M Protocol Packet Details * packet details .. _LwM2M_step7: .. tab-set:: .. tab-item:: LwM2M Usecases * usecases .. _LwM2M_step8: .. tab-set:: .. tab-item:: LwM2M Basic Features * features .. _LwM2M_step17: .. tab-set:: .. tab-item:: Reference links * Reference links