Pi GPS Setup

This does not yet work on the Pi 3 due to intense firmware/hardware changes that affected the hardware UART. Please stick to Pi 2 or 'lower' for now!
Once you follow these steps, you will no longer have a log in console on the Serial RX/TX pins, you will have to use a monitor+keyboard or ssh into your Pi! (or remove the HAT and undo the edits)

Set up the Pi to release the console pins

Start by logging into your Pi using a monitor/keyboard or via ssh

Step One: Edit /boot/cmdline.txt

If you are using Raspbian Wheezy or Jessie, enter the following command from the command line:

sudo nano /boot/cmdline.txt

And change:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait


dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

(eg, remove console=ttyAMA0,115200 and if there, kgdboc=ttyAMA0,115200)

Raspbian Wheezy only

Step Two: Edit /etc/inittab

On a Wheezy machine, from the command prompt enter the following command:

sudo nano /etc/inittab

And change:

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100


#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

That is, add a # to the beginning of the line!

Raspbian Jessie

Step Two:

Run the following two commands to stop and disable the tty service:

sudo systemctl stop [email protected]
sudo systemctl disable [email protected] 

Step Three: Reboot your Pi

Run sudo shutdown -h now to shutdown your Pi safely.

Remove power, attach the GPS hat and re-power the Pi

After rebooting the Pi for the above changes to take effect, you can proceed with testing the GPS!

Last updated on 2016-04-18 at 02.47.42 PM Published on 2014-12-26 at 05.22.11 PM