Lwm2mExampleClient

This example demonstrates how to register with a LWM2M server including the standard LWM2M objects. Insecure and encrypted communication is both supported. The example will connect to the Leshan Lwm2m server from Eclipse which can be accessed on a PC at http://leshan.eclipse.org/#/clients.

Once the XDK is connected to the network and also to the Leshan server, the orange LED will turn on. On the website you can now click on the desired client and read the objects.

Image

Image

Programming

Image

Image

Output

When running the program keep the USB plugged to the PC. The USB will output a string of data you can read to indicate correct functionality. This string is mainly used for debug purposes. If the output differs from the following picture, then there is an error in the network setup or LWM2M setup.

Image