Grovepi GPS not providing any data

I have been trying to get this to work for over a week now, with two GPS modules and two different GrovePi boards, just in case the RPiser connection is faulty.

This is the latest Raspbian Stretch, and a fresh install of grovepi libraries using curl.

When I ran the various GPS test programs for python, I have modified them with brackets to allow for the changes in python3. I am usually using thonnyIDE. I have not touched UART in the config file, even though some articles discussing the GPS have indicated that is a solution (but I see no information on Seeed or Dexterind about this).
I ‘do’ know that accessing the GPS will disable a Bluetooth mouse if one is connected, and that is an indication of AMA0 conflicts (?!?)

I am getting nothing from these GPS modules, absolutely nothing. How can I make these devices work the way they are intended to?

Hi @gstraath,

I think you’re talking about this library we have, right?

If so, I remember having it fixed last year - probably something changed since then. I’ll have a look at it tomorrow when I’ll do the barometric sensor too.

Thank you!

yes, that is the library I am using. I have had to wrap most print commands in parenthesis. I am not getting anything from the GPS, however. I have tried two GPS units and two grovepi boards with no data, inside or outside.

Hi @gstraath,

Judging the response I got from you on the other thread, I think you’re using Python 3, in which case you might want to use this library instead:

gps.py (6.9 KB)

Run it and see if it works. If it does, we’ll replace the current one with this one on our repo.

Thank you!

lines 180 and 195 (perhaps others) are giving an “invalid syntax” error. Are you using a python library that should handle this format?

line 180:

