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

SDK Usage

Introduction

The IoT Device ArkTS (OpenHarmony) SDK provides abundant demo code for devices to communicate with the platform.

Requirements

DevEco Studio 5.0.0 or later has been installed.

Usage

  • Download and installation: In DevEco Studio, run the following command to import and install the SDK.
    ohpm install @huaweicloud/iot-device-sdk
  • Permission configuration: To use the SDK, add the ohos.permission.INTERNET permission to requestPermissions in the module.json5 file.
    {
      "module": {
        "requestPermissions": [
          {
            "name": "ohos.permission.INTERNET"
          }
        ]
      }
    }

Change History

Table 1 Change History of the OpenHarmony ArkTS SDK

Version

Change

Description

0.0.1

Function addition

Added the capability of connecting to the Huawei Cloud IoT platform to facilitate service scenarios such as access, device management, and command delivery.