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?
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.
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.
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.
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.
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:
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.
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:
Latest Raspbian Stretch, 2.4 June 2018. update, upgrade
install Dexter Libraries & stuff using the curl method
Update the grovePi firmware.
turn off Bluetooth on the upper right
open raspi-config
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.
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.
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.
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
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 ?.