O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an LWM2M client

We begin by declaring a new field member of type Lwm2mClient (defined in the namespace Waher.Networking.Lwm2m):

private Lwm2mClient lwm2mClient = null; 

The Lwm2mClient class provides the basic LWM2M functionality described previously. When we instantiate it, we need to provide it with a client name, a reference to the CoAP endpoint that will be used for communication, and some basic LWM2M objects. We begin by providing it with the security object (0), the server object (1), the access control object (2), and the device object (3). We don't have to provide any details for the first three. We will let the bootstrap process take care of filling these with values. The device object, however, requires some parameters ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required