Is this the smallest LwM2M device in the world?
LwM2M Wi-Fi button - Credit Harald Naumann

Is this the smallest LwM2M device in the world?

Step by step, the number of LwM2M devices is increasing. LwM2M is the new protocol of the mobile network operators. LWM2M stands for Lightweight Machine to Machine and is an IoT protocol designed for embedded devices with limited resources (memory, power consumption, etc.). To make a smartphone work permanently there is device management, bootstrap and software update over the air. All this and much more was taken over in LwM2M and the communication was adapted to devices with little memory and small microcontrollers. In addition, there was a uniform communication via so-called profiles similar to Bluetooth Low Energy. Profiles ensure that devices from different manufacturers can work together with different LwM2M servers. This edition of the IoT M2M Times gives a brief insight.

Table of contents

  • LwM2M Protocol hierarchy
  • The world's smallest LwM2M device
  • The most open LwM2M with NB-IoT and LTE-M device in the world

LwM2M Protocol hierarchy

Version 1.0 of LWM2M was a protocol based CoAP. CoAP can perform DTLS encryption and eventually transmit it via UDP or SMS. In the versions 1.1 and 1.2, it was extended to TCP and MQTT. LoRaWAN and NB-IoT non IP were added as carriers without IP.

CoAP and MQTT only control the transmission of data. CoAP is significantly better than MQTT in terms of energy consumption. However, so that users of MQTT do not have to develop device management, bootstrap and Fota themselves, MQTT was integrated into LwM2M. LwM2M enables mixed operation of CoAP and MQTT. The graphic makes the possibilities visible.

Es wurde kein Alt-Text für dieses Bild angegeben.

LwM2M devices with NB-IoT and LTE-M

NB-IoT and LTE-M offer new functions to save energy. RAI enables a telegram to be sent without acknowledgement. PSM allows an IoT device to go to sleep permanently and remain logged on to the base station for weeks. With eDRX, an IoT device with NB-IoT and LTE-M can receive permanently and still only require a small amount of energy. These functions are already integrated into the LwM2M stack.

A device with NB-IoT, LTEM, LTE, 5G NR, UMTS or GSM is immediately ready to work with the following features without writing a line of code.

Device Discovery and Registration

This interface allows the LwM2M client to register with the LwM2M server and inform the server of the functions supported by the client. The temperature sensor informs the server that it can send temperatures. The tracking device informs the server that it can send positions. Many profiles such as serial number, battery status, cell ID are mandatory. Since the position is also mandatory, an IoT device with NB-IoT, LTEM, GNSS combo module is instantly locatable without a line of code.

Bootstrap server

The bootstrap server uses this interface to configure the LwM2M client and, for example, to set up the URL of the LWM2M server. Bootstrap server and LwM2M server do not have to have the same origin. Thus, an LwM2M device can be shipped with only the bootstrap code after production and receive its program code after logging in via the LwM2M Server. Or the programme code is already installed in production and the LwM2M client fetches an update.

Possible sources for a bootstrap

  • Factory bootstrap
  • Bootstrap from Smartcard
  • Client-Initiated bootstrap
  • Server Initiated bootstrap

The boot server instructs the client to connect to this work server to receive further instructions.

Device Management and Service Enablement

The LWM2M server sends a command to the client and receives a response. The example for the Device object (order number 3 in LwM2M) below shows how extensive the scope of information around a device is, for example.

The following profiles are mandatory:

  • Device (/3)
  • Connectivity monitoring (/4)
  • Firmware update (/5)
  • Location (/6)

LwM2M object and resources: Device

Object definition

  1. Object ID: 3
  2. Name: Device
  3. Instance: Single
  4. Mandatory: Mandatory

Es wurde kein Alt-Text für dieses Bild angegeben.

Information Reporting

This interface is used by the LWM2M client to transmit its resources/information. This can be, for example, the sensor temperature, the level of the container or the position of the locator. The messages can be event-driven or periodic. For example, the recyclable container sends messages daily or once a week and when the container exceeds a maximum fill level.

IoT devise software stack - make or open source?

Why should an IoT developer now spend hundreds of hours replicating the complete functionality of the LWM2M stack himself? The LwM2M Stack 1.1 is open source and, according to AVSystem, may be used commercially. Crout in Germany offers the free LwM2M test server with the appropriate LwM2M SIM cards. These LwM2M SIM cards are pay as you go (prepaid) and work worldwide with LTEM, LTE (4G), UMTS (3G), GPRS (2G), SMS (2G) and regionally with NB-IoT. A cellular LwM2M evaluation kit from Crout is shipped worldwide and works without a line of code with the above functions.

