All Products
Search
Document Center

IoT Platform:Gateways and sub-devices

Last Updated:Oct 31, 2023

You can directly connect devices to IoT Platform. You can also connect devices to IoT Platform by attaching the devices to a gateway as sub-devices.

Scenarios

Gateways are required if sub-devices cannot be directly connected to IoT Platform or when you want to manage topological relationships. Gateways include Wi-Fi gateways, Bluetooth gateways, and ZigBee gateways.

Benefits

IoT Platform allows you to maintain and monitor the sub-devices of a gateway. IoT Platform also allows you to manage the topological relationships between the sub-devices and the gateway. This way, your business system can communicate with sub-devices without the need to consider topological relationships.

Gateways and devices

When you create products and devices, you must select a node type. Valid values:

  • Directly Connected Device: A directly connected device has an IP address. The device can be directly connected to IoT Platform. No sub-devices can be attached to the device, but the device can be attached to a gateway as a sub-device.
  • Gateway sub-device: Sub-devices cannot be directly connected to IoT Platform. You can connect a sub-device to IoT Platform by using a gateway.
  • Gateway device: A gateway device or gateway is a directly connected device to which you can attach sub-devices. You can use a gateway to manage sub-devices, maintain the topological relationships of sub-devices, and synchronize the topological relationships to IoT Platform.

The following figure shows the topological relationships between a gateway and its sub-devices.

Gateways and sub-devices

Connect a sub-device to IoT Platform

After a gateway is connected to IoT Platform, the gateway synchronizes the information about the topologies to IoT Platform. The gateway completes device verification, sends upstream messages, and receives downstream commands on behalf of its sub-devices.

  • You can connect a gateway to IoT Platform the same way you connect a directly connected device. For more information, see What is Link SDK?.
  • You can connect a sub-device to IoT Platform by using one of the following methods:
    • Unique-certificate-per-sub-device verification: The gateway obtains the certificate of the sub-device and submits the certificate to IoT Platform. The certificate information includes the ProductKey, DeviceName, and DeviceSecret.
    • Dynamic registration: You must enable dynamic registration for the sub-device in the IoT Platform console. After the gateway obtains the ProductKey and DeviceName of a sub-device, the gateway dynamically registers the sub-device in IoT Platform for authentication. After the sub-device is verified, IoT Platform dynamically assigns a DeviceSecret to the sub-device. You can use the certificate to connect the sub-device to IoT Platform. The certificate information includes the ProductKey, DeviceName, and DeviceSecret.