Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpsinit can't seem to set port baud rate correctly #6

Open
cpaelzer opened this issue May 23, 2018 · 6 comments
Open

gpsinit can't seem to set port baud rate correctly #6

cpaelzer opened this issue May 23, 2018 · 6 comments

Comments

@cpaelzer
Copy link

Hi,
this is disturbingly similar to issue #5 , so maybe my hat is also just damaged - I'm not sure.
It wan't shared in the other issue how the further debugging was done, so I hope to get some insights by filing and discussing a new issue.

I came from adafruit forums and found this great github project here.

I then realized I really need to (re-)initialize my GPS as it is probably a year and 500km out of sync to its last good status it had with a friend of mine. But when I try to initialize I only get this:

$ gpsinit -s 115200 -f gpsinit_reset.conf /dev/ttyAMA0
Making sure the unit is in NMEA mode
Making sure the speeds match
The GPS speed and the port speed couldn't be synchronized.
Retrying
Making sure the speeds match
The GPS speed and the port speed couldn't be synchronized.

I tried to set raw mode if I get anything, but I don't

stty -F /dev/ttyAMA0 raw
tty -F /dev/ttyAMA0 -a
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc
cat /dev/ttyAMA0
<nothing>

So it is just dead - maybe? But I lack a good idea how to check and would be happy about any advice in that regard.

@cpaelzer
Copy link
Author

I thought I found the issue in myself missing the pps-gpio overlay on this new installation.
But with the overlay configured (dtoverlay=pps-gpio,gpiopin=4) and pps-gpio module properly loaded the behavior of /dev/ttyAMA0 in regard to GPS is still the same as before.

@JasonGantner
Copy link

I have a similar issue with RPi 3B+ and raspbian version from about a month + Adafruit Ultimate GPS Hat.
gpsinit often fails but not always.
It seems like there is a mismatch of baud rate between the Pi and the MTK3339 that can't be resolved by gpsinit.
Also, running gpsinit in the startup script of gpsd results to nothing (setting baud rate at 115200 and updates intervals at 10Hz plus some SBAS settings, lauching gpsmon just to find out that it's at 9600 and 1Hz). I was beginning to wonder if GPSD resets the chip and the port at startup thus creating conflict with gpsinit.

@cpaelzer
Copy link
Author

I had it running for ~3hours in a loop now, for me it seems to never work.
I have a Rpi3B (no +) and the same Adafruit Ultimate GPS Hat.

@gtjoseph
Copy link
Owner

Unfortunately, I no longer have a Pi to test with but the scripts still seem to work with the Ultimate GPS breakout module and an x86 host. Let me see if I can borrow a Pi this weekend and test.

@jforhan
Copy link

jforhan commented May 24, 2018

Did you remove the reference to "console" in your "/boot/cmdline.txt"? remove "console=ttyAMA0,115200"

Also make sure the UDEV rules are setup correctly. I have this setup on a RPi3.

Later,
Jeff

@bluepuma77
Copy link

Not sure if this is relevant, but Dragino has a long Wiki page about the RPi3 and serial issues, maybe that applies here, too: Getting GPS to work on Raspberry Pi 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants