中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
本文将介绍如何使用hdc工具 tcp模式以无线的方式连接OpenHarmony设备。
将usb线将OpenHarmony设备和电脑端连接,并且将两个连接至同一个局域网。
# 执行 tmode port port-number,port-number设置为端口号。 hdc tmode port 6666 # 执行 hdc tconn OpenHarmony设备IP地址:port-number端口号,然后把两者的USB线拔下 hdc tconn 192.168.229.195:6666 hdc shell
wifiManager.getIpInfo().ipAddress
# 将设备和电脑两者之间USB线连接 hdc tmode usb hdc shell
# 进入shell终端 hdc shell # 设置属性 persist.hdc.mode 为all ,同时启用hdc tcp和usb模式 param set persist.hdc.mode all # 设置属性 persist.hdc.port 端口号 param set persist.hdc.port 6666 # 设置属性 persist.hdc.mode 为tcp ,启用hdc tcp模式 param set persist.hdc.mode tcp # 设置属性 persist.hdc.mode 为usb ,启用hdc usb模式 param set persist.hdc.mode usb
微信扫码分享