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

Registering with the LWM2M servers

As soon as the bootstrap procedure completes, the LWM2M client will automatically register itself with the LWM2M servers configured to it by the bootstrap server. But if you do not want to use a bootstrap server to configure your device, you need to perform this registration yourself:

this.lwm2mClient.Register(60, 
  new Lwm2mServerReference("leshan.eclipse.org", 5683)); 

The first parameter provides the lifetime, in seconds, of the registration. You should perform a registration update before that time elapses for instance, after half that time. You do that by just making the following call:

this.lwm2mClient.RegisterUpdate();
Deregistration is performed automatically by disposing the client object. If you ...

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