GPS Module

edited January 2019 in User projects

Hi all,

I'm playing a little bit with the Raspberry PI and found Emteria while searching for information about the Raspberry.
Good job !
It runs almost stable and I was able to install Google Play.

Now I'm interested to use the tiny Raspberry as navigation system in the car. Unfortunatelly GPS dosn't work. I connected a GPS Mouse via USB and the installed TomTom App dosn't found the GPS module.

Is there any possibility to get GPS working?

Regards
Supergrobi

Tagged:
«1

Comments

  • Hi Supergrobi. Thanks for your feedback. Can you please elaborate on "it runs almost stable"? What exactly is bothering you?

    We have no experience with (USB-connected) GPS modules. If the module isn't detected at all, there is probably a driver missing. If it is detected by the Linux kernel, but not by Android, it's probably HAL issue. We have no GPS modules here to test, so if you happen to find out what is causing the problem earlier than we do, we will be happy to fix it.

  • Hi,

    I have sometimes trouble with installing Apps from Google Play. During downloading the App the Raspberry stops working. After a reboot the installation goes on and works well. Happened 2 times until now.
    But it could be that I made a mistake. I'm totally unexperienced with Android.

    Regarding the GPS Module: Do I understand you right that USB GPS Modules are supported by Emteria if the driver is included in the Linux Kernel?
    If so I will buy a other Module and try it again. Do RS232 Modules work as well?

  • Well, we have little impact on the GApps / Google Play installation flow. Maybe it is a memory issue or Google Play Services just need to finish the background initialization.

    Regarding the GPS module, no you don't need to buy a new one. Try finding out what driver is used for this one (how would you use it in Linux) and we will include the driver in the next release. We didn't try any GPS modules so far. Neither USB nor RS232.

  • OK understood :-)
    Under Raspbian Stretch the USB GPS-Mous works fine, so I will find out which driver is needed.
    Thanks for your help!

  • Hi :)
    I have solution how to run Usb gps on android.
    You should try this:
    https://github.com/freshollie/UsbGps4Droid

    I use Holux 215 gps-mouse and all works great.

    Best regards

  • Hi @marciling, thank you very much for your feedback. So you are using this app together with a USB dongle and emteria.OS?

  • Yes :)
    Usb dondle (Holux215) + emteria.os (0.3.0) + usbgps4Droid (2.1.3) works fine.

  • Hi marciling,

    Thanks for this tip :-)
    I have installed the app but it don't work.
    I get the error:
    UsbGps stopped
    Reason: Mock locations disabled in settings

    I have no clue what's a Mock location and what I have to set in the settings that the app will run.

    Has anybody an idea?

    Thanks for help

  • edited October 2017

    @Supergrobi, Go to Settings - Developer options - Select mock location app

    By the way, did you try to search for USB GPS on Google play?
    There are several apps over there, you might find another app that works.

  • @marciling, which navigation app are you using?
    Is it TomTom or Sygic?

  • I use sygic.Usbgps4Droid must be version 2.1.3 because earlier version has problem with new android security level.

  • Hi roxette,

    Thanks for the help with Mock location settings, it worked and the error message is gone.
    Unfortunately I get still no connection to the USB device. I guess my USB GPS mouse is very unique :-) Tomorrow I have a chance to test a different one.
    I will post the result here if it works ore not.

    I installed TomTom just to test it if I'm happy with it. Once I get my GPS working I will see if TomTom is usable on the Raspberry. I'll keep you updated.

  • IT WORKS !!! :-)

    After connecting a different GPS Mouse UsbGps4Droid shows my position.
    Unfortunately TomTom is the opinion that I have deactivated GPS :-(

    Has anybody an idea how I can TomTom teach to use the UsbGps4Droid position?

  • Hi all,

    I installed TomTom completely new and now it works. No clue what went wrong.
    Now I'm happy :-)

    Thanks to all for the excellent help to get the GPS running.

  • @Supergrobi, so now you are happy and willing to purchase a license? :wink:

  • After I have tested the navigation system on the Raspberry and it runs stable we can talk about it :smile:

  • edited November 2017

    Usbgps4Droid app up and running, data coming in from the gps ant. So is there a trick to get it to communicate with other apps? I'm also running a holux 215 ? I've tied several settings with out luck....

  • edited November 2017

    What are the ways i can get GPS data into a Raspberry Pi Android installation . Is the USB route the only way ? Also ,what is the best USB GPS unit for this android Raspberry Pi setup

  • edited November 2017

    @IOTGuru said:
    What are the ways i can get GPS data into a Raspberry Pi Android installation . Is the USB route the only way ? Also ,what is the best USB GPS unit for this android Raspberry Pi setup

    bluetooth_gps.jpg

    No, USB GPS is not the only way.
    I share my old phone integrated GPS module connected to the Raspberry pi via bluetooth :smile:

  • edited November 2017

    sat_fix.jpg

    sat_fix1.jpg

    sat_fix2.png

    GPS satellite fix :smile:

    You need to install Bluetooth GPS Provider on Emteria OS to interact with the phone built-in GPS module.

    By the way i'm not using a Samsung phone as the app claims, that was already explained in another thread LOL.

  • @roxette can you explain what i have to do to use gps position of a old phone to emteria os please ?

  • edited December 2017

    @jonas7782 , it's as described in screenshots.

    • On your phone you install an application that acts as a server to share the integrated GPS module to Emteria OS via bluetooth.
    • On Emteria OS you install Bluetooth GPS Provider app.
    • On Emteria OS, Enable Mock GPS Provider.
      What is your phone brand/model?
  • USBGPS works. Sends data, but applications do not have access. They are inactive while active.
    I tried: Waze, Torque, Navigator, TomTom Go.
    and two USB GPS, but it was both.
    I tried the UsbGps4Droid-2.1.5 program. The program recognized both Gps

  • @roxette now i have iphone 6 ,but i have "old" samsung galaxy s5 that i can use
    thanks for you help i will try :)

  • @jonas7782 , no problem ... if you were able to make it work then please post screenshots to help someone else :smile:

  • Did someone make any effort in using an USB-GPS-Dongle?
    I also tried several APPs and tips but nothing works fine. The tip to set the SELinus on disabled makes no difference.
    I would be pleased if someone could tell how the USB-GPS works stable.

  • A couple of questions, has someone used a gps module for the gpio pins? also, somebody has managed to establish bluetooth connection between raspberry and a mobile xioami?

  • I tried also to use a bluetooth GPS provider on my Redmi 4 but unfortunately none of the apps is working. The apps are not able to access the phone's GPS. I will try to buy a USB GPS and test it.

  • Hi,
    i have a problem to find the USB port with USBGPS4droid and pl2303gpsinfo i cant start it but after a click on start gps he does nothing. every test i have enabled the mock gps for these apps.

  • We have purchased a GPS dongle. It will be tested in the next days

  • edited January 2018

    Can I download your kernel from somewhere? I would like to rebuild it to use my usb gps mouse cp2104. I already did it with my Tinker Board it works realy good, but your Android image much better than Asus.

  • Hey,

    the upcoming Emteria version will have experimental support for GPS mouses.

  • @schake said:
    Hey,

    the upcoming Emteria version will have experimental support for GPS mouses.

    And gps module via GPIO UART?

  • edited January 2018

    Is update 0.5.5 already support USB GPS mouses? I tryed use my mouse, but is't didn't work.

  • Yes, we have included the configuration for this GPS module: http://www.hardkernel.com/main/products/prdt_info.php?g_code=G142502154078

    If you have another one, we have to check how it is exposed to the Android framework. What tty is used? Please provide us more information on how it should be configured. If it doesn't conflict with our current setup, we will be glad to add it in the next release.

  • @schake said:
    Hey,

    the upcoming Emteria version will have experimental support for GPS mouses.

    And gps module via GPIO UART?> @kalkov said:

    Yes, we have included the configuration for this GPS module: http://www.hardkernel.com/main/products/prdt_info.php?g_code=G142502154078

    If you have another one, we have to check how it is exposed to the Android framework. What tty is used? Please provide us more information on how it should be configured. If it doesn't conflict with our current setup, we will be glad to add it in the next release.

    the only difference for the GPIO is that the file to be used is / dev / ttyS0. In fact, I can see the communication in this file, but I can not use it as an Android location system

  • If you said me how i can change the option to select the file to simulate location I could test it.

  • @kalkov said:
    Yes, we have included the configuration for this GPS module: http://www.hardkernel.com/main/products/prdt_info.php?g_code=G142502154078

    If you have another one, we have to check how it is exposed to the Android framework. What tty is used? Please provide us more information on how it should be configured. If it doesn't conflict with our current setup, we will be glad to add it in the next release.

    I have USB GPS mouse like this:
    https://www.amazon.co.uk/Channels-Receiver-SkyTraQ-Venus8-Chipset/dp/B00EDI5M3A

    It used ttyUSB0.

    When i did it with Asus android image for Tinker Board, I just include USB driver in Kernel for my cp210x controller (see attached image).

    Path in kernel: Device Driver => USB support => USB Serial Converter support=> USB cp210x family of UART Bridge Controllers

    After that, my GPS mouse was idetified like ttyUSB0.

  • I'm sorry, don't know how to add image here.

  • i have the cp210 controller, too. but it doesn´t work.
    what i have to do to activate the CP210?
    i´ve the pi3 with cp210 uart and a u blox neo 6m

  • Rafa,

    you need load cp210x.ko file in the system by insmod command, then set the baud rate of yout ttyUSB0 (for me its 4800 baud), after than you can read NMEA data from GPS.

    All this work, but only when l did it manually.

    Mr. Kalkov, what we need to do that our GPS start working after starting Android?

    I tried to use init.d directory, preinstall.sh, install-recovery.sh but nothing works in autostart. Don't understand why.

    All necessary scripts and libraries spelled out and installed.

  • Dear developers of Emteria OS, how to enable script autostart ?

  • Gridlock,

    Do you get Android system simulate gps communication selecting file ttyUSB? Could you say how, I can see NMEA messages in ttySO but I not know this point.

  • edited February 2018

    albdom,

    yes. I used terminal emulater for android.

    What I did:

    First you need download gps.default.so https://github.com/dipcore/gps-glonass-android-driver (can use another one)

    Copy gps.default.so to /system/lib/hw
    set the permission: chmod 644 /system/lib/hw/gps.default.so

    Then load gps driver to the system: insmod /boot/modules/your_driver.ko, for me it was cp210x.ko, so I wrote: insmod /boot/modules/cp210x.ko

    After that type: dmesg | grep usb

    u must see something similar to: "cp210x converter now attached to ttyUSB0"

    Then set a baud speed for your usb gps: stty -F /dev/ttyUSB0 speed XXXXX (for me it was 4800), so i wrote: stty -F /dev/ttyUSB0 speed 4800

    And final: cat /dev/ttyUSB0

    NMEA data must run.

  • Gridlock,

    I can see NMEA message in /dev/ttyS0 because my gps module is connected on gpio via serial. My problem is that I can't select this file in app gpsUsbDroid and I know not how said to Android that select this file yet.

  • edited February 2018

    @Glidlock, you can write your own sh scripts and put them into /data/init.d
    They will be executed during boot. Take a look at existing scripts.

    EDIT: You will find an initialization header with execution trigger in our own scripts. You can replace "boot" by "ready" if you want your script to be executed as soon as the platform finised booting. Otherwise your settings may be overwritten by the boot process.

  • @Glidlock, we will also try to compile drivers for USB cp210x serial devices into our kernel by default.

  • @kalkov what about gps.rpi3.so?

  • What about it? It provides a default HAL for ODROID's USB GPS mouse: https://help.emteria.com/kb/devices-rpi-3#gps

  • 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

Sign In or Register to comment.