The world's smallest LwM2M device

Es wurde kein Alt-Text für dieses Bild angegeben.

An LwM2M stack has been added to the M5Stick5. The LwM2M stack and the application above the LWM2M stack are on open source. This tiny LwM2M device allows you to accelerate IoT prototyping. With dimensions of 48.2 mm x 25.5 mm x 13.7, the IoT device is very small. Infrared, LED, RTC, microphone, buzzer, LED, MEMS, buttons and display are available as peripherals and sensors. According to our research, the M5StickC-Plus is the smallest LwM2M device with radio certification according to RED/CE and FCC worldwide. The following LwM2M objects are supported in the programme code:

  • Push button (/3347)
  • Light control (/3311)
  • Temperature sensor (/3303)
  • Accelerometer (/3313)
  • Gyroscope (/3343)

Crout in Germany is giving away the LwM2M Wifi button to its customers including the test access to the LwM2M server on AVSystem . The LwM2M server works as a relay server. The IoT developers can pass the data bidirectionally to the cloud services AWS, Azure, Google CP and many more. Those who prefer their own cloud can use this. Very simple things can be solved with the API of the LWM2M server or with a simple cronjob on the LwM2M server from Crout.

The IoT developers switch on the LwM2M button, switch the smartphone to tethering and connect to the LwM2M server with the wifi in the smartphone plus mobile radio. The whole process is much faster than commissioning a LoRaWAN sensor, is more secure and has the full functionality of the LWM2M stack.

The most open LwM2M with NB-IoT and LTE-M device in the world

Es wurde kein Alt-Text für dieses Bild angegeben.

Crout ordered me to develop an open LwM2M device based on NB-IoT, LTEM, GSM and GNSS. This open LwM2M device fits perfectly with the 80 pages of "Low cost do it yourself antennas for the wireless IoT" at: https://www.akoriot.com/white-papers/

The NB-IoT / LTEM antenna design is already open source. An antenna simulation based on a standard antenna is available for only 600 Euros. Now the PCB with the radio module, the microcontroller, the sensors, the charging electronics and much more open-source circuit diagram is added. The LwM2M stack for the client is already open source.

What should I implement first? What do you want to have? An LwM2M temperature sensor for your cold frame? Or a level sensor for the water level? Our house has a drainage system with a pump. I can install it in the well. The water level is important. Or a sensor for the soil moisture? I can activate the GNSS receiver in the multimode module for tracking objects. Which sensors should I fill the empty PCB with? Thanks in advance for your wishes and ideas.

--------------

A wireless sensor with a BOM smaller than 10 USD is possible with LwM2M. The effort for software development is low. The LwM2M is available to all IoT developers. Nevertheless, I got some LwM2M Wi-Fi buttons and would like to share it with other IoT developers on this nice blue plant. Requests for customised development of the PCBs, antennas and software are welcome at harald.naumann (at) lte-modem.com ??????

Imprint

  • Harald Naumann, Ludwig-Kaufholz-Weg 4, 31535 Neustadt, Germany
  • Contact: harald.naumann (at) lte-modem.com, Phone: +49-5032 801 9985, Mobile:+49-152-33877687


Fabrizio Piantone

Solution IoT Designer presso Olivetti (Electronic Engineer, PMI-PMP?, Togaf?9.2 Certified, AWS? Cloud Practitioner, ITIL?v4)

2 年

What version of lwm2m is supported into the device ? Lwm2m 1.1 ?

回复
Dennis McMahon

Founder, Compassionate Commerce

2 年

And the device crout is getting you to build is based on what device platform?

Dennis McMahon

Founder, Compassionate Commerce

2 年

Hi harald Are you saying the M5StickC-Plus is LTE enabled? Cos their datasheet doesn't seem to mention that If it does, it seems a great option to test out a use case I have in mind

回复
Marko Mandaric

Building something (again). ??

2 年

Ours is 44x28x7mm

I made a lwM2M device with an ESP8266. Took less than an hour from scratch to have it in the server. Ok, it was WiFi, but lwM2M is a good option for this use case too

要查看或添加评论,请登录

社区洞察

其他会员也浏览了