Sub-devices cannot directly connect to IoT Platform. Instead, they must connect to IoT Platform through a gateway. This topic describes how to connect a sub-device to IoT platform through a gateway.
Follow these steps: 1. Create a gateway and a sub-device in IoT Platform. 2. Develop a device SDK for the gateway to connect the gateway to IoT platform. The gateway can build a topological relationship between the gateway and the sub-device and reports to IoT Platform. When the gateway find that it has a topological relationship with the connected sub-device, it reports the device certificate of the sub-device, or dynamically registers the sub-device. IoT Platform authenticates the identity of the sub-device and the topological relationship between the sub-device and the gateway. After the sub-device and the gateway pass the authentication, IoT Platform establishes a logical channel for the sub-device and binds the logical channel to the physical channel of the gateway. In this way, the sub-device can connect to IoT Platform for communications through the gateway.
This example only describes how to connect a sub-device to IoT platform through a gateway, and does not involve communication configurations such as Thing Specification Language (TSL) model communication. If youwant to transmit a TSL model between the sub-device and IoT platform, configure the gateway to transmit the TSL model information for the sub-device . For more information about the configuration, see TSL model communication.
To download the SDK demo used in this example, click here.
To connect the sub-device to IoT Platform through the gateway, follow these steps: