Firefly开源社区

打印 上一主题 下一主题

[Android] Uart4是不是被其他模块占用了?

136

积分

0

威望

0

贡献

技术小白

积分
136

Uart4是不是被其他模块占用了?

发表于 2018-5-3 10:02:23      浏览:7697 | 回复:7        打印     [复制链接] 楼主
使用android7.1
控制uart4的时候,发现波特率老是被修改为9600,是不是被其他模块占用了,要如何修改?
01-18 09:25:53.685   410   947 E u-blox  : ubx_thread: read error 0
01-18 09:25:53.686   410   947 V u-blox  : connectReceiver: Open/Reopen the serial port
01-18 09:25:53.686   410   947 V u-blox  : CSerialPort::openSerial: Serial port opened, fd = 166
01-18 09:25:53.686   410   947 V u-blox  : connectReceiver: Init receiver
01-18 09:25:53.686   410   947 V u-blox  : CUbxGpsState::powerOff: placeholder for power OFF function
01-18 09:25:53.686   410   947 V u-blox  : CGpsIf::gpsStatus: current GPS status: (still) 4 (GPS_STATUS_ENGINE_OFF)
回复

使用道具 举报

136

积分

0

威望

0

贡献

技术小白

积分
136
发表于 2018-5-3 17:30:08      沙发
rk3399的4G容量开发板
尝试wike如下修改还是不行
3.3 修改方法
3.2中的固件默认是支持GPS的,而公版固件默认关闭该功能。用户可以根据需要修改/system/build.prop里面ro.factory.hasGPS参数(false/true),实现禁止或者使能GPS功能,改完之后需要重启机器才会生效。
可以查看到ro.factory.hasGP已经修改为false了,但ttyS4操作时还是会失效,日志如下:
01-18 08:51:00.049   400   954 E u-blox  : ubx_thread: read error 0
01-18 08:51:00.049   400   954 V u-blox  : connectReceiver: Open/Reopen the serial port
01-18 08:51:00.049   400   954 V u-blox  : CSerialPort::openSerial: Serial port opened, fd = 166
01-18 08:51:00.049   400   954 V u-blox  : connectReceiver: Init receiver
01-18 08:51:00.049   400   954 V u-blox  : CUbxGpsState::powerOff: placeholder for power OFF function
01-18 08:51:00.049   400   954 V u-blox  : CGpsIf::gpsStatus: current GPS status: (still) 4 (GPS_STATUS_ENGINE_OFF)
可见,gps服务还是在工作
是否还要修改什么地方?谢谢!
回复

使用道具 举报

136

积分

0

威望

0

贡献

技术小白

积分
136
发表于 2018-5-3 19:48:25      板凳
加上以上修改后,还是会有相同的问题,波特率被修改回9600。出错时会有如下日志打印:
01-18 13:55:27.585   603  1264 E u-blox  : ubx_thread: read error 0
01-18 13:55:27.586   603  1264 V u-blox  : connectReceiver: Open/Reopen the serial port
01-18 13:55:27.586   603  1264 V u-blox  : CSerialPort::openSerial: Serial port opened, fd = 165
01-18 13:55:27.586   603  1264 V u-blox  : connectReceiver: Init receiver
01-18 13:55:27.586   603  1264 V u-blox  : CUbxGpsState::powerOff: placeholder for power OFF function
01-18 13:55:27.586   603  1264 V u-blox  : CGpsIf::gpsStatus: current GPS status: (still) 4 (GPS_STATUS_ENGINE_OFF)
是否应考虑将GPS的服务关闭?该如何操作?谢谢!
回复

使用道具 举报

136

积分

0

威望

0

贡献

技术小白

积分
136
发表于 2018-5-4 10:28:34      地板
修改了device/rockchip/rk3399/gps/u-blox.conf这个文件,
修改为SERIAL_DEVICE           /dev/ttyUSB4
这样log会一直打印找不到串口
01-18 08:58:35.757   597  1273 V u-blox  : connectReceiver: Open/Reopen the serial port
01-18 08:58:35.757   597  1273 E u-blox  : CSerialPort::openSerial: Cannot open serial port /dev/ttyUSB4, return -1 0
01-18 08:58:35.757   597  1273 V u-blox  : CGpsIf::gpsStatus: current GPS status: (still) 4 (GPS_STATUS_ENGINE_OFF)
01-18 08:58:35.757   597  1273 E u-blox  : connectReceiver: Failing to reopen the serial port
有没有办法可以完全关闭他呢?
谢谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表