IoT Platform allows you to distribute devices across regions, instances, or accounts. A device can request an endpoint and port from IoT Platform in different regions and use the information to establish a connection. This eliminates the need to repeatedly burn the device information. This article describes how to configure Link SDK for C to connect a device with IoT Platform by using the device distribution feature.
Prerequisites
- The device authentication information is obtained.
- The device is distributed to the specified region, instance, or account by using the IoT Platform console.
-
When you customize an SDK on the SDK customization page, set Advanced Capabilities to Bootstrap service.
- A development environment is prepared.
Background information
For more information about the topics that are used when IoT Platform sends downstream notifications to change endpoints, see Device distribution
Process
The application program calls the API operations of Link SDK for C to initiate an HTTPS request to obtain an MQTT endpoint and port and then connect with IoT Platform.
The following figure shows the process. In this example, the ./demos/bootstrap_posix_demo.c application program is used.
For more information about device distribution-specific API operations, see aiot_bootstrap_api.h.
Examples
- For more information about examples, see Example.
- For more information about error codes, see aiot_bootstrap_api.h.