If you connect devices to IoT Platform over Message Queuing Telemetry Transport (MQTT), you must subscribe to topics before you can receive messages from IoT Platform. Link SDK for C versions 3.1, 3.2, and 4.x that are provided by IoT Platform support automatic topic subscription. This topic describes the topics to which devices can automatically subscribe.

Background information

IoT Platform communicates with devices based on topics. If you want to use multiple features of IoT Platform, you must subscribe to feature-specific topics. A large amount of time is required to subscribe to topics and then enable devices to work properly. To shorten the time, IoT Platform provides the automatic topic subscription feature. You can use specified topics to send messages from devices without sending requests to subscribe to the topics.

Note
  • After you connect a device to IoT Platform by using Link SDK for C version 3.1, 3.2, or 4.x, IoT Platform can send downstream messages by using automatically subscribed topics.

    Devices can call the aiot_mqtt_sub operation to subscribe to topics. For more information, see Example.

    If devices are deleted and destroyed, or devices call the aiot_mqtt_unsub operation to unsubscribe from the topics, IoT Platform no longer sends messages to the devices.

  • After the device goes online, IoT Platform automatically subscribes to the basic communication topics and Thing Specification Language (TSL)-based topics to which the device can subscribe. You can also subscribe to custom topics by using the Upstream Debug feature of custom topics on the Device Simulation page. For more information, see Device simulation.
  • If you use MQTT.fx to simulate a device and connect the simulated device to IoT Platform, the device cannot automatically subscribe to device topics. You can use the subscribe feature to subscribe to device topics. For more information, see Test downstream messaging.

Topics

Feature Topic
TSL-based communication /sys/${productKey}/${deviceName}/thing/model/down_raw
/sys/${productKey}/${deviceName}/thing/model/up_raw_reply
/sys/${productKey}/${deviceName}/thing/event/+/post_reply
/sys/${productKey}/${deviceName}/thing/deviceinfo/update_reply
/sys/${productKey}/${deviceName}/thing/deviceinfo/delete_reply
/sys/${productKey}/${deviceName}/thing/dynamicTsl/get_reply
/sys/${productKey}/${deviceName}/rrpc/request/+
/sys/${productKey}/${deviceName}/thing/service/property/set
/sys/${productKey}/${deviceName}/thing/event/property/history/post_reply
/sys/${productKey}/${deviceName}/thing/service/+
Sub-device management /sys/${productKey}/${deviceName}/thing/topo/change
/sys/${productKey}/${deviceName}/thing/sub/register_reply
/sys/${productKey}/${deviceName}/thing/sub/unregister_reply
/sys/${productKey}/${deviceName}/thing/topo/add_reply
/sys/${productKey}/${deviceName}/thing/topo/delete_reply
/sys/${productKey}/${deviceName}/thing/disable_reply
/sys/${productKey}/${deviceName}/thing/topo/get_reply
Firmware update /ota/device/upgrade/${productKey}/${deviceName}
Remote configuration /sys/${productKey}/${deviceName}/thing/config/push
/sys/${productKey}/${deviceName}/thing/config/get_reply
Device shadows /sys/${productKey}/${deviceName}/thing/property/desired/get_reply
/sys/${productKey}/${deviceName}/thing/property/desired/delete_reply
/shadow/get/${productKey}/${deviceName}
Unique-certificate-per-product authentication of sub-devices /sys/${productKey}/${deviceName}/thing/proxy/provisioning/product_register_reply