GPS Module

2»

Comments

  • I realized that the problem is gps.rpi3.so

  • We are using the open source GPS implementation from here: https://osdn.net/projects/android-x86/scm/git/hardware-gps/blobs/oreo-x86/gps.c
    If you find any issues with that code, we would be happy to adapt a fix.

  • I do not understand this.
    They said it was necessary to send a new gps.defaukt.so and everything will work.

  • edited November 2018

    Hi All, couple of last weeks I was trying to connect my old USB GPS receiver Navilock with u-blox-5 chipset. I had problem which I described here: https://github.com/kconger/android-serial-gps-driver/issues/3 . Now, I am using fixed GPS driver and it works well and I would like to commit my fix to AOSP codebase. And, I can post fixed gps.rpi3.so somewhere.

  • ...And of course I have fixed gps.c file.

  • @Martin, thank you very much. I will be happy to adopt the changes as soon as they are merged by Keith.

  • Hi @kalkov, Keith merged my modifications to the Master branch today.
  • @Martin, awesome. Thanks for the update.
    I'll test it with emteria.OS next week and include it into the next release if everything goes well.

  • FYI: I added new time_sync functionality to the GPS driver. Description is here: https://github.com/kconger/android-serial-gps-driver/blob/master/README.md

  • edited February 2019

    Greetings,

    I am sorry about upping the thread! I am not very familiar with coding and I am trying to connect my GlobalSat BU353s4 USB (uses PL2303 chip)with my Raspberry. The only way I get data is with PL2303 program.

    I tried editing the build.prop(below) and adding driver to the lib/hw. I did this with Windows EXT mounting software, so I dont know if thats the reason it doesnt work.

    ro.kernel.android.gps=ttyUSB0
    ro.kernel.android.gps.speed=9600
    ro.kernel.android.gps.max_rate=1

    That is the only thing holding me back right now. Next thing will be getting the Waveshare 7inch screen, but I saw it is supported plugNplay.

  • edited February 2019

    Hi. Emteria is built with USB GPS driver by default. This driver is designed for u-blox chipsets, but theoretically it should work with every USB GPS using NMEA protocol. It's possible that your chipset requires some proprietary commands for activating.

    So remove your changes, because original build.prop file contains line "ro.kernel.android.gps=ttyACM0" and name ttyUSB0 is incorrect. Reboot and take a look to the https://forum.emteria.com/discussion/619/time-sync-rasp3-usb-gps#latest . There is description how to test if GPS module is compatible (by app Serial USB Terminal).

  • I reinstalled Emteria, to start clean. Still couldnt get a fix. Using Terminal USB I get only symbols, which dont make sense. I am guessing the character code is not right. I tried changing it from UTF-8 to others, characters change but nothing that makes sense...

    Another thing I take in mind is the system time and date - they are correct, so no problem there.

    I will try this method now:

    @dorfi said:
    You do not need cp210x.ko, also I use ttyUSB0 instead of ttyACM0, so build.prop:
    ro.kernel.android.gps=ttyUSB0
    ro.kernel.android.gps.speed=4800
    ro.kernel.android.gps.max_rate=1

    unplug and plug your GPS mouse back in then dmesg
    you should see:
    ....
    usb 1-1.3: cp210x 1-1.3:1.0: cp210x converter detected
    usb 1-1.3: usb 1-1.3: cp210x converter now attached to ttyUSB0

    Enable Serial
    Edit /boot/config.txt ----> add the line: enable_uart=1
    Edit /boot/cmdline.txt ----> remove the string: console=serial0,115200

    As on https://github.com/dipcore/gps-glonass-android-driver described,
    Downlaod gps.default.so
    Copy gps.default.so to /system/lib/hw
    chmod 777 /system/lib/hw

    Then I have added the script from the github link with the initialization header in /data/init.d/
    in the script change baudrate from 9600 to 4800

    Set permissions for the script:
    chmod 777 /data/init.d/script
    chown root /data/init.d/script
    chgrp root /data/init.d/script

    Reboot

  • One question - Can I initiate these commands from the Pi terminal, or I have to use ethernet?

  • This must be for another Android. Emteria has all these things included. Driver has name gps.rpi.so instead of gps.default.so. Device ttyUSB doesn't exist on Emteria.

    First step is to see NMEA sentences in the Serial USB Terminal. If you don't see them you probably need proprietary driver for your GPS device. Or use some compatible one.

  • edited February 2019

    Thank you for the help, Martin!

    I reinstalled Emteria once again, and installed just the GlobalSat program.
    https://apkpure.com/pl2303-gpsinfo/com.globalsat.android.gps.pl2303.provider

    The GPS module returns signal within the program, here is the log:

    $GPGGA,192836.944,,,,,0,00,,,M,0.0,M,,0000*58 $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPRMC,192836.944,V,,,,,,,240219,,,N*4F $GPGGA,192837.944,,,,,0,00,,,M,0.0,M,,0000*59 $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPRMC,192837.944,V,,,,,,,240219,,,N*4E $GPGGA,192838.944,,,,,0,00,,,M,0.0,M,,0000*56 $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPGSV,3,1,11,31,60,314,,20,48,118,,10,41,158,,21,41,019,*79 $GPGSV,3,2,11,14,32,224,,32,31,201,,25,26,086,,26,14,341,*72 $GPGSV,3,3,11,27,13,284,,12,05,112,,18,00,218,*46 $GPRMC,192838.944,V,,,,,,,240219,,,N*41 $GPGGA,192839.944,,,,,0,00,,,M,0.0,M,,0000*57 $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPRMC,192839.944,V,,,,,,,240219,,,N*40 $GPGGA,192840.944,,,,,0,00,,,M,0.0,M,,0000*59 $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPRMC,192840.944,V,,,,,,,240219,,,N*4E $GPGGA,192841.944,,,,,0,00,,,M,0.0,M,,0000*58 $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPRMC,192841.944,V,,,,,,,240219,,,N*4F $GPGGA,192842.944,,,,,0,00,,,M,0.0,M,,0000*5B $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPRMC,192842.944,V,,,,,,,240219,,,N*4C $GPGGA,192843.944,,,,,0,00,,,M,0.0,M,,0000*5A $GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPGSV,3,1,11,31,60,314,,20,48,118,,10,41,158,,21,41,019,*79 $GPGSV,3,2,11,14,32,224,,32,31,201,,25,26,086,,26,14,341,*72 $GPGSV,3,3,11,27,13,284,,12,05,112,,18,00,218,*46

    If I dont launch the program i cant get a fix. Once I attach the GPS to the program I get an instant fix.s

    I found this neat apk, the process is more seamless.

    https://github.com/freshollie/UsbGps4Droid/releases

    I dont mind having it that way, but it is very inconvenient, because the process is manual...

  • edited February 2019

    I have found why it is not working.

    The module supports Sirf and NMEA, but Sirf is default. Might be the case that its not returning NMEA code without the PL2303 program. Ive read that Sirf still contains NMEA sentences, but i think thats why I get just symbols in Serial USB Terminal. Is there any way to request NMEA from GPS module?

    Other reason could be that the dongle is using 4800 boud. Can I define it in buil.prop with ro.kernel.android.gpsttybaud=4800 ? WIll it change, or it is driver related?

  • Yes this is the case when you need send some command for activating.

    So you have three possibilities:

    1) To modify gps.rpi.so according to GlobalSat documentation.

    2) Use GlobalSat app from one of your previous posts. Assign it as location mock app in the Developer settings and somewhere in settings is possibility to assign autostart apps.

    3) Use another GPS device. I recommend anything with u-blox chipset.

  • edited February 2019

    Thank you very much, Martin! I really appreciate it!

    Great(bad) news!

    I ran SirfDemo(windows program) and changed device mode to NMEA @ 9800

    I ran both cat "/dev/ttyUSB0" and "cat /dev/ttyACM0".

    ACM0 returns error
    USB0 gets isntant NMEA log now :):)

    Any tips how to use USB0.
    buil.prop 'ro.kernel.android.gps=/dev/ttyUSB0" doesnt work.

    I have tried "su gpsd /dev/ttyUSB0 -n -F /var/run/gpsd.sock" but gpsd is not recodnised :(

    If i buy a new dongle with Ublox chip, can it be with USB or its easier to use 5v GND TX/RX on GPIO?

  • edited February 2019

    Gpsd doesn't exist in Android. Android has its own location service and gps.rpi.so library is plugin to it.

    If your device creates ttyUSB, I think that modification of gps.rpi.so is necessary again. But I am not sure, because I have some experience only with ACM ones.

  • edited March 2019

    I got myself an U-Blox USB receiver with 8M chip inside. Working like a charm. Its cheap, but gets GPS data even in my living room. Next stop - LCD.

    Thank you for the help, Martin!

  • Glad to hear it. You are welcome.

  • Hello
    I am busy with the raspberry 3 and I would like to do the emteria on it and of course I need gps then I have neo 6m gps this works like the 8m?
    greet Mathias

  • Hi,
    it could work but it looks as Neo 6m is connected via UART instead of USB. You must make some research regarding used port (maybe ttyS1 ?) and proper bitrate.

  • edited March 2019

    yes exactly he does not use usb I was now the ondoid con polin recommended. it costs 30 eur :( which one do you recommend
    Thank you
    Gruss ais Germany and sorry for my bad English that runs on foogle translate

  • edited April 2019

    Thank you

    I have Ordered :smiley:

    Thx Mathias

Sign In or Register to comment.