当前位置: 首页 > news >正文

20250828在荣品RD-RK3588-MID开发板的Android13系统下适配Bainianxing的GPS模块BU-16M10

20250828在荣品RD-RK3588-MID开发板的Android13系统下适配Bainianxing的GPS模块BU-16M10
2025/8/29 9:50


荣品RD-RK3588-MID开发板。适配GPS 38400bps
需要配置波特率吗?

一般是 9600

这边使用的泰斗
你要适配新的gps模块?


规格书:Baud rate 38400bps

1、如果不是9600,需要 专门 配置 波特率吗?
2、GPS模块的电源 是受 GPIO控制的。如何在GPS中改呢?【我想开机默认打开GPS模块!】
嗯。根据 PM需求[破涕为笑]如果 不是9600bps的GPS模块。需要专门配置波特率不?


要设置吧,是通过串口获取到gps相关的定位数据进行解析;
波特率不一致,应该获取不到数据

请提供配置方法/步骤?说明文档![破涕为笑]

这个你跟gps厂家沟通 如何适配;
这边之前设置泰斗,都是通过厂家提供文档配置的


GPS这种简单的东西[破涕为笑]不需要这么复杂吧!

只是一个 波特率而已![破涕为笑]
请问泰斗的GPS模块可以 切换波特率吗?难道 泰斗的GPS模块从9600bps切换到38400bps。
你们的荣品的RD-RK3588-MID开发板 就罢工了?[捂脸]

不只是是波特率的问题,还有相关的服务和库是不一样的

我想直接使用 内置的GPSTEST测试[破涕为笑]
GPStesk.APK 锁定了 串口号?波特率吗?还是自适应的额?


如果你不需要移植这个gps模块对应的库或者服务,
直接用泰斗的,可以是试一下修改泰斗的波特率
hardware/rockchip/gps/TD1030HAL/tdgnss.conf


然后再在对应的dts配置中打开 配置 和指定串口

Y:\MID_MX_RK3588_android13-20250818\device\rockchip\rk3588\BoardConfig.mk

BOARD_HAS_GPS := false

这里也需要打开吧?[破涕为笑]

GPT TEST实测效果图:

静态漂移效果图:


https://doc.rpdzkj.cn/#/zh_cn/%E7%91%9E%E8%8A%AF%E5%BE%AE%E7%B3%BB%E5%88%97/rk3588-rk3588s/7.%E6%8E%A5%E5%8F%A3%E4%BD%BF%E7%94%A8?id=gps
GPS
该功能目前linux未适配,仅安卓生效 GPS模块大部分版型默认是关闭的,如需使用,需要去设备树下打开GPS功能
在连接GPS模块之前需要确认你的UART的电压是否与你的GPS模块电压匹配,从我司购买的GPS模块,需要注意是3.3V电压的供电
以RD-RK3588为例,可在主DTS最后部分添加下面的内容,true为打开该功能,gps_serial_port为设置使用哪个UART作为GPS功能,可自行配置修改

&rpdzkj{
gps_use = "true";
gps_serial_port = "/dev/ttyS0"; //对应uart0
};

复制Error已复制
值得注意的是 RD-RK3588-AHD版型可从底板原理图看到本身是自带GPS模块的,只需要外接天线就行
可cat /dev/ttyS0查看其打印,Android 可以使用 TDMonitor2 这个APP查看GPS图形化界面

console:/ # cat /dev/ttyS0                                                     
$GNRMC,,V,,,,,,,,,,N,V*37
$GNGGA,,,,,,0,00,99.9,,,,,,*6F
$GNGSA,A,1,,,,,,,,,,,,,99.9,99.9,99.9,1*0A
$GNGSA,A,1,,,,,,,,,,,,,99.9,99.9,99.9,4*0F
$GPGSV,1,1,04,21,,,07,22,,,12,24,,,29,28,,,29,0*6A
$BDGSV,1,1,00,0*74


Z:\rk-android13-20250818RD-RK3588-MID\kernel-5.10\arch\arm64\boot\dts\rockchip\rk3588\rd-rk3588-mid.dts

// 2025/8/20 14:06 wenyuanbo add for MCU/video transmission module
&uart1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart1m1_xfer>;
};