return f"{degrees}*{minutes}'{seconds:{2}.2f}"
(I don't know how to type the little circle thingie)

line 195

return f"{self.timestamp[:2]}:{self.timestamp[:2:4]}:{self.timestamp[4:6]}"

my google-fu is lacking to try to find a solution for this kind of statement.

ah, nevermind. it seems this new formatting concept is a new thingie in python 3.6. The version included with the current Raspbian is 3.5.

from here: https://stackoverflow.com/questions/5082452/python-string-formatting-vs-format

specifically:

As of Python 3.6 (2016) you can use f-strings to substitute variables:
>>> origin = "London"
>>> destination = "Paris"
>>> f"from {origin} to {destination}"
'from London to Paris'
Note the f" prefix. If you try this in Python 3.5 or earlier, you'll get a SyntaxError.
See https://docs.python.org/3.6/reference/lexical_analysis.html#f-strings

I have compiled 3.6 but cannot run this program at this time. I would suggest you aim for python 3.5 for now as that is what the vanilla Raspbian installation has, and it should be your lowest common denominator.

I have bought a new raspberry pi, just in case there was some kind of communications error, also a new non-bluetooth keyboard (logitech) to avoid the ttyAMA0/bluetooth problems.

So far I have tried two groveGPS sensors, two grovePi boards and two raspberry pi computers. The hardware test, simply printing what is coming directly form the GPS as data has nothing.

This current setup is vanilla raspbian stretch with Adafruit_Python_GPIO installed and Adafruit_Python_BME280 to get barometer information.

This ‘should’ work, right? I have not touched the UART for raspbian stretch as that solution was from a few years ago.

any insight would help. I can get data from the light sensor, sound level, temp.humidity/barometer280, displaying the GPS on the groveLCD but I get nothing from the groveGPS.

I have just tested this with a fresh install of the latest Raspbian for Robots and am still getting nothing.

from both sensors. from both boards, from both groveGPS units, tested outside.

Can you tell how frustrating this is? Two grovePi’s, two groveGPS, two raspberry pi’s and I still don’t have any GPS coordinates.

Hi @gstraath,

Yeah, those f-strings come with version 3.6 of Python. I guess the Python foundation is trying to replicate what Javascript has. Again, this library I have handed over to you is out of the public sight, so that’s why we took the liberty in going forward.

Anyway, the moment I have some spare time on my hands I’ll have that tested again on Raspbian For Robots. There’s must be something going bad on your setup because we can assure you this library works with the GPS - with that being said, we’ll still test it - maybe there’s something very specific to your configuration that messes this up.

Thank you!

1 Like

Hello @gstraath
Are you running you a Pi3B+, or a Pi3B ?
Either way, the serial port is taken by the Bluetooth antenna and has to be reconfigured for the miniserial.
You should have the following lines in your /boot/config.txt file:

dtoverlay=pi3-miniuart-bt
dtoverlay=pi3-disable-bt
enable_uart=1

This one: dtoverlay=pi3-disable-bt is not strictly mandatory, but is safest to have, at least until you get the GPS configured. Then you can try without that line if you need bluetooth.

Cleo

1 Like

hello RobertLucien and Cleoqc … thank you for dealing with my frustrations. I found a solution after a lot of experimenting which gives me the GPS coordinates without having to rely on extraneous items. I have not tested this with Raspbian for Robots (which did not work out of the box, sadly)

Here is what I have done:

  1. Latest Raspbian Stretch, 2.4 June 2018. update, upgrade
  2. install Dexter Libraries & stuff using the curl method
  3. Update the grovePi firmware.
  4. turn off Bluetooth on the upper right
  5. open raspi-config
  6. interfacing options -P6 serial - no to login shell - yes to hardware port enabled.

in the grove_gps_hardware_test.py code, change ttyAMA0 to serial0.

ser = serial.Serial('dev/serial0', 9600, timeout = 0)

Use decode, as in
ch=ser.read.decode()

there was some confusion as the latest Raspbian python (3.?) would say TypeError: can’t convert ‘bytes’ object to str implicitly
Changing rv="" to rv=b"" would solve that problem, but the information could not be parsed as a string since rv was now a byte. Adding decode changes the serial byte info to a string, letting it be parsed.

The library I used was the groveGPS with these changes. It seems to work. It was the easiest to understand for myself.

I am unsure if this is the best way to solve this problem but it appears to work for me. It may not for those who want to log in using serial…

Sorry for being such a jerk over the past two weeks.
Gerry.

You were not a jerk, Gerry. You were right to be frustrated.

Disabling bluetooth via the GUI or via the config.txt as I posted are the same thing.

I see you are now using Serial0, it is not as fast as AMA0 but if you’re happy with it, do keep it.

With dtoverlay=pi3-miniuart-bt I was swapping the two serial ports, assigning the weaker one to bluetooth (as it’s not being used) and keeping the faster one for the GPS.

Those changes are due to the arrival of Bluetooth on the Pi, it seems we never updated the GPS module accordingly. Nostra culpa. Not only did we not update the documentation, but totally forgot about this issue when you asked for help. I really dropped the ball on this one.

The rest of the issues are related to Python2 vs Python3 and you figured them out. Thanks for coming back here and letting us know how you fixed them.

Cleo.

Hi Everyone

I am facing the exact same problem, I have tried running all of the libraries 1 by 1 in grove_gps directory but I do not see any output.

My setup is follows

  • Latest Raspbian Stretch
  • Raspberry PI 3 model b board
  • Updated the grovePi firmware.
  • turned off Bluetooth through GUI
  • tried running using both python2 and python 3
  • interfacing options -P6 serial - no to login shell - yes to hardware port enabled.

I still do not see any gps values, I live on the top floor of my house and have the gps module directly beneath my window.

On a seperate but more important note , I was wondering if it is possible to have a NodeJS implementation for GPS module, or could you guys guide me to another NodeJS sensor which is similar to GPS module whose code i can adapt, I was looking through the NodeJS library and could not find any sensor that dealt with serial ports.

Hi @rameez.saleem,

From my experiments, I noticed having problems with the GPS when indoors - just sometimes not always.

The story goes like this: once I go outside (and be sure there are no clouds) I would get a locked signal to a couple of satellites - and then going back into the house would not make the GPS to loose the signal - as opposed to starting it inside.
So starting it inside presents a lower chance of getting a locked signal compared to staying outside. Which is quite normal of a GPS.

And regarding it, I don’t think the GPS is to be blamed here. I still think the serial doesn’t work on your Pis for some reason. I’ve had this happen to me too and it was quite infuriating - I realized it didn’t work by attaching a logic analyzer to the serial ports.

Thinking about it, you might want to connect the serial lines together (the TX and RX) of the Raspberry Pi, send a command through the serial line and see if you get the ping back. If it doesn’t, then the serial line on your Pi isn’t working.

Let us know how it goes for you.

Thank you!

I am using wifi on my raspberry Pi to connect to the internet could it be blocking or interfering with the GPS module as was the case with bluetooth ?

It would be helpful if GPS module gave some sort of indication that it was working and communicating with the rasoberryPI correctly, i.e. sending something like “Searching for Satelite signal” to the console. This way it would be much easier for us to debug the issue. Right now any one facing issues have to rule out all possible scenarios one by one i.e. check serial port communication on the PI, check for Signal issues etc, I think as a future improvement suggestion could it be made so that if there is successful communication between the PI and GPS module we get some thing on the console i.e. “Searching for GPS signal” etc

Hi @rameez.saleem ,

I guess something more simple and more reliable would be to add 2 LEDs for each transmit/receive line instead of a more complicated feedback loop.

As for the WiFi, you can rule it out as being the signal to interfere/block the GPS module.

Let me know how the tests go out for you.

Thank you!

If you’re running on a Raspberry Pi 3, you have to swap the two serial ports. It used to be that the Pi only had one, now it has two.

Did you put these lines in your /boot/config.txt file?

dtoverlay=pi3-miniuart-bt
dtoverlay=pi3-disable-bt
enable_uart=1

Hi cleoqc

Yes I already tried adding these line in /boot/config.txt
I am attaching screen shot of all my setting below, as you can see Bluetooth is off and the above mentioned lines are added in the pi still i do not see anything in console for grove_gps_hardware_test.py. I have connected the gps module to the RPISER port of the grovePI, is that the correct port ?.
ss