RK3568如何在OH3.2release上运行软总线样例
1.前置条件 (1)两台RK3568设备。(2)OpenHarmony下载和编译环境。(3)hdc工具见附录 2.下载代码 repo init -u git@gitee.com:openharmony/manifest.git -b refs/tags/OpenHarmony-v3.2.3-Release
1.前置条件
(1)两台RK3568设备。
(2)OpenHarmony下载和编译环境。
(3)hdc工具见代码仓。
2.下载代码
repo init -u git@gitee.com:openharmony/manifest.git -b refs/tags/OpenHarmony-v3.2.3-Release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
3.编写测试程序
4.在OH源码中添加测试代码目录
如图,在源代码路径:foundation\communication\dsoftbus\tools\添加测试代码目录:
5.修改配置文件
修改文件:foundation\communication\dsoftbus\core\BUILD.gn
如下图所示:
6.编译代码
在源码根目录中运行如下命令:
预编译:./build/prebuilts_download.sh
编译:./build.sh --product-name rk3568
7.烧录镜像
8.softbus_tool
8.1.设备发现
(1)将开发板A与开发板B连接同一个wifi。
(2)编译生成的程序默认在/system/bin下,可直接运行sofrbus_tool(本文将工具移动到了/data/下)
开发板A: ./data/softbus_tool
开发板B: ./data/softbus_tool
如图所示:
① B端执行publish
② B端设置publish id 可任意输入int类型的值,如:111
③ B端选择发布方式,这里选择2(coap)
④ B端选择是主动发现(1)还是被动发现(0),因为这里是发布端,所以输入:0。
⑤ Coap发现无要求,输入0或者1都行
⑥ A端执行refresh,主动发现
⑦ A端设置subsctibe id:可输入不同于111的int值,如:222。
⑧ coap发现:2
⑨ 主动发现:1
最终将在A端输出发现的设备信息:
更多推荐
所有评论(0)