// GPS
&uart3 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart3m2_xfer>;
};

&uart5 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart5m1_xfer>;
};

&uart6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart6m0_xfer>;
};

&uart8 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart8m0_xfer>;
};

&i2c4 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c4m2_xfer>;

    hym8563: hym8563@51 {
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "hym8563";
//pinctrl-names = "default";
//pinctrl-0 = <&hym8563_int>;
//interrupt-parent = <&gpio0>;
//interrupts = <RK_PD4 IRQ_TYPE_LEVEL_LOW>;
//wakeup-source;
};

};


Z:\rk-android13-20250818RD-RK3588-MID\kernel-5.10\arch\arm64\boot\dts\rockchip\rk3588\rp-lcd-mipi0-8-1200-1920.dtsi

&rpdzkj {
compatible = "rp_config";
user_version = "rpdzkj";
system_rotate = "270";
csi_camera_rotate = "0"; //all csi camera rotation //0 90 180 270 //no effect
csi_camera_facing = "0"; //0:auto  1:all front   2:all back //no effect
usb_camera_rotate = "0"; //all usb camera rotation //0 90 180 270
usb_camera_facing = "0"; //0:auto  1:all front   2:all back
lcd_density = "280";
language = "zh-CN";   //zh-CN //en-US
time_zone = "Asia/Shanghai"; //Asia/Shanghai = +8   //Europe/London  = +1       //Africa/Casablanca     = +0;
not_navigation_bar = "false";
not_status_bar = "false";
default_launcher = "true";
has_root = "true";
usb_not_permission = "true";
    gps_use = "false";
gps_serial_port = "/dev/ttyS0";

primary_device = "DSI";
extend_device = "HDMI-A";
extend_rotate = "0";//0 0//1 90 //2 180 //3 270
rotation_efull = "true";
extend_rotate_2 = "0";//0 0//1 90 //2 180 //3 270
rotation_efull_2 = "true";
extend_rotate_3 = "0";//0 0//1 90 //2 180 //3 270
rotation_efull_3 = "true";
home_apk = "null";
status = "okay";
};

修改为:

&rpdzkj {
compatible = "rp_config";
user_version = "rpdzkj";
system_rotate = "270";
csi_camera_rotate = "0"; //all csi camera rotation //0 90 180 270 //no effect
csi_camera_facing = "0"; //0:auto  1:all front   2:all back //no effect
usb_camera_rotate = "0"; //all usb camera rotation //0 90 180 270
usb_camera_facing = "0"; //0:auto  1:all front   2:all back
lcd_density = "280";
language = "zh-CN";   //zh-CN //en-US
time_zone = "Asia/Shanghai"; //Asia/Shanghai = +8   //Europe/London  = +1       //Africa/Casablanca     = +0;
not_navigation_bar = "false";
not_status_bar = "false";
default_launcher = "true";
has_root = "true";
usb_not_permission = "true";
    gps_use = "true";
gps_serial_port = "/dev/ttyS3";

primary_device = "DSI";
extend_device = "HDMI-A";
extend_rotate = "0";//0 0//1 90 //2 180 //3 270
rotation_efull = "true";
extend_rotate_2 = "0";//0 0//1 90 //2 180 //3 270
rotation_efull_2 = "true";
extend_rotate_3 = "0";//0 0//1 90 //2 180 //3 270
rotation_efull_3 = "true";
home_apk = "null";
status = "okay";
};


Z:\rk-android13-20250818RD-RK3588-MID\device\rockchip\rk3588\BoardConfig.mk_bk

BOARD_NFC_SUPPORT := false
BOARD_HAS_GPS := false

修改为:

BOARD_NFC_SUPPORT := false
BOARD_HAS_GPS := true


Z:\rk-android13-20250818RD-RK3588-MID\hardware\rockchip\gps\TD1030HAL\AGNSS\gps.default.so


Z:\rk-android13-20250818RD-RK3588-MID\hardware\rockchip\gps\TD1030HAL\tdgnss.conf

UART_DRIVER=/dev/ttyS4
UART_BAUD_RATE=9600

