Setting Up the Environment

Development Tool and Configuration

DevEco Studio, as the driver development tool, allows you to develop, debug, and package drivers. Download and install DevEco Studio and verify basic operations to ensure that it can function properly. For details, see Creating a Project in DevEco Studio User Guide.

SDK Version Configuration

The ArkTs APIs for peripheral management are applicable only when the SDK is of API version 10 or later.

The following table lists the SDK versions required to develop dedicated peripheral drivers or enhanced peripheral drivers based on the DDK.

NDK API SDK Version
UsbDdk API version 10 or later
HidDdk API version 11 or later
USBSerialDDK API version 18 or later
ScsiPeripheralDDK API version 18 or later

Verifying the Environment

Check whether DevEco Studio is connected to the OpenHarmony device.

Device connection

HDC Configuration

HarmonyOS Device Connector (hdc) is a command-line tool for debugging. It can be used to interact with real devices or the Emulators on Windows, Linux, and macOS. For details about the configuration, see hdc.

NOTE

Configuring the environment variable hdc_server_port and global environment variables is mandatory.

Development Device

  • Currently, RK3568 is used as the device for development, debugging, and verification. For details about how to compile and burn the RK3568, see Quick Start.
  • During peripheral client and driver development, you need to connect an external USB device for debugging. Currently, only an external USB device is supported.
  • The product ID and vendor ID of the USB device are required for defining drivers and implementing IPC.