GPS Module

2

Comments

  • Hi all! I resolved trouble with connection any gps mice to RPI with emteria os.
    I used old GPS receiver with TTL output, connected to RPI's uart (GPIO pin 10 - RX). Then, i removed from file "cmdline.txt" string about console, like "console=serial0,115200". My receiver works at speed 9600, so, now i can see NMEA flow in /dev/ttyS0.
    Next, i make script file named "99gps", in /data/init.d/. In this script i put strings:

    chmod 777 /dev/ttyS0
    ln -f /dev/ttyS0 /dev/ttyACM0
    chmod 777 /dev/ttyACM0

    As owner for this script i set "system", and all of rights (777)

    After reboot, in terminal by "cat" command, i see NMEA flow at /dev/ttyACM0 too

    Fine!
    Test program "GPS Test" shows me sattelites and my location.

    Profit!

    next, i want to try Ublox 8 receiver (GLONASS + GPS) with TTL output from one famous China shop.

    p.s. sorry for my english :-)

  • edited February 2018

    @Electron said:
    Hi all! I resolved trouble with connection any gps mice to RPI with emteria os.
    I used old GPS receiver with TTL output, connected to RPI's uart (GPIO pin 10 - RX). Then, i removed from file "cmdline.txt" string about console, like "console=serial0,115200". My receiver works at speed 9600, so, now i can see NMEA flow in /dev/ttyS0.
    Next, i make script file named "99gps", in /data/init.d/. In this script i put strings:

    chmod 777 /dev/ttyS0
    ln -f /dev/ttyS0 /dev/ttyACM0
    chmod 777 /dev/ttyACM0

    As owner for this script i set "system", and all of rights (777)

    After reboot, in terminal by "cat" command, i see NMEA flow at /dev/ttyACM0 too

    Fine!
    Test program "GPS Test" shows me sattelites and my location.

    Profit!

    next, i want to try Ublox 8 receiver (GLONASS + GPS) with TTL output from one famous China shop.

    p.s. sorry for my english :-)

    Great job!! I needed it finally!!

  • Finally the solution for GPS via GPIO (UART) need these steps:

    1)
    /\/\/\/\/\/\/\/\
    ENABLE SERIAL/\
    /\/\/\/\/\/\/\/\

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

    2)
    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    CREATE SCRIPT (in folder /data/init.d). For example scriptgps/\
    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    https://drive.google.com/open?id=1DyLQTsck5mzdr9IUpg5f4vzyTolZ-fuy

    3)
    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    GIVE PERMITS, CHANGE USER AND GROUP TO SCRIPT/\
    /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    Commands by SSH (easy form: install app called sshdroid):

    ----> chmod 777 /data/init.d/scriptgps
    ----> chown system /data/init.d/scriptgps
    ----> chgrp shell /data/init.d/scriptgps

    4)
    /\/\/\/\/\
    REBOOT/\
    /\/\/\/\/\

    Thanks to the user @Electron for this solution.

  • So, in latest release 0.5.8, in file /system/build.prop i found a string "ro.kernel.android.gps=ttyACM0". You met with this string, if you tried to use some GPS/GLONASS libraries from github.

    And, i changed ttyACM0 to ttyS0. Plus, i putted a script in to init.d, which gives permissions 755 to /dev/ttyS0.

    It works too!

  • Nice, thanks for sharing!

  • Hi guys,

    I have a USB GPS CP2102 like this one:
    https://www.robotshop.com/eu/fr/module-gps-raspberry-pi.html?gclid=CjwKCAjw7tfVBRB0EiwAiSYGMxVfMkBp4N468mXzyrsW0cbCNL52coioLykBfaqSaavfmazspNUxwxoCNskQAvD_BwE

    I saw Glidlock managed to loag the CP201x driver into the system, but I have no idea how to do it. Can you please help me?
    I would like to use this gps in my car..I tested emteria and everything is working fine except this GPS. Once I will make it work, I'll buy the full licence.

    Thanks

  • @Andybv said:
    Hi guys,

    I have a USB GPS CP2102 like this one:
    https://www.robotshop.com/eu/fr/module-gps-raspberry-pi.html?gclid=CjwKCAjw7tfVBRB0EiwAiSYGMxVfMkBp4N468mXzyrsW0cbCNL52coioLykBfaqSaavfmazspNUxwxoCNskQAvD_BwE

    I saw Glidlock managed to loag the CP201x driver into the system, but I have no idea how to do it. Can you please help me?
    I would like to use this gps in my car..I tested emteria and everything is working fine except this GPS. Once I will make it work, I'll buy the full licence.

    Thanks

    Please look here
    http://pccar.ru/showthread.php?t=18871 (Russian)
    there were some drivers, and for cp2102 too...

  • Hi, everybody. I use Rasp pi 3 for CarPC. There is a problem with the Gnss receiver gn803g gps receiver. Formally, applications see the location, but it constantly disappears every second. What can be done in this situation?

  • @Artur951 said:
    Hi, everybody. I use Rasp pi 3 for CarPC. There is a problem with the Gnss receiver gn803g gps receiver. Formally, applications see the location, but it constantly disappears every second. What can be done in this situation?

    With U-Blox u-center, i tuned my U-blox neo M8N to partially resolve this problem.
    I switched off output of GLONASS data, and changed data rate to 10 hz.
    Situation became better...

  • @Electron said:

    @Artur951 said:
    Hi, everybody. I use Rasp pi 3 for CarPC. There is a problem with the Gnss receiver gn803g gps receiver. Formally, applications see the location, but it constantly disappears every second. What can be done in this situation?

    With U-Blox u-center, i tuned my U-blox neo M8N to partially resolve this problem.
    I switched off output of GLONASS data, and changed data rate to 10 hz.
    Situation became better...

    How did you set up U-blox? I didn't see any settings there. The car speed on the gps periodically disappears and appears.

  • @Artur951 said:

    @Electron said:

    @Artur951 said:
    Hi, everybody. I use Rasp pi 3 for CarPC. There is a problem with the Gnss receiver gn803g gps receiver. Formally, applications see the location, but it constantly disappears every second. What can be done in this situation?

    With U-Blox u-center, i tuned my U-blox neo M8N to partially resolve this problem.
    I switched off output of GLONASS data, and changed data rate to 10 hz.
    Situation became better...

    How did you set up U-blox? I didn't see any settings there. The car speed on the gps periodically disappears and appears.

    In menu View->configuration view (CTRL+F9)-> RATE (Rates)
    Set measurement period to 100 ms
    Also,in NMEA (NMEA Protocol) menu, you can to switch off output of GLONASS data.

  • Hello,

    I am having GPS issues, too. For a car pc project I bought these two devices:

    https://www.amazon.de/gp/product/B00EDI5M3A/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

    https://www.amazon.de/gp/product/B008200LHW/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1

    The second one I bought as I read, that it should be working with Android. I followed this manual, saying I should use the BU-353-S4:

    https://www.tapatalk.com/groups/engineeringdiy/raspberry-pi-3-android-lineageos-kodi-17-gps-navig-t875.html

    I did all steps (not through ADB, but I copied and edited the files manually via SD card reader) as desribed in the linked topic. I does not work. Mock locations are activated - in German its "Choose app for mock locations". Someone here from Germany who can confirm that? There is no other entry for mock locations or GPS...

    Then I read here and tried UsbGps4Droid - it does not work. I can choose my GPS device but it cannot connect.

    Here you are GPS - does not work.

    Usinge Linux (Rasbian Jessie) - it works.

    So can someone please help me?

    Thank you in advance!

    Best regards

    gsfx

  • edited May 2018

    Yesterday my Odroid USB GPS device arrived. A few days before I installed version 0.5.14. The Odroid device did not work. But with GPS UPS IT started working. So I tested the BU-353-S4 and it worked as well with USB GPS. Only the Venus SkyTraq did not work with GPS USB... It seems that the Version 0.5.14 fixed the problems.

    Best regards

    gsfx

  • Hey,
    I am using this usb gps mouse
    https://goo.gl/QxYBD7
    Gps mouse works when using Raspian

    I did the mentioned steps before and "cat /dev/ttyACM0" shows NMEA data, but Apps like "TestGPS" do not get GPS data

    in build.prop I've changed/added following lines:
    ro.kernel.android.gps=/dev/ttyACM0
    ro.kernel.android.gps.speed=4800
    ro.kernel.android.gps.max_rate=1

    When I copy cp210x.ko to /boot/modules and execute
    insmod /boot/modules/cp210x.ko
    I get get "insmod: failed to load /boot/modules/cp210x.ko: Exec format error"

    dmesg shows:
    usb 1-1.3: new full-speed USB device number 8 using dwc_otg
    usb 1-1.3: New USB device found, idVendor=10c4, idProduct=ea60
    usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    usb 1-1.3: Product CP2104 USB to UART Bridge Controller
    usb 1-1.3: Manufactorer Silicon Labs
    usb 1-1.3: SerialNumber: 011807EB
    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

    Logs from logcat
    https://drive.google.com/open?id=1P1vVZE9Evs1BcbvGzRYvmAahF4D8mCH_

  • edited May 2018

    If your system is already able to detect cp210x devices, you don't need to load additional modules (they are probably already included).

    I don't see any GPS-related errors in the logcat. Are you sure your app may access /dev/ttyACM0? Maybe you need to set correct permissions.

  • I had to set root as owner for the script and remove the /dev/ from ro.kernel.android.gps=/dev/ttyACM0
    Works fine now :)

  • Awesome, thanks for sharing!

  • edited May 2018

    @dorfi said:
    I had to set root as owner for the script and remove the /dev/ from ro.kernel.android.gps=/dev/ttyACM0
    Works fine now :)

    Hello Dorfi,

    Interesting news. Just to be sure, your build.prop shows the following lines:

    ro.kernel.android.gps=ttyACM0
    ro.kernel.android.gps.speed=4800
    ro.kernel.android.gps.max_rate=1

    Where did you find the file cp210x.ko? Is this the file where you set the root permission? Did you connect the GPS directly to the USB slot or via adapter to the GPIO connectors?

    Thank you!

    Best regards

    gsfx

  • 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

  • Thank you, dorfi! I tried it, but it refuses to work. But I can live with using two GPS devices, one for Android and one for Linux.

  • Do you get any errors?
    What happens if you manually execute the script

  • @Olexyjunior yes it will work but it's not gonna be plug&play

  • Hi guys, I am a newbie about Emteria, and I want to install a GPS on it for my car. I wanted to know if possible :
    1° which GPS module and antenna are compatible with Emteria
    2° Is it easy to install? There is a procedure somewhere to do this? It would be perfect if there is a tutorial.

    Many thanks for your help :)

  • the main issue is that waze and google maps dont get run correctly

  • @albdom, could you please describe what is the main problem with waze?

  • @kalkov when you are using waze without entering a route it usually works well, but when you enter a route the application is frozen or the route starts and soon after the screen remains black.
  • Hm, interesting... I hope it's not a memory issue.

  • help me please.
    I have three gps modules. all ublox
    the problem is that all three are caught by their partners but they do not fix
    There is no height reading, so there is no fix 3d
    The problem with Ublox in the nmea GPRMC stream is before GPGGA, which contains a quality fix, and the parsing is completed by GPRMC
       need the opposite. help please fix

  • 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 24

    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 24

    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 25

    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 25

    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 26

    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 26

    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.

Sign In or Register to comment.