If you're familiar with the concepts of provisioning, as described in the previous chapter, and concentrators as described in this chapter, adding provisioning support to a concentrator is straightforward and will be left to the reader. The details are available in the
ConcentratorXmpp2 project in the Mastering Internet of Things GitHub repository. The outline of the implementation is as follows:
- After finding a provisioning server, you create an instance of the
ProvisioningClientclass pointing to the provisioning server, with a reference to the XMPP client being used. This action will provision presence subscription requests (or friendship requests) for your device.
- If you want each embedded node to be provisioned as well, you provide a reference to the provisioning client to the
ConcentratorServerinstance when you create it. It will pass it on to the
ControlServerinstances it creates.
- If you provision embedded nodes, you...