How will your product become an integral part of the IoT world?

Projects in the industrial and consumer IoT environment are exciting and diverse. Many disciplines are required simultaneously: hardware and antenna design, industrialisation, communication, low power, visualisation and control, cloud integration, firmware development and updates and much more. The technology mix is constantly growing and many standards and alliances are fighting for market share. LwM2M - the Lightweight Machine-to-Machine protocol - is a protocol that is not yet so well known.

If a project grows beyond the prototype phase, questions arise in an IoT project that can have a significant impact on the overall design and costs.

  • How are the devices automatically initialised during production (bootstrapping)?
  • How is new firmware installed on the IoT device?
  • How can the remote devices be controlled centrally, e.g. activated or deactivated?
  • What happens to the data when an IoT device is asleep?
  • Are there standards for transferring sensor data so that it can be easily exchanged or added to without having to adapt an existing server environment?
  • How can data be transferred securely between the IoT device and server?


Fortunately, there is no need to reinvent the wheel. LwM2M, a standard for M2M communication, provides answers to these questions and much more.

oem-solutions-iot_1-960x540.jpg

Machine-to-Machine - M2M

Machine-to-machine, or M2M for short, is an automated exchange of information between different end devices. Sensors and actuators communicate with a server (control centre/SCADA, cloud, database, workflow engine) via various access networks (such as mobile radio, Bluetooth, WiFi, 802.15.4) using the Internet.

M2M communication is a point-to-point connection. A temperature sensor sends its data to a database via the mobile network and thus communicates directly with the database server. However, IoT communication can also function directly in a network. For example, a luminaire with an integrated motion sensor can send a control command to luminaires in the same luminaire group and switch them on. M2M is the key topic in the industrial environment in particular. Sophisticated processes and machine learning and visualisations run on a central infrastructure to which IoT devices exchange data via M2M.

oem-solutions-iot_2-960x540.jpg



The Lightweight M2M Protokoll - LwM2M

LwM2M is an M2M protocol focussing on IoT devices: Secure, economical data transmission, low power and fault tolerance are key design requirements. Many of the current wireless modules (WiFi / LTE / NB-IoT / Cat-M / ...) already support LwM2M. This support means that a project with industrial requirements can be implemented very quickly. From the firmware developer's perspective, the integration of LwM2M is often reduced to a few lines of AT commands.

LwM2M uses UDP and COAP as transport protocols. The data is encrypted using DTLS. The LwM2M standard defines resources that are addressed in the style of an Internet web address (REST) and operators (Read / Write / Execute / Observe / ...) to handle these resources.

Example:

  • «Read /3/0/0» - The server would like to receive the «Manufacturer» information from the IoT device.
  • «Execute /3/0/4» - The server wants to restart the IoT device (reboot).
  • «Observe /6/0» - The server would like to be informed about all changes in the location (GNSS).


The resources are addressed via the object ID / resource ID. In the first two examples, the object with ID 3 (/3/x/x), the "Device" object, was addressed. If an IoT device registers on the server, it reports which objects it supports. The LwM2M standard defines many predefined objects. These predefined objects allow a tracking IoT device to report to the server with object 6, for example, and the server knows that this is tracking data and in which format it is being sent.

Are there alternatives?

MQTT is certainly the best-known representative for IoT projects and M2M communication and is supported by many cloud platforms. However, MQTT only defines one communication channel and does not solve any of the questions posed at the beginning. LwM2M allows much greater flexibility thanks to its active control. It is possible to decide in real time when the server wants which data from which IoT device. For example, the behaviour of an IoT device can be adjusted at any time, even if it has been in operation for a long time.

Economical data transmission

Economical data transmission is usually a key issue in IoT projects. Every byte that has to be transferred due to protocol overhead is a drain on the battery and is usually directly proportional to the cost of the amount of data transferred. LwM2M has therefore designed the entire protocol definition with this goal in mind.

oem-solutions-iot-fachartikel-zitat-marcel-graber.jpg

«Everyone is talking about IoT: the networking of things opens up a multitude of possibilities and markets. However, the real key to the Internet of Things is not the most sensitive sensor, but the intelligent linking of the various sensors and actuators via the cloud.» 

Marcel Graber, Development Engineer Electronics and Firmware at STEINEL Solutions AG