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

Searching for a provisioning server

For our purposes, we start with the device set of interfaces for provisioning. We add a member variable that will hold our provisioning client to both our SensorXmpp2 and ActuatorXmpp2 projects:

private ProvisioningClient provisioningClient = null;

When we search the components made available by the server to find a Thing Registry, we make sure to check for provisioning support as well:

if (e2.HasFeature(ProvisioningClient.NamespaceProvisioningDevice)) 
{ 
   Log.Informational("Provisioning server found.", Item2.JID); 
   this.UseProvisioningServer(Item2.JID, OwnerJid); 
   await RuntimeSettings.SetAsync("ProvisioningServer.JID", 
         Item2.JID); 
} 

Here, the OwnerJid contains the JID to the device's owner, if known. If ...

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