Help Center/ IoT/ API Reference/ MQTT Interface Reference/ Overview/ Flow Description/ Service Process (One-Device-One-Secret)
Updated on 2022-02-24 GMT+08:00

Service Process (One-Device-One-Secret)

  1. The application sends a device registration request to the IoT platform.
  2. The registration is successful, and deviceId and secret are returned. If the registration fails, the failure cause is returned.
  3. After the device is powered on, it sends a connection authentication request containing clientId, username, and password to the IoT platform. For details, see MQTT Connection Authentication Through CONNECT Messages.
  4. After the authentication is successful, the IoT platform returns a success response. The device is connected to the IoT platform.
  5. The device sends a SUBSCRIBE message carrying the topic that contains deviceId to the IoT platform.
  6. The IoT platform returns the subscription result.
  7. The device sends a PUBLISH message carrying data and the topic to the IoT platform.
  8. The IoT platform decodes the data by using the corresponding codec plug-in.
  9. The IoT platform sends the decoded data to the corresponding application based on the topic.
  10. The application delivers a command to the IoT platform.
  11. The IoT platform encodes the data by using the corresponding codec plug-in.
  12. The IoT platform sends the encoded data to the device.
  13. The device responds to the command and returns a response to the IoT platform.
  14. The IoT platform sends the command execution result to the application.
    NOTE:

    For details about the APIs used for the interaction between applications and the IoT platform, see the API reference document.