BDPRNADD=200
GNSS_MODE=3
AGNSS_ENABLE=0
FAST_FIX=0
TD_DEBUG_GSV=0
TD_DEBUG_GSA=0
TD_DEBUG_NMEA=0
TD_DEBUG_FIX=0
TD_DEBUG_FUCTION=1
TD_DEBUG_CONFIGFILE=1

修改为:

UART_DRIVER=/dev/ttyS3
UART_BAUD_RATE=38400

BDPRNADD=200
GNSS_MODE=3
AGNSS_ENABLE=0
FAST_FIX=0
TD_DEBUG_GSV=0
TD_DEBUG_GSA=0
TD_DEBUG_NMEA=0
TD_DEBUG_FIX=0
TD_DEBUG_FUCTION=1
TD_DEBUG_CONFIGFILE=1


jinhualong@jinhualong-LEGION-REN7000K-26IRX:~/MID_MX_RK3588_android13-20250818$ sudo rm out -rf
jinhualong@jinhualong-LEGION-REN7000K-26IRX:~/MID_MX_RK3588_android13-20250818$ sudo ./build.sh


Microsoft Windows [版本 10.0.19045.5965]
(c) Microsoft Corporation。保留所有权利。

C:\Users\QQ>adb shell
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: cannot connect to daemon

C:\Users\QQ>adb shell
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: cannot connect to daemon

C:\Users\QQ>adb shell
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: cannot connect to daemon

C:\Users\QQ>adb shell
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: cannot connect to daemon

C:\Users\QQ>adb shell
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: cannot connect to daemon

C:\Users\QQ>adb shell
rk3588_t:/ $ su
rk3588_t:/ #
rk3588_t:/ # cd /sys/class/gpio/
rk3588_t:/sys/class/gpio # ll
total 0
--w------- 1 root root 4096 2025-08-29 08:24 export
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip0 -> ../../devices/platform/pinctrl/fd8a0000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip128 -> ../../devices/platform/pinctrl/fec50000.gpio/gpio/gpiochip128
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip32 -> ../../devices/platform/pinctrl/fec20000.gpio/gpio/gpiochip32
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip509 -> ../../devices/platform/feb20000.spi/spi_master/spi2/spi2.0/rk806-pinctrl.1.auto/gpio/gpiochip509
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip64 -> ../../devices/platform/pinctrl/fec30000.gpio/gpio/gpiochip64
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip96 -> ../../devices/platform/pinctrl/fec40000.gpio/gpio/gpiochip96
--w------- 1 root root 4096 2025-08-29 08:24 unexport
rk3588_t:/sys/class/gpio #
rk3588_t:/sys/class/gpio # echo 132 > export
rk3588_t:/sys/class/gpio # ll
total 0
--w------- 1 root root 4096 2025-08-29 08:24 export
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpio132 -> ../../devices/platform/pinctrl/fec50000.gpio/gpiochip4/gpio/gpio132
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip0 -> ../../devices/platform/pinctrl/fd8a0000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip128 -> ../../devices/platform/pinctrl/fec50000.gpio/gpio/gpiochip128
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip32 -> ../../devices/platform/pinctrl/fec20000.gpio/gpio/gpiochip32
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip509 -> ../../devices/platform/feb20000.spi/spi_master/spi2/spi2.0/rk806-pinctrl.1.auto/gpio/gpiochip509
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip64 -> ../../devices/platform/pinctrl/fec30000.gpio/gpio/gpiochip64
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 gpiochip96 -> ../../devices/platform/pinctrl/fec40000.gpio/gpio/gpiochip96
--w------- 1 root root 4096 2025-08-29 08:24 unexport
rk3588_t:/sys/class/gpio # cd gp
gpio132/      gpiochip0/    gpiochip128/  gpiochip32/   gpiochip509/  gpiochip64/   gpiochip96/
rk3588_t:/sys/class/gpio # cd gpio132
rk3588_t:/sys/class/gpio/gpio132 # ll
total 0
-rw-r--r-- 1 root root 4096 2025-08-29 08:24 active_low
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 device -> ../../../gpiochip4
-rw-r--r-- 1 root root 4096 2025-08-29 08:24 direction
-rw-r--r-- 1 root root 4096 2025-08-29 08:24 edge
drwxr-xr-x 2 root root    0 2025-08-29 08:24 power
lrwxrwxrwx 1 root root    0 2025-08-29 08:24 subsystem -> ../../../../../../../class/gpio
-rw-r--r-- 1 root root 4096 2025-08-29 08:24 uevent
-rw-r--r-- 1 root root 4096 2025-08-29 08:24 value
rk3588_t:/sys/class/gpio/gpio132 # cat direction
in
rk3588_t:/sys/class/gpio/gpio132 # cat value
0
rk3588_t:/sys/class/gpio/gpio132 #
rk3588_t:/sys/class/gpio/gpio132 # echo out >direction
rk3588_t:/sys/class/gpio/gpio132 # cat direction
out
rk3588_t:/sys/class/gpio/gpio132 # cat value
0
rk3588_t:/sys/class/gpio/gpio132 #
rk3588_t:/sys/class/gpio/gpio132 # echo 1 > value
rk3588_t:/sys/class/gpio/gpio132 # cat direction
out
rk3588_t:/sys/class/gpio/gpio132 # cat value
1
rk3588_t:/sys/class/gpio/gpio132 #
C:\Users\QQ>


