可以了
需要修改两个地方
Modify1:GPS串口配置文件/system/etc/u-blox.conf
修改两个位置
1.1:SERIAL_DEVICE,串口号配置,配置为/dev/ttysWK2
1.2:BAUDRATE,波特率配置,因为采购的是非blox,波特率是38400
好了,保存一下。
Modify2:打开GPS功能,修改开发板的文件/system/build.prop里的ro.factory.hasGPS=true
保存一下。
好了,重启一下。
接上GPS模块,cat /dev/ttysWK2,数据出来了:
$GNGLL,2428.7614,N,11809.4673,E,040404.600,A,A*4A
$GNG3,210,213,,,,,,,,,,,1.6,0.8,1.4*25
$GPGSV,4,1,13,02,60,018,16,05,,12,19,241,32,29,14,323,28,15,14,209,35*77
$GPGSV,4,3,13,30,11,10,075,29*40
$BDGSV,3,1,12,227,86,000,,206,62,180,,208,59,031,,216,09,37,197,*6B
$BDGSV,3,3,12,228,36,138,,204,36,115,,230,31,321,,20,000.0,280919,,,A*76
$GNVTG,000.0,T,,M,000.0,N,000.0,K,A*13
$GN11809.4673,E,1,13,0.8,39.3,M,10.5,M,,0000*76
$GNRMC,040404.800,A,2$GNGGA,040405.000,2428.7614,N,11809.4673,E,1,13,0.8,39.3,M,10.5,M,,280919,,,A*71
,0000*7D
$GNRMC,040405.200,A,2428.7614,N,11809.4673,E,000.0,000.0$GNGGA,040405.400,2428.7614,N,11809.4673,E,1,13,0.8,39.3,M,10.5,M,,0000*7B
$GNRMC,040405.400,A,2428.7614,N,11809.4673,E,000.0,000.0$GNGGA,040405.600,2428.7614,N,11809.4673,E,1,13,0.8,39.3,M,10.5,M,A,A,3,05,25,15,06,12,29,19,07,02,13,17,,1.6,0.8,1.4*27
$GNGSA,A,3,210,213,,,,,,,,,,,1.6,0.8,1.4*25
$GNRMC,040405.600,A,2428.7614,N,11809.4673,E,000.0,000.0,280919,,,A*77
$GNVTG,000.0,T,,M,000.0,N,$GNGGA,040405.800,2428.7614,N,11809.4673,E,1,13,0.8,39.3,M,10.5,M,,0000*77
$GNRMC,040405.800,A,2428.7614,N,11809.4673,E,000.0,000.0,$GNGGA,040406.000,2428.7614,N,11809.4673,E,1,13,0.8,39.3,M,10.5,M,,280919,,,A*72
,0000*7E
打开开发板上安装的GPS工具箱app,提示发现卫星13颗。
感谢jpchen的指导。
|