ennalta
Posts: 1
Joined: Mon Sep 12, 2016 3:17 am

Need help with GPS on Rpi3

Mon Sep 12, 2016 3:27 am

I am building a carputer (like everyone else) with a RPi3 and a 7" touchscreen. My problem comes with the GPS integration.

I am using a GPS that I have used on arduinos many times, LS20031, but I can not get any output from it. I have checked and rechecked my wiring, tried two different GPS units and still no output in minicom or GPSD. I also wired it into an arduino nano to check that it was functional.

I have the positive to the 3.3v, RX to TX, TX to RX and ground to, well ground.

MY guess is that something in Rasbian Jessie is blocking this but not quite sure. Would anyone have any thoughts on this?

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Need help with GPS on Rpi3

Mon Sep 12, 2016 11:28 am

You may need to enable the serial uart on the Pi3 and ensure that kernel console logging and the console login are disabled. You may also need to apply some config for the Pi3 UART to ensure it runs at the right speed.

Likely settings for fixing the speed and enabling the uart are in /boot/config.txt. You then might need to edit /boot/cmdline and disable/mask the systemd services for the console logging / terminal.

Sorry it's not something I've done on the Pi3, or jessie so I'm not sure what thing you need to tweak, but there should be plenty of guidance on this forum if you have a search.

dgordon42
Posts: 788
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Need help with GPS on Rpi3

Mon Sep 12, 2016 12:36 pm

To get the serial port working on the Pi 3B:-

Make sure that you are running the latest version of Raspbian with:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
and follow the prompts.

Add the line "enable_uart=1" to the end of the file '/boot/config.txt'. Make sure that this file does not contain any other lines relating to the uart with the command:

Code: Select all

grep uart /boot/config.txt
If you find any other uart lines, comment them out.

Remove the phrase "console=serial0,115200" from the file '/boot/cmdline.txt'. This file must only contain 1 line, do not split the line when editing, and do not add comments.

Reboot.

You should refer to the Serial Port in code as "/dev/serial0", that's serialZero, not serialOh!

If you are using sample code that came with your GPS, or code from the internet, you should changes all occurrences of Serial Port names such as "/dev/ttyAMA0" to "/dev/serial0" in that code.

Hope this helps,
Dave.

Return to “Advanced users”