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, without the need to repeatedly burn device information. Configure Link SDK for C to connect a device to IoT Platform by using the device distribution feature.
Prerequisites
- You have the device authentication information.
- The device is distributed to the specified region, instance, or account in the IoT Platform console.
- Obtain the C Link SDK.
When you customize the SDK, on the Bootstrap service.
- Set up the development environment.
Background information
For information about the topics used when IoT Platform sends downstream notifications to change endpoints, seeDevice distribution
How it works
An application establishes a connection with the IoT Platform by calling the C Link SDK APIsinitiate an HTTPS request to obtain an MQTT endpoint and port, and then connect to IoT Platform.
The following time series chart uses the device application./demos/bootstrap_posix_demo.c as an example to illustrate the implementation flow.
For device distribution API operations, see aiot_bootstrap_api.h.
Examples
- For a code sample of the MQTT connection feature, see Usage example.
- For error codes related to the MQTT connection feature, see aiot_bootstrap_api.h.