参考资料:
百度:RK3588 适配GPS模块
rk3588 适配gps模块
RK3588 android14 GPS 步骤
RK3588 gps so库文件


https://blog.csdn.net/qiuzw2003/article/details/128788499
RK3588 Android 12 北斗模块调试


https://blog.csdn.net/lijunjun1120/article/details/108804295?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ECtr-3-108804295-blog-132509980.235%5Ev43%5Epc_blog_bottom_relevance_base5&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ECtr-3-108804295-blog-132509980.235%5Ev43%5Epc_blog_bottom_relevance_base5&utm_relevant_index=6
【RK3128】RK平台ME3630模块GPS移植调试
https://blog.csdn.net/lijunjun1120/article/details/108804295

4、开启android gps支持(rk3128默认没有开启)
方法一:(推荐)
device/rockchip/common/BoardConfig.mk文件中,
# product has GPS or not
BOARD_HAS_GPS := true    (false 改为 ture)(使支持gps)
方法二:(不推荐)
device/rockchip/common/device.mk +340
将红框false改为ture


https://blog.csdn.net/YY2065/article/details/115707807?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-115707807-blog-108804295.235^v43^pc_blog_bottom_relevance_base5&spm=1001.2101.3001.4242.1&utm_relevant_index=3
【RK3288】gps调试
https://blog.csdn.net/YY2065/article/details/115707807


https://blog.csdn.net/weixin_37636519/article/details/132509980
RK3588 移植中科微GPS驱动


【付费】
https://blog.csdn.net/weixin_45422521/article/details/125810128?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-9-125810128-blog-108804295.235^v43^pc_blog_bottom_relevance_base5&spm=1001.2101.3001.4242.6&utm_relevant_index=12
RK3568 Android 11添加EC20模块的GPS功能


https://blog.csdn.net/BeiJingXunWei/article/details/141282662?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-141282662-blog-108804295.235^v43^pc_blog_bottom_relevance_base5&spm=1001.2101.3001.4242.2&utm_relevant_index=4
【迅为电子】RK3568驱动指南|第十七篇 串口-第203章 GPS模块编程


https://doc.embedfire.com/linux/rk356x/quick_start/zh/latest/lubancat_rk_software_hardware/hardware/gps/gps.html
LubanCat-RK3562/RK3566/RK3568系列板卡快速使用手册
23. GPS

23.3.2. NMEA 解码库
了解了 NMEA 格式有之后,我们就可以编写相应的解码程序了,而程序员 Tim(xtimor@gmail.com)提供了一个非常完善的 NMEA 解码库,在以下网址可以下载到:http://nmea.sourceforge.net/ ,直接使用该解码库,可以避免重复发明轮子的工作。 在野火提供的 GPS 模块资料的“NMEA0183 解码库源码”文件夹中也包含了该解码库的源码, 野火提供的 程序就是使用该库来解码 NMEA 语句的。

