1. 前言
TODO
2. 交叉编译(QNX与Android)
TODO
2.1 下载资源
FDBUS下载V5.4版本:
gitee:
fdbus: Fast Distributed Bus (FDBus) - Gitee.com
csdn:
fdbus-v5.4.0
PROTOBUF 下载3.20 CPP版本:
github:
https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.2
github镜像:
Release Protocol Buffers v3.20.2 · protocolbuffers/protobuf · GitHub
csdn:
protobuf-v3.20.2
2.2 编译
前面博文有专门摘录编译脚本
FDBUS NDK与QNX交叉编译
3. 实操
3.1 将编译后的文件分别推送到Android与QNX
3.1.1 ADB push推送到Android
adb root
adb shell mkdir -p data/fdbus
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\fdbxclient data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\fdbxserver data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\name_server data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\lshost data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\lssvc data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\host_server data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\logsvc data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\logviewer data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\lsclt data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\lsevt data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\bin\ntfcenter data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\lib\libfdbus.so data/fdbus/
adb push Z:\workspace\thirdlibs\fdbus-v5.4.0\build\android\install\usr\lib\libfdbus-clib.so data/fdbus/
adb push Z:\workspace\thirdlibs\protobuf-3.20.2\build\android\install\lib\libprotobuf.so data/fdbus/
3.1.2 通过ADB Shell 用busybox ftpput 推送到QNX
busybox ftpput -u root 192.168.1.1 /data/fdbus/fdbxserver
busybox ftpput -u root 192.168.1.1 /data/fdbus/fdbxclient
busybox ftpput -u root 192.168.1.1 /data/fdbus/name_server
busybox ftpput -u root 192.168.1.1 /data/fdbus/lshost
busybox ftpput -u root 192.168.1.1 /data/fdbus/lssvc
busybox ftpput -u root 192.168.1.1 /data/fdbus/host_server
busybox ftpput -u root 192.168.1.1 /data/fdbus/logsvc
busybox ftpput -u root 192.168.1.1 /data/fdbus/logviewer
busybox ftpput -u root 192.168.1.1 /data/fdbus/lsclt
busybox ftpput -u root 192.168.1.1 /data/fdbus/lsevt
busybox ftpput -u root 192.168.1.1 /data/fdbus/ntfcenter
busybox ftpput -u root 192.168.1.1 /data/fdbus/libfdbus-clib.so
busybox ftpput -u root 192.168.1.1 /data/fdbus/libcommon_base.so
busybox ftpput -u root 192.168.1.1 /data/fdbus/libfdbus.so
busybox ftpput -u root 192.168.1.1 /data/fdbus/libprotobuf.so
3.2 设置环境变量:
export LD_LIBRARY_PATH=/data/fdbus:$LD_LIBRARY_PATH
两个系统都需设置
3.3 实际操作
3.3.1 QNX启动服务
#cd /data/fdbus
# ./name_server &
# ./host_server &
# ./fdbxserver &
3.3.2 Android启动服务
#cd /data/fdbus
# ./name_server -u tcp://192.168.1.1:60000 -n android &
# ./fdbxclient &
查看接口状态可以通过 ./lssvc来查看
3.3.3 测试结果:
4 总结
综上,跨系统通讯FDBUS Demo例程算是基本掌握了。文章来源:https://www.toymoban.com/news/detail-403839.html
后面就是如何在FDBUS基础上进行二次开发,定制化开发,让它进化满足产品要求。文章来源地址https://www.toymoban.com/news/detail-403839.html
到了这里,关于10-QNX与Android双系统通讯之FDBUS(1)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!