IoT Platform allows devices to connect to it directly, or be mounted as sub-devices to gateways that connect to IoT Platform.
Gateways and devices
When you create a product, you must select a node type for the devices of the product. Currently, IoT Platform supports two node types, Device and Gateway.
- Device: Devices of this node type cannot be mounted with sub-devices, but can be connected directly to the IoT Platform or be mounted as sub-devices to gateways.
- Gateway: Devices of this node type can connect to IoT Platform directly and can be mounted with sub-devices. Gateways are then used to manage sub-devices, maintain topological relationships with sub-devices, and synchronize these topological relationships to IoT Platform.
The topological relationship between a gateway and its sub-devices is shown in the following figure:
Connect gateways and sub-devices to IoT Platform
Once a gateway has been connected to IoT Platform, the gateway will synchronize its topological relationships with its sub-devices to IoT Platform. A gateway supports device authentication, message reporting, instruction receiving, and other communications with IoT Platform for all its sub-devices. That is, sub-devices are managed by their corresponding gateway.
- For more information about how to connect gateways to IoT Platform, see Link Kit SDK.
- You can connect sub-devices to IoT Platform using either of the following two methods:
- The Unique-certificate-per-device authentication method. This method requires you to install the device certificates (namely, the ProductKey, DeviceName, and DeviceSecret) in the physical sub-devices, and then connect the sub-devices to IoT Platform.
- The Unique-certificate-per-product authentication method. This method requires you to enable Dynamic Registration on the product details page and register devices in the IoT Platform console. Then, when a physical sub-device is being connected, the gateway will initiate a connection request to IoT Platform for the sub-device. IoT Platform then verifies the sub-device information. If the verification passes, IoT Platform will assign the DeviceSecret to the sub-device. The sub-device then receives all the required information (namely, the ProductKey, DeviceName, and DeviceSecret) to successfully connect to IoT Platform.