该解码库目前最新为 0.5.3 版本,它使用纯 C 语言编写,支持 windows、 winCE 、UNIX 平台,支持解析 GPGGA, GPGSA,GPGSV,GPRMC,GPVTG 这五种语句(这五种语句已经提供足够多的 GPS 信息),解析得的 GPS 数据信息以结构体存储,附加了地理学相关功能,可支持导航等数据工作,除了解析 NMEA 语句,它还可以根据随机数产生 NMEA语句,方便模拟。 在该解码库之上, 野火扩展了其对 NMEA-0183 4.0 版本的支持。

23.4. 在鲁班猫上使用 BH-ATGM332D 模块
本次实验以LubanCat-1N板卡演示,测试系统为Debian。

23.4.1. 更新软件源列表
sudo apt update
23.4.2. 手动安装相关的依赖包
sudo apt install git make gcc
23.4.3. 拉取 nmealib 仓库
nmealib 仓库已经发布在github与gitee上,野火对改库进行了修改,以支持解析 NMEA-0183 4.0 协议。

从 github 拉取 nmealib 仓库:

git clone https://github.com/Embedfire/nmealib.git
从 gitee 拉取 nmealib 仓库:

git clone https://gitee.com/Embedfire/nmealib.git


https://wiki.t-firefly.com/GNSS/gnss.html
GPS
一、产品介绍


https://www.bilibili.com/video/BV1gfuQzTEVB/?vd_source=4a6b675fa22dfa306da59f67b1f22616
Linux驱动开发—GPS模块(方法适用于RK3568、RK3588、RK3506等)


https://blog.csdn.net/yjz_0314/article/details/134142847
Android11.0系统中适配EC20模块4G及GPS功能


https://www.cnblogs.com/wmc245376374/p/18909180
RK3588 Android14 EG25-G模块GPS调试

realme GT NEO5使用GPS test的对比测试效果:

http://www.xdnf.cn/news/1388089.html

相关文章:

  • STM32项目分享:基于单片机的自行车测速系统设计
  • C++ DDS框架学习
  • 【前端教程】用 JavaScript 实现4个常用时间与颜色交互功能
  • mysql安全运维之常见攻击类型与防御指南-从SQL注入到权限提升
  • iOS 文件管理与 uni-app 性能优化实战 多工具协作的完整指南
  • 知识卡片html5动态网页源码
  • 2025-08-28-zabbix5.0创建监控项通过脚本简单实现监控oracle11g的磁盘组和表空间的使用量
  • 【从零开始搭建你的 AI 编程助手知识库】
  • Docker的常用命令及简单使用
  • 微积分 | 积分代换
  • 探索永洪vividime的超链接功能:数据分析的桥梁
  • C# NET5.0及以上版本中如何处理MySQL大数据查询
  • 数据防泄与最小可见:ABP 统一封装行级安全(RLS)+ 列级脱敏
  • Go对接全球期货数据源指南:基于StockTV API实现多品种实时监控
  • whisper-large-v3 模型
  • Rust Tokio异步任务实战教程(高级功能)
  • 【前端教程】二维数组排序实战:按需封装才是最优解——拒绝冗余,精简代码
  • Rust语言能干什么
  • PHP的uniqid() 函数分析
  • LangChain实战(二):环境搭建与Hello World(国内开源模型版)
  • 嵌入式Linux驱动开发 - 并发控制机制
  • 【开题答辩全过程】以 基于Spring Boot的网上家庭烹饪学习系统的设计与实现为例,包含答辩的问题和答案
  • 不止 ChatGPT:多模态 AI(文本 + 图像 + 音频)正重构内容创作全流程
  • 以技术赋能强化消费者信任,助推餐饮服务质量提质增效的明厨亮灶开源了
  • [密码学实战]基于SM2实现协同签名(四十五)
  • 微算法科技(NASDAQ:MLGO)一种基于FPGA的Grover搜索优化算法技术引领量子计算
  • QT5.14.2、CMake 扩展openCV
  • JVM_JMM
  • 面试八股文之——JVM与并发编程/多线程
  • Python Imaging Library (PIL) 全面指南:PIL基础入门-构建简易图像编辑器