bcm4752 gps调试


分类: linux   457人阅读  评论(0)  收藏  举报


1.拷贝下列文件

从原厂获取下列文件,拷贝到system里

/system/bin/gpsd
/system/bin/gpslogd
/system/lib/hw/gps.default.so
/system/etc/gps/gps.xml
/system/etc/gps.conf

在device.mk里

PRODUCT_COPY_FILES += \
        device/samsung/avl5260/gps.conf:system/etc/gps.conf \
        device/samsung/avl5260/gpsd:system/bin/gpsd \
        device/samsung/avl5260/gpslogd:system/bin/gpslogd \
        device/samsung/avl5260/gps.xml:system/etc/gps/gps.xml
PRODUCT_COPY_FILES += \
        device/samsung/avl5260/gps.default.so:system/lib/hw/gps.default.so


2.配置接口

acPortName="/dev/ttySAC1" //串口,波特率不用care
gpioNStdbyPath="/sys/devices/platform/bcm4752_gps/gps_on_off" //power_en 信号,提供接口给应用层
RfType="GL_RF_4752_BRCM_EXT_LNA"


gps.xml:

       acPortName="/dev/ttySAC1"
       lBaudRate="921600"
       cLogEnabled="true"
       acLogDirectory="/data/gps/log/" 
       acNmeaOutName="/data/gps/gpspipe"
       ctrlPipe="/data/gps/glgpsctrl"
       acNvStoDir="/data/gps/"
       gpslogdPipePath="/data/gps/.gpslogd.pipe"
           
       Log="FILE"


       gpioNStdbyPath="/sys/devices/platform/bcm4752_gps/gps_on_off"


3.init.rc

init.xxx.rc
# For GPIOs for REG_PU

chown gps system /sys/devices/platform/bcm4752_gps/gps_on_off
# For NVRAM data of gps daemon
mkdir /data/gps 775 system system
chown system system /data/gps
# For serial port.
chown root system /dev/ttySAC1
chmod 0770 /dev/ttySAC1
# Run service
service gps-daemon /system/bin/gpsd -c /system/etc/gps/gps.xml
class main
socket gps seqpacket 0660 gps system
socket rilgps.socket seqpacket 0660 gps system
user gps
group system inet sdcard_rw Confidential


4.test

using gpstest.apk to test
gps log patch: /data/gps/log/.
logcat | grep -i  "gps"

adb pull /data/gps/log

你可能感兴趣的:(linux)