使用hdc TCP模式无线方式连接OpenHarmony设备
·
使用hdc TCP模式无线方式连接OpenHarmony设备
1. usb连接方式切换为tcp模式。
将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
2. tcp模式切换回usb模式
hdc tmode usb
hdc shell
3. 同时启用hdc tcp和usb模式
# 进入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
更多推荐


所有评论(0)