Updated on 2025-12-04 GMT+08:00

Prerequisites

Maven Dependencies

<dependencies>
    <dependency>
        <groupId>com.huaweicloud</groupId>
        <artifactId>iot-device-sdk-java</artifactId>
        <version>1.2.2</version>
    </dependency>
</dependencies>

Source Code Acquisition and Compilation

  1. Prepare the development environment with JDK 1.8 or later and Maven installed.
  2. Download the SDK. The project contains multiple subprojects.

    • iot-device-sdk-java: SDK code
    • iot-device-demo: demo code for common directly connected devices
    • iot-gateway-demo: demo code for gateways
    • iot-bridge-sdk: SDK code for the bridge
    • iot-bridge-demo: demo code for the bridge, which is used to bridge a TCP device to the platform
    • iot-bridge-sample-tcp-protocol: sample code of a child device using TCP to connect to a bridge
    • iot-device-code-generator: device code generator, which can automatically generate device code for different product models
  3. Go to the SDK root directory and run the mvn install command to build and install